diff --git a/src/core/gdbstub.c b/src/core/gdbstub.c index 45df7f2b..c8083955 100644 --- a/src/core/gdbstub.c +++ b/src/core/gdbstub.c @@ -344,12 +344,10 @@ static void gdbstub_state_cksum2 ( struct gdbstub *stub, char ch ) { static void gdbstub_state_wait_ack ( struct gdbstub *stub, char ch ) { if ( ch == '+' ) { stub->parse = gdbstub_state_new; - } else if ( ch == '-' ) { - gdbstub_tx_packet ( stub ); /* retransmit */ - } else if ( ch == '$' ) { - /* GDB is reconnecting, drop our packet and listen to GDB */ - stub->trans->send ( "-", 1 ); - stub->parse = gdbstub_state_new; + } else { + /* This retransmit is very aggressive but necessary to keep + * in sync with GDB. */ + gdbstub_tx_packet ( stub ); } }