]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/cross-crate-spans.rs
Rollup merge of #51722 - Aaronepower:master, r=Mark-Simulacrum
[rust.git] / src / test / debuginfo / cross-crate-spans.rs
1 // Copyright 2013-2015 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 #![feature(omit_gdb_pretty_printer_section)]
12 #![omit_gdb_pretty_printer_section]
13
14 // min-lldb-version: 310
15
16 // aux-build:cross_crate_spans.rs
17 extern crate cross_crate_spans;
18
19 // compile-flags:-g
20
21
22 // === GDB TESTS ===================================================================================
23
24 // gdb-command:break cross_crate_spans.rs:24
25 // gdb-command:run
26
27 // gdb-command:print result
28 // gdbg-check:$1 = {__0 = 17, __1 = 17}
29 // gdbr-check:$1 = (17, 17)
30 // gdb-command:print a_variable
31 // gdb-check:$2 = 123456789
32 // gdb-command:print another_variable
33 // gdb-check:$3 = 123456789.5
34 // gdb-command:continue
35
36 // gdb-command:print result
37 // gdbg-check:$4 = {__0 = 1212, __1 = 1212}
38 // gdbr-check:$4 = (1212, 1212)
39 // gdb-command:print a_variable
40 // gdb-check:$5 = 123456789
41 // gdb-command:print another_variable
42 // gdb-check:$6 = 123456789.5
43 // gdb-command:continue
44
45
46
47 // === LLDB TESTS ==================================================================================
48
49 // lldb-command:b cross_crate_spans.rs:24
50 // lldb-command:run
51
52 // lldb-command:print result
53 // lldb-check:[...]$0 = (17, 17)
54 // lldb-command:print a_variable
55 // lldb-check:[...]$1 = 123456789
56 // lldb-command:print another_variable
57 // lldb-check:[...]$2 = 123456789.5
58 // lldb-command:continue
59
60 // lldb-command:print result
61 // lldb-check:[...]$3 = (1212, 1212)
62 // lldb-command:print a_variable
63 // lldb-check:[...]$4 = 123456789
64 // lldb-command:print another_variable
65 // lldb-check:[...]$5 = 123456789.5
66 // lldb-command:continue
67
68
69 // This test makes sure that we can break in functions inlined from other crates.
70
71 fn main() {
72
73     let _ = cross_crate_spans::generic_function(17u32);
74     let _ = cross_crate_spans::generic_function(1212i16);
75
76 }