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