1 // min-lldb-version: 310
5 // === GDB TESTS ===================================================================================
10 // gdb-command:print x
12 // gdb-command:continue
14 // gdb-command:print x
16 // gdb-command:continue
18 // gdb-command:print x
20 // gdb-command:continue
22 // gdb-command:print x
24 // gdb-command:continue
26 // gdb-command:print x
27 // gdb-check:$5 = -987
28 // gdb-command:continue
30 // gdb-command:print x
32 // gdb-command:continue
36 // gdb-command:print x
38 // gdb-command:continue
40 // gdb-command:print x
42 // gdb-command:continue
44 // gdb-command:print x
46 // gdb-command:continue
48 // gdb-command:print x
49 // gdb-check:$10 = 102
50 // gdb-command:continue
52 // gdb-command:print x
53 // gdb-check:$11 = -987
54 // gdb-command:continue
56 // gdb-command:print x
57 // gdb-check:$12 = 102
58 // gdb-command:continue
60 // gdb-command:print x
62 // gdb-command:continue
65 // === LLDB TESTS ==================================================================================
70 // lldb-command:print x
71 // lldbg-check:[...]$0 = 0
72 // lldbr-check:(i32) x = 0
73 // lldb-command:continue
75 // lldb-command:print x
76 // lldbg-check:[...]$1 = 1
77 // lldbr-check:(i32) x = 1
78 // lldb-command:continue
80 // lldb-command:print x
81 // lldbg-check:[...]$2 = 101
82 // lldbr-check:(i32) x = 101
83 // lldb-command:continue
85 // lldb-command:print x
86 // lldbg-check:[...]$3 = 101
87 // lldbr-check:(i32) x = 101
88 // lldb-command:continue
90 // lldb-command:print x
91 // lldbg-check:[...]$4 = -987
92 // lldbr-check:(i32) x = -987
93 // lldb-command:continue
95 // lldb-command:print x
96 // lldbg-check:[...]$5 = 101
97 // lldbr-check:(i32) x = 101
98 // lldb-command:continue
102 // lldb-command:print x
103 // lldbg-check:[...]$6 = 1
104 // lldbr-check:(i32) x = 1
105 // lldb-command:continue
107 // lldb-command:print x
108 // lldbg-check:[...]$7 = 2
109 // lldbr-check:(i32) x = 2
110 // lldb-command:continue
112 // lldb-command:print x
113 // lldbg-check:[...]$8 = 102
114 // lldbr-check:(i32) x = 102
115 // lldb-command:continue
117 // lldb-command:print x
118 // lldbg-check:[...]$9 = 102
119 // lldbr-check:(i32) x = 102
120 // lldb-command:continue
122 // lldb-command:print x
123 // lldbg-check:[...]$10 = -987
124 // lldbr-check:(i32) x = -987
125 // lldb-command:continue
127 // lldb-command:print x
128 // lldbg-check:[...]$11 = 102
129 // lldbr-check:(i32) x = 102
130 // lldb-command:continue
132 // lldb-command:print x
133 // lldbg-check:[...]$12 = 2
134 // lldbr-check:(i32) x = 2
135 // lldb-command:continue
137 #![feature(omit_gdb_pretty_printer_section)]
138 #![omit_gdb_pretty_printer_section]
157 // open scope within loop's top level scope
168 // Check that we get the x before the inner scope again