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 // gdbr-check:$3 = 97 'a'
31 // gdb-command:print/d i8
33 // gdb-command:print i16
35 // gdb-command:print i32
37 // gdb-command:print i64
39 // gdb-command:print u
41 // gdb-command:print/d u8
43 // gdb-command:print u16
45 // gdb-command:print u32
47 // gdb-command:print u64
49 // gdb-command:print f32
50 // gdb-check:$13 = 2.5
51 // gdb-command:print f64
52 // gdb-check:$14 = 3.5
55 // === LLDB TESTS ==================================================================================
58 // lldb-command:print b
59 // lldb-check:[...]$0 = false
60 // lldb-command:print i
61 // lldb-check:[...]$1 = -1
63 // NOTE: LLDB does not support 32bit chars
64 // d ebugger:print (usize)(c)
67 // lldb-command:print i8
68 // lldb-check:[...]$2 = 'D'
69 // lldb-command:print i16
70 // lldb-check:[...]$3 = -16
71 // lldb-command:print i32
72 // lldb-check:[...]$4 = -32
73 // lldb-command:print i64
74 // lldb-check:[...]$5 = -64
75 // lldb-command:print u
76 // lldb-check:[...]$6 = 1
77 // lldb-command:print u8
78 // lldb-check:[...]$7 = 'd'
79 // lldb-command:print u16
80 // lldb-check:[...]$8 = 16
81 // lldb-command:print u32
82 // lldb-check:[...]$9 = 32
83 // lldb-command:print u64
84 // lldb-check:[...]$10 = 64
85 // lldb-command:print f32
86 // lldb-check:[...]$11 = 2.5
87 // lldb-command:print f64
88 // lldb-check:[...]$12 = 3.5
90 #![allow(unused_variables)]
91 #![feature(omit_gdb_pretty_printer_section)]
92 #![omit_gdb_pretty_printer_section]