浏览代码

[GDB] Obey flow control when GDB connects.

tags/v0.9.4
Stefan Hajnoczi 16 年前
父节点
当前提交
7eb555a8ae
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      src/core/gdbstub.c

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

@@ -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
 

正在加载...
取消
保存