about summary refs log tree commit diff
path: root/tests/debuginfo/collapse-debuginfo-static-external.rs
blob: 2209bb9bd94813413edb30611cfa634a77a1df64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//@ ignore-lldb

// Test that static debug info is not collapsed with #[collapse_debuginfo(external)]

//@ compile-flags:-g

// === GDB TESTS ===================================================================================

// gdb-command:info line collapse_debuginfo_static_external::FOO
// gdb-check:[...]Line 15[...]

#[collapse_debuginfo(external)]
macro_rules! decl_foo {
    () => {
        static FOO: u32 = 0;
    };
}

decl_foo!();

fn main() {
    // prevent FOO from getting optimized out
    std::hint::black_box(&FOO);
}