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 // min-lldb-version: 310
15 // === GDB TESTS ===================================================================================
20 // gdb-command:print x
22 // gdb-command:continue
24 // gdb-command:print x
26 // gdb-command:continue
28 // gdb-command:print x
30 // gdb-command:continue
32 // gdb-command:print x
34 // gdb-command:continue
36 // gdb-command:print x
37 // gdb-check:$5 = -987
38 // gdb-command:continue
40 // gdb-command:print x
42 // gdb-command:continue
46 // gdb-command:print x
48 // gdb-command:continue
50 // gdb-command:print x
52 // gdb-command:continue
54 // gdb-command:print x
56 // gdb-command:continue
58 // gdb-command:print x
59 // gdb-check:$10 = 102
60 // gdb-command:continue
62 // gdb-command:print x
63 // gdb-check:$11 = -987
64 // gdb-command:continue
66 // gdb-command:print x
67 // gdb-check:$12 = 102
68 // gdb-command:continue
70 // gdb-command:print x
72 // gdb-command:continue
75 // === LLDB TESTS ==================================================================================
80 // lldb-command:print x
81 // lldbg-check:[...]$0 = 0
82 // lldbr-check:(i32) x = 0
83 // lldb-command:continue
85 // lldb-command:print x
86 // lldbg-check:[...]$1 = 1
87 // lldbr-check:(i32) x = 1
88 // lldb-command:continue
90 // lldb-command:print x
91 // lldbg-check:[...]$2 = 101
92 // lldbr-check:(i32) x = 101
93 // lldb-command:continue
95 // lldb-command:print x
96 // lldbg-check:[...]$3 = 101
97 // lldbr-check:(i32) x = 101
98 // lldb-command:continue
100 // lldb-command:print x
101 // lldbg-check:[...]$4 = -987
102 // lldbr-check:(i32) x = -987
103 // lldb-command:continue
105 // lldb-command:print x
106 // lldbg-check:[...]$5 = 101
107 // lldbr-check:(i32) x = 101
108 // lldb-command:continue
112 // lldb-command:print x
113 // lldbg-check:[...]$6 = 1
114 // lldbr-check:(i32) x = 1
115 // lldb-command:continue
117 // lldb-command:print x
118 // lldbg-check:[...]$7 = 2
119 // lldbr-check:(i32) x = 2
120 // lldb-command:continue
122 // lldb-command:print x
123 // lldbg-check:[...]$8 = 102
124 // lldbr-check:(i32) x = 102
125 // lldb-command:continue
127 // lldb-command:print x
128 // lldbg-check:[...]$9 = 102
129 // lldbr-check:(i32) x = 102
130 // lldb-command:continue
132 // lldb-command:print x
133 // lldbg-check:[...]$10 = -987
134 // lldbr-check:(i32) x = -987
135 // lldb-command:continue
137 // lldb-command:print x
138 // lldbg-check:[...]$11 = 102
139 // lldbr-check:(i32) x = 102
140 // lldb-command:continue
142 // lldb-command:print x
143 // lldbg-check:[...]$12 = 2
144 // lldbr-check:(i32) x = 2
145 // lldb-command:continue
147 #![feature(omit_gdb_pretty_printer_section)]
148 #![omit_gdb_pretty_printer_section]
167 // open scope within loop's top level scope
178 // Check that we get the x before the inner scope again