mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
25 lines
514 B
Rust
25 lines
514 B
Rust
//@ ignore-lldb
|
|
|
|
// Test that static debug info is collapsed with #[collapse_debuginfo(yes)]
|
|
|
|
//@ compile-flags:-g
|
|
|
|
// === GDB TESTS ===================================================================================
|
|
|
|
// gdb-command:info line collapse_debuginfo_static::FOO
|
|
// gdb-check:[...]Line 19[...]
|
|
|
|
#[collapse_debuginfo(yes)]
|
|
macro_rules! decl_foo {
|
|
() => {
|
|
static FOO: u32 = 0;
|
|
};
|
|
}
|
|
|
|
decl_foo!();
|
|
|
|
fn main() {
|
|
// prevent FOO from getting optimized out
|
|
std::hint::black_box(&FOO);
|
|
}
|