1 // min-lldb-version: 310
5 // === GDB TESTS ===================================================================================
9 // gdb-command:print *bool_ref
10 // gdb-check:$1 = true
12 // gdb-command:print *int_ref
15 // gdb-command:print/d *char_ref
18 // gdb-command:print/d *i8_ref
21 // gdb-command:print *i16_ref
24 // gdb-command:print *i32_ref
27 // gdb-command:print *i64_ref
30 // gdb-command:print *uint_ref
33 // gdb-command:print/d *u8_ref
36 // gdb-command:print *u16_ref
39 // gdb-command:print *u32_ref
42 // gdb-command:print *u64_ref
45 // gdb-command:print *f32_ref
46 // gdb-check:$13 = 2.5
48 // gdb-command:print *f64_ref
49 // gdb-check:$14 = 3.5
52 // === LLDB TESTS ==================================================================================
54 // lldb-command:type format add -f decimal char
55 // lldb-command:type format add -f decimal 'unsigned char'
58 // lldb-command:print *bool_ref
59 // lldbg-check:[...]$0 = true
60 // lldbr-check:(bool) *bool_ref = true
62 // lldb-command:print *int_ref
63 // lldbg-check:[...]$1 = -1
64 // lldbr-check:(isize) *int_ref = -1
66 // NOTE: only rust-enabled lldb supports 32bit chars
67 // lldbr-command:print *char_ref
68 // lldbr-check:(char) *char_ref = 97
70 // lldb-command:print *i8_ref
71 // lldbg-check:[...]$2 = 68
72 // lldbr-check:(i8) *i8_ref = 68
74 // lldb-command:print *i16_ref
75 // lldbg-check:[...]$3 = -16
76 // lldbr-check:(i16) *i16_ref = -16
78 // lldb-command:print *i32_ref
79 // lldbg-check:[...]$4 = -32
80 // lldbr-check:(i32) *i32_ref = -32
82 // lldb-command:print *i64_ref
83 // lldbg-check:[...]$5 = -64
84 // lldbr-check:(i64) *i64_ref = -64
86 // lldb-command:print *uint_ref
87 // lldbg-check:[...]$6 = 1
88 // lldbr-check:(usize) *uint_ref = 1
90 // lldb-command:print *u8_ref
91 // lldbg-check:[...]$7 = 100
92 // lldbr-check:(u8) *u8_ref = 100
94 // lldb-command:print *u16_ref
95 // lldbg-check:[...]$8 = 16
96 // lldbr-check:(u16) *u16_ref = 16
98 // lldb-command:print *u32_ref
99 // lldbg-check:[...]$9 = 32
100 // lldbr-check:(u32) *u32_ref = 32
102 // lldb-command:print *u64_ref
103 // lldbg-check:[...]$10 = 64
104 // lldbr-check:(u64) *u64_ref = 64
106 // lldb-command:print *f32_ref
107 // lldbg-check:[...]$11 = 2.5
108 // lldbr-check:(f32) *f32_ref = 2.5
110 // lldb-command:print *f64_ref
111 // lldbg-check:[...]$12 = 3.5
112 // lldbr-check:(f64) *f64_ref = 3.5
114 #![allow(unused_variables)]
115 #![feature(omit_gdb_pretty_printer_section)]
116 #![omit_gdb_pretty_printer_section]
119 let bool_box: Box<bool> = Box::new(true);
120 let bool_ref: &bool = &*bool_box;
122 let int_box: Box<isize> = Box::new(-1);
123 let int_ref: &isize = &*int_box;
125 let char_box: Box<char> = Box::new('a');
126 let char_ref: &char = &*char_box;
128 let i8_box: Box<i8> = Box::new(68);
129 let i8_ref: &i8 = &*i8_box;
131 let i16_box: Box<i16> = Box::new(-16);
132 let i16_ref: &i16 = &*i16_box;
134 let i32_box: Box<i32> = Box::new(-32);
135 let i32_ref: &i32 = &*i32_box;
137 let i64_box: Box<i64> = Box::new(-64);
138 let i64_ref: &i64 = &*i64_box;
140 let uint_box: Box<usize> = Box::new(1);
141 let uint_ref: &usize = &*uint_box;
143 let u8_box: Box<u8> = Box::new(100);
144 let u8_ref: &u8 = &*u8_box;
146 let u16_box: Box<u16> = Box::new(16);
147 let u16_ref: &u16 = &*u16_box;
149 let u32_box: Box<u32> = Box::new(32);
150 let u32_ref: &u32 = &*u32_box;
152 let u64_box: Box<u64> = Box::new(64);
153 let u64_ref: &u64 = &*u64_box;
155 let f32_box: Box<f32> = Box::new(2.5);
156 let f32_ref: &f32 = &*f32_box;
158 let f64_box: Box<f64> = Box::new(3.5);
159 let f64_ref: &f64 = &*f64_box;