瀏覽代碼

[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>
tags/v0.9.8
Stefan Hajnoczi 15 年之前
父節點
當前提交
38a1d0fe3f
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4
    6
      src/core/gdbstub.c

+ 4
- 6
src/core/gdbstub.c 查看文件

@@ -344,12 +344,10 @@ static void gdbstub_state_cksum2 ( struct gdbstub *stub, char ch ) {
344 344
 static void gdbstub_state_wait_ack ( struct gdbstub *stub, char ch ) {
345 345
 	if ( ch == '+' ) {
346 346
 		stub->parse = gdbstub_state_new;
347
-	} else if ( ch == '-' ) {
348
-		gdbstub_tx_packet ( stub ); /* retransmit */
349
-	} else if ( ch == '$' ) {
350
-		/* GDB is reconnecting, drop our packet and listen to GDB */
351
-		stub->trans->send ( "-", 1 );
352
-		stub->parse = gdbstub_state_new;
347
+	} else {
348
+		/* This retransmit is very aggressive but necessary to keep
349
+		 * in sync with GDB. */
350
+		gdbstub_tx_packet ( stub );
353 351
 	}
354 352
 }
355 353
 

Loading…
取消
儲存