public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom de Vries <tdevries@suse.de>,  Tom Tromey <tom@tromey.com>
Subject: Re: [pushed] [gdb/testsuite] Fix gdb.dwarf2/forward-spec.exp with read1
Date: Sat, 15 Jul 2023 10:46:55 +0200	[thread overview]
Message-ID: <87v8elef40.fsf@linux-m68k.org> (raw)
In-Reply-To: <20230715081104.2452-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Sat, 15 Jul 2023 10:11:04 +0200")

On Jul 15 2023, Tom de Vries via Gdb-patches wrote:

> diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec.exp b/gdb/testsuite/gdb.dwarf2/forward-spec.exp
> index ac7d16b09b8..f4512cf9b8c 100644
> --- a/gdb/testsuite/gdb.dwarf2/forward-spec.exp
> +++ b/gdb/testsuite/gdb.dwarf2/forward-spec.exp
> @@ -74,7 +74,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
>  
>  set in_v 0
>  gdb_test_multiple "maint print objfiles" "v has a parent" {
> -    -re "^ *\\\[\[0-9\]\\\] *..cooked_index_entry\[^\r\n\]*" {
> +    -re "^ *\\\[\[0-9\]\\\] *\\(\\(cooked_index_entry\[^\r\n\]*" {

A match that ends with an empty element doesn't make much sense.  I
guess this should rather be

    -re "^ *\\\[\[0-9\]\\\] *..cooked_index_entry\[^\r\n\]*\[\r\n\]" {

to avoid matching an incomplete line.

>  	set in_v 0
>  	exp_continue
>      }
> @@ -82,7 +82,7 @@ gdb_test_multiple "maint print objfiles" "v has a parent" {
>  	set in_v 1
>  	exp_continue
>      }
> -    -re "^ *parent: *..cooked_index_entry .. (0|$hex)." {
> +    -re "^ *parent: *\\(\\(cooked_index_entry \\*\\) (0|$hex)\\)" {

I think this just needs to be anchored on EOL as well.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  reply	other threads:[~2023-07-15  8:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-15  8:11 Tom de Vries
2023-07-15  8:46 ` Andreas Schwab [this message]
2023-07-15 15:06   ` Tom de Vries

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=87v8elef40.fsf@linux-m68k.org \
    --to=schwab@linux-m68k.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    --cc=tom@tromey.com \
    /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).