diff options
Diffstat (limited to 'gdb/testsuite/gdb.rust/unsized.exp')
-rw-r--r-- | gdb/testsuite/gdb.rust/unsized.exp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.rust/unsized.exp b/gdb/testsuite/gdb.rust/unsized.exp index 388e1727fd4..67ee49d0935 100644 --- a/gdb/testsuite/gdb.rust/unsized.exp +++ b/gdb/testsuite/gdb.rust/unsized.exp @@ -31,5 +31,12 @@ if {![runto ${srcfile}:$line]} { return -1 } -gdb_test "ptype *us" \ - " = struct \[a-z:\]*V<\\\[u8\\\]> {.* data: \\\[u8\\\],.*}" +gdb_test "ptype us" " = .*V<\\\[u8\\\]>.*" + +set v [split [rust_compiler_version] .] +# The necessary debuginfo generation landed in 1.60, but had a bug +# that was fixed in 1.61. +if {[lindex $v 0] > 1 || [lindex $v 1] >= 61} { + gdb_test "print us2" " = .*Box<.*> \\\[1, 2, 3\\\]" + gdb_test "ptype us2" "type = .*" +} |