]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | // min-lldb-version: 310 |
2 | ||
3 | // compile-flags:-g | |
4 | ||
5 | // === GDB TESTS =================================================================================== | |
6 | ||
7 | // gdb-command:run | |
8 | ||
9 | // FIRST ITERATION | |
10 | // gdb-command:print x | |
11 | // gdb-check:$1 = 1 | |
12 | // gdb-command:continue | |
13 | ||
14 | // gdb-command:print x | |
15 | // gdb-check:$2 = -1 | |
16 | // gdb-command:continue | |
17 | ||
18 | // SECOND ITERATION | |
19 | // gdb-command:print x | |
20 | // gdb-check:$3 = 2 | |
21 | // gdb-command:continue | |
22 | ||
23 | // gdb-command:print x | |
24 | // gdb-check:$4 = -2 | |
25 | // gdb-command:continue | |
26 | ||
27 | // THIRD ITERATION | |
28 | // gdb-command:print x | |
29 | // gdb-check:$5 = 3 | |
30 | // gdb-command:continue | |
31 | ||
32 | // gdb-command:print x | |
33 | // gdb-check:$6 = -3 | |
34 | // gdb-command:continue | |
35 | ||
36 | // AFTER LOOP | |
37 | // gdb-command:print x | |
38 | // gdb-check:$7 = 1000000 | |
39 | // gdb-command:continue | |
40 | ||
41 | ||
42 | // === LLDB TESTS ================================================================================== | |
43 | ||
44 | // lldb-command:run | |
45 | ||
46 | // FIRST ITERATION | |
47 | // lldb-command:print x | |
0bf4aa26 XL |
48 | // lldbg-check:[...]$0 = 1 |
49 | // lldbr-check:(i32) x = 1 | |
1a4d82fc JJ |
50 | // lldb-command:continue |
51 | ||
52 | // lldb-command:print x | |
0bf4aa26 XL |
53 | // lldbg-check:[...]$1 = -1 |
54 | // lldbr-check:(i32) x = -1 | |
1a4d82fc JJ |
55 | // lldb-command:continue |
56 | ||
57 | // SECOND ITERATION | |
58 | // lldb-command:print x | |
0bf4aa26 XL |
59 | // lldbg-check:[...]$2 = 2 |
60 | // lldbr-check:(i32) x = 2 | |
1a4d82fc JJ |
61 | // lldb-command:continue |
62 | ||
63 | // lldb-command:print x | |
0bf4aa26 XL |
64 | // lldbg-check:[...]$3 = -2 |
65 | // lldbr-check:(i32) x = -2 | |
1a4d82fc JJ |
66 | // lldb-command:continue |
67 | ||
68 | // THIRD ITERATION | |
69 | // lldb-command:print x | |
0bf4aa26 XL |
70 | // lldbg-check:[...]$4 = 3 |
71 | // lldbr-check:(i32) x = 3 | |
1a4d82fc JJ |
72 | // lldb-command:continue |
73 | ||
74 | // lldb-command:print x | |
0bf4aa26 XL |
75 | // lldbg-check:[...]$5 = -3 |
76 | // lldbr-check:(i32) x = -3 | |
1a4d82fc JJ |
77 | // lldb-command:continue |
78 | ||
79 | // AFTER LOOP | |
80 | // lldb-command:print x | |
0bf4aa26 XL |
81 | // lldbg-check:[...]$6 = 1000000 |
82 | // lldbr-check:(i32) x = 1000000 | |
1a4d82fc JJ |
83 | // lldb-command:continue |
84 | ||
b039eaaf | 85 | #![feature(omit_gdb_pretty_printer_section)] |
1a4d82fc JJ |
86 | #![omit_gdb_pretty_printer_section] |
87 | ||
88 | fn main() { | |
89 | ||
85aaf69f | 90 | let range = [1, 2, 3]; |
1a4d82fc | 91 | |
85aaf69f | 92 | let x = 1000000; // wan meeeljen doollaars! |
1a4d82fc | 93 | |
85aaf69f | 94 | for &x in &range { |
1a4d82fc JJ |
95 | zzz(); // #break |
96 | sentinel(); | |
97 | ||
85aaf69f | 98 | let x = -1 * x; |
1a4d82fc JJ |
99 | |
100 | zzz(); // #break | |
101 | sentinel(); | |
102 | } | |
103 | ||
104 | zzz(); // #break | |
105 | sentinel(); | |
106 | } | |
107 | ||
108 | fn zzz() {()} | |
109 | fn sentinel() {()} |