2 // min-lldb-version: 310
4 // === GDB TESTS ===================================================================================
8 // gdb-command:print *stack_val_ref
9 // gdbg-check:$1 = {x = 10, y = 23.5}
10 // gdbr-check:$1 = borrowed_struct::SomeStruct {x: 10, y: 23.5}
12 // gdb-command:print *stack_val_interior_ref_1
15 // gdb-command:print *stack_val_interior_ref_2
16 // gdb-check:$3 = 23.5
18 // gdb-command:print *ref_to_unnamed
19 // gdbg-check:$4 = {x = 11, y = 24.5}
20 // gdbr-check:$4 = borrowed_struct::SomeStruct {x: 11, y: 24.5}
22 // gdb-command:print *unique_val_ref
23 // gdbg-check:$5 = {x = 13, y = 26.5}
24 // gdbr-check:$5 = borrowed_struct::SomeStruct {x: 13, y: 26.5}
26 // gdb-command:print *unique_val_interior_ref_1
29 // gdb-command:print *unique_val_interior_ref_2
30 // gdb-check:$7 = 26.5
33 // === LLDB TESTS ==================================================================================
37 // lldb-command:print *stack_val_ref
38 // lldbg-check:[...]$0 = { x = 10 y = 23.5 }
39 // lldbr-check:(borrowed_struct::SomeStruct) *stack_val_ref = (x = 10, y = 23.5)
41 // lldb-command:print *stack_val_interior_ref_1
42 // lldbg-check:[...]$1 = 10
43 // lldbr-check:(isize) *stack_val_interior_ref_1 = 10
45 // lldb-command:print *stack_val_interior_ref_2
46 // lldbg-check:[...]$2 = 23.5
47 // lldbr-check:(f64) *stack_val_interior_ref_2 = 23.5
49 // lldb-command:print *ref_to_unnamed
50 // lldbg-check:[...]$3 = { x = 11 y = 24.5 }
51 // lldbr-check:(borrowed_struct::SomeStruct) *ref_to_unnamed = (x = 11, y = 24.5)
53 // lldb-command:print *unique_val_ref
54 // lldbg-check:[...]$4 = { x = 13 y = 26.5 }
55 // lldbr-check:(borrowed_struct::SomeStruct) *unique_val_ref = (x = 13, y = 26.5)
57 // lldb-command:print *unique_val_interior_ref_1
58 // lldbg-check:[...]$5 = 13
59 // lldbr-check:(isize) *unique_val_interior_ref_1 = 13
61 // lldb-command:print *unique_val_interior_ref_2
62 // lldbg-check:[...]$6 = 26.5
63 // lldbr-check:(f64) *unique_val_interior_ref_2 = 26.5
65 #![allow(unused_variables)]
66 #![feature(omit_gdb_pretty_printer_section)]
67 #![omit_gdb_pretty_printer_section]
75 let stack_val
: SomeStruct
= SomeStruct { x: 10, y: 23.5 }
;
76 let stack_val_ref
: &SomeStruct
= &stack_val
;
77 let stack_val_interior_ref_1
: &isize = &stack_val
.x
;
78 let stack_val_interior_ref_2
: &f64 = &stack_val
.y
;
79 let ref_to_unnamed
: &SomeStruct
= &SomeStruct { x: 11, y: 24.5 }
;
81 let unique_val
: Box
<_
> = Box
::new(SomeStruct { x: 13, y: 26.5 }
);
82 let unique_val_ref
: &SomeStruct
= &*unique_val
;
83 let unique_val_interior_ref_1
: &isize = &unique_val
.x
;
84 let unique_val_interior_ref_2
: &f64 = &unique_val
.y
;