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 ===================================================================================
21 // gdb-command:print x
23 // gdb-command:print y
25 // gdb-command:continue
27 // AT BEGINNING of 'then' block
28 // gdb-command:print x
30 // gdb-command:print y
32 // gdb-command:continue
34 // AFTER 1st redeclaration of 'x'
35 // gdb-command:print x
36 // gdb-check:$5 = 1001
37 // gdb-command:print y
39 // gdb-command:continue
41 // AFTER 2st redeclaration of 'x'
42 // gdb-command:print x
43 // gdb-check:$7 = 1002
44 // gdb-command:print y
45 // gdb-check:$8 = 1003
46 // gdb-command:continue
48 // AFTER 1st if expression
49 // gdb-command:print x
51 // gdb-command:print y
53 // gdb-command:continue
55 // BEGINNING of else branch
56 // gdb-command:print x
57 // gdb-check:$11 = 999
58 // gdb-command:print y
60 // gdb-command:continue
62 // BEGINNING of else branch
63 // gdb-command:print x
64 // gdb-check:$13 = 1004
65 // gdb-command:print y
66 // gdb-check:$14 = 1005
67 // gdb-command:continue
69 // BEGINNING of else branch
70 // gdb-command:print x
71 // gdb-check:$15 = 999
72 // gdb-command:print y
74 // gdb-command:continue
77 // === LLDB TESTS ==================================================================================
82 // lldb-command:print x
83 // lldb-check:[...]$0 = 999
84 // lldb-command:print y
85 // lldb-check:[...]$1 = -1
86 // lldb-command:continue
88 // AT BEGINNING of 'then' block
89 // lldb-command:print x
90 // lldb-check:[...]$2 = 999
91 // lldb-command:print y
92 // lldb-check:[...]$3 = -1
93 // lldb-command:continue
95 // AFTER 1st redeclaration of 'x'
96 // lldb-command:print x
97 // lldb-check:[...]$4 = 1001
98 // lldb-command:print y
99 // lldb-check:[...]$5 = -1
100 // lldb-command:continue
102 // AFTER 2st redeclaration of 'x'
103 // lldb-command:print x
104 // lldb-check:[...]$6 = 1002
105 // lldb-command:print y
106 // lldb-check:[...]$7 = 1003
107 // lldb-command:continue
109 // AFTER 1st if expression
110 // lldb-command:print x
111 // lldb-check:[...]$8 = 999
112 // lldb-command:print y
113 // lldb-check:[...]$9 = -1
114 // lldb-command:continue
116 // BEGINNING of else branch
117 // lldb-command:print x
118 // lldb-check:[...]$10 = 999
119 // lldb-command:print y
120 // lldb-check:[...]$11 = -1
121 // lldb-command:continue
123 // BEGINNING of else branch
124 // lldb-command:print x
125 // lldb-check:[...]$12 = 1004
126 // lldb-command:print y
127 // lldb-check:[...]$13 = 1005
128 // lldb-command:continue
130 // BEGINNING of else branch
131 // lldb-command:print x
132 // lldb-check:[...]$14 = 999
133 // lldb-command:print y
134 // lldb-check:[...]$15 = -1
135 // lldb-command:continue