public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [pushed] Relax regexp in gdb.rust/unsized.exp
Date: Sat, 12 Mar 2022 14:39:06 -0700	[thread overview]
Message-ID: <20220312213906.126960-1-tom@tromey.com> (raw)

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


                 reply	other threads:[~2022-03-12 21:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220312213906.126960-1-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).