0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-22 10:25:09 +01:00
rust/tests/debuginfo/collapse-debuginfo-static-external.rs
2024-06-13 16:04:31 +02:00

25 lines
537 B
Rust

//@ 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);
}