aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog3
-rw-r--r--gdb/testsuite/gdb.base/sigall.exp25
2 files changed, 23 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a586daa..705d4e7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,8 @@
Sat Jan 14 11:25:28 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
+ * gdb.base/sigall.exp (test_one_sig): Attempt to recover if
+ "get signal $thissig" test fails.
+
* gdb.base/setvar.exp: Check for and reject crazy expected type hacks.
Thu Jan 12 01:14:53 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp
index 10de1aa..b3f6504 100644
--- a/gdb/testsuite/gdb.base/sigall.exp
+++ b/gdb/testsuite/gdb.base/sigall.exp
@@ -43,15 +43,30 @@ proc test_one_sig {nextsig} {
"SIG$thissig\[ \t\]*Yes\[ \t\]*Yes\[ \t\]*Yes"
gdb_test "b handle_$thissig" "Breakpoint \[0-9\]"
gdb_test "b gen_$nextsig" "Breakpoint \[0-9\]"
+
+ set need_another_continue 1
if $this_sig_supported then {
- gdb_test "continue" \
- "Continuing.*Program received signal SIG$thissig" \
- "get signal $thissig"
+ send "continue\n"
+ expect {
+ -re "Continuing.*Program received signal SIG$thissig.*$prompt $" {
+ pass "get signal $thissig"
+ }
+ -re ".*$prompt $" {
+ fail "get signal $thissig"
+ set need_another_continue 0
+ }
+ default {
+ fail "get signal $thissig (eof or timeout)"
+ }
+ }
}
- gdb_test "continue" "Breakpoint.*handle_$thissig" "send signal $thissig"
+ if $need_another_continue then {
+ gdb_test "continue" \
+ "Breakpoint.*handle_$thissig" "send signal $thissig"
+ }
- send "continue\n"
+ send "signal 0\n"
expect {
-re "Breakpoint.*gen_$nextsig.*kill.*$prompt $" {
pass "advance to $nextsig"