As mentioned in #79009, there are four failed debuginfo test cases
when using GDB 10. This commit fixes two of them, which fail because
GDB 10 won't print pointers as string anymore. We can use `printf`
as a workaround. It should work regardless of the version of GDB.
Refer this [comment] for more details.
[comment]: https://github.com/rust-lang/rust/issues/79009#issuecomment-
826952708
// === GDB TESTS ===================================================================================
// gdb-command:run
// === GDB TESTS ===================================================================================
// gdb-command:run
-// gdb-command:print s
-// gdbg-check:$1 = [...]"abcd"
-// gdbr-check:$1 = [...]"abcd\000"
+// gdb-command:printf "s = \"%s\"\n", s
+// gdb-check:s = "abcd"
// gdb-command:print local0
// gdb-command:print local0
// gdb-command:print local1
// gdb-command:print local1
// gdb-command:print local2
// gdb-command:print local2
// gdb-check:$1 = Vec(size=1000000000) = {[...]...}
// gdb-command: print slice
// gdb-check:$1 = Vec(size=1000000000) = {[...]...}
// gdb-command: print slice
-// gdb-check:$2 = &[u8] {data_ptr: [...]"\000", length: 1000000000}
+// gdb-check:$2 = &[u8] {data_ptr: [...], length: 1000000000}
#![allow(unused_variables)]
#![allow(unused_variables)]