I noticed that the modules test was failing. Some choice use of `nm`
revealed `TWENTY_THREE` was not in the final binary. Fix by taking a
pointer to the global, forcing the linker to keep the symbol in.
gdb/testsuite/ChangeLog
2020-07-11 Daniel Xu <dxu@dxuuu.xyz>
PR rust/26121
* gdb.rust/modules.rs: Prevent linker from discarding test
symbol.
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
+2020-07-11 Daniel Xu <dxu@dxuuu.xyz>
+
+ PR rust/26121
+ * gdb.rust/modules.rs: Prevent linker from discarding test
+ symbol.
+
2020-07-10 Pedro Alves <pedro@palves.net>
PR gdb/26199
let f2 = || println!("lambda f2");
- let copy = ::TWENTY_THREE;
+ // Prevent linker from discarding symbol
+ let ptr: *const u16 = &::TWENTY_THREE;
f2(); // set breakpoint here
f3();