about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Levick <me@ryanlevick.com>2022-06-20 18:45:08 +0200
committerRyan Levick <me@ryanlevick.com>2022-08-04 10:39:35 +0200
commit95f4d41100cc1ef87206b9510a259be9abc23c55 (patch)
tree2c21f62e128516168161fe21c13edd57ca4c9150
parentf2ee1242b114e77d688f0839e3b0653aa04fb6c1 (diff)
downloadrust-95f4d41100cc1ef87206b9510a259be9abc23c55.tar.gz
rust-95f4d41100cc1ef87206b9510a259be9abc23c55.zip
Turn CDB test back on and all clarifying test
-rw-r--r--src/test/debuginfo/no_mangle-info.rs24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/test/debuginfo/no_mangle-info.rs b/src/test/debuginfo/no_mangle-info.rs
index 7bedcaf2110..1e182eb7cc0 100644
--- a/src/test/debuginfo/no_mangle-info.rs
+++ b/src/test/debuginfo/no_mangle-info.rs
@@ -4,22 +4,34 @@
 // gdb-command:run
 // gdb-command:whatis TEST
 // gdb-check:type = u64
+// gdb-command:whatis no_mangle_info::namespace::OTHER_TEST
+// gdb-check:type = u64
 
 // === LLDB TESTS ==================================================================================
 // lldb-command:run
 // lldb-command:expr TEST
 // lldb-check: (unsigned long) $0 = 3735928559
+// lldb-command:expr no_mangle_test::namespace::OTHER_TEST
+// lldb-check: (unsigned long) $0 = 42
 
 // === CDB TESTS ==================================================================================
-// FIXME: This does not currently work due to a bug in LLVM
-// The fix for this is being tracked in rust-lang/rust#98295
-// // cdb-command: g
-// // cdb-command: dx a!no_mangle_info::TEST
-// // cdb-check: a!no_mangle_info::TEST : 0xdeadbeef [Type: unsigned __int64]
+// cdb-command: g
+// Note: LLDB and GDB allow referring to items that are in the same namespace of the symbol
+// we currently have a breakpoint on in an unqualified way. CDB does not, and thus we need to
+// refer to it in a fully qualified way.
+// cdb-command: dx a!no_mangle_info::TEST
+// cdb-check: a!no_mangle_info::TEST : 0xdeadbeef [Type: unsigned __int64]
+// cdb-command: dx a!no_mangle_info::namespace::OTHER_TEST
+// cdb-check: a!no_mangle_info::namespace::OTHER_TEST : 0x2a [Type: unsigned __int64]
 
 #[no_mangle]
 pub static TEST: u64 = 0xdeadbeef;
 
+pub mod namespace {
+    pub static OTHER_TEST: u64 = 42;
+}
+
 pub fn main() {
-    println!("TEST: {}", TEST); // #break
+    println!("TEST: {}", TEST);
+    println!("OTHER TEST: {}", namespace::OTHER_TEST); // #break
 }