summaryrefslogtreecommitdiff
path: root/com32
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@gmail.com>2008-08-30 09:07:42 +0100
committerStefan Hajnoczi <stefanha@gmail.com>2008-08-30 09:07:42 +0100
commitab17bbf00cb3f967765830d3f3e71215e9ae70b4 (patch)
tree34efd684fbed151fac650c3b15d9ad69b3230ef0 /com32
parent77950e64a458e753900ff4ff6119bea15d1a4533 (diff)
downloadsyslinux-ab17bbf00cb3f967765830d3f3e71215e9ae70b4.tar.gz
Fix GDB protocol flow control issues
Diffstat (limited to 'com32')
-rw-r--r--com32/gdbstub/gdbstub.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/com32/gdbstub/gdbstub.c b/com32/gdbstub/gdbstub.c
index 77c9dcb9..3e9ff5e8 100644
--- a/com32/gdbstub/gdbstub.c
+++ b/com32/gdbstub/gdbstub.c
@@ -504,13 +504,11 @@ 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 */
- serial_write ( "-", 1 );
- stub->parse = gdbstub_state_new;
- }
+ } else {
+ /* This retransmit is very aggressive but necessary to keep
+ * in sync with GDB. */
+ gdbstub_tx_packet ( stub );
+ }
}
void gdbstub_handler ( int signo, gdbreg_t *regs ) {