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
18 // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
25 // gdbg-command:print 'basic_types_mut_globals::B'
26 // gdbr-command:print B
27 // gdb-check:$1 = false
28 // gdbg-command:print 'basic_types_mut_globals::I'
29 // gdbr-command:print I
31 // gdbg-command:print/d 'basic_types_mut_globals::C'
32 // gdbr-command:print C
34 // gdbr-check:$3 = 97 'a'
35 // gdbg-command:print/d 'basic_types_mut_globals::I8'
36 // gdbr-command:print I8
38 // gdbg-command:print 'basic_types_mut_globals::I16'
39 // gdbr-command:print I16
41 // gdbg-command:print 'basic_types_mut_globals::I32'
42 // gdbr-command:print I32
44 // gdbg-command:print 'basic_types_mut_globals::I64'
45 // gdbr-command:print I64
47 // gdbg-command:print 'basic_types_mut_globals::U'
48 // gdbr-command:print U
50 // gdbg-command:print/d 'basic_types_mut_globals::U8'
51 // gdbr-command:print U8
53 // gdbg-command:print 'basic_types_mut_globals::U16'
54 // gdbr-command:print U16
56 // gdbg-command:print 'basic_types_mut_globals::U32'
57 // gdbr-command:print U32
59 // gdbg-command:print 'basic_types_mut_globals::U64'
60 // gdbr-command:print U64
62 // gdbg-command:print 'basic_types_mut_globals::F32'
63 // gdbr-command:print F32
64 // gdb-check:$13 = 2.5
65 // gdbg-command:print 'basic_types_mut_globals::F64'
66 // gdbr-command:print F64
67 // gdb-check:$14 = 3.5
68 // gdb-command:continue
71 // gdbg-command:print 'basic_types_mut_globals'::B
72 // gdbr-command:print B
73 // gdb-check:$15 = true
74 // gdbg-command:print 'basic_types_mut_globals'::I
75 // gdbr-command:print I
77 // gdbg-command:print/d 'basic_types_mut_globals'::C
78 // gdbr-command:print C
79 // gdbg-check:$17 = 102
80 // gdbr-check:$17 = 102 'f'
81 // gdbg-command:print/d 'basic_types_mut_globals'::I8
82 // gdbr-command:print/d I8
84 // gdbg-command:print 'basic_types_mut_globals'::I16
85 // gdbr-command:print I16
86 // gdb-check:$19 = -26
87 // gdbg-command:print 'basic_types_mut_globals'::I32
88 // gdbr-command:print I32
89 // gdb-check:$20 = -12
90 // gdbg-command:print 'basic_types_mut_globals'::I64
91 // gdbr-command:print I64
92 // gdb-check:$21 = -54
93 // gdbg-command:print 'basic_types_mut_globals'::U
94 // gdbr-command:print U
96 // gdbg-command:print/d 'basic_types_mut_globals'::U8
97 // gdbr-command:print/d U8
99 // gdbg-command:print 'basic_types_mut_globals'::U16
100 // gdbr-command:print U16
101 // gdb-check:$24 = 32
102 // gdbg-command:print 'basic_types_mut_globals'::U32
103 // gdbr-command:print U32
104 // gdb-check:$25 = 16
105 // gdbg-command:print 'basic_types_mut_globals'::U64
106 // gdbr-command:print U64
107 // gdb-check:$26 = 128
108 // gdbg-command:print 'basic_types_mut_globals'::F32
109 // gdbr-command:print F32
110 // gdb-check:$27 = 5.75
111 // gdbg-command:print 'basic_types_mut_globals'::F64
112 // gdbr-command:print F64
113 // gdb-check:$28 = 9.25
115 #![allow(unused_variables)]
116 #![feature(omit_gdb_pretty_printer_section)]
117 #![omit_gdb_pretty_printer_section]
119 static mut B: bool = false;
120 static mut I: isize = -1;
121 static mut C: char = 'a';
122 static mut I8: i8 = 68;
123 static mut I16: i16 = -16;
124 static mut I32: i32 = -32;
125 static mut I64: i64 = -64;
126 static mut U: usize = 1;
127 static mut U8: u8 = 100;
128 static mut U16: u16 = 16;
129 static mut U32: u32 = 32;
130 static mut U64: u64 = 64;
131 static mut F32: f32 = 2.5;
132 static mut F64: f64 = 3.5;