1 // min-lldb-version: 310
2 // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
4 // ignore-gdb-version: 7.11.90 - 7.12.9
8 // === GDB TESTS ===================================================================================
11 // gdb-command:print u
12 // gdbg-check:$1 = {a = {__0 = 2 '\002', __1 = 2 '\002'}, b = 514}
13 // gdbr-check:$1 = union_smoke::U {a: (2, 2), b: 514}
14 // gdb-command:print union_smoke::SU
15 // gdbg-check:$2 = {a = {__0 = 1 '\001', __1 = 1 '\001'}, b = 257}
16 // gdbr-check:$2 = union_smoke::U {a: (1, 1), b: 257}
18 // === LLDB TESTS ==================================================================================
21 // lldb-command:print u
22 // lldbg-check:[...]$0 = U { a: ('\x02', '\x02'), b: 514 }
23 // lldbr-check:(union_smoke::U) u = { a = { = 2 = 2 } b = 514 }
25 // Don't test this with rust-enabled lldb for now; see
26 // https://github.com/rust-lang-nursery/lldb/issues/18
27 // lldbg-command:print union_smoke::SU
28 // lldbg-check:[...]$1 = U { a: ('\x01', '\x01'), b: 257 }
31 #![feature(omit_gdb_pretty_printer_section)]
32 #![omit_gdb_pretty_printer_section]
39 static mut SU: U = U { a: (1, 1) };
42 let u = U { b: (2 << 8) + 2 };
43 unsafe { SU = U { a: (1, 1) } }