* gdb.base/watchpoint.exp(test_watchpoint_triggered_in_syscall):
authorBob Manson <manson@cygnus>
Wed, 9 Apr 1997 05:54:15 +0000 (05:54 +0000)
committerBob Manson <manson@cygnus>
Wed, 9 Apr 1997 05:54:15 +0000 (05:54 +0000)
  Don't call gdb_test when the command doesn't return to a gdb prompt.

Oops.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/watchpoint.exp

index 3df4bf0d5882fcb782f9ad204486f4eeddc8c659..fb0c01bef5fdd454f93baeaf07801908468e1e25 100644 (file)
@@ -1,5 +1,8 @@
 Tue Apr  8 19:33:20 1997  Bob Manson  <manson@charmed.cygnus.com>
 
+       * gdb.base/watchpoint.exp(test_watchpoint_triggered_in_syscall):
+       Don't call gdb_test when the command doesn't return to a gdb prompt.
+
        * lib/gdb.exp(gdb_stop_suppressing_tests): Don't print gratuitous
        "Tests restarted" messages.
 
index ffb06442a22fb43c925dce93be9638a3089ae535..574a9ebcd5b06cb43b0ef1e37e6f83ea4a60a1c6 100644 (file)
@@ -394,8 +394,15 @@ proc test_watchpoint_triggered_in_syscall {} {
        # If we send_gdb "123\n" before gdb has switched the tty, then it goes
        # to gdb, not the inferior, and we lose.  So that is why we have
        # watchpoint.c prompt us, so we can wait for that prompt.
-       if [gdb_test "continue" "Continuing\\.\r\ntype stuff for buf now:" "continue to read" ] { 
-         return ; 
+       send_gdb "continue\n";
+       gdb_expect {
+           -re "Continuing\\.\r\ntype stuff for buf now:" {
+               pass "continue to read"
+           }
+           default {
+               fail "continue to read";
+               return ;
+           }
        }
 
        send_gdb "123\n"