Explorar el Código

[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 hace 15 años
padre
commit
38a1d0fe3f
Se han modificado 1 ficheros con 4 adiciones y 6 borrados
  1. 4
    6
      src/core/gdbstub.c

+ 4
- 6
src/core/gdbstub.c Ver fichero

@@ -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…
Cancelar
Guardar