1 // Caveat - gdb doesn't know about UTF-32 character encoding and will print a
2 // rust char as only its numerical value.
4 // min-lldb-version: 310
5 // min-gdb-version: 8.0
9 // gdbg-command:print 'basic_types_globals::B'
10 // gdbr-command:print B
11 // gdb-check:$1 = false
12 // gdbg-command:print 'basic_types_globals::I'
13 // gdbr-command:print I
15 // gdbg-command:print 'basic_types_globals::C'
16 // gdbr-command:print/d C
19 // gdbg-command:print/d 'basic_types_globals::I8'
20 // gdbr-command:print I8
22 // gdbg-command:print 'basic_types_globals::I16'
23 // gdbr-command:print I16
25 // gdbg-command:print 'basic_types_globals::I32'
26 // gdbr-command:print I32
28 // gdbg-command:print 'basic_types_globals::I64'
29 // gdbr-command:print I64
31 // gdbg-command:print 'basic_types_globals::U'
32 // gdbr-command:print U
34 // gdbg-command:print/d 'basic_types_globals::U8'
35 // gdbr-command:print U8
37 // gdbg-command:print 'basic_types_globals::U16'
38 // gdbr-command:print U16
40 // gdbg-command:print 'basic_types_globals::U32'
41 // gdbr-command:print U32
43 // gdbg-command:print 'basic_types_globals::U64'
44 // gdbr-command:print U64
46 // gdbg-command:print 'basic_types_globals::F32'
47 // gdbr-command:print F32
48 // gdb-check:$13 = 2.5
49 // gdbg-command:print 'basic_types_globals::F64'
50 // gdbr-command:print F64
51 // gdb-check:$14 = 3.5
52 // gdb-command:continue
54 #![allow(unused_variables)]
55 #![feature(omit_gdb_pretty_printer_section)]
56 #![omit_gdb_pretty_printer_section]
58 // N.B. These are `mut` only so they don't constant fold away.
59 static mut B: bool = false;
60 static mut I: isize = -1;
61 static mut C: char = 'a';
62 static mut I8: i8 = 68;
63 static mut I16: i16 = -16;
64 static mut I32: i32 = -32;
65 static mut I64: i64 = -64;
66 static mut U: usize = 1;
67 static mut U8: u8 = 100;
68 static mut U16: u16 = 16;
69 static mut U32: u32 = 32;
70 static mut U64: u64 = 64;
71 static mut F32: f32 = 2.5;
72 static mut F64: f64 = 3.5;
77 let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) };