1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Caveats - gdb prints any 8-bit value (meaning rust I8 and u8 values)
12 // as its numerical value along with its associated ASCII char, there
13 // doesn't seem to be any way around this. Also, gdb doesn't know
14 // about UTF-32 character encoding and will print a rust char as only
15 // its numerical value.
17 // min-lldb-version: 310
24 // gdbg-command:print 'basic_types_mut_globals::B'
25 // gdbr-command:print B
26 // gdb-check:$1 = false
27 // gdbg-command:print 'basic_types_mut_globals::I'
28 // gdbr-command:print I
30 // gdbg-command:print/d 'basic_types_mut_globals::C'
31 // gdbr-command:print C
33 // gdbr-check:$3 = 97 'a'
34 // gdbg-command:print/d 'basic_types_mut_globals::I8'
35 // gdbr-command:print I8
37 // gdbg-command:print 'basic_types_mut_globals::I16'
38 // gdbr-command:print I16
40 // gdbg-command:print 'basic_types_mut_globals::I32'
41 // gdbr-command:print I32
43 // gdbg-command:print 'basic_types_mut_globals::I64'
44 // gdbr-command:print I64
46 // gdbg-command:print 'basic_types_mut_globals::U'
47 // gdbr-command:print U
49 // gdbg-command:print/d 'basic_types_mut_globals::U8'
50 // gdbr-command:print U8
52 // gdbg-command:print 'basic_types_mut_globals::U16'
53 // gdbr-command:print U16
55 // gdbg-command:print 'basic_types_mut_globals::U32'
56 // gdbr-command:print U32
58 // gdbg-command:print 'basic_types_mut_globals::U64'
59 // gdbr-command:print U64
61 // gdbg-command:print 'basic_types_mut_globals::F32'
62 // gdbr-command:print F32
63 // gdb-check:$13 = 2.5
64 // gdbg-command:print 'basic_types_mut_globals::F64'
65 // gdbr-command:print F64
66 // gdb-check:$14 = 3.5
67 // gdb-command:continue
70 // gdbg-command:print 'basic_types_mut_globals'::B
71 // gdbr-command:print B
72 // gdb-check:$15 = true
73 // gdbg-command:print 'basic_types_mut_globals'::I
74 // gdbr-command:print I
76 // gdbg-command:print/d 'basic_types_mut_globals'::C
77 // gdbr-command:print C
78 // gdbg-check:$17 = 102
79 // gdbr-check:$17 = 102 'f'
80 // gdbg-command:print/d 'basic_types_mut_globals'::I8
81 // gdbr-command:print/d I8
83 // gdbg-command:print 'basic_types_mut_globals'::I16
84 // gdbr-command:print I16
85 // gdb-check:$19 = -26
86 // gdbg-command:print 'basic_types_mut_globals'::I32
87 // gdbr-command:print I32
88 // gdb-check:$20 = -12
89 // gdbg-command:print 'basic_types_mut_globals'::I64
90 // gdbr-command:print I64
91 // gdb-check:$21 = -54
92 // gdbg-command:print 'basic_types_mut_globals'::U
93 // gdbr-command:print U
95 // gdbg-command:print/d 'basic_types_mut_globals'::U8
96 // gdbr-command:print/d U8
98 // gdbg-command:print 'basic_types_mut_globals'::U16
99 // gdbr-command:print U16
100 // gdb-check:$24 = 32
101 // gdbg-command:print 'basic_types_mut_globals'::U32
102 // gdbr-command:print U32
103 // gdb-check:$25 = 16
104 // gdbg-command:print 'basic_types_mut_globals'::U64
105 // gdbr-command:print U64
106 // gdb-check:$26 = 128
107 // gdbg-command:print 'basic_types_mut_globals'::F32
108 // gdbr-command:print F32
109 // gdb-check:$27 = 5.75
110 // gdbg-command:print 'basic_types_mut_globals'::F64
111 // gdbr-command:print F64
112 // gdb-check:$28 = 9.25
114 #![allow(unused_variables)]
115 #![feature(omit_gdb_pretty_printer_section)]
116 #![omit_gdb_pretty_printer_section]
118 static mut B: bool = false;
119 static mut I: isize = -1;
120 static mut C: char = 'a';
121 static mut I8: i8 = 68;
122 static mut I16: i16 = -16;
123 static mut I32: i32 = -32;
124 static mut I64: i64 = -64;
125 static mut U: usize = 1;
126 static mut U8: u8 = 100;
127 static mut U16: u16 = 16;
128 static mut U32: u32 = 32;
129 static mut U64: u64 = 64;
130 static mut F32: f32 = 2.5;
131 static mut F64: f64 = 3.5;