소스 검색

[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…
취소
저장