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\]+ = " "tdb0 unavailable" gdb_test "print \$tr0" "\\\$\[0-9\]+ = " "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