1 // min-lldb-version: 310
5 // === GDB TESTS ===================================================================================
9 // gdb-command:print three_simple_structs
10 // gdbg-check:$1 = {x = {x = 1}, y = {x = 2}, z = {x = 3}}
11 // gdbr-check:$1 = struct_in_struct::ThreeSimpleStructs {x: struct_in_struct::Simple {x: 1}, y: struct_in_struct::Simple {x: 2}, z: struct_in_struct::Simple {x: 3}}
13 // gdb-command:print internal_padding_parent
14 // gdbg-check:$2 = {x = {x = 4, y = 5}, y = {x = 6, y = 7}, z = {x = 8, y = 9}}
15 // gdbr-check:$2 = struct_in_struct::InternalPaddingParent {x: struct_in_struct::InternalPadding {x: 4, y: 5}, y: struct_in_struct::InternalPadding {x: 6, y: 7}, z: struct_in_struct::InternalPadding {x: 8, y: 9}}
17 // gdb-command:print padding_at_end_parent
18 // gdbg-check:$3 = {x = {x = 10, y = 11}, y = {x = 12, y = 13}, z = {x = 14, y = 15}}
19 // gdbr-check:$3 = struct_in_struct::PaddingAtEndParent {x: struct_in_struct::PaddingAtEnd {x: 10, y: 11}, y: struct_in_struct::PaddingAtEnd {x: 12, y: 13}, z: struct_in_struct::PaddingAtEnd {x: 14, y: 15}}
22 // === LLDB TESTS ==================================================================================
26 // lldb-command:print three_simple_structs
27 // lldbg-check:[...]$0 = { x = { x = 1 } y = { x = 2 } z = { x = 3 } }
28 // lldbr-check:(struct_in_struct::ThreeSimpleStructs) three_simple_structs = { x = { x = 1 } y = { x = 2 } z = { x = 3 } }
30 // lldb-command:print internal_padding_parent
31 // lldbg-check:[...]$1 = { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } }
32 // lldbr-check:(struct_in_struct::InternalPaddingParent) internal_padding_parent = { x = { x = 4 y = 5 } y = { x = 6 y = 7 } z = { x = 8 y = 9 } }
34 // lldb-command:print padding_at_end_parent
35 // lldbg-check:[...]$2 = { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } }
36 // lldbr-check:(struct_in_struct::PaddingAtEndParent) padding_at_end_parent = { x = { x = 10 y = 11 } y = { x = 12 y = 13 } z = { x = 14 y = 15 } }
38 // lldb-command:print mixed
39 // lldbg-check:[...]$3 = { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 }
40 // lldbr-check:(struct_in_struct::Mixed) mixed = { x = { x = 16 y = 17 } y = { x = 18 y = 19 } z = { x = 20 } w = 21 }
42 // lldb-command:print bag
43 // lldbg-check:[...]$4 = { x = { x = 22 } }
44 // lldbr-check:(struct_in_struct::Bag) bag = { x = { x = 22 } }
46 // lldb-command:print bag_in_bag
47 // lldbg-check:[...]$5 = { x = { x = { x = 23 } } }
48 // lldbr-check:(struct_in_struct::BagInBag) bag_in_bag = { x = { x = { x = 23 } } }
50 // lldb-command:print tjo
51 // lldbg-check:[...]$6 = { x = { x = { x = { x = 24 } } } }
52 // lldbr-check:(struct_in_struct::ThatsJustOverkill) tjo = { x = { x = { x = { x = 24 } } } }
54 // lldb-command:print tree
55 // lldbg-check:[...]$7 = { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } }
56 // lldbr-check:(struct_in_struct::Tree) tree = { x = { x = 25 } y = { x = { x = 26 y = 27 } y = { x = 28 y = 29 } z = { x = 30 y = 31 } } z = { x = { x = { x = 32 } } } }
58 #![allow(unused_variables)]
59 #![feature(omit_gdb_pretty_printer_section)]
60 #![omit_gdb_pretty_printer_section]
66 struct InternalPadding {
76 struct ThreeSimpleStructs {
82 struct InternalPaddingParent {
88 struct PaddingAtEndParent {
109 struct ThatsJustOverkill {
115 y: InternalPaddingParent,
121 let three_simple_structs = ThreeSimpleStructs {
127 let internal_padding_parent = InternalPaddingParent {
128 x: InternalPadding { x: 4, y: 5 },
129 y: InternalPadding { x: 6, y: 7 },
130 z: InternalPadding { x: 8, y: 9 }
133 let padding_at_end_parent = PaddingAtEndParent {
134 x: PaddingAtEnd { x: 10, y: 11 },
135 y: PaddingAtEnd { x: 12, y: 13 },
136 z: PaddingAtEnd { x: 14, y: 15 }
140 x: PaddingAtEnd { x: 16, y: 17 },
141 y: InternalPadding { x: 18, y: 19 },
146 let bag = Bag { x: Simple { x: 22 } };
147 let bag_in_bag = BagInBag {
153 let tjo = ThatsJustOverkill {
163 y: InternalPaddingParent {
164 x: InternalPadding { x: 26, y: 27 },
165 y: InternalPadding { x: 28, y: 29 },
166 z: InternalPadding { x: 30, y: 31 }