Skip to content

Commit 3ea686f

Browse files
committed
Turn CDB test back on and all clarifying test
1 parent f30c76a commit 3ea686f

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/test/debuginfo/no_mangle-info.rs

+18-6
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,34 @@
44
// gdb-command:run
55
// gdb-command:whatis TEST
66
// gdb-check:type = u64
7+
// gdb-command:whatis no_mangle_info::namespace::OTHER_TEST
8+
// gdb-check:type = u64
79

810
// === LLDB TESTS ==================================================================================
911
// lldb-command:run
1012
// lldb-command:expr TEST
1113
// lldb-check: (unsigned long) $0 = 3735928559
14+
// lldb-command:expr no_mangle_test::namespace::OTHER_TEST
15+
// lldb-check: (unsigned long) $0 = 42
1216

1317
// === CDB TESTS ==================================================================================
14-
// FIXME: This does not currently work due to a bug in LLVM
15-
// The fix for this is being tracked in rust-lang/rust#98295
16-
// // cdb-command: g
17-
// // cdb-command: dx a!no_mangle_info::TEST
18-
// // cdb-check: a!no_mangle_info::TEST : 0xdeadbeef [Type: unsigned __int64]
18+
// cdb-command: g
19+
// Note: LLDB and GDB allow referring to items that are in the same namespace of the symbol
20+
// we currently have a breakpoint on in an unqualified way. CDB does not, and thus we need to
21+
// refer to it in a fully qualified way.
22+
// cdb-command: dx a!no_mangle_info::TEST
23+
// cdb-check: a!no_mangle_info::TEST : 0xdeadbeef [Type: unsigned __int64]
24+
// cdb-command: dx a!no_mangle_info::namespace::OTHER_TEST
25+
// cdb-check: a!no_mangle_info::namespace::OTHER_TEST : 0x2a [Type: unsigned __int64]
1926

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

30+
pub mod namespace {
31+
pub static OTHER_TEST: u64 = 42;
32+
}
33+
2334
pub fn main() {
24-
println!("TEST: {}", TEST); // #break
35+
println!("TEST: {}", TEST);
36+
println!("OTHER TEST: {}", namespace::OTHER_TEST); // #break
2537
}

0 commit comments

Comments
 (0)