rs->stop_reason = TARGET_STOPPED_BY_NO_REASON;
- /* We got something. */
- rs->waiting_for_stop_reply = 0;
-
/* Assume that the target has acknowledged Ctrl-C unless we receive
an 'F' or 'O' packet. */
if (buf[0] != 'F' && buf[0] != 'O')
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. */
+ rs->waiting_for_stop_reply = 0;
+
warning (_("Remote failure reply: %s"), buf);
status->kind = TARGET_WAITKIND_STOPPED;
status->value.sig = GDB_SIGNAL_0;
break;
case 'T': case 'S': case 'X': case 'W':
{
- struct stop_reply *stop_reply
+ struct stop_reply *stop_reply;
+
+ /* There is a stop reply to handle. */
+ rs->waiting_for_stop_reply = 0;
+
+ stop_reply
= (struct stop_reply *) remote_notif_parse (¬if_client_stop,
rs->buf);
}
case 'O': /* Console output. */
remote_console_output (buf + 1);
-
- /* The target didn't really stop; keep waiting. */
- rs->waiting_for_stop_reply = 1;
-
break;
case '\0':
if (rs->last_sent_signal != GDB_SIGNAL_0)
strcpy ((char *) buf, rs->last_sent_step ? "s" : "c");
putpkt ((char *) buf);
-
- /* We just told the target to resume, so a stop reply is in
- order. */
- rs->waiting_for_stop_reply = 1;
break;
}
/* else fallthrough */
default:
warning (_("Invalid remote reply: %s"), buf);
- /* Keep waiting. */
- rs->waiting_for_stop_reply = 1;
break;
}