[mlir][PDLL] Allow (and ignore) `-D` tablegen macros. (#124166)
[llvm-project.git] / lldb / test / API / lang / c / parray_vrs_char_array / TestParrayVrsCharArrayChild.py
blob62a493f64e9f82f33393988ec08dd92ded993769
1 """
2 Test that parray of a struct with an embedded char array works.
3 This was failing because the "live address" of the child elements
4 was calculated incorrectly - as a offset from the pointer live
5 address. It only happened for char[] children because they used
6 GetAddressOf which relies on the live address.
7 """
10 import lldb
11 import lldbsuite.test.lldbutil as lldbutil
12 from lldbsuite.test.lldbtest import *
15 class TestParrayVrsCharArrayChild(TestBase):
16 NO_DEBUG_INFO_TESTCASE = True
18 def test_parray_struct_with_char_array_child(self):
19 """This is the basic test for does parray get the char values right."""
20 self.build()
21 self.main_source_file = lldb.SBFileSpec("main.c")
22 self.do_array_test()
24 def do_array_test(self):
25 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
26 self, "Set a breakpoint here", self.main_source_file
29 frame = thread.GetFrameAtIndex(0)
31 self.expect(
32 "expr -Z 3 -- struct_ptr",
33 substrs=[
34 'before = 112, var = "abcd", after = 221',
35 'before = 313, var = "efgh", after = 414',
36 'before = 515, var = "ijkl", after = 616',