brintos

brintos / llvm-project-archived public Read only

0
0
Text · 842 B · 448cd5b Raw
30 lines · python
1"""2Test DIL pointer arithmetic.3"""4 5import lldb6from lldbsuite.test.lldbtest import *7from lldbsuite.test.decorators import *8from lldbsuite.test import lldbutil9 10 11class TestFrameVarDILExprPointerArithmetic(TestBase):12    NO_DEBUG_INFO_TESTCASE = True13 14    def test_pointer_arithmetic(self):15        self.build()16        lldbutil.run_to_source_breakpoint(17            self, "Set a breakpoint here", lldb.SBFileSpec("main.cpp")18        )19 20        self.runCmd("settings set target.experimental.use-DIL true")21 22        self.expect_var_path("+array", type="int *")23        self.expect_var_path("+array_ref", type="int *")24        self.expect_var_path("+p_int0", type="int *")25        self.expect(26            "frame var -- '-p_int0'",27            error=True,28            substrs=["invalid argument type 'int *' to unary expression"],29        )30