Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen <guinevere@redhat.com>
To: gdb-patches@sourceware.org
Cc: Guinevere Larsen <guinevere@redhat.com>
Subject: [PATCH] gdb/testsuite: Fix supplying a function name to gdb_continue_to_breakpoint
Date: Thu, 27 Aug 2026 17:38:57 -0300	[thread overview]
Message-ID: <20260827203857.206218-1-guinevere@redhat.com> (raw)

The previous regex pattern in gdb_continue_to_breakpoint expects a
message in one of the following forms:
    Breakpoint N, <hex address> in <function>
    Breakpoint N, <function> at <linespec>

And so, checks for either the "in" or the "at" keywords before the
user-supplied pattern.  However, this means that if GDB doesn't stop
somewhere that requires printing the address, the test can't supply
the function name when checking for the breakpoint.

This commit adds the possibility of looking just for the comma before
the user-supplied pattern, allowing the second form of the stop
message to also accept a function name.

with '#' will be ignored, and an empty message aborts the commit.  # #
On branch gwen-test_breakpoint_threads # Changes to be committed: #
modified: gdb/testsuite/lib/gdb.exp #
---
 gdb/testsuite/lib/gdb.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1a6438f36a5..1eb643cdf1a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -954,7 +954,7 @@ proc gdb_continue_to_breakpoint {name {location_pattern .*}} {
 
     set kfail_pattern "Process record does not support instruction 0xfae64 at.*"
     return [gdb_test_multiple "continue" $full_name {
-	-re "(?:Breakpoint|Temporary breakpoint) .* (at|in) $location_pattern\r\n$gdb_prompt $" {
+	-re "(?:Breakpoint|Temporary breakpoint) .*( at| in|,) $location_pattern\r\n$gdb_prompt $" {
 	    pass $full_name
 	}
 	-re "(?:$kfail_pattern)\r\n$gdb_prompt $" {

base-commit: 6e3ecea0e3ca191e81e82ee0194c49eea1ffb101
-- 
2.55.0


             reply	other threads:[~2026-08-27 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 20:38 Guinevere Larsen [this message]
2026-08-28  3:28 ` Kevin Buettner

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=20260827203857.206218-1-guinevere@redhat.com \
    --to=guinevere@redhat.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