brintos

brintos / llvm-project-archived public Read only

0
0
Text · 777 B · 78dbd24 Raw
28 lines · python
1"""2Test the robustness of lldb expression parser.3"""4 5 6import lldb7from lldbsuite.test.lldbtest import *8 9 10class Radar8638051TestCase(TestBase):11    def test_expr_commands(self):12        """The following expression commands should not crash."""13        self.build()14 15        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)16 17        self.runCmd("breakpoint set -n c")18 19        self.runCmd("run", RUN_SUCCEEDED)20 21        self.expect_expr("val", result_type="int", result_value="1")22        self.expect_expr("*(&val)", result_type="int", result_value="1")23 24        # rdar://problem/863805125        # lldb expression command: Could this crash be avoided26        self.expect("expression &val", startstr="(int *) $2 = ")27        # (int *) $2 = 0x....28