From patchwork Thu Sep 5 12:04:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 34392 Received: (qmail 103679 invoked by alias); 5 Sep 2019 12:04:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 103668 invoked by uid 89); 5 Sep 2019 12:04:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=kfail, Trigger, sk:_sigin, sk:$_sigin X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Sep 2019 12:04:29 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 5DFFC18 for ; Thu, 5 Sep 2019 14:04:25 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z1s-HSjp0wXW for ; Thu, 5 Sep 2019 14:04:07 +0200 (CEST) Received: from itzacchiuatl.CeBiTec.Uni-Bielefeld.DE (itzacchiuatl.CeBiTec.Uni-Bielefeld.DE [129.70.161.157]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id E847612 for ; Thu, 5 Sep 2019 14:04:06 +0200 (CEST) Received: (from ro@localhost) by itzacchiuatl.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id x85C46b8022089; Thu, 5 Sep 2019 14:04:06 +0200 (CEST) From: Rainer Orth To: gdb-patches@sourceware.org Subject: [PATCH] Fix expected received signal message in testsuite Date: Thu, 05 Sep 2019 14:04:06 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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. Tested on sparcv9-sun-solaris2.11, x86_64-pc-solaris2.11, and x86_64-pc-linux-gnu. Ok for master? Rainer # HG changeset patch # Parent 83e8741eb69e875b4745b17494480e4271f0df40 Fix expected received signal message in testsuite 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 @@ -88,7 +88,7 @@ proc check_regs {regtype regnums value p # Run until end of signal handler gdb_test "continue" \ - "Continuing.*Program received signal SIGILL.*" \ + "Continuing.*(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal 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 ".*(Program|Thread .*) received signal 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 @@ -57,7 +57,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 "(Program|Thread .*) received signal 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 @@ -45,11 +45,11 @@ gdb_test_multiple "print have_mpx ()" "h } } -set u_fault [multi_line "Program received signal SIGSEGV, Segmentation fault" \ +set u_fault [multi_line "(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal 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 @@ -51,11 +51,11 @@ gdb_test_multiple "print have_mpx ()" "h } } -set violation [multi_line "Program received signal SIGSEGV, Segmentation fault" \ +set violation [multi_line "(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal 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 @@ -72,7 +72,7 @@ if ![runto_main] then { # Testcase for standard prologue. -gdb_test "continue" "Program received signal SIGTRAP.*" "continue to standard" +gdb_test "continue" "(Program|Thread .*) received signal SIGTRAP.*" "continue to standard" skip_breakpoint standard @@ -99,7 +99,7 @@ gdb_test "backtrace 10" \ "first backtrace in stack_align_ecx" gdb_test "continue" \ - "Program received signal SIGTRAP.*" \ + "(Program|Thread .*) received signal SIGTRAP.*" \ "continue in stack_align_ecx" skip_breakpoint stack_align_ecx @@ -127,7 +127,7 @@ gdb_test "backtrace 10" \ "first backtrace in stack_align_edx" gdb_test "continue" \ - "Program received signal SIGTRAP.*" \ + "(Program|Thread .*) received signal SIGTRAP.*" \ "continue in stack_align_edx" skip_breakpoint stack_align_edx @@ -155,7 +155,7 @@ gdb_test "backtrace 10" \ "first backtrace in stack_align_eax" gdb_test "continue" \ - "Program received signal SIGTRAP.*" \ + "(Program|Thread .*) received signal SIGTRAP.*" \ "continue in stack_align_eax" skip_breakpoint stack_align_eax @@ -171,7 +171,7 @@ gdb_test "info frame" \ # Testcase from symtab/1253. -gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1253" +gdb_test "continue" "(Program|Thread .*) received signal SIGTRAP.*" "continue to gdb1253" skip_breakpoint gdb1253 @@ -186,7 +186,7 @@ gdb_test "info frame" \ # Testcase from backtrace/1718. -gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1718" +gdb_test "continue" "(Program|Thread .*) received signal SIGTRAP.*" "continue to gdb1718" skip_breakpoint gdb1718 @@ -202,7 +202,7 @@ gdb_test "info frame" \ # Testcase from backtrace/1338. -gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1338" +gdb_test "continue" "(Program|Thread .*) received signal 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 "" "(Program|Thread .*) received signal 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 "" "(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal 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 "" "(Program|Thread .*) received signal 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-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 "(Program|Thread .*) received signal SIGSEGV.*$gdb_prompt $" { pass $test } } 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 "(Program|Thread .*) received signal 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 @@ -41,7 +41,7 @@ if ![runto_main] then { } gdb_test_multiple "next" "check for TE support" { - -re "Program received signal SIGILL,.*\r\n$gdb_prompt $" { + -re "(Program|Thread .*) received signal SIGILL,.*\r\n$gdb_prompt $" { unsupported "no TE support." return } @@ -59,7 +59,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, .*" \ + "(Program|Thread .*) received signal 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 @@ -52,7 +52,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 "(Program|Thread .*) received signal 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 @@ -48,6 +48,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 "(Program|Thread .*) received signal 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 @@ -126,7 +126,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.*" +gdb_test continue ".*(Program|Thread .*) received signal.*" gdb_test continue ".*Program terminated with signal.*" # 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 "(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal 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" "(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal SIGTRAP.*$gdb_prompt $" { fail $test } -re "handler .*$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 @@ -105,7 +105,7 @@ gdb_test "continue" "Breakpoint \[0-9\]* # Continue again, we should get a signal. -gdb_test "continue" "Program received signal .*" \ +gdb_test "continue" "(Program|Thread .*) received signal .*" \ "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 @@ -199,7 +199,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 ".*(Program|Thread .*) received signal 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 @@ -47,7 +47,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" "(Program|Thread .*) received signal SIGSEGV.*" "trigger SIGSEGV" # Continue until the end. gdb_test "continue" "Program terminated with signal SIGSEGV.*" \ 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 @@ -67,7 +67,7 @@ gdb_test_multiple $test $test { set test "inferior received SIGINT" gdb_test_multiple "" $test { - -re "\r\nProgram received signal SIGINT.*" { + -re "\r\n(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal 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 ".*(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal 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 @@ -111,7 +111,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 "" "(Program|Thread .*) received signal 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" "(Program|Thread .*) received signal SIGUSR1, .*" gdb_test "stepi" "\r\nhandler .*" gdb_test_multiple "kill" "kill" { -re "Kill the program being debugged\\? \\(y or n\\) $" { 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 "" "(Program|Thread .*) received signal 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 @@ -193,7 +193,7 @@ if ![target_info exists gdb,nointerrupts incr vcont_r_counter exp_continue } - -re "Program received signal SIGINT.*$gdb_prompt $" { + -re "(Program|Thread .*) received signal 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" "(Program|Thread .*) received signal 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.*(Program|Thread .*) received signal 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.*(Program|Thread .*) received signal 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 @@ -76,9 +76,9 @@ 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 $" { - set signame $expect_out(1,string) - set segv_addr $expect_out(3,string) + -re "(Program|Thread .*) received signal (SIGBUS|SIGSEGV).*pc(\r\n| *) *=> (0x\[0-9a-f\]*).*$gdb_prompt $" { + set signame $expect_out(2,string) + set segv_addr $expect_out(4,string) pass "$test" } -re " .*pc(\r\n| *)=> (0x\[0-9a-f\]*).*bowler.*$gdb_prompt $" { @@ -171,7 +171,7 @@ proc stepi_out { name args } { send_gdb "stepi\n" exp_continue } - -re "Program received signal SIGSEGV.*$gdb_prompt $" { + -re "(Program|Thread .*) received signal SIGSEGV.*$gdb_prompt $" { kfail gdb/8807 "$test (executed fault insn)" } -re "Breakpoint.*pc(\r\n| *)[at_segv] .*bowler.*$gdb_prompt $" { @@ -236,7 +236,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] .*" \ + "(Program|Thread .*) received signal ${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 @@ -40,7 +40,7 @@ if ![runto_main] then { } # Run to the signal. -gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal" +gdb_test "continue" ".*(Program|Thread .*) received signal 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" "(Program|Thread .*) received signal 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 @@ -45,7 +45,7 @@ if ![runto_main] then { } # Run to the signal. -gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal" +gdb_test "continue" ".*(Program|Thread .*) received signal SIGSEGV.*" "continue to signal" # Try to generate a core file, for a later test. set gcorefile [standard_output_file $testfile.gcore] @@ -104,7 +104,7 @@ if ![runto_main] then { } # Run to the signal. -gdb_test "continue" ".*Program received signal SIGSEGV.*" "continue to signal" +gdb_test "continue" ".*(Program|Thread .*) received signal SIGSEGV.*" "continue to signal" set test "set si_addr" gdb_test "p \$_siginfo._sifields._sigfault.si_addr = 0x666" " = \\(void \\*\\) 0x666" 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 @@ -44,7 +44,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.*" \ + ".*(Program|Thread .*) received signal (SIGBUS|SIGSEGV).*bowler.*" \ "continue to fault" # Insert conditional breakpoint at faulting instruction @@ -56,6 +56,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.*" \ + ".*(Program|Thread .*) received signal (SIGBUS|SIGSEGV).*(Program|Thread .*) received signal (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 @@ -72,14 +72,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 "(Program|Thread .*) received signal SIGSEGV.*bowler .*$gdb_prompt $" { set function_pointer code_descriptor pass "$test (function descriptor)" } - -re "Program received signal SIGSEGV.*0.*$gdb_prompt $" { + -re "(Program|Thread .*) received signal SIGSEGV.*0.*$gdb_prompt $" { pass "$test (function entry-point)" } - -re "Program received signal SIGBUS.*0.*$gdb_prompt $" { + -re "(Program|Thread .*) received signal SIGBUS.*0.*$gdb_prompt $" { set signame SIGBUS pass "$test (function entry-point)" } @@ -103,7 +103,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 "(Program|Thread .*) received signal ${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 @@ -91,7 +91,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" "(Program|Thread .*) received signal.*" "continue to signal" } gdb_test "$enter_cmd" ".*handler .*" "$enter_cmd to handler" @@ -150,7 +150,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 "(Program|Thread .*) received signal 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 @@ -34,7 +34,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\." \ + "(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal SIG$thissig.*handle_$thissig.*$gdb_prompt $" { fail "$testmsg (wrong location)" } - -re "Program received signal SIG$thissig.*$gdb_prompt $" { + -re "(Program|Thread .*) received signal 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 "(Program|Thread .*) received signal SIG$prevsig.*$gdb_prompt " { pass "reverse to signal event, $prevsig" set nested_testmsg "reverse signal delivered" @@ -299,7 +299,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.*(Program|Thread .*) received signal 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 @@ -52,10 +52,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 "(Program|Thread .*) received signal SIG$thissig.*handle_$thissig.*$gdb_prompt $" { fail "$testmsg (wrong location)" } - -re "Program received signal SIG$thissig.*$gdb_prompt $" { + -re "(Program|Thread .*) received signal SIG$thissig.*$gdb_prompt $" { pass $testmsg } -re "Breakpoint.* handle_$thissig.*$gdb_prompt $" { @@ -113,7 +113,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 "(Program|Thread .*) received signal SIG$prevsig.*$gdb_prompt " { pass "reverse to signal event, $prevsig" set nested_testmsg "reverse signal delivered" @@ -247,7 +247,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.*(Program|Thread .*) received signal 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 @@ -58,7 +58,7 @@ proc connect_continue_ctrl_c {} { } after 1000 {send_gdb "\003"} - gdb_test "" "Program received signal SIGINT.*" "stop with control-c" + gdb_test "" "(Program|Thread .*) received signal 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 @@ -99,7 +99,7 @@ foreach nonstop { 0 1 } { with_test_pref } } - gdb_test "continue" "Program received signal SIGUSR1, .*" + gdb_test "continue" "(Program|Thread .*) received signal 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 @@ -99,7 +99,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 "(Program|Thread .*) received signal SIGSEGV, Segmentation fault\\..*$gdb_prompt $" { if { $kfail_proc != 0 } { $kfail_proc $trace_command }