]> git.proxmox.com Git - rustc.git/blame - src/test/debuginfo/multi-cgu.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / debuginfo / multi-cgu.rs
CommitLineData
7cac9316
XL
1// This test case makes sure that we get proper break points for binaries
2// compiled with multiple codegen units. (see #39160)
3
4
5// min-lldb-version: 310
6
7// compile-flags:-g -Ccodegen-units=2
8
9// === GDB TESTS ===============================================================
10
11// gdb-command:run
12
13// gdb-command:print xxx
14// gdb-check:$1 = 12345
15// gdb-command:continue
16
17// gdb-command:print yyy
18// gdb-check:$2 = 67890
19// gdb-command:continue
20
21
22// === LLDB TESTS ==============================================================
23
24// lldb-command:run
25
26// lldb-command:print xxx
0bf4aa26
XL
27// lldbg-check:[...]$0 = 12345
28// lldbr-check:(u32) xxx = 12345
7cac9316
XL
29// lldb-command:continue
30
31// lldb-command:print yyy
0bf4aa26
XL
32// lldbg-check:[...]$1 = 67890
33// lldbr-check:(u64) yyy = 67890
7cac9316
XL
34// lldb-command:continue
35
36
37#![feature(omit_gdb_pretty_printer_section)]
38#![omit_gdb_pretty_printer_section]
39
40mod a {
41 pub fn foo(xxx: u32) {
42 super::_zzz(); // #break
43 }
44}
45
46mod b {
47 pub fn bar(yyy: u64) {
48 super::_zzz(); // #break
49 }
50}
51
52fn main() {
53 a::foo(12345);
54 b::bar(67890);
55}
56
57#[inline(never)]
58fn _zzz() {}