From: Stefan Hajnoczi Date: Mon, 16 Jun 2008 12:18:20 +0000 (+0100) Subject: [GDB] Obey flow control when GDB connects. X-Git-Tag: v0.9.4~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eb555a8ae87202909e5e1c759149bc2375bb9f5;p=thirdparty%2Fipxe.git [GDB] Obey flow control when GDB connects. --- diff --git a/src/core/gdbstub.c b/src/core/gdbstub.c index 8e3387755..bbed344f8 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; } }