From: Stefan Hajnoczi Date: Mon, 16 Jun 2008 12:18:20 +0000 (+0100) Subject: [GDB] Obey flow control when GDB connects. X-Git-Url: http://git.etherboot.org/people/mdeck/gpxe.git/commitdiff_plain/7eb555a8ae87202909e5e1c759149bc2375bb9f5 [GDB] Obey flow control when GDB connects. --- diff --git a/src/core/gdbstub.c b/src/core/gdbstub.c index 8e338775..bbed344f 100644 --- a/src/core/gdbstub.c +++ b/src/core/gdbstub.c @@ -350,6 +350,10 @@ static void gdbstub_state_wait_ack ( struct gdbstub *stub, char 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; } }