]>
git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/borrowed-basic.rs
2 // min-lldb-version: 310
4 // === GDB TESTS ===================================================================================
7 // gdb-command:print *bool_ref
10 // gdb-command:print *int_ref
13 // gdb-command:print/d *char_ref
16 // gdb-command:print *i8_ref
17 // gdbg-check:$4 = 68 'D'
20 // gdb-command:print *i16_ref
23 // gdb-command:print *i32_ref
26 // gdb-command:print *i64_ref
29 // gdb-command:print *uint_ref
32 // gdb-command:print *u8_ref
33 // gdbg-check:$9 = 100 'd'
34 // gdbr-check:$9 = 100
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 ==================================================================================
55 // lldb-command:print *bool_ref
56 // lldbg-check:[...]$0 = true
57 // lldbr-check:(bool) *bool_ref = true
59 // lldb-command:print *int_ref
60 // lldbg-check:[...]$1 = -1
61 // lldbr-check:(isize) *int_ref = -1
63 // NOTE: only rust-enabled lldb supports 32bit chars
64 // lldbr-command:print *char_ref
65 // lldbr-check:(char) *char_ref = 'a'
67 // lldb-command:print *i8_ref
68 // lldbg-check:[...]$2 = 'D'
69 // lldbr-check:(i8) *i8_ref = 68
71 // lldb-command:print *i16_ref
72 // lldbg-check:[...]$3 = -16
73 // lldbr-check:(i16) *i16_ref = -16
75 // lldb-command:print *i32_ref
76 // lldbg-check:[...]$4 = -32
77 // lldbr-check:(i32) *i32_ref = -32
79 // lldb-command:print *i64_ref
80 // lldbg-check:[...]$5 = -64
81 // lldbr-check:(i64) *i64_ref = -64
83 // lldb-command:print *uint_ref
84 // lldbg-check:[...]$6 = 1
85 // lldbr-check:(usize) *uint_ref = 1
87 // lldb-command:print *u8_ref
88 // lldbg-check:[...]$7 = 'd'
89 // lldbr-check:(u8) *u8_ref = 100
91 // lldb-command:print *u16_ref
92 // lldbg-check:[...]$8 = 16
93 // lldbr-check:(u16) *u16_ref = 16
95 // lldb-command:print *u32_ref
96 // lldbg-check:[...]$9 = 32
97 // lldbr-check:(u32) *u32_ref = 32
99 // lldb-command:print *u64_ref
100 // lldbg-check:[...]$10 = 64
101 // lldbr-check:(u64) *u64_ref = 64
103 // lldb-command:print *f32_ref
104 // lldbg-check:[...]$11 = 2.5
105 // lldbr-check:(f32) *f32_ref = 2.5
107 // lldb-command:print *f64_ref
108 // lldbg-check:[...]$12 = 3.5
109 // lldbr-check:(f64) *f64_ref = 3.5
111 #![allow(unused_variables)]
112 #![feature(omit_gdb_pretty_printer_section)]
113 #![omit_gdb_pretty_printer_section]
116 let bool_val
: bool
= true;
117 let bool_ref
: &bool
= &bool_val
;
119 let int_val
: isize = -1;
120 let int_ref
: &isize = &int_val
;
122 let char_val
: char = 'a'
;
123 let char_ref
: &char = &char_val
;
126 let i8_ref
: &i8 = &i8_val
;
128 let i16_val
: i16 = -16;
129 let i16_ref
: &i16 = &i16_val
;
131 let i32_val
: i32 = -32;
132 let i32_ref
: &i32 = &i32_val
;
134 let i64_val
: i64 = -64;
135 let i64_ref
: &i64 = &i64_val
;
137 let uint_val
: usize = 1;
138 let uint_ref
: &usize = &uint_val
;
140 let u8_val
: u8 = 100;
141 let u8_ref
: &u8 = &u8_val
;
143 let u16_val
: u16 = 16;
144 let u16_ref
: &u16 = &u16_val
;
146 let u32_val
: u32 = 32;
147 let u32_ref
: &u32 = &u32_val
;
149 let u64_val
: u64 = 64;
150 let u64_ref
: &u64 = &u64_val
;
152 let f32_val
: f32 = 2.5;
153 let f32_ref
: &f32 = &f32_val
;
155 let f64_val
: f64 = 3.5;
156 let f64_ref
: &f64 = &f64_val
;