[binutils-gdb] gdb/testsuite: Make hook-stop.exp ignore termination message from GDB stub
Sandra Loosemore
sandra@sourceware.org
Tue Sep 5 18:49:29 GMT 2023
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a006bc9c37e95b4afaf85715cc54fe57b3300ccd
commit a006bc9c37e95b4afaf85715cc54fe57b3300ccd
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Tue Sep 5 18:48:22 2023 +0000
gdb/testsuite: Make hook-stop.exp ignore termination message from GDB stub
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.
Reviewed-By: Tom Tromey <tom@tromey.com>
Approved-By: Tom Tromey <tom@tromey.com>
Diff:
---
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
}
}
More information about the Gdb-cvs
mailing list