Debian Codegraph @

lldb/test/API/commands/frame/var-dil/expr/PointerArithmetic/TestFrameVarDILExprPointerArithmetic.py

raw
1 """
2 Test DIL pointer arithmetic.
3 """
4
5 import lldb
6 from lldbsuite.test.lldbtest import *
7 from lldbsuite.test.decorators import *
8 from lldbsuite.test import lldbutil
9
10
11 class TestFrameVarDILExprPointerArithmetic(TestBase):
12 NO_DEBUG_INFO_TESTCASE = True
13
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 )