summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorStefan Hajnoczi2009-04-15 18:16:31 +0200
committerMichael Brown2009-04-15 18:18:14 +0200
commit38a1d0fe3f92c74d848a8665d8d43392bc23bbfc (patch)
tree59990c3d8e1108fac1f31dda757350345993853b /src/core
parent[build] Round up SUBx deltas (diff)
downloadipxe-38a1d0fe3f92c74d848a8665d8d43392bc23bbfc.tar.gz
ipxe-38a1d0fe3f92c74d848a8665d8d43392bc23bbfc.tar.xz
ipxe-38a1d0fe3f92c74d848a8665d8d43392bc23bbfc.zip
[gdb] Allow resynchronisation with gdb
This replaces the gdbstub's polite NAK behavior with retransmission of the current outstanding reply packet. It solves situations where gdb and gPXE's gdbstub get out of sync due to the lack of flow control in the gdb protocol spec. Signed-off-by: Michael Brown <mcb30@etherboot.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/gdbstub.c10
1 files changed, 4 insertions, 6 deletions
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 );
}
}