]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/multiple-functions-equal-var-names.rs
Auto merge of #54043 - fintelia:raw_entry, r=alexcrichton
[rust.git] / src / test / debuginfo / multiple-functions-equal-var-names.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 abc
20 // gdb-check:$1 = 10101
21 // gdb-command:continue
22
23 // gdb-command:print abc
24 // gdb-check:$2 = 20202
25 // gdb-command:continue
26
27 // gdb-command:print abc
28 // gdb-check:$3 = 30303
29
30
31 // === LLDB TESTS ==================================================================================
32
33 // lldb-command:run
34
35 // lldb-command:print abc
36 // lldbg-check:[...]$0 = 10101
37 // lldbr-check:(i32) abc = 10101
38 // lldb-command:continue
39
40 // lldb-command:print abc
41 // lldbg-check:[...]$1 = 20202
42 // lldbr-check:(i32) abc = 20202
43 // lldb-command:continue
44
45 // lldb-command:print abc
46 // lldbg-check:[...]$2 = 30303
47 // lldbr-check:(i32) abc = 30303
48
49 #![allow(unused_variables)]
50 #![feature(omit_gdb_pretty_printer_section)]
51 #![omit_gdb_pretty_printer_section]
52
53 fn function_one() {
54     let abc = 10101;
55     zzz(); // #break
56 }
57
58 fn function_two() {
59     let abc = 20202;
60     zzz(); // #break
61 }
62
63
64 fn function_three() {
65     let abc = 30303;
66     zzz(); // #break
67 }
68
69
70 fn main() {
71     function_one();
72     function_two();
73     function_three();
74 }
75
76 fn zzz() {()}