From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 06AB73858286 for ; Tue, 2 Jan 2024 15:58:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06AB73858286 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 06AB73858286 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704211096; cv=none; b=EEgz1yLGWyKAcj3PfQwJ4YhG0lM4eVaW7JfBb5DFY8gpky9TtLIQTzWMhU+DTMFzJQ+naH2iKISKrhXl+ihNtlaQiV8r+N8zfD6ddP8sKalQ2P8lzv7NdLZi1HxeSqcT8Wktz1ihLd8nCFTybB9m7T41zmr5V25/Tjk8eoAjUz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704211096; c=relaxed/simple; bh=qbo+ItavHKslcyetmOa2xRkdDRfA1ngrP08huLEmQ2k=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=gGlX3/B1plWASF3fD9HsCUtfig1LQmqgcLE3Gq5uRB2W/Qzn7Y6mq0Gx7VqLxZyk6ZZbGXoAl3Bp2G2OuyGcEXFkBKBkyoIjtP7QY7+NX07yWNApTxXqPVBtlZeKgG1cSflLFzcMECVPNbLUDASxqdzC3/c8j2UC+fP3eWn5aTQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704211089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bm1nDOSGpEXW6yBB8p7n7TKbdugV71m8pMyicQxE5Po=; b=BVbCoq4gKIjCO8yDGv5N9i1hF7kF2w9H1o1gSHNDATvG40iPNQ13+ZmylOSpB9deckOmMC BRb6ycJa8lEPej9xpFemyG13zdBTqHzmauxcPht8KaPJNypXZPQR/oeq5GXYsAw/M2sdrG +rke1JoicJ5Qnc2xKs4Z2yXNX4LexBM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-163-Fi3eMXurMOGRFoQAmE8uMw-1; Tue, 02 Jan 2024 10:58:08 -0500 X-MC-Unique: Fi3eMXurMOGRFoQAmE8uMw-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-40d3f53ca2aso49902765e9.0 for ; Tue, 02 Jan 2024 07:58:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704211086; x=1704815886; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bm1nDOSGpEXW6yBB8p7n7TKbdugV71m8pMyicQxE5Po=; b=TCFUw1vXqXfiCejrwBT4BXX8I6yRCxdZMADpDL4WNjGg0zLnrJO6SNEYanlNqqjTi1 VOyuqtumgyrueYkC3hQN3uLTX/pH9J755Uxop+/A5GCR3f90ggHOZ+x+blAHY6+sZMcY sfP2g7j0rGk50PaehvIPDCgUg8JiZDJ9IHw7hF8K4N20Sxoc/lB8g3zugBxjeuCR4O68 DDCMou68RO1fOihvv412Geb89JJcI5nv13BKGTkjVdBhTmSWjF6SWTNe5MmOVHQZbw4P JCIvV2+qxidld6x8bRZm7VWEQcbfNb6V+0QLc5EpnbL34LRejhYMuUQS6VOLcSEXEUUJ WC2A== X-Gm-Message-State: AOJu0YwZ1wOhspNzwn7gxMC3XvcLOkvRBTt2rp9NFlhv7PAFqSgnBLii W/MpZpmsDabN7BZvfAkk1IJeN0q/MAqBluUw6H9EHNnGJ+pVlSRb3RUmiiMWEzasWJM94ond1Au winErlaUd2p/Rfv1YB2stGhGXeIK6RhHDsoyTliKuWQ4pBYUftfS4KcrjKsg7q0U/ckJaAnNSYG lGIAobIkgC8/78Fg== X-Received: by 2002:a05:600c:a43:b0:40d:6bea:d031 with SMTP id c3-20020a05600c0a4300b0040d6bead031mr4201171wmq.14.1704211085738; Tue, 02 Jan 2024 07:58:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4kohq9d9dzcrBhlwwgfCVeUzWUhu/P3zTvTP3NaS+DenexZwowK/GFNhJXgDcRHQpSEk4fQ== X-Received: by 2002:a05:600c:a43:b0:40d:6bea:d031 with SMTP id c3-20020a05600c0a4300b0040d6bead031mr4201161wmq.14.1704211085056; Tue, 02 Jan 2024 07:58:05 -0800 (PST) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id fc16-20020a05600c525000b0040d4dc06f91sm37843003wmb.43.2024.01.02.07.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 07:58:02 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess , Eli Zaretskii Subject: [PATCHv10 5/5] gdb: rename unwindonsignal to unwind-on-signal Date: Tue, 2 Jan 2024 15:57:53 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Eli has already approved the NEWS/doc changes in this file. --- We now have unwind-on-timeout and unwind-on-terminating-exception, and then the odd one out unwindonsignal. I'm not a great fan of these squashed together command names, so in this commit I propose renaming this to unwind-on-signal. Obviously I've added the hidden alias unwindonsignal so any existing GDB scripts will keep working. There's one test that I've extended to test the alias works, but in most of the other test scripts I've changed over to use the new name. The docs are updated to reference the new name. Reviewed-By: Eli Zaretskii --- gdb/NEWS | 9 +++++ gdb/doc/gdb.texinfo | 16 ++++++--- gdb/infcall.c | 21 ++++++----- gdb/testsuite/gdb.base/callfuncs.exp | 4 +-- gdb/testsuite/gdb.base/infcall-failure.exp | 4 +-- gdb/testsuite/gdb.base/unwindonsignal.exp | 36 +++++++++++++------ gdb/testsuite/gdb.compile/compile-cplus.exp | 6 ++-- gdb/testsuite/gdb.compile/compile.exp | 6 ++-- gdb/testsuite/gdb.cp/gdb2495.exp | 16 ++++----- gdb/testsuite/gdb.fortran/function-calls.exp | 2 +- gdb/testsuite/gdb.mi/mi-condbreak-fail.exp | 6 ++-- gdb/testsuite/gdb.mi/mi-condbreak-throw.exp | 2 +- gdb/testsuite/gdb.mi/mi-syn-frame.exp | 2 +- .../infcall-from-bp-cond-simple.exp | 2 +- .../gdb.threads/thread-unwindonsignal.exp | 8 ++--- 15 files changed, 89 insertions(+), 51 deletions(-) diff --git a/gdb/NEWS b/gdb/NEWS index 4ba8f62a8b3..dda757a8ceb 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -21,6 +21,10 @@ maintenance info line-table if the line is considered the start of the epilgoue, and thus a point at which the frame can be considered destroyed. +set unwindonsignal on|off +show unwindonsignal + These commands are now aliases for the new set/show unwind-on-signal. + * New commands info missing-debug-handler @@ -70,6 +74,11 @@ show unwind-on-timeout dummy frame that was added for the inferior call, and restoring the inferior state to how it was before the inferior call started. +set unwind-on-signal on|off +show unwind-on-signal + These new commands replaces the existing set/show unwindonsignal. The + old command is maintained as an alias. + * New features in the GDB remote stub, GDBserver ** The --remote-debug and --event-loop-debug command line options diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 6f847295e28..6b4126b8f1a 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20898,7 +20898,7 @@ It is possible for the function you call via the @code{print} or @code{call} command to generate a signal (e.g., if there's a bug in the function, or if you passed it incorrect arguments). What happens -in that case is controlled by the @code{set unwindonsignal} command. +in that case is controlled by the @code{set unwind-on-signal} command. Similarly, with a C@t{++} program it is possible for the function you call via the @code{print} or @code{call} command to generate an @@ -20912,7 +20912,8 @@ @anchor{stack unwind settings} @table @code -@item set unwindonsignal +@item set unwind-on-signal +@kindex set unwind-on-signal @kindex set unwindonsignal @cindex unwind stack in called functions @cindex call dummy stack unwinding @@ -20923,11 +20924,18 @@ default), @value{GDBN} stops in the frame where the signal was received. -@item show unwindonsignal +The command @code{set unwindonsignal} is an alias for this command, +and is maintained for backward compatibility. + +@item show unwind-on-signal +@kindex show unwind-on-signal @kindex show unwindonsignal Show the current setting of stack unwinding in the functions called by @value{GDBN}. +The command @code{show unwindonsignal} is an alias for this command, +and is maintained for backward compatibility. + @item set unwind-on-terminating-exception @kindex set unwind-on-terminating-exception @cindex unwind stack in called functions with unhandled exceptions @@ -20992,7 +21000,7 @@ If a called function is interrupted for any reason, including hitting a breakpoint, or triggering a watchpoint, and the stack is not unwound due to @code{set unwind-on-terminating-exception on}, @code{set -unwind-on-timeout on}, or @code{set unwindonsignal on} (@pxref{stack +unwind-on-timeout on}, or @code{set unwind-on-signal on} (@pxref{stack unwind settings}), then the dummy-frame, created by @value{GDBN} to facilitate the call to the program function, will be visible in the backtrace, for example frame @code{#3} in the following backtrace: diff --git a/gdb/infcall.c b/gdb/infcall.c index 84c6bf2cdd2..bf17a1a21d6 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -1755,7 +1755,7 @@ When the function is done executing, GDB will silently stop."), The program being debugged received signal %s, %s\n\ while in a function called from GDB. GDB has restored the context\n\ to what it was before the call. To change this behavior use\n\ -\"set unwindonsignal off\". Evaluation of the expression containing\n\ +\"set unwind-on-signal off\". Evaluation of the expression containing\n\ the function (%s) will be abandoned."), gdb_signal_to_name (stop_signal), gdb_signal_to_string (stop_signal), @@ -1774,7 +1774,7 @@ the function (%s) will be abandoned."), error (_("\ The program being debugged was signaled while in a function called from GDB.\n\ GDB remains in the frame where the signal was received.\n\ -To change this behavior use \"set unwindonsignal on\".\n\ +To change this behavior use \"set unwind-on-signal on\".\n\ Evaluation of the expression containing the function\n\ (%s) will be abandoned.\n\ When the function is done executing, GDB will silently stop."), @@ -1906,17 +1906,22 @@ The default is to perform the conversion."), show_coerce_float_to_double_p, &setlist, &showlist); - add_setshow_boolean_cmd ("unwindonsignal", no_class, - &unwind_on_signal_p, _("\ + set_show_commands setshow_unwind_on_signal_cmds + = add_setshow_boolean_cmd ("unwind-on-signal", no_class, + &unwind_on_signal_p, _("\ Set unwinding of stack if a signal is received while in a call dummy."), _("\ Show unwinding of stack if a signal is received while in a call dummy."), _("\ -The unwindonsignal lets the user determine what gdb should do if a signal\n\ +The unwind-on-signal lets the user determine what gdb should do if a signal\n\ is received while in a function called from gdb (call dummy). If set, gdb\n\ unwinds the stack and restore the context to what as it was before the call.\n\ The default is to stop in the frame where the signal was received."), - NULL, - show_unwind_on_signal_p, - &setlist, &showlist); + NULL, + show_unwind_on_signal_p, + &setlist, &showlist); + add_alias_cmd ("unwindonsignal", setshow_unwind_on_signal_cmds.set, + no_class, 1, &setlist); + add_alias_cmd ("unwindonsignal", setshow_unwind_on_signal_cmds.show, + no_class, 1, &showlist); add_setshow_boolean_cmd ("unwind-on-terminating-exception", no_class, &unwind_on_terminating_exception_p, _("\ diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 2c797a224a7..d9f63e944bf 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -46,7 +46,7 @@ proc do_function_calls {prototypes} { # If any of these calls segv we don't want to affect subsequent tests. # E.g., we want to ensure register values are restored. - gdb_test_no_output "set unwindonsignal on" + gdb_test_no_output "set unwind-on-signal on" gdb_test "p t_char_values(0,0)" " = 0" gdb_test "p t_char_values('a','b')" " = 1" @@ -237,7 +237,7 @@ proc do_function_calls {prototypes} { "call inferior func with struct - returns char *" # Restore default value. - gdb_test_no_output "set unwindonsignal off" + gdb_test_no_output "set unwind-on-signal off" } # Procedure to get current content of all registers. diff --git a/gdb/testsuite/gdb.base/infcall-failure.exp b/gdb/testsuite/gdb.base/infcall-failure.exp index 5ad179a089d..e2e71649dac 100644 --- a/gdb/testsuite/gdb.base/infcall-failure.exp +++ b/gdb/testsuite/gdb.base/infcall-failure.exp @@ -137,7 +137,7 @@ proc_with_prefix run_cond_hits_segfault_test { async_p non_stop_p } { "Error in testing condition for breakpoint ${bp_1_num}:" \ "The program being debugged was signaled while in a function called from GDB\\." \ "GDB remains in the frame where the signal was received\\." \ - "To change this behavior use \"set unwindonsignal on\"\\." \ + "To change this behavior use \"set unwind-on-signal on\"\\." \ "Evaluation of the expression containing the function" \ "\\(func_segfault\\) will be abandoned\\." \ "When the function is done executing, GDB will silently stop\\."] @@ -166,7 +166,7 @@ proc_with_prefix run_call_hits_segfault_test { async_p non_stop_p } { "${::decimal}\\s+\[^\r\n\]+Segfault here\[^\r\n\]+" \ "The program being debugged was signaled while in a function called from GDB\\." \ "GDB remains in the frame where the signal was received\\." \ - "To change this behavior use \"set unwindonsignal on\"\\." \ + "To change this behavior use \"set unwind-on-signal on\"\\." \ "Evaluation of the expression containing the function" \ "\\(func_segfault\\) will be abandoned\\." \ "When the function is done executing, GDB will silently stop\\."] diff --git a/gdb/testsuite/gdb.base/unwindonsignal.exp b/gdb/testsuite/gdb.base/unwindonsignal.exp index 5c2243236ba..bf876fb42ba 100644 --- a/gdb/testsuite/gdb.base/unwindonsignal.exp +++ b/gdb/testsuite/gdb.base/unwindonsignal.exp @@ -34,13 +34,29 @@ gdb_test "break stop_here" "Breakpoint \[0-9\]* at .*" gdb_test "continue" "Continuing.*Breakpoint \[0-9\]*, stop_here.*" \ "continue to breakpoint at stop_here" -# Turn on unwindonsignal. -gdb_test_no_output "set unwindonsignal on" \ - "setting unwindonsignal" +# Turn on unwind-on-signal. +gdb_test_no_output "set unwind-on-signal on" \ + "setting unwind-on-signal" -gdb_test "show unwindonsignal" \ +gdb_test "show unwind-on-signal" \ "Unwinding of stack .* is on." \ - "showing unwindonsignal" + "showing unwind-on-signal" + +# For backward compatibility we maintain a 'unwindonsignal' alias for +# 'unwind-on-signal', check it now. +gdb_test "show unwindonsignal" \ + "Unwinding of stack .* is on\\." \ + "showing unwindonsignal alias" + +gdb_test_no_output "set unwindonsignal off" \ + "setting unwindonsignal alias to off" + +gdb_test "show unwind-on-signal" \ + "Unwinding of stack .* is off\\." \ + "showing unwind-on-signal after setting via alias" + +gdb_test_no_output "set unwindonsignal on" \ + "setting unwindonsignal alias to on" # Call function (causing the program to get a signal), and see if gdb handles # it properly. @@ -49,7 +65,7 @@ if {[gdb_test "call gen_signal ()" \ "The program being debugged received signal SIGABRT, Aborted" \ "while in a function called from GDB\\. GDB has restored the context" \ "to what it was before the call\\. To change this behavior use" \ - "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ + "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ "the function \\(gen_signal\\) will be abandoned\\."] \ "unwindonsignal, inferior function call signaled"] != 0} { return 0 @@ -58,15 +74,15 @@ if {[gdb_test "call gen_signal ()" \ # Verify the stack got unwound. gdb_test "bt" \ "#0 *\[x0-9a-f in\]*stop_here \\(.*\\) at .*#1 *\[x0-9a-f in\]*main \\(.*\\) at .*" \ - "unwindonsignal, stack unwound" + "stack unwound" # Verify the dummy frame got removed from dummy_frame_stack. gdb_test_multiple "maint print dummy-frames" \ - "unwindonsignal, dummy frame removed" { + "unwind-on-signal, dummy frame removed" { -re "\[\r\n\]*.*stack=.*code=.*\[\r\n\]+$gdb_prompt $" { - fail "unwindonsignal, dummy frame removed" + fail $gdb_test_name } -re "\[\r\n\]+$gdb_prompt $" { - pass "unwindonsignal, dummy frame removed" + pass $gdb_test_name } } diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp index 48fb75c3d78..c938c60ee98 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus.exp @@ -131,13 +131,13 @@ gdb_test "return" "\r\n#0 main .*" "return" \ "Make _gdb_expr\\(__gdb_regs\\*\\) return now\\? \\(y or n\\) " "y" gdb_test "info sym $infcall_pc" "\r\nNo symbol matches .*" "info sym not found" -gdb_test_no_output "set unwindonsignal on" +gdb_test_no_output "set unwind-on-signal on" gdb_test "compile code *(volatile int *) 0 = 0;" \ [multi_line \ "The program being debugged received signal SIGSEGV, Segmentation fault" \ "while in a function called from GDB\\. GDB has restored the context" \ "to what it was before the call\\. To change this behavior use" \ - "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ + "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ "the function \\(_gdb_expr\\(__gdb_regs\\*\\)\\) will be abandoned\\."] \ "compile code segfault second" @@ -313,7 +313,7 @@ gdb_test "compile code static const int readonly = 1; *(int *) &readonly = 2;" \ "The program being debugged received signal SIGSEGV, Segmentation fault" \ "while in a function called from GDB\\. GDB has restored the context" \ "to what it was before the call\\. To change this behavior use" \ - "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ + "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ "the function \\(_gdb_expr\\(__gdb_regs\\*\\)\\) will be abandoned\\."] gdb_test_no_output "set debug compile off" diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index 86521e99dac..cd409f5a48a 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -157,13 +157,13 @@ gdb_test "return" "\r\n#0 main .*" "return" \ "Make _gdb_expr return now\\? \\(y or n\\) " "y" gdb_test "info sym $infcall_pc" "\r\nNo symbol matches .*" "info sym not found" -gdb_test_no_output "set unwindonsignal on" +gdb_test_no_output "set unwind-on-signal on" gdb_test "compile code *(volatile int *) 0 = 0;" \ [multi_line \ "The program being debugged received signal SIGSEGV, Segmentation fault" \ "while in a function called from GDB\\. GDB has restored the context" \ "to what it was before the call\\. To change this behavior use" \ - "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ + "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ "the function \\(_gdb_expr\\) will be abandoned\\."] \ "compile code segfault second" @@ -321,7 +321,7 @@ gdb_test "compile code static const int readonly = 1; *(int *) &readonly = 2;" \ "The program being debugged received signal SIGSEGV, Segmentation fault" \ "while in a function called from GDB\\. GDB has restored the context" \ "to what it was before the call\\. To change this behavior use" \ - "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ + "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ "the function \\(_gdb_expr\\) will be abandoned\\."] gdb_test_no_output "set debug compile off" diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp index 93b046ad3a6..b888924ec63 100644 --- a/gdb/testsuite/gdb.cp/gdb2495.exp +++ b/gdb/testsuite/gdb.cp/gdb2495.exp @@ -98,10 +98,10 @@ if {![runto_main]} { # behaviour; it should not. Test both on and off states. # Turn on unwind on signal behaviour. -gdb_test_no_output "set unwindonsignal on" +gdb_test_no_output "set unwind-on-signal on" # Check that it is turned on. -gdb_test "show unwindonsignal" \ +gdb_test "show unwind-on-signal" \ "signal is received while in a call dummy is on.*" \ "turn on unwind on signal" @@ -112,20 +112,20 @@ gdb_test "p exceptions.raise_signal(1)" \ "The program being debugged received signal SIGABRT, Aborted" \ "while in a function called from GDB\\. GDB has restored the context" \ "to what it was before the call\\. To change this behavior use" \ - "\"set unwindonsignal off\"\\. Evaluation of the expression containing" \ + "\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \ "the function \\(SimpleException::raise_signal\\(int\\)\\) will be abandoned\\."]\ - "check for unwindonsignal off message" + "check for unwind-on-signal off message" # And reverse - turn off again. -gdb_test_no_output "set unwindonsignal off" +gdb_test_no_output "set unwind-on-signal off" # Check that it is actually turned off. -gdb_test "show unwindonsignal" \ +gdb_test "show unwind-on-signal" \ "signal is received while in a call dummy is off.*" \ "turn off unwind on signal" # Check to see if new behaviour interferes with # normal signal handling in inferior function calls. gdb_test "p exceptions.raise_signal(1)" \ - "To change this behavior use \"set unwindonsignal on\".*" \ - "check for unwindonsignal on message" + "To change this behavior use \"set unwind-on-signal on\".*" \ + "check for unwind-on-signal on message" diff --git a/gdb/testsuite/gdb.fortran/function-calls.exp b/gdb/testsuite/gdb.fortran/function-calls.exp index 646fbb06435..27dd68d8cd9 100644 --- a/gdb/testsuite/gdb.fortran/function-calls.exp +++ b/gdb/testsuite/gdb.fortran/function-calls.exp @@ -44,7 +44,7 @@ if {![runto [gdb_get_line_number "post_init"]]} { } # Use inspired by gdb.base/callfuncs.exp. -gdb_test_no_output "set unwindonsignal on" +gdb_test_no_output "set unwind-on-signal on" # Baseline: function and subroutine call with no arguments. gdb_test "p no_arg()" " = .TRUE." diff --git a/gdb/testsuite/gdb.mi/mi-condbreak-fail.exp b/gdb/testsuite/gdb.mi/mi-condbreak-fail.exp index 3ccca4c2e9b..d91bef420af 100644 --- a/gdb/testsuite/gdb.mi/mi-condbreak-fail.exp +++ b/gdb/testsuite/gdb.mi/mi-condbreak-fail.exp @@ -43,7 +43,7 @@ proc run_test { unwind_on_signal } { return } - mi_gdb_test "-gdb-set unwindonsignal ${unwind_on_signal}" {\^done} \ + mi_gdb_test "-gdb-set unwind-on-signal ${unwind_on_signal}" {\^done} \ "set unwind-on-signal" # Create the conditional breakpoint. @@ -70,7 +70,7 @@ proc run_test { unwind_on_signal } { "&\"The program being debugged received signal SIGSEGV, Segmentation fault\\\\n\"" \ "&\"while in a function called from GDB\\. GDB has restored the context\\\\n\"" \ "&\"to what it was before the call\\. To change this behavior use\\\\n\"" \ - "&\"\\\\\"set unwindonsignal off\\\\\"\\. Evaluation of the expression containing\\\\n\"" \ + "&\"\\\\\"set unwind-on-signal off\\\\\"\\. Evaluation of the expression containing\\\\n\"" \ "&\"the function \\(cond_fail\\) will be abandoned\\.\\\\n\"" \ "=breakpoint-modified,bkpt={number=\"$bpnum\",type=\"breakpoint\",\[^\r\n\]+times=\"1\",\[^\r\n\]+}" \ "~\"\\\\n\"" \ @@ -92,7 +92,7 @@ proc run_test { unwind_on_signal } { "&\"Error in testing condition for breakpoint $bpnum:\\\\n\"" \ "&\"The program being debugged was signaled while in a function called from GDB\\.\\\\n\"" \ "&\"GDB remains in the frame where the signal was received\\.\\\\n\"" \ - "&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\.\\\\n\"" \ + "&\"To change this behavior use \\\\\"set unwind-on-signal on\\\\\"\\.\\\\n\"" \ "&\"Evaluation of the expression containing the function\\\\n\"" \ "&\"\\(cond_fail\\) will be abandoned\\.\\\\n\"" \ "&\"When the function is done executing, GDB will silently stop\\.\\\\n\"" \ diff --git a/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp b/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp index 7f291244e53..437825eea47 100644 --- a/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp +++ b/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp @@ -103,7 +103,7 @@ proc run_test { unwind_on_exception } { "&\"Error in testing condition for breakpoint $bpnum:\\\\n\"" \ "&\"The program being debugged was signaled while in a function called from GDB\\.\\\\n\"" \ "&\"GDB remains in the frame where the signal was received\\.\\\\n\"" \ - "&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\.\\\\n\"" \ + "&\"To change this behavior use \\\\\"set unwind-on-signal on\\\\\"\\.\\\\n\"" \ "&\"Evaluation of the expression containing the function\\\\n\"" \ "&\"\\(cond_throw\\(\\)\\) will be abandoned\\.\\\\n\"" \ "&\"When the function is done executing, GDB will silently stop\\.\\\\n\"" \ diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp index 40df312a1cc..1324226412c 100644 --- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp +++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp @@ -94,7 +94,7 @@ mi_gdb_test "409-stack-list-frames 0 0" \ # mi_gdb_test "410-data-evaluate-expression bar()" \ - ".*410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\".\\\\nEvaluation of the expression containing the function\\\\n\\(bar\\) will be abandoned.\\\\nWhen the function is done executing, GDB will silently stop.\"" \ + ".*410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwind-on-signal on\\\\\".\\\\nEvaluation of the expression containing the function\\\\n\\(bar\\) will be abandoned.\\\\nWhen the function is done executing, GDB will silently stop.\"" \ "call inferior function which raises exception" mi_gdb_test "411-stack-list-frames" "411\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"},frame=\{level=\"1\",addr=\"$hex\",func=\"\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"}.*\\\]" "backtrace from inferior function at exception" diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp index d6069ebaa58..c9508c9d67e 100644 --- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp +++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp @@ -173,7 +173,7 @@ proc_with_prefix run_bp_cond_segfaults { target_async target_non_stop } { "Error in testing condition for breakpoint ${bp_1_num}:" \ "The program being debugged was signaled while in a function called from GDB\\." \ "GDB remains in the frame where the signal was received\\." \ - "To change this behavior use \"set unwindonsignal on\"\\." \ + "To change this behavior use \"set unwind-on-signal on\"\\." \ "Evaluation of the expression containing the function" \ "\\(function_that_segfaults\\) will be abandoned\\." \ "When the function is done executing, GDB will silently stop\\."] diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp index 68a99f66f1c..a9cedc0c466 100644 --- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp +++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Test use of unwindonsignal when a hand function call that gets interrupted +# Test use of unwind-on-signal when a hand function call that gets interrupted # by a signal in another thread. set NR_THREADS 4 @@ -49,12 +49,12 @@ gdb_test "continue" \ # We want the main thread (hand_call_with_signal) and # thread 1 (sigabrt_handler) to both run. -# Do turn on unwindonsignal. +# Do turn on unwind-on-signal. # We want to test gdb handling of the current thread changing when # unwindonsignal is in effect. -gdb_test_no_output "set unwindonsignal on" \ +gdb_test_no_output "set unwind-on-signal on" \ "setting unwindonsignal" -gdb_test "show unwindonsignal" \ +gdb_test "show unwind-on-signal" \ "Unwinding of stack .* is on." \ "showing unwindonsignal" -- 2.25.4