]> git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/simple-lexical-scope.rs
Merge branch 'debian/sid' into debian/experimental
[rustc.git] / src / test / debuginfo / simple-lexical-scope.rs
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.
4 //
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.
10
11 // min-lldb-version: 310
12
13 // compile-flags:-g
14
15 // === GDB TESTS ===================================================================================
16
17 // gdb-command:run
18
19 // gdb-command:print x
20 // gdb-check:$1 = false
21 // gdb-command:continue
22
23 // gdb-command:print x
24 // gdb-check:$2 = false
25 // gdb-command:continue
26
27 // gdb-command:print x
28 // gdb-check:$3 = 10
29 // gdb-command:continue
30
31 // gdb-command:print x
32 // gdb-check:$4 = 10
33 // gdb-command:continue
34
35 // gdb-command:print x
36 // gdb-check:$5 = 10.5
37 // gdb-command:continue
38
39 // gdb-command:print x
40 // gdb-check:$6 = 10
41 // gdb-command:continue
42
43 // gdb-command:print x
44 // gdb-check:$7 = false
45 // gdb-command:continue
46
47
48 // === LLDB TESTS ==================================================================================
49
50 // lldb-command:run
51
52 // lldb-command:print x
53 // lldbg-check:[...]$0 = false
54 // lldbr-check:(bool) x = false
55 // lldb-command:continue
56
57 // lldb-command:print x
58 // lldbg-check:[...]$1 = false
59 // lldbr-check:(bool) x = false
60 // lldb-command:continue
61
62 // lldb-command:print x
63 // lldbg-check:[...]$2 = 10
64 // lldbr-check:(i32) x = 10
65 // lldb-command:continue
66
67 // lldb-command:print x
68 // lldbg-check:[...]$3 = 10
69 // lldbr-check:(i32) x = 10
70 // lldb-command:continue
71
72 // lldb-command:print x
73 // lldbg-check:[...]$4 = 10.5
74 // lldbr-check:(f64) x = 10.5
75 // lldb-command:continue
76
77 // lldb-command:print x
78 // lldbg-check:[...]$5 = 10
79 // lldbr-check:(i32) x = 10
80 // lldb-command:continue
81
82 // lldb-command:print x
83 // lldbg-check:[...]$6 = false
84 // lldbr-check:(bool) x = false
85 // lldb-command:continue
86
87
88 #![feature(omit_gdb_pretty_printer_section)]
89 #![omit_gdb_pretty_printer_section]
90
91 fn main() {
92 let x = false;
93
94 zzz(); // #break
95 sentinel();
96
97 {
98 zzz(); // #break
99 sentinel();
100
101 let x = 10;
102
103 zzz(); // #break
104 sentinel();
105
106 {
107 zzz(); // #break
108 sentinel();
109
110 let x = 10.5f64;
111
112 zzz(); // #break
113 sentinel();
114 }
115
116 zzz(); // #break
117 sentinel();
118 }
119
120 zzz(); // #break
121 sentinel();
122 }
123
124 fn zzz() {()}
125 fn sentinel() {()}