2024-06-13 16:04:31 +02:00
|
|
|
//@ ignore-lldb
|
|
|
|
|
|
|
|
|
|
// Test that static debug info is collapsed with #[collapse_debuginfo(yes)]
|
|
|
|
|
|
|
|
|
|
//@ compile-flags:-g
|
2025-10-02 23:56:27 +02:00
|
|
|
//@ ignore-backends: gcc
|
2024-06-13 16:04:31 +02:00
|
|
|
|
|
|
|
|
// === GDB TESTS ===================================================================================
|
|
|
|
|
|
|
|
|
|
// gdb-command:info line collapse_debuginfo_static::FOO
|
2025-10-02 23:56:27 +02:00
|
|
|
// gdb-check:[...]Line 20[...]
|
2024-06-13 16:04:31 +02:00
|
|
|
|
|
|
|
|
#[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);
|
|
|
|
|
}
|