Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 1/6] [gdb/testsuite] Fix regexp in gdb.base/solib-overlap.exp
Date: Fri,  6 Nov 2026 23:34:45 +0100	[thread overview]
Message-ID: <20261106223450.1554600-2-tdevries@suse.de> (raw)
In-Reply-To: <20261106223450.1554600-1-tdevries@suse.de>

In test-case gdb.base/solib-overlap.exp there's a regexp
"\[Switching to thread $testpid\..*\]".

Because of using double quotes, we have backslash substitution, so for a
testpid of <n>, this transforms into the regexp
{[Switching to thread <n>..*]}, which matches just a single character.

What's meant here is "\\\[Switching to thread $testpid\\..*\\\]".

Fix this using 'subst_vars {}'.
---
 gdb/testsuite/gdb.base/solib-overlap.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp
index 3fc92d37e90..a94b1f9f6bd 100644
--- a/gdb/testsuite/gdb.base/solib-overlap.exp
+++ b/gdb/testsuite/gdb.base/solib-overlap.exp
@@ -102,7 +102,7 @@ foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1"
 	-re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
 	    pass $test
 	}
-	-re "Attaching to program.*`?$escapedbinfile\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" {
+	-re -wrap "[subst_vars {Attaching to program.*`?$escapedbinfile\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*}]" {
 	    # Response expected on Cygwin
 	    pass $test
 	}
-- 
2.51.0


  reply	other threads:[~2026-11-06 22:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 22:34 [pushed 0/6] [gdb/testsuite] Some testsuite fixes Tom de Vries
2026-11-06 22:34 ` Tom de Vries [this message]
2026-11-06 22:34 ` [pushed 2/6] [gdb/testsuite] Cleanup "Attaching to program" regexps Tom de Vries
2026-11-06 22:34 ` [pushed 3/6] [gdb/testsuite] Update regexp in gdb.base/default.exp Tom de Vries
2026-11-06 22:34 ` [pushed 4/6] [gdb/testsuite] Update "Interpreter unrecognized" regexp Tom de Vries
2026-11-06 22:34 ` [pushed 5/6] [gdb/testsuite] Reformat gdb.cp/classes.exp Tom de Vries
2026-11-06 22:34 ` [pushed 6/6] [gdb/testsuite] Update "error in expression, near" regexp 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=20261106223450.1554600-2-tdevries@suse.de \
    --to=tdevries@suse.de \
    --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