aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp4
-rw-r--r--gdb/testsuite/gdb.base/infcall-failure.exp4
-rw-r--r--gdb/testsuite/gdb.base/unwindonsignal.exp36
-rw-r--r--gdb/testsuite/gdb.compile/compile-cplus.exp2
-rw-r--r--gdb/testsuite/gdb.compile/compile.exp2
-rw-r--r--gdb/testsuite/gdb.cp/gdb2495.exp16
-rw-r--r--gdb/testsuite/gdb.fortran/function-calls.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-syn-frame.exp2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread-unwindonsignal.exp8
10 files changed, 47 insertions, 31 deletions
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index df67c77..da99478 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -49,7 +49,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"
@@ -240,7 +240,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 8fa2c40..cf50a3b 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\\."]
@@ -165,7 +165,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 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
}
}
diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp
index 0b7cb59..4960e03 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus.exp
@@ -129,7 +129,7 @@ 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;" \
"The program being debugged was signaled while in a function called from GDB\\.\r\nGDB has restored the context to what it was before the call\\.\r\n.*" \
"compile code segfault second"
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
index 9fdd367..a971708 100644
--- a/gdb/testsuite/gdb.compile/compile.exp
+++ b/gdb/testsuite/gdb.compile/compile.exp
@@ -159,7 +159,7 @@ 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;" \
"The program being debugged was signaled while in a function called from GDB\\.\r\nGDB has restored the context to what it was before the call\\.\r\n.*" \
"compile code segfault second"
diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp
index 0cb8bdd..af94d95 100644
--- a/gdb/testsuite/gdb.cp/gdb2495.exp
+++ b/gdb/testsuite/gdb.cp/gdb2495.exp
@@ -104,29 +104,29 @@ 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"
# 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 off\".*" \
- "check for unwindonsignal off message"
+ "To change this behavior use \"set unwind-on-signal off\".*" \
+ "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 f9a1efc..c4d1f23 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-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
index 409fac6..f65d570 100644
--- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp
+++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
@@ -97,7 +97,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=\"<function called from gdb>\"\},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 8d94d24..402d8f7 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
@@ -174,7 +174,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 0b08723..2fa210c 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 <http://www.gnu.org/licenses/>.
-# 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
@@ -52,12 +52,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"