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