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:print y
24 // gdb-command:continue
26 // AT BEGINNING of 'then' block
27 // gdb-command:print x
29 // gdb-command:print y
31 // gdb-command:continue
33 // AFTER 1st redeclaration of 'x'
34 // gdb-command:print x
35 // gdb-check:$5 = 1001
36 // gdb-command:print y
38 // gdb-command:continue
40 // AFTER 2st redeclaration of 'x'
41 // gdb-command:print x
42 // gdb-check:$7 = 1002
43 // gdb-command:print y
44 // gdb-check:$8 = 1003
45 // gdb-command:continue
47 // AFTER 1st if expression
48 // gdb-command:print x
50 // gdb-command:print y
52 // gdb-command:continue
54 // BEGINNING of else branch
55 // gdb-command:print x
56 // gdb-check:$11 = 999
57 // gdb-command:print y
59 // gdb-command:continue
61 // BEGINNING of else branch
62 // gdb-command:print x
63 // gdb-check:$13 = 1004
64 // gdb-command:print y
65 // gdb-check:$14 = 1005
66 // gdb-command:continue
68 // BEGINNING of else branch
69 // gdb-command:print x
70 // gdb-check:$15 = 999
71 // gdb-command:print y
73 // gdb-command:continue
76 // === LLDB TESTS ==================================================================================
81 // lldb-command:print x
82 // lldbg-check:[...]$0 = 999
83 // lldbr-check:(i32) x = 999
84 // lldb-command:print y
85 // lldbg-check:[...]$1 = -1
86 // lldbr-check:(i32) y = -1
87 // lldb-command:continue
89 // AT BEGINNING of 'then' block
90 // lldb-command:print x
91 // lldbg-check:[...]$2 = 999
92 // lldbr-check:(i32) x = 999
93 // lldb-command:print y
94 // lldbg-check:[...]$3 = -1
95 // lldbr-check:(i32) y = -1
96 // lldb-command:continue
98 // AFTER 1st redeclaration of 'x'
99 // lldb-command:print x
100 // lldbg-check:[...]$4 = 1001
101 // lldbr-check:(i32) x = 1001
102 // lldb-command:print y
103 // lldbg-check:[...]$5 = -1
104 // lldbr-check:(i32) y = -1
105 // lldb-command:continue
107 // AFTER 2st redeclaration of 'x'
108 // lldb-command:print x
109 // lldbg-check:[...]$6 = 1002
110 // lldbr-check:(i32) x = 1002
111 // lldb-command:print y
112 // lldbg-check:[...]$7 = 1003
113 // lldbr-check:(i32) y = 1003
114 // lldb-command:continue
116 // AFTER 1st if expression
117 // lldb-command:print x
118 // lldbg-check:[...]$8 = 999
119 // lldbr-check:(i32) x = 999
120 // lldb-command:print y
121 // lldbg-check:[...]$9 = -1
122 // lldbr-check:(i32) y = -1
123 // lldb-command:continue
125 // BEGINNING of else branch
126 // lldb-command:print x
127 // lldbg-check:[...]$10 = 999
128 // lldbr-check:(i32) x = 999
129 // lldb-command:print y
130 // lldbg-check:[...]$11 = -1
131 // lldbr-check:(i32) y = -1
132 // lldb-command:continue
134 // BEGINNING of else branch
135 // lldb-command:print x
136 // lldbg-check:[...]$12 = 1004
137 // lldbr-check:(i32) x = 1004
138 // lldb-command:print y
139 // lldbg-check:[...]$13 = 1005
140 // lldbr-check:(i32) y = 1005
141 // lldb-command:continue
143 // BEGINNING of else branch
144 // lldb-command:print x
145 // lldbg-check:[...]$14 = 999
146 // lldbr-check:(i32) x = 999
147 // lldb-command:print y
148 // lldbg-check:[...]$15 = -1
149 // lldbr-check:(i32) y = -1
150 // lldb-command:continue
152 #![feature(omit_gdb_pretty_printer_section)]
153 #![omit_gdb_pretty_printer_section]