* remote.c (remote_wait, remote_async_wait): Stop if we receive
authorDaniel Jacobowitz <drow@false.org>
Wed, 27 Feb 2008 21:00:01 +0000 (21:00 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 27 Feb 2008 21:00:01 +0000 (21:00 +0000)
an error.

gdb/ChangeLog
gdb/remote.c

index 13b37ce196284c4ff201ec3c6b00bef9ca93804c..f5afe11b74cc2fc7a1c2bb07a1431c1e989b8c42 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * remote.c (remote_wait, remote_async_wait): Stop if we receive
+       an error.
+
 2008-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * utils.c (debug_timestamp): New.
index 3f50ff28df1f2e8302d88362d4558f61d8b55563..a5349b4bdf9f17dec9ec3487de2f6a53987cd474 100644 (file)
@@ -3403,8 +3403,12 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status)
       switch (buf[0])
        {
        case 'E':               /* Error of some sort.  */
+         /* We're out of sync with the target now.  Did it continue or not?
+            Not is more likely, so report a stop.  */
          warning (_("Remote failure reply: %s"), buf);
-         continue;
+         status->kind = TARGET_WAITKIND_STOPPED;
+         status->value.sig = TARGET_SIGNAL_0;
+         goto got_status;
        case 'F':               /* File-I/O request.  */
          remote_fileio_request (buf);
          continue;
@@ -3631,8 +3635,12 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
       switch (buf[0])
        {
        case 'E':               /* Error of some sort.  */
+         /* We're out of sync with the target now.  Did it continue or not?
+            Not is more likely, so report a stop.  */
          warning (_("Remote failure reply: %s"), buf);
-         continue;
+         status->kind = TARGET_WAITKIND_STOPPED;
+         status->value.sig = TARGET_SIGNAL_0;
+         goto got_status;
        case 'F':               /* File-I/O request.  */
          remote_fileio_request (buf);
          continue;