1 // This test makes sure that the LLDB pretty printer does not throw an exception
2 // when trying to handle a Vec<> or anything else that contains zero-sized
5 // min-lldb-version: 310
7 // ignore-tidy-linelength
11 // === LLDB TESTS ==================================================================================
14 // lldb-command:print v
15 // lldbg-check:[...]$0 = vec![1, 2, 3]
16 // lldbr-check:(alloc::vec::Vec<i32>) v = vec![1, 2, 3]
17 // lldb-command:print zs
18 // lldbg-check:[...]$1 = StructWithZeroSizedField { x: ZeroSizedStruct[...], y: 123, z: ZeroSizedStruct[...], w: 456 }
19 // lldbr-check:(issue_22656::StructWithZeroSizedField) zs = StructWithZeroSizedField { x: ZeroSizedStruct { }, y: 123, z: ZeroSizedStruct { }, w: 456 }
20 // lldbr-command:continue
22 #![allow(unused_variables)]
24 #![feature(omit_gdb_pretty_printer_section)]
25 #![omit_gdb_pretty_printer_section]
27 struct ZeroSizedStruct;
29 struct StructWithZeroSizedField {
39 let zs = StructWithZeroSizedField {