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 // lldb-check:[...]$0 = 999
83 // lldb-command:print y
84 // lldb-check:[...]$1 = -1
85 // lldb-command:continue
87 // AT BEGINNING of 'then' block
88 // lldb-command:print x
89 // lldb-check:[...]$2 = 999
90 // lldb-command:print y
91 // lldb-check:[...]$3 = -1
92 // lldb-command:continue
94 // AFTER 1st redeclaration of 'x'
95 // lldb-command:print x
96 // lldb-check:[...]$4 = 1001
97 // lldb-command:print y
98 // lldb-check:[...]$5 = -1
99 // lldb-command:continue
101 // AFTER 2st redeclaration of 'x'
102 // lldb-command:print x
103 // lldb-check:[...]$6 = 1002
104 // lldb-command:print y
105 // lldb-check:[...]$7 = 1003
106 // lldb-command:continue
108 // AFTER 1st if expression
109 // lldb-command:print x
110 // lldb-check:[...]$8 = 999
111 // lldb-command:print y
112 // lldb-check:[...]$9 = -1
113 // lldb-command:continue
115 // BEGINNING of else branch
116 // lldb-command:print x
117 // lldb-check:[...]$10 = 999
118 // lldb-command:print y
119 // lldb-check:[...]$11 = -1
120 // lldb-command:continue
122 // BEGINNING of else branch
123 // lldb-command:print x
124 // lldb-check:[...]$12 = 1004
125 // lldb-command:print y
126 // lldb-check:[...]$13 = 1005
127 // lldb-command:continue
129 // BEGINNING of else branch
130 // lldb-command:print x
131 // lldb-check:[...]$14 = 999
132 // lldb-command:print y
133 // lldb-check:[...]$15 = -1
134 // lldb-command:continue
136 #![feature(omit_gdb_pretty_printer_section)]
137 #![omit_gdb_pretty_printer_section]