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
21 // === GDB TESTS ===================================================================================
24 // gdb-command:print b
25 // gdb-check:$1 = false
26 // gdb-command:print i
28 // gdb-command:print c
30 // gdb-command:print/d i8
32 // gdb-command:print i16
34 // gdb-command:print i32
36 // gdb-command:print i64
38 // gdb-command:print u
40 // gdb-command:print/d u8
42 // gdb-command:print u16
44 // gdb-command:print u32
46 // gdb-command:print u64
48 // gdb-command:print f32
49 // gdb-check:$13 = 2.5
50 // gdb-command:print f64
51 // gdb-check:$14 = 3.5
54 // === LLDB TESTS ==================================================================================
57 // lldb-command:print b
58 // lldb-check:[...]$0 = false
59 // lldb-command:print i
60 // lldb-check:[...]$1 = -1
62 // NOTE: LLDB does not support 32bit chars
63 // d ebugger:print (usize)(c)
66 // lldb-command:print i8
67 // lldb-check:[...]$2 = 'D'
68 // lldb-command:print i16
69 // lldb-check:[...]$3 = -16
70 // lldb-command:print i32
71 // lldb-check:[...]$4 = -32
72 // lldb-command:print i64
73 // lldb-check:[...]$5 = -64
74 // lldb-command:print u
75 // lldb-check:[...]$6 = 1
76 // lldb-command:print u8
77 // lldb-check:[...]$7 = 'd'
78 // lldb-command:print u16
79 // lldb-check:[...]$8 = 16
80 // lldb-command:print u32
81 // lldb-check:[...]$9 = 32
82 // lldb-command:print u64
83 // lldb-check:[...]$10 = 64
84 // lldb-command:print f32
85 // lldb-check:[...]$11 = 2.5
86 // lldb-command:print f64
87 // lldb-check:[...]$12 = 3.5
89 #![allow(unused_variables)]
90 #![feature(omit_gdb_pretty_printer_section)]
91 #![omit_gdb_pretty_printer_section]