aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/unwindonsignal.exp
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-01-18 12:09:05 +0000
committerAndrew Burgess <aburgess@redhat.com>2023-01-25 15:48:58 +0000
commit3c2dc6de6545d671cffb46b3ca6a25ffae94c253 (patch)
tree49c4b713a568d5f035538b7f0c7d3ffeeb9e924e /gdb/testsuite/gdb.base/unwindonsignal.exp
parentc7d08e62fc9e2c0ccefd9c8f5bf4566b52526b3d (diff)
downloadgdb-users/aburgess/bp-inferior-calls.zip
gdb-users/aburgess/bp-inferior-calls.tar.gz
gdb-users/aburgess/bp-inferior-calls.tar.bz2
gdb: rename unwindonsignal to unwind-on-signalusers/aburgess/bp-inferior-calls
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.
Diffstat (limited to 'gdb/testsuite/gdb.base/unwindonsignal.exp')
-rw-r--r--gdb/testsuite/gdb.base/unwindonsignal.exp36
1 files changed, 26 insertions, 10 deletions
diff --git a/gdb/testsuite/gdb.base/unwindonsignal.exp b/gdb/testsuite/gdb.base/unwindonsignal.exp
index 8470634..41a4de8 100644
--- a/gdb/testsuite/gdb.base/unwindonsignal.exp
+++ b/gdb/testsuite/gdb.base/unwindonsignal.exp
@@ -40,35 +40,51 @@ 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.
if {[gdb_test "call gen_signal ()" \
"\[\r\n\]*The program being debugged was signaled.*" \
- "unwindonsignal, inferior function call signaled"] != 0} {
+ "inferior function call signaled"] != 0} {
return 0
}
# 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
}
}