ソースを参照

[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
 

読み込み中…
キャンセル
保存