]> git.proxmox.com Git - rustc.git/blame - src/test/debuginfo/shadowed-variable.rs
* Introduce some changes by Angus Lees
[rustc.git] / src / test / debuginfo / shadowed-variable.rs
CommitLineData
1a4d82fc
JJ
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// ignore-android: FIXME(#10381)
12// min-lldb-version: 310
13
14// compile-flags:-g
15
16// === GDB TESTS ===================================================================================
17
18// gdb-command:run
19
20// gdb-command:print x
21// gdb-check:$1 = false
22// gdb-command:print y
23// gdb-check:$2 = true
24// gdb-command:continue
25
26// gdb-command:print x
27// gdb-check:$3 = 10
28// gdb-command:print y
29// gdb-check:$4 = true
30// gdb-command:continue
31
32// gdb-command:print x
33// gdb-check:$5 = 10.5
34// gdb-command:print y
35// gdb-check:$6 = 20
36// gdb-command:continue
37
38
39// === LLDB TESTS ==================================================================================
40
41// lldb-command:run
42
43// lldb-command:print x
44// lldb-check:[...]$0 = false
45// lldb-command:print y
46// lldb-check:[...]$1 = true
47// lldb-command:continue
48
49// lldb-command:print x
50// lldb-check:[...]$2 = 10
51// lldb-command:print y
52// lldb-check:[...]$3 = true
53// lldb-command:continue
54
55// lldb-command:print x
56// lldb-check:[...]$4 = 10.5
57// lldb-command:print y
58// lldb-check:[...]$5 = 20
59// lldb-command:continue
60
61#![omit_gdb_pretty_printer_section]
62
63fn main() {
64 let x = false;
65 let y = true;
66
67 zzz(); // #break
68 sentinel();
69
70 let x = 10i;
71
72 zzz(); // #break
73 sentinel();
74
75 let x = 10.5f64;
76 let y = 20i;
77
78 zzz(); // #break
79 sentinel();
80}
81
82fn zzz() {()}
83fn sentinel() {()}