* however sometimes '-' is sent even though we've already received
* an ACK (+) for everything we've sent off.
*/
-#ifndef _WIN32
int gotdata;
for (;;)
{
return retval;
LOG_WARNING("Discard unexpected char %c", reply);
}
-#endif
#endif
while (1)
case '$':
break;
case '+':
+ /* gdb sends a dummy ack '+' at every remote connect - see remote_start_remote (remote.c)
+ * incase anyone tries to debug why they receive this warning every time */
LOG_WARNING("acknowledgment received, but no packet pending");
break;
case '-':
* connect.
*/
target_halt(gdb_service->target);
+ /* FIX!!!! could extended-remote work better here?
+ *
+ * wait a tiny bit for halted state or we just continue. The
+ * GDB register packet will then contain garbage
+ */
+ target_wait_state(gdb_service->target, TARGET_HALTED, 500);
/* remove the initial ACK from the incoming buffer */
if ((retval = gdb_get_char(connection, &initial_ack)) != ERROR_OK)