Skip to content

Commit

Permalink
Add a test for issue rust-lang#33172
Browse files Browse the repository at this point in the history
  • Loading branch information
rylev committed Aug 4, 2022
1 parent caee496 commit e696309
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/test/debuginfo/no_mangle-info.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// compile-flags:-g

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

// gdb-command:run
// gdb-command:whatis TEST
// gdb-check:type = u64

// === LLDB TESTS ==================================================================================

// lldb-command:run
// lldb-command:expr TEST
// lldb-check: (unsigned long) $0 = 3735928559

// === CDB TESTS ==================================================================================
// cdb-command: g

// cdb-command: dx a!no_mangle_info::TEST
// cdb-check: a!no_mangle_info::TEST : 0xdeadbeef [Type: unsigned __int64]

#[no_mangle]
pub static TEST: u64 = 0xdeadbeef;

pub fn main() {
println!("TEST: {}", TEST); // #break
}

0 comments on commit e696309

Please sign in to comment.