From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix expected received signal message in testsuite
Date: Tue, 22 Nov 2022 10:18:30 +0100 [thread overview]
Message-ID: <yddmt8jqrdl.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <20190913221823.GV6076@embecosm.com> (Andrew Burgess's message of "Fri, 13 Sep 2019 18:18:24 -0400")
[-- Attachment #1: Type: text/plain, Size: 4563 bytes --]
Hi Andrew,
> * Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> [2019-09-05 14:04:06 +0200]:
>
>> Quite a number of tests FAIL on Solaris due to a mismatch between
>> expected and received messages: the testsuite expects something like
>>
>> Program received signal SIGABRT, Aborted.
>>
>> while on Solaris it gets
>>
>> Thread 2 received signal SIGABRT, Aborted.
>>
>> For a simple testcase, info threads shows
>>
>> (gdb) info threads
>> Id Target Id Frame
>> 1 LWP 1 main () at /vol/src/gnu/gdb/doc/bugs/ua.c:5
>> * 2 Thread 1 (LWP 1) main () at /vol/src/gnu/gdb/doc/bugs/ua.c:5
>>
>> I suspect this is due to support for the old pre-Solaris 9 MxN thread
>> model where user level threads were mapped to a different set of lwps.
>>
>> For the moment, I'm dealing with this by allowing both forms of the
>> message in the testsuite. The patch is almost completely mechanical,
>> with the exception of gdb.base/sigbpt.exp where the introduction of a
>> new group in the RE required adjustments in the $expect_out indices.
>
> I'm a little nervous about just allowing either "Thread" or "Program"
> for all tests for all targets. Maybe others will disagree and think
> I'm worrying about nothing, but I wonder if we could be more
> conservative by adding a support function into lib/gdb.exp that takes
> the name of a signal and returns the string we expect from GDB, which
> we can then change based on Solaris/non-Solaris.
>
> I haven't looked through the patch in enough detail to know if there's
> any reason why this wouldn't work, so please push back if you think
> the idea is unworkable.
sorry for letting the ball drop on this one. Only recently did I
stumble across it again when looking into a related issue and now I
finally understand why Solaris is different here.
[Thread starting at https://sourceware.org/ml/gdb-patches/2019-09/msg00050.html]
* Consider the following testcase:
$ cat selfkill.c
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <pthread.h>
void *
selfkill (void *arg)
{
kill (getpid (), SIGINT);
return NULL;
}
int
main (void)
{
#ifdef _REENTRANT
pthread_t tid;
pthread_create (&tid, NULL, selfkill, NULL);
pthread_join (tid, NULL);
#else
selfkill (NULL);
#endif
return 0;
}
* Now compile on Solaris 9, both without and with -pthread:
$ gcc -o selfkill selfkill.c
$ gcc -pthread -o selfkill-mt selfkill.c
* Run the identical binaries and versions of gdb (7.11 here) on both
Solaris 9 and Solaris 10:
$ gdb -q --batch -ex run selfkill{,-mt}
** Solaris 9, selfkill:
Program received signal SIGINT, Interrupt.
0xb5d54186 in _libc_kill () from /usr/lib/libc.so.1
** Solaris 9, selfkill-mt:
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New LWP 2 ]
[New Thread 2 (LWP 2)]
Thread 2 received signal SIGINT, Interrupt.
[Switching to Thread 1 (LWP 1)]
0xb5c9fad5 in _lwp_wait () from /usr/lib/libc.so.1
** Solaris 10, selfkill:
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Thread 2 received signal SIGINT, Interrupt.
[Switching to Thread 1 (LWP 1)]
0xfef0c165 in kill () from /lib/libc.so.1
** Solaris 10, selfkill-mt:
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New LWP 2 ]
[New Thread 2 (LWP 2)]
Thread 2 received signal SIGINT, Interrupt.
[Switching to Thread 1 (LWP 1)]
0xfeedca05 in __lwp_wait () from /lib/libc.so.1
** Trying the same on Linux/x86_64, one sees the same behaviour as on
Solaris 9: non-threaded and threaded programs behave differently.
* As you can see, on Solaris 10 even the not explicitly threaded version
of the test is shown as threaded, explaining the difference in the
"... received signal" messages.
This is a consequence of the Thread Model Unification Project in
Solaris 10, which removed the difference between non-threaded and
threaded processes. This has nothing to do with the removal of the
pre-Solaris 9 MxN multilevel thread model as I'd originally
suspected.
That said, I've reworked the patch to use a support function in gdb.exp
(signal_recv_msg) to hide the difference between the Solaris and
non-Solaris cases. One could think about introducing an additional arg
(threaded) so both the explicitly threaded and other cases could be
handled similarly.
So far lightly tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-testsuite-received-signal-msg.patch --]
[-- Type: text/x-patch, Size: 35793 bytes --]
diff --git a/gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp b/gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp
--- a/gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-brk-patterns.exp
@@ -43,7 +43,7 @@ set count 0
while {$keep_going} {
# Continue to next program breakpoint instruction.
gdb_test_multiple "continue" "brk instruction $count causes SIGTRAP" {
- -re "Program received signal SIGTRAP, Trace/breakpoint trap.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGTRAP], Trace/breakpoint trap.*$gdb_prompt $" {
pass $gdb_test_name
# Insert a breakpoint at the program breakpoint instruction so
diff --git a/gdb/testsuite/gdb.arch/aarch64-mte-core.exp b/gdb/testsuite/gdb.arch/aarch64-mte-core.exp
--- a/gdb/testsuite/gdb.arch/aarch64-mte-core.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-mte-core.exp
@@ -115,7 +115,7 @@ proc test_mode { mode } {
if {$mode == "sync"} {
gdb_test "continue" \
[multi_line \
- "Program received signal SIGSEGV, Segmentation fault" \
+ "[signal_recv_msg SIGSEGV], Segmentation fault" \
"Memory tag violation while accessing address ${::hex}" \
"Allocation tag 0x1" \
"Logical tag 0x0\." \
@@ -125,7 +125,7 @@ proc test_mode { mode } {
} else {
gdb_test "continue" \
[multi_line \
- "Program received signal SIGSEGV, Segmentation fault" \
+ "[signal_recv_msg SIGSEGV], Segmentation fault" \
"Memory tag violation" \
"Fault address unavailable\." \
"${::hex} in .* from .*"] \
diff --git a/gdb/testsuite/gdb.arch/aarch64-mte.exp b/gdb/testsuite/gdb.arch/aarch64-mte.exp
--- a/gdb/testsuite/gdb.arch/aarch64-mte.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-mte.exp
@@ -327,7 +327,7 @@ foreach reg {"tag_ctl" } {
# information.
gdb_test "continue" \
[multi_line \
- "Program received signal SIGSEGV, Segmentation fault" \
+ "[signal_recv_msg SIGSEGV], Segmentation fault" \
"Memory tag violation while accessing address $hex" \
"Allocation tag $hex" \
"Logical tag $hex\." \
@@ -360,7 +360,7 @@ with_test_prefix "async" {
# information for async mode
gdb_test "continue" \
[multi_line \
- "Program received signal SIGSEGV, Segmentation fault" \
+ "[signal_recv_msg SIGSEGV], Segmentation fault" \
"Memory tag violation" \
"Fault address unavailable\." \
"$hex in .* \\(.*\\) .*"] \
diff --git a/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp b/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
--- a/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
+++ b/gdb/testsuite/gdb.arch/aarch64-sighandler-regs.exp
@@ -87,7 +87,7 @@ proc check_regs {regtype regnums value p
# Run until end of signal handler
gdb_test "continue" \
- "Continuing.*Program received signal SIGILL.*" \
+ "Continuing.*[signal_recv_msg SIGILL].*" \
"continue until signal"
gdb_breakpoint [gdb_get_line_number "exit(0)"]
diff --git a/gdb/testsuite/gdb.arch/amd64-i386-address.exp b/gdb/testsuite/gdb.arch/amd64-i386-address.exp
--- a/gdb/testsuite/gdb.arch/amd64-i386-address.exp
+++ b/gdb/testsuite/gdb.arch/amd64-i386-address.exp
@@ -32,7 +32,7 @@ gdb_run_cmd
set test "trap stop"
gdb_test_multiple "" $test {
- -re "Program received signal SIGTRAP,.*_start .*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGTRAP],.*_start .*$gdb_prompt $" {
pass $test
}
}
diff --git a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
--- a/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
+++ b/gdb/testsuite/gdb.arch/i386-gnu-cfi.exp
@@ -53,7 +53,7 @@ gdb_load ${binfile}
gdb_run_cmd
gdb_test_multiple {} "continue to abort()" {
- -re ".*Program received signal SIGABRT,.*$gdb_prompt $" {
+ -re ".*[signal_recv_msg SIGABRT],.*$gdb_prompt $" {
pass "continue to abort()"
}
}
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-call.exp b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
--- a/gdb/testsuite/gdb.arch/i386-mpx-call.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
@@ -62,7 +62,7 @@ set bndcfg_reg " = \\\{raw = $hex, confi
preserved = $hex, enabled = $hex\\\}\\\}"
set bndstatus_reg " = \\\{raw = $hex, status = \\\{bde = $hex,\
error = $hex\\\}\\\}"
-set u_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \
+set u_fault [multi_line "[signal_recv_msg SIGSEGV], Segmentation fault" \
"Upper bound violation while accessing address $hex" \
"Bounds: \\\[lower = $hex, upper = $hex\\\]"]
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp b/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
--- a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
@@ -43,11 +43,11 @@ if ![runto_main] {
return -1
}
-set u_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \
+set u_fault [multi_line "[signal_recv_msg SIGSEGV], Segmentation fault" \
"Upper bound violation while accessing address $hex" \
"Bounds: \\\[lower = $hex, upper = $hex\\\]"]
-set l_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \
+set l_fault [multi_line "[signal_recv_msg SIGSEGV], Segmentation fault" \
"Lower bound violation while accessing address $hex" \
"Bounds: \\\[lower = $hex, upper = $hex\\\]"]
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp b/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
--- a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
@@ -49,11 +49,11 @@ if ![runto_main] {
return -1
}
-set violation [multi_line "Program received signal SIGSEGV, Segmentation fault" \
+set violation [multi_line "[signal_recv_msg SIGSEGV], Segmentation fault" \
"Upper bound violation while accessing address $hex" \
"Bounds: \\\[lower = $hex, upper = $hex\\\]"]
-set segv_with_exit "Program received signal SIGSEGV,\
+set segv_with_exit "[signal_recv_msg SIGSEGV],\
Segmentation fault.*$inferior_exited_re.*"
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -71,7 +71,7 @@ if ![runto_main] then {
# Testcase for standard prologue.
-gdb_test "continue" "Program received signal SIGTRAP.*" "continue to standard"
+gdb_test "continue" "[signal_recv_msg SIGTRAP].*" "continue to standard"
skip_breakpoint standard
@@ -98,7 +98,7 @@ gdb_test "backtrace 10" \
"first backtrace in stack_align_ecx"
gdb_test "continue" \
- "Program received signal SIGTRAP.*" \
+ "[signal_recv_msg SIGTRAP].*" \
"continue in stack_align_ecx"
skip_breakpoint stack_align_ecx
@@ -126,7 +126,7 @@ gdb_test "backtrace 10" \
"first backtrace in stack_align_edx"
gdb_test "continue" \
- "Program received signal SIGTRAP.*" \
+ "[signal_recv_msg SIGTRAP].*" \
"continue in stack_align_edx"
skip_breakpoint stack_align_edx
@@ -154,7 +154,7 @@ gdb_test "backtrace 10" \
"first backtrace in stack_align_eax"
gdb_test "continue" \
- "Program received signal SIGTRAP.*" \
+ "[signal_recv_msg SIGTRAP].*" \
"continue in stack_align_eax"
skip_breakpoint stack_align_eax
@@ -170,7 +170,7 @@ gdb_test "info frame" \
# Testcase from symtab/1253.
-gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1253"
+gdb_test "continue" "[signal_recv_msg SIGTRAP].*" "continue to gdb1253"
skip_breakpoint gdb1253
@@ -185,7 +185,7 @@ gdb_test "info frame" \
# Testcase from backtrace/1718.
-gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1718"
+gdb_test "continue" "[signal_recv_msg SIGTRAP].*" "continue to gdb1718"
skip_breakpoint gdb1718
@@ -201,7 +201,7 @@ gdb_test "info frame" \
# Testcase from backtrace/1338.
-gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1338"
+gdb_test "continue" "[signal_recv_msg SIGTRAP].*" "continue to gdb1338"
skip_breakpoint gdb1338
diff --git a/gdb/testsuite/gdb.arch/i386-size-overlap.exp b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
--- a/gdb/testsuite/gdb.arch/i386-size-overlap.exp
+++ b/gdb/testsuite/gdb.arch/i386-size-overlap.exp
@@ -41,7 +41,7 @@ gdb_load ${binfile}
# We use gdb_run_cmd so this stands a chance to work for remote
# targets too.
gdb_run_cmd
-gdb_test "" "Program received signal SIGTRAP.*" "run past main"
+gdb_test "" "[signal_recv_msg SIGTRAP.*" "run past main"
set message "backtrace shows the outer function"
gdb_test_multiple "backtrace 10" $message {
diff --git a/gdb/testsuite/gdb.arch/i386-size.exp b/gdb/testsuite/gdb.arch/i386-size.exp
--- a/gdb/testsuite/gdb.arch/i386-size.exp
+++ b/gdb/testsuite/gdb.arch/i386-size.exp
@@ -46,7 +46,7 @@ gdb_load ${binfile}
# We use gdb_run_cmd so this stands a chance to work for remote
# targets too.
gdb_run_cmd
-gdb_test "" "Program received signal SIGTRAP.*" "run past main"
+gdb_test "" "[signal_recv_msg SIGTRAP].*" "run past main"
set message "backtrace shows no function"
gdb_test_multiple "backtrace 10" $message {
diff --git a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
--- a/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
+++ b/gdb/testsuite/gdb.arch/i386-sse-stack-align.exp
@@ -48,7 +48,7 @@ foreach i {0 1 2 3 4} {
-re " = 2\r\n$gdb_prompt $" {
pass $test
}
- -re "Program received signal SIGSEGV, Segmentation fault\\..*\r\n$gdb_prompt $" {
+ -re "[signal_recv_msg SIGSEGV], Segmentation fault\\..*\r\n$gdb_prompt $" {
fail $test
}
}
diff --git a/gdb/testsuite/gdb.arch/i386-unwind.exp b/gdb/testsuite/gdb.arch/i386-unwind.exp
--- a/gdb/testsuite/gdb.arch/i386-unwind.exp
+++ b/gdb/testsuite/gdb.arch/i386-unwind.exp
@@ -46,7 +46,7 @@ gdb_load ${binfile}
# We use gdb_run_cmd so this stands a chance to work for remote
# targets too.
gdb_run_cmd
-gdb_test "" "Program received signal SIGTRAP.*" "run past gdb1435"
+gdb_test "" "[signal_recv_msg SIGTRAP].*" "run past gdb1435"
gdb_test "backtrace 10" \
"#1\[ \t]*$hex in gdb1435.*\r\n#2\[ \t\]*$hex in main.*" \
diff --git a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
--- a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
@@ -52,7 +52,7 @@ gdb_breakpoint $bp3
set insn_supported 1
gdb_test_multiple "stepi" "set r3" {
- -re "Program received signal SIGILL, Illegal instruction\\..*" {
+ -re "[signal_recv_msg SIGILL], Illegal instruction\\..*" {
set insn_supported 0
}
-re -wrap "" {
diff --git a/gdb/testsuite/gdb.arch/powerpc-lnia.exp b/gdb/testsuite/gdb.arch/powerpc-lnia.exp
--- a/gdb/testsuite/gdb.arch/powerpc-lnia.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-lnia.exp
@@ -56,7 +56,7 @@ gdb_breakpoint $bp3
# register values as we proceed.
set insn_supported 1
gdb_test_multiple "stepi" "set r3" {
- -re "Program received signal SIGILL, Illegal instruction\\..*" {
+ -re "[signal_recv_msg SIGILL], Illegal instruction\\..*" {
set insn_supported 0
}
-re -wrap "" {
diff --git a/gdb/testsuite/gdb.arch/powerpc-stackless.exp b/gdb/testsuite/gdb.arch/powerpc-stackless.exp
--- a/gdb/testsuite/gdb.arch/powerpc-stackless.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-stackless.exp
@@ -31,7 +31,7 @@ gdb_run_cmd
set test "run until SIGSEGV"
gdb_test_multiple "" $test {
- -re "Program received signal SIGSEGV.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGSEGV].*$gdb_prompt $" {
pass $test
}
}
diff --git a/gdb/testsuite/gdb.arch/powerpc-trap.exp b/gdb/testsuite/gdb.arch/powerpc-trap.exp
--- a/gdb/testsuite/gdb.arch/powerpc-trap.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-trap.exp
@@ -50,7 +50,7 @@ while {$keep_going} {
# Continue to next program breakpoint instruction.
gdb_test_multiple "continue" "trap instruction $count causes SIGTRAP" {
- -re "Program received signal SIGTRAP, Trace/breakpoint trap.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGTRAP], Trace/breakpoint trap.*$gdb_prompt $" {
pass $gdb_test_name
# Advance PC to next instruction
diff --git a/gdb/testsuite/gdb.arch/s390-stackless.exp b/gdb/testsuite/gdb.arch/s390-stackless.exp
--- a/gdb/testsuite/gdb.arch/s390-stackless.exp
+++ b/gdb/testsuite/gdb.arch/s390-stackless.exp
@@ -29,7 +29,7 @@ gdb_run_cmd
set test "run until SIGSEGV"
gdb_test_multiple "" $test {
- -re "Program received signal SIGSEGV.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGSEGV].*$gdb_prompt $" {
pass $test
}
}
diff --git a/gdb/testsuite/gdb.arch/s390-tdbregs.exp b/gdb/testsuite/gdb.arch/s390-tdbregs.exp
--- a/gdb/testsuite/gdb.arch/s390-tdbregs.exp
+++ b/gdb/testsuite/gdb.arch/s390-tdbregs.exp
@@ -40,7 +40,7 @@ if ![runto_main] then {
}
gdb_test_multiple "next" "check for TE support" {
- -re "Program received signal SIGILL,.*\r\n$gdb_prompt $" {
+ -re "[signal_recv_msg SIGILL],.*\r\n$gdb_prompt $" {
unsupported "no TE support."
return
}
@@ -58,7 +58,7 @@ set crashline [gdb_get_line_number "FAUL
gdb_test "print \$tdb0" "\\\$\[0-9\]+ = <unavailable>" "tdb0 unavailable"
gdb_test "print \$tr0" "\\\$\[0-9\]+ = <unavailable>" "tr0 unavailable"
gdb_test "next" \
- "Program received signal SIGSEGV, .*" \
+ "[signal_recv_msg SIGSEGV], .*" \
"crash in transaction"
gdb_test "print/x \$tdb0" "\\\$\[0-9\]+ = 0x1.*" "tdb0 available"
gdb_test "set print symbol-filename" "" "set print symbol-filename"
diff --git a/gdb/testsuite/gdb.arch/s390-vregs.exp b/gdb/testsuite/gdb.arch/s390-vregs.exp
--- a/gdb/testsuite/gdb.arch/s390-vregs.exp
+++ b/gdb/testsuite/gdb.arch/s390-vregs.exp
@@ -51,7 +51,7 @@ gdb_test_multiple "x/i \$pc" "get PC at
}
gdb_test_multiple "stepi" "check for vector support" {
- -re "Program received signal SIGILL,.*\r\n$gdb_prompt $" {
+ -re "[signal_recv_msg SIGILL],.*\r\n$gdb_prompt $" {
unsupported "no vector support."
return
}
diff --git a/gdb/testsuite/gdb.arch/sparc64-adi.exp b/gdb/testsuite/gdb.arch/sparc64-adi.exp
--- a/gdb/testsuite/gdb.arch/sparc64-adi.exp
+++ b/gdb/testsuite/gdb.arch/sparc64-adi.exp
@@ -47,6 +47,6 @@ gdb_test "adi x/100 shmaddr" "${hex}00:\
"examine new ADI"
gdb_test_no_output "adi a/100 shmaddr=0x0" "reset ADI"
gdb_test "continue" \
- [multi_line "Program received signal SIGSEGV, Segmentation fault.*" \
+ [multi_line "[signal_recv_msg SIGSEGV], Segmentation fault.*" \
"ADI precise mismatch while accessing address $hex.*" ] \
"continue to sigsegv"
diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp
--- a/gdb/testsuite/gdb.base/auxv.exp
+++ b/gdb/testsuite/gdb.base/auxv.exp
@@ -125,7 +125,7 @@ set live_data [fetch_auxv "info auxv on
set gcore_works [gdb_gcore_cmd "$gcorefile" "gcore"]
# Let the program continue and die.
-gdb_test continue ".*Program received signal.*" "continue until signal"
+gdb_test continue ".*[signal_recv_msg .*]" "continue until signal"
gdb_test continue ".*Program terminated with signal.*" "continue and terminate"
# Now collect the core dump it left.
diff --git a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
--- a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
+++ b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
@@ -84,7 +84,7 @@ proc do_test {} {
fail "$test (SIGALRM)"
return
}
- -re "Program received signal SIGINT.*\r\n$gdb_prompt $" {
+ -re "[signal_recv_msg SIGINT].*\r\n$gdb_prompt $" {
send_log "$internal_pass (SIGINT)\n"
}
-re "Quit\r\n$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp b/gdb/testsuite/gdb.base/bp-permanent.exp
--- a/gdb/testsuite/gdb.base/bp-permanent.exp
+++ b/gdb/testsuite/gdb.base/bp-permanent.exp
@@ -134,7 +134,7 @@ proc test {always_inserted sw_watchpoint
unsupported "failed to stop at permanent breakpoint"
return
}
- -re "Program received signal SIGTRAP.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGTRAP].*$gdb_prompt $" {
pass $test
}
}
@@ -174,7 +174,7 @@ proc test {always_inserted sw_watchpoint
# disabled, it should act as if we hadn't created it in the first
# place. IOW, we should get a random signal, and, the breakpoint's
# command should not run.
- gdb_test "continue" "Program received signal SIGTRAP.*" \
+ gdb_test "continue" "[signal_recv_msg SIGTRAP].*" \
"disabled permanent breakpoint doesn't explain stop"
gdb_test "info breakpoints" \
@@ -257,7 +257,7 @@ proc test {always_inserted sw_watchpoint
set test "single-step to handler"
gdb_test_multiple "stepi" $test {
- -re "Program received signal SIGTRAP.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGTRAP].*$gdb_prompt $" {
fail $test
}
-re "signal handler called.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.base/call-signal-resume.exp b/gdb/testsuite/gdb.base/call-signal-resume.exp
--- a/gdb/testsuite/gdb.base/call-signal-resume.exp
+++ b/gdb/testsuite/gdb.base/call-signal-resume.exp
@@ -104,7 +104,7 @@ gdb_test "continue" "Breakpoint \[0-9\]*
# Continue again, we should get a signal.
-gdb_test "continue" "Program received signal .*" \
+gdb_test "continue" "[signal_recv_msg .*]" \
"continue to receipt of signal"
# Hand call another function that prematurely stops,
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -195,7 +195,7 @@ gdb_test_multiple "next" "step out of ma
-re "_*start\[0-9\]* \\(\[^)\]*\\).*$gdb_prompt $" {
pass "step out of main"
}
- -re ".*Program received signal SIGTRAP.*$gdb_prompt $" {
+ -re ".*[signal_recv_msg SIGTRAP].*$gdb_prompt $" {
pass "step out of main"
}
-re ".*in.*__uClibc_main.*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.base/exitsignal.exp b/gdb/testsuite/gdb.base/exitsignal.exp
--- a/gdb/testsuite/gdb.base/exitsignal.exp
+++ b/gdb/testsuite/gdb.base/exitsignal.exp
@@ -53,7 +53,7 @@ gdb_test "print \$_exitcode" " = void" \
"\$_exitcode is void before running"
# Trigger SIGSEGV.
-gdb_test "continue" "Program received signal SIGSEGV.*" "trigger SIGSEGV"
+gdb_test "continue" "[signal_recv_msg SIGSEGV].*" "trigger SIGSEGV"
# Continue until the end.
gdb_test "continue" "Program terminated with signal SIGSEGV.*" \
diff --git a/gdb/testsuite/gdb.base/interrupt-a.exp b/gdb/testsuite/gdb.base/interrupt-a.exp
--- a/gdb/testsuite/gdb.base/interrupt-a.exp
+++ b/gdb/testsuite/gdb.base/interrupt-a.exp
@@ -41,7 +41,7 @@ gdb_test_multiple "interrupt -a" "" {
}
gdb_test_multiple "" "inferior stopped" {
- -re "Program received signal" {
+ -re "[signal_recv_msg .*]" {
pass $gdb_test_name
}
}
diff --git a/gdb/testsuite/gdb.base/interrupt-noterm.exp b/gdb/testsuite/gdb.base/interrupt-noterm.exp
--- a/gdb/testsuite/gdb.base/interrupt-noterm.exp
+++ b/gdb/testsuite/gdb.base/interrupt-noterm.exp
@@ -66,7 +66,7 @@ gdb_test_multiple $test $test {
set test "inferior received SIGINT"
gdb_test_multiple "" $test {
- -re "\r\nProgram received signal SIGINT.*" {
+ -re "\r\n[signal_recv_msg SIGINT].*" {
# This appears after the prompt, which was already consumed
# above.
pass $test
diff --git a/gdb/testsuite/gdb.base/interrupt.exp b/gdb/testsuite/gdb.base/interrupt.exp
--- a/gdb/testsuite/gdb.base/interrupt.exp
+++ b/gdb/testsuite/gdb.base/interrupt.exp
@@ -82,7 +82,7 @@ if ![file exists $binfile] then {
send_gdb "\003"
set msg "send_gdb control C"
gdb_test_multiple "" $msg {
- -re "Program received signal SIGINT.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGINT].*$gdb_prompt $" {
pass $msg
}
}
@@ -93,7 +93,7 @@ if ![file exists $binfile] then {
-re " = 4.*$gdb_prompt $" {
pass $msg
}
- -re ".*Program received signal SIG(SEGV|ILL).*$gdb_prompt $" {
+ -re ".*[signal_recv_msg SIG(SEGV|ILL)].*$gdb_prompt $" {
setup_xfail "i*86-pc-linux*-gnu*"
fail "child died when we called func1, skipped rest of tests"
return
@@ -166,7 +166,7 @@ if ![file exists $binfile] then {
set msg "Send Control-C, second time"
send_gdb "\003"
gdb_test_multiple "" "$msg" {
- -re "Program received signal SIGINT.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGINT].*$gdb_prompt $" {
pass "$msg"
}
}
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -119,7 +119,7 @@ proc jit_reader_test {} {
gdb_test_no_output "jit-reader-load ${jit_reader_bin}" "jit-reader-load"
gdb_run_cmd
- gdb_test "" "Program received signal SIGTRAP, .*" "expect SIGTRAP"
+ gdb_test "" "[signal_recv_msg SIGTRAP], .*" "expect SIGTRAP"
# Test the JIT reader unwinder.
with_test_prefix "with jit-reader" {
diff --git a/gdb/testsuite/gdb.base/kill-after-signal.exp b/gdb/testsuite/gdb.base/kill-after-signal.exp
--- a/gdb/testsuite/gdb.base/kill-after-signal.exp
+++ b/gdb/testsuite/gdb.base/kill-after-signal.exp
@@ -35,7 +35,7 @@ if ![runto_main] {
return -1
}
-gdb_test "continue" "Program received signal SIGUSR1, .*"
+gdb_test "continue" "[signal_recv_msg SIGUSR1], .*"
set test "handler"
gdb_test_multiple "stepi" $test {
diff --git a/gdb/testsuite/gdb.base/random-signal.exp b/gdb/testsuite/gdb.base/random-signal.exp
--- a/gdb/testsuite/gdb.base/random-signal.exp
+++ b/gdb/testsuite/gdb.base/random-signal.exp
@@ -47,7 +47,7 @@ proc do_test {} {
# For this to work we must be sure to consume the "Continuing."
# message first, or GDB's signal handler may not be in place.
after 500 {send_gdb "\003"}
- gdb_test "" "Program received signal SIGINT.*" "stop with control-c"
+ gdb_test "" "[signal_recv_msg SIGINT].*" "stop with control-c"
}
# With native debugging and "run" (with job control), the ctrl-c
diff --git a/gdb/testsuite/gdb.base/range-stepping.exp b/gdb/testsuite/gdb.base/range-stepping.exp
--- a/gdb/testsuite/gdb.base/range-stepping.exp
+++ b/gdb/testsuite/gdb.base/range-stepping.exp
@@ -192,7 +192,7 @@ if ![target_info exists gdb,nointerrupts
incr vcont_r_counter
exp_continue
}
- -re "Program received signal SIGINT.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGINT].*$gdb_prompt $" {
pass $test
}
}
diff --git a/gdb/testsuite/gdb.base/relativedebug.exp b/gdb/testsuite/gdb.base/relativedebug.exp
--- a/gdb/testsuite/gdb.base/relativedebug.exp
+++ b/gdb/testsuite/gdb.base/relativedebug.exp
@@ -43,7 +43,7 @@ gdb_test_multiple $test $test {
}
# pause () -> SIGALRM -> handler () -> abort ()
-gdb_test "continue" "Program received signal SIGABRT.*"
+gdb_test "continue" "[signal_recv_msg SIGABRT].*"
# Backtracing through pause broke if glibc has been prelinked,
# because the separate debug files in /usr/lib/debug had different
diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp
--- a/gdb/testsuite/gdb.base/sigall.exp
+++ b/gdb/testsuite/gdb.base/sigall.exp
@@ -50,7 +50,7 @@ proc test_one_sig {nextsig} {
}
gdb_test "continue" \
- "Continuing.*Program received signal SIG$esig.*" \
+ "Continuing.*[signal_recv_msg SIG$esig].*" \
"get signal $esig"
}
@@ -180,7 +180,7 @@ gdb_test "handle SIGTERM stop print" \
"SIGTERM\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes.*"
gdb_test "b handle_TERM" "Breakpoint \[0-9\]+ .*"
gdb_test "continue" \
- "Continuing.*Program received signal SIGTERM.*" \
+ "Continuing.*[signal_recv_msg SIGTERM].*" \
"get signal TERM"
gdb_test "continue" "Breakpoint.*handle_TERM.*" "send signal TERM"
gdb_continue_to_end "continue to sigall exit"
diff --git a/gdb/testsuite/gdb.base/sigbpt.exp b/gdb/testsuite/gdb.base/sigbpt.exp
--- a/gdb/testsuite/gdb.base/sigbpt.exp
+++ b/gdb/testsuite/gdb.base/sigbpt.exp
@@ -75,7 +75,7 @@ gdb_test "advance bowler" "bowler.*" "ad
set test "stepping to fault"
set signame "SIGSEGV"
gdb_test_multiple "stepi" "$test" {
- -re "Program received signal (SIGBUS|SIGSEGV).*pc(\r\n| *) *=> (0x\[0-9a-f\]*).*$gdb_prompt $" {
+ -re "[signal_recv_msg (SIGBUS|SIGSEGV)].*pc(\r\n| *) *=> (0x\[0-9a-f\]*).*$gdb_prompt $" {
set signame $expect_out(1,string)
set segv_addr $expect_out(3,string)
pass "$test"
@@ -172,7 +172,7 @@ proc stepi_out { name args } {
send_gdb "stepi\n"
exp_continue
}
- -re "Program received signal SIGSEGV.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGSEGV].*$gdb_prompt $" {
kfail gdb/8807 "$test (executed fault insn)"
}
-re "Breakpoint.*pc(\r\n| *)[at_segv] .*bowler.*$gdb_prompt $" {
@@ -239,7 +239,7 @@ proc cont_out { name args } {
# Now single step the faulted instrction at that breakpoint.
gdb_test "stepi" \
- "Program received signal ${signame}.*pc(\r\n| *)=> [at_segv] .*" \
+ "[signal_recv_msg ${signame}].*pc(\r\n| *)=> [at_segv] .*" \
"${name}; stepi fault"
# Clear any breakpoints
diff --git a/gdb/testsuite/gdb.base/siginfo-addr.exp b/gdb/testsuite/gdb.base/siginfo-addr.exp
--- a/gdb/testsuite/gdb.base/siginfo-addr.exp
+++ b/gdb/testsuite/gdb.base/siginfo-addr.exp
@@ -39,7 +39,7 @@ if ![runto_main] then {
}
# Run to the signal.
-gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal"
+gdb_test "continue" ".*[signal_recv_msg SIGSEGV].*" "continue to signal"
gdb_breakpoint "pass"
diff --git a/gdb/testsuite/gdb.base/siginfo-infcall.exp b/gdb/testsuite/gdb.base/siginfo-infcall.exp
--- a/gdb/testsuite/gdb.base/siginfo-infcall.exp
+++ b/gdb/testsuite/gdb.base/siginfo-infcall.exp
@@ -31,7 +31,7 @@ if ![runto_main] {
gdb_breakpoint "pass"
gdb_breakpoint "fail"
-gdb_test "continue" "Program received signal SIGUSR1, .*" "continue to SIGUSR1"
+gdb_test "continue" "[signal_recv_msg SIGUSR1], .*" "continue to SIGUSR1"
gdb_test "p callme ()" " = 42"
diff --git a/gdb/testsuite/gdb.base/siginfo-obj.exp b/gdb/testsuite/gdb.base/siginfo-obj.exp
--- a/gdb/testsuite/gdb.base/siginfo-obj.exp
+++ b/gdb/testsuite/gdb.base/siginfo-obj.exp
@@ -44,7 +44,7 @@ if ![runto_main] then {
}
# Run to the signal.
-gdb_test "continue" ".*Program received signal SIGSEGV.*" \
+gdb_test "continue" ".*[signal_recv_msg SIGSEGV].*" \
"continue to signal, 1st"
# Try to generate a core file, for a later test.
@@ -104,7 +104,7 @@ if ![runto_main] then {
}
# Run to the signal.
-gdb_test "continue" ".*Program received signal SIGSEGV.*" \
+gdb_test "continue" ".*[signal_recv_msg SIGSEGV].*" \
"continue to signal, 2nd"
set test "set si_addr"
diff --git a/gdb/testsuite/gdb.base/signest.exp b/gdb/testsuite/gdb.base/signest.exp
--- a/gdb/testsuite/gdb.base/signest.exp
+++ b/gdb/testsuite/gdb.base/signest.exp
@@ -43,7 +43,7 @@ if { [is_address_zero_readable] } {
# Run until we hit the SIGSEGV (or SIGBUS on some platforms).
gdb_test "continue" \
- ".*Program received signal (SIGBUS|SIGSEGV).*bowler.*" \
+ ".*[signal_recv_msg (SIGBUS|SIGSEGV)].*bowler.*" \
"continue to fault"
# Insert conditional breakpoint at faulting instruction
@@ -55,6 +55,6 @@ gdb_test "handle SIGBUS nostop print pas
# Step off the faulting instruction into the handler, triggering nested faults
gdb_test "continue" \
- ".*Program received signal (SIGBUS|SIGSEGV).*Program received signal (SIGBUS|SIGSEGV).*exited normally.*" \
+ ".*[signal_recv_msg (SIGBUS|SIGSEGV)].*[signal_recv_msg (SIGBUS|SIGSEGV)].*exited normally.*" \
"run through nested faults"
diff --git a/gdb/testsuite/gdb.base/signull.exp b/gdb/testsuite/gdb.base/signull.exp
--- a/gdb/testsuite/gdb.base/signull.exp
+++ b/gdb/testsuite/gdb.base/signull.exp
@@ -71,14 +71,14 @@ set test "probe function pointer"
set function_pointer code_entry_point
set signame "SIGSEGV"
gdb_test_multiple "continue" "$test" {
- -re "Program received signal SIGSEGV.*bowler .*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGSEGV].*bowler .*$gdb_prompt $" {
set function_pointer code_descriptor
pass "$test (function descriptor)"
}
- -re "Program received signal SIGSEGV.*0.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGSEGV].*0.*$gdb_prompt $" {
pass "$test (function entry-point)"
}
- -re "Program received signal SIGBUS.*0.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGBUS].*0.*$gdb_prompt $" {
set signame SIGBUS
pass "$test (function entry-point)"
}
@@ -102,7 +102,7 @@ proc test_segv { name tag bt_from_segv b
gdb_test continue "Breakpoint.* bowler.*" "${name}; start with the bowler"
# NB: Don't use $tag in the testname - changes across systems.
gdb_test_no_output "set test = $tag" "${name}; select the pointer type"
- gdb_test continue "Program received signal ${signame}.*" \
+ gdb_test continue "[signal_recv_msg ${signame}].*" \
"${name}; take the ${signame}"
gdb_test backtrace $bt_from_segv "${name}; backtrace from ${signame}"
gdb_test continue "Breakpoint.* keeper.*" "${name}; continue to the keeper"
diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp
--- a/gdb/testsuite/gdb.base/sigstep.exp
+++ b/gdb/testsuite/gdb.base/sigstep.exp
@@ -92,7 +92,7 @@ proc advance { enter_cmd in_handler_pref
} else {
gdb_test "handle SIGALRM print pass stop"
gdb_test "handle SIGVTALRM print pass stop"
- gdb_test "continue" "Program received signal.*" "continue to signal"
+ gdb_test "continue" "[signal_recv_msg .*]" "continue to signal"
}
gdb_test_multiple "$enter_cmd" "$enter_cmd to handler" {
@@ -160,7 +160,7 @@ set in_handler_map {
set test "advance in handler"
gdb_test_multiple "advance $other_handler_location" $test {
- -re "Program received signal SIGTRAP.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGTRAP].*$gdb_prompt $" {
# On some versions of Linux (observed on
# 3.16.4-200.fc20.x86_64), using PTRACE_SINGLESTEP+sig
# to step into a signal handler, and then issuing
diff --git a/gdb/testsuite/gdb.btrace/segv.exp b/gdb/testsuite/gdb.btrace/segv.exp
--- a/gdb/testsuite/gdb.btrace/segv.exp
+++ b/gdb/testsuite/gdb.btrace/segv.exp
@@ -33,7 +33,7 @@ if ![runto_main] {
# trace the test code
gdb_test_no_output "record btrace"
gdb_test "continue" [multi_line \
- "Program received signal SIGSEGV, Segmentation fault\." \
+ "[signal_recv_msg SIGSEGV], Segmentation fault\." \
"0x0* in \\\?\\\? \\\(\\\)" \
] "cont to segv"
diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp
--- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp
@@ -53,10 +53,10 @@ proc test_one_sig {nextsig} {
}
set testmsg "get signal $thissig"
gdb_test_multiple "continue" $testmsg {
- -re "Program received signal SIG$thissig.*handle_$thissig.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIG$thissig].*handle_$thissig.*$gdb_prompt $" {
fail "$testmsg (wrong location)"
}
- -re "Program received signal SIG$thissig.*$gdb_prompt $" {
+ -re "[signal_recv_msg SIG$thissig].*$gdb_prompt $" {
pass $testmsg
}
-re "Breakpoint.* handle_$thissig.*$gdb_prompt $" {
@@ -114,7 +114,7 @@ proc test_one_sig_reverse {prevsig} {
-re "Breakpoint.*handle_.*$gdb_prompt " {
pass "$testmsg (un-handled)"
}
- -re "Program received signal SIG$prevsig.*$gdb_prompt " {
+ -re "[signal_recv_msg SIG$prevsig].*$gdb_prompt " {
pass "reverse to signal event, $prevsig"
set nested_testmsg "reverse signal $prevsig delivered"
@@ -305,7 +305,7 @@ gdb_test "handle SIGTERM stop print" \
"SIGTERM\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes.*"
gdb_test "b handle_TERM" "Breakpoint \[0-9\]+ .*"
gdb_test "continue" \
- "Continuing.*Program received signal SIGTERM.*" \
+ "Continuing.*[signal_recv_msg SIGTERM].*" \
"get signal TERM"
gdb_test "continue" "Breakpoint.*handle_TERM.*" "send signal TERM"
diff --git a/gdb/testsuite/gdb.reverse/sigall-reverse.exp b/gdb/testsuite/gdb.reverse/sigall-reverse.exp
--- a/gdb/testsuite/gdb.reverse/sigall-reverse.exp
+++ b/gdb/testsuite/gdb.reverse/sigall-reverse.exp
@@ -53,10 +53,10 @@ proc test_one_sig {nextsig} {
}
gdb_test_multiple "continue" "get signal $thissig" {
-wrap -re \
- "Program received signal SIG$thissig.*handle_$thissig.*" {
+ "[signal_recv_msg SIG$thissig].*handle_$thissig.*" {
fail "$gdb_test_name (wrong location)"
}
- -wrap -re "Program received signal SIG$thissig.*" {
+ -wrap -re "[signal_recv_msg SIG$thissig].*" {
pass $gdb_test_name
}
-wrap -re "Breakpoint.* handle_$thissig.*" {
@@ -120,7 +120,7 @@ proc test_one_sig_reverse {prevsig} {
-re "Breakpoint.*handle_.*$gdb_prompt " {
pass "$testmsg (un-handled)"
}
- -re "Program received signal SIG$prevsig.*$gdb_prompt " {
+ -re "[signal_recv_msg SIG$prevsig].*$gdb_prompt " {
pass "reverse to signal event, $prevsig"
set nested_testmsg "reverse signal $prevsig delivered"
@@ -260,7 +260,7 @@ gdb_test "handle SIGTERM stop print" \
"SIGTERM\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes.*"
gdb_test "b handle_TERM" "Breakpoint \[0-9\]+ .*"
gdb_test "continue" \
- "Continuing.*Program received signal SIGTERM.*" \
+ "Continuing.*[signal_recv_msg SIGTERM].*" \
"get signal TERM"
gdb_test "continue" "Breakpoint.*handle_TERM.*" "send signal TERM"
diff --git a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
--- a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
+++ b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
@@ -67,7 +67,7 @@ proc connect_continue_ctrl_c {} {
}
after 1000 {send_gdb "\003"}
- gdb_test "" "Program received signal SIGINT.*" "stop with control-c"
+ gdb_test "" "[signal_recv_msg SIGINT].*" "stop with control-c"
}
with_test_prefix "first" {
diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp
--- a/gdb/testsuite/gdb.server/solib-list.exp
+++ b/gdb/testsuite/gdb.server/solib-list.exp
@@ -117,7 +117,7 @@ foreach nonstop { 0 1 } { with_test_pref
}
gdb_assert {$new_symbol_table == 1}
- gdb_test "continue" "Program received signal SIGUSR1, .*"
+ gdb_test "continue" "[signal_recv_msg SIGUSR1], .*"
gdb_test "sharedlibrary" ".*"
gdb_test "p libvar" " = 23"
}}
diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp
--- a/gdb/testsuite/gdb.trace/trace-condition.exp
+++ b/gdb/testsuite/gdb.trace/trace-condition.exp
@@ -96,7 +96,7 @@ proc test_tracepoints { trace_command co
-re ".*Breakpoint \[0-9\]+, end .*$gdb_prompt $" {
pass "advance through tracing"
}
- -re "Program received signal SIGSEGV, Segmentation fault\\..*$gdb_prompt $" {
+ -re "[signal_recv_msg SIGSEGV], Segmentation fault\\..*$gdb_prompt $" {
if { $kfail_proc != 0 } {
$kfail_proc $trace_command
}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -9341,5 +9341,18 @@ proc decompress_bz2 { bz2 } {
return $copy
}
+# Return message gdb emits when a signal is received.
+proc signal_recv_msg { signal } {
+ # With the Process Model Unification in Solaris 10, there are no
+ # non-threaded processes anymore.
+ if [istarget "*-*-solaris2.1\[0-9\]*"] {
+ set entity "Thread .*"
+ } else {
+ set entity "Program"
+ }
+
+ return "$entity received signal $signal"
+}
+
# Always load compatibility stuff.
load_lib future.exp
next prev parent reply other threads:[~2022-11-22 9:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 12:04 Rainer Orth
2019-09-13 12:47 ` Rainer Orth
2019-09-13 22:18 ` Andrew Burgess
2022-11-22 9:18 ` Rainer Orth [this message]
2022-11-24 16:01 ` Andrew Burgess
2022-11-24 17:06 ` Andrew Burgess
2022-11-25 10:04 ` Rainer Orth
2022-11-25 9:58 ` Rainer Orth
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=yddmt8jqrdl.fsf@CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=andrew.burgess@embecosm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).