Auto merge of #84618 - lrh2000:fix-gdb-10-str, r=Mark-Simulacrum
Fix failed tests related to pointer printing when using GDB 10 As mentioned in #79009, there are four failed debuginfo test cases when using GDB 10. This PR 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
This commit is contained in:
commit
78c963945a
2 changed files with 7 additions and 8 deletions
|
@ -5,17 +5,16 @@
|
||||||
// === GDB TESTS ===================================================================================
|
// === GDB TESTS ===================================================================================
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print s
|
// gdb-command:printf "s = \"%s\"\n", s
|
||||||
// gdbg-check:$1 = [...]"abcd"
|
// gdb-check:s = "abcd"
|
||||||
// gdbr-check:$1 = [...]"abcd\000"
|
|
||||||
// gdb-command:print len
|
// gdb-command:print len
|
||||||
// gdb-check:$2 = 20
|
// gdb-check:$1 = 20
|
||||||
// gdb-command:print local0
|
// gdb-command:print local0
|
||||||
// gdb-check:$3 = 19
|
// gdb-check:$2 = 19
|
||||||
// gdb-command:print local1
|
// gdb-command:print local1
|
||||||
// gdb-check:$4 = true
|
// gdb-check:$3 = true
|
||||||
// gdb-command:print local2
|
// gdb-command:print local2
|
||||||
// gdb-check:$5 = 20.5
|
// gdb-check:$4 = 20.5
|
||||||
|
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// gdb-check:$1 = Vec(size=1000000000) = {[...]...}
|
// gdb-check:$1 = Vec(size=1000000000) = {[...]...}
|
||||||
|
|
||||||
// gdb-command: print slice
|
// 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)]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue