Skip to content

Commit edb6c4b

Browse files
committed
Add a test for issue #33172
1 parent 1d60108 commit edb6c4b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/test/debuginfo/no_mangle-info.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// compile-flags:-g
2+
3+
// === GDB TESTS ===================================================================================
4+
5+
// gdb-command:run
6+
// gdb-command:whatis TEST
7+
// gdb-check:type = u64
8+
9+
// === LLDB TESTS ==================================================================================
10+
11+
// lldb-command:run
12+
// lldb-command:expr TEST
13+
// lldb-check: (unsigned long) $0 = 3735928559
14+
15+
// === CDB TESTS ==================================================================================
16+
// cdb-command: g
17+
18+
// cdb-command: dx a!no_mangle_info::TEST
19+
// cdb-check: a!no_mangle_info::TEST : 0xdeadbeef [Type: unsigned __int64]
20+
21+
#[no_mangle]
22+
pub static TEST: u64 = 0xdeadbeef;
23+
24+
pub fn main() {
25+
println!("TEST: {}", TEST); // #break
26+
}

0 commit comments

Comments
 (0)