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 // ignore-android: FIXME(#10381)
12 // min-lldb-version: 310
16 // === GDB TESTS ===================================================================================
20 // gdb-command:print variable
22 // gdb-command:print constant
24 // gdb-command:print a_struct
25 // gdb-check:$3 = {a = -3, b = 4.5, c = 5}
26 // gdb-command:print *struct_ref
27 // gdb-check:$4 = {a = -3, b = 4.5, c = 5}
28 // gdb-command:print *owned
30 // gdb-command:print closure_local
32 // gdb-command:continue
34 // gdb-command:print variable
36 // gdb-command:print constant
38 // gdb-command:print a_struct
39 // gdb-check:$9 = {a = -3, b = 4.5, c = 5}
40 // gdb-command:print *struct_ref
41 // gdb-check:$10 = {a = -3, b = 4.5, c = 5}
42 // gdb-command:print *owned
44 // gdb-command:print closure_local
46 // gdb-command:continue
49 // === LLDB TESTS ==================================================================================
53 // lldb-command:print variable
54 // lldb-check:[...]$0 = 1
55 // lldb-command:print constant
56 // lldb-check:[...]$1 = 2
57 // lldb-command:print a_struct
58 // lldb-check:[...]$2 = Struct { a: -3, b: 4.5, c: 5 }
59 // lldb-command:print *struct_ref
60 // lldb-check:[...]$3 = Struct { a: -3, b: 4.5, c: 5 }
61 // lldb-command:print *owned
62 // lldb-check:[...]$4 = 6
63 // lldb-command:print closure_local
64 // lldb-check:[...]$5 = 8
65 // lldb-command:continue
67 // lldb-command:print variable
68 // lldb-check:[...]$6 = 1
69 // lldb-command:print constant
70 // lldb-check:[...]$7 = 2
71 // lldb-command:print a_struct
72 // lldb-check:[...]$8 = Struct { a: -3, b: 4.5, c: 5 }
73 // lldb-command:print *struct_ref
74 // lldb-check:[...]$9 = Struct { a: -3, b: 4.5, c: 5 }
75 // lldb-command:print *owned
76 // lldb-check:[...]$10 = 6
77 // lldb-command:print closure_local
78 // lldb-check:[...]$11 = 8
79 // lldb-command:continue
81 #![allow(unused_variables)]
82 #![omit_gdb_pretty_printer_section]
94 let a_struct = Struct {
100 let struct_ref = &a_struct;
104 let closure_local = 8;
106 let nested_closure = || {
108 variable = constant + a_struct.a + struct_ref.a + *owned + closure_local;