Ver código fonte

[GDB] Obey flow control when GDB connects.

tags/v0.9.4
Stefan Hajnoczi 16 anos atrás
pai
commit
7eb555a8ae
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4
    0
      src/core/gdbstub.c

+ 4
- 0
src/core/gdbstub.c Ver arquivo

@@ -350,6 +350,10 @@ static void gdbstub_state_wait_ack ( struct gdbstub *stub, char ch ) {
350 350
 		stub->parse = gdbstub_state_new;
351 351
 	} else if ( ch == '-' ) {
352 352
 		gdbstub_tx_packet ( stub ); /* retransmit */
353
+	} else if ( ch == '$' ) {
354
+		/* GDB is reconnecting, drop our packet and listen to GDB */
355
+		stub->trans->send ( "-", 1 );
356
+		stub->parse = gdbstub_state_new;
353 357
 	}
354 358
 }
355 359
 

Carregando…
Cancelar
Salvar