]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/cross-crate-spans.rs
Auto merge of #28816 - petrochenkov:unistruct, r=nrc
[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 // gdb-check:$1 = {__0 = 17, __1 = 17}
29 // gdb-command:print a_variable
30 // gdb-check:$2 = 123456789
31 // gdb-command:print another_variable
32 // gdb-check:$3 = 123456789.5
33 // gdb-command:continue
34
35 // gdb-command:print result
36 // gdb-check:$4 = {__0 = 1212, __1 = 1212}
37 // gdb-command:print a_variable
38 // gdb-check:$5 = 123456789
39 // gdb-command:print another_variable
40 // gdb-check:$6 = 123456789.5
41 // gdb-command:continue
42
43
44
45 // === LLDB TESTS ==================================================================================
46
47 // lldb-command:b cross_crate_spans.rs:24
48 // lldb-command:run
49
50 // lldb-command:print result
51 // lldb-check:[...]$0 = (17, 17)
52 // lldb-command:print a_variable
53 // lldb-check:[...]$1 = 123456789
54 // lldb-command:print another_variable
55 // lldb-check:[...]$2 = 123456789.5
56 // lldb-command:continue
57
58 // lldb-command:print result
59 // lldb-check:[...]$3 = (1212, 1212)
60 // lldb-command:print a_variable
61 // lldb-check:[...]$4 = 123456789
62 // lldb-command:print another_variable
63 // lldb-check:[...]$5 = 123456789.5
64 // lldb-command:continue
65
66
67 // This test makes sure that we can break in functions inlined from other crates.
68
69 fn main() {
70
71     let _ = cross_crate_spans::generic_function(17u32);
72     let _ = cross_crate_spans::generic_function(1212i16);
73
74 }