public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Relax regexp in gdb.rust/unsized.exp
@ 2022-03-12 21:39 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-03-12 21:39 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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.
---
 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\\\]>.*"
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-12 21:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 21:39 [pushed] Relax regexp in gdb.rust/unsized.exp Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).