[binutils-gdb] Relax regexp in gdb.rust/unsized.exp

Tom Tromey tromey@sourceware.org
Sat Mar 12 21:39:14 GMT 2022


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4775334c6f6c18584d9f1aff6b63b2b0fcf6ccab

commit 4775334c6f6c18584d9f1aff6b63b2b0fcf6ccab
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Mar 12 14:36:43 2022 -0700

    Relax regexp in gdb.rust/unsized.exp
    
    With nightly rustc, gdb.rust/unsized.exp fails:
    
        (gdb) ptype *us
        Structure has no component named operator*.
    
    rustc changed to emit a bit more debug info for unsized types.
    Because the original test is just to make sure that ptype of an
    unsized array looks right, this patch relaxes the regexp and changes
    the expression.  I think this keeps the original test meaning, but
    also works with nightly.  I also tested stable and 1.48.

Diff:
---
 gdb/testsuite/gdb.rust/unsized.exp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.rust/unsized.exp b/gdb/testsuite/gdb.rust/unsized.exp
index 388e1727fd4..76d0bbb739b 100644
--- a/gdb/testsuite/gdb.rust/unsized.exp
+++ b/gdb/testsuite/gdb.rust/unsized.exp
@@ -31,5 +31,4 @@ if {![runto ${srcfile}:$line]} {
     return -1
 }
 
-gdb_test "ptype *us" \
-    " = struct \[a-z:\]*V<\\\[u8\\\]> {.* data: \\\[u8\\\],.*}"
+gdb_test "ptype us" " = .*V<\\\[u8\\\]>.*"


More information about the Gdb-cvs mailing list