public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: <gdb-patches@sourceware.org>
Cc: <tom@tromey.com>
Subject: [PATCH V2 5/5] gdb/testsuite: Make hook-stop.exp ignore termination message from GDB stub
Date: Sun, 23 Apr 2023 13:36:06 -0600	[thread overview]
Message-ID: <20230423193606.576453-2-sandra@codesourcery.com> (raw)
In-Reply-To: <20230423193606.576453-1-sandra@codesourcery.com>

When a GDB stub is run via "target remote |", it sometimes produces
extra output that ends up mixed with GDB's own output.  For example,
QEMU's built-in GDB stub responds to the vKill packet by printing

nios2-elf-qemu-system: QEMU: Terminated via GDBstub

before exiting.

This patch fixes the regexp in gdb.base/hook-stop.exp to allow such
messages between GDB's "continuing" and "Inferior killed" messages.
---
 gdb/testsuite/gdb.base/hook-stop.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/hook-stop.exp b/gdb/testsuite/gdb.base/hook-stop.exp
index 0babd46aaea..50c5dfe9dc5 100644
--- a/gdb/testsuite/gdb.base/hook-stop.exp
+++ b/gdb/testsuite/gdb.base/hook-stop.exp
@@ -85,7 +85,7 @@ proc hook_stop_kill {} {
 
 	set test "run hook-stop"
 	gdb_test_multiple "continue" "$test" {
-	    -re "Continuing.\r\n\\\[Inferior $decimal \\(.*\\) killed\\\]\r\n${gdb_prompt} $" {
+	    -re "Continuing.*\r\n\\\[Inferior $decimal \\(.*\\) killed\\\]\r\n${gdb_prompt} $" {
 		pass $test
 	    }
 	}
-- 
2.31.1


      reply	other threads:[~2023-04-23 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 19:36 [PATCH V2 4/5] gdb/testsuite: Disable some tests that are broken on remote Windows host Sandra Loosemore
2023-04-23 19:36 ` Sandra Loosemore [this message]

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=20230423193606.576453-2-sandra@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --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).