提交 e2af15b2 编写于 作者: F Fabien Chouteau 提交者: Edgar E. Iglesias

gdbstub: Close connection in gdb_exit

On Windows, this is required to flush the remaining data in the IO stream,
otherwise Gdb do not receive the last packet.

Version 2:
   Fix linux-user build error.
Signed-off-by: NFabien Chouteau <chouteau@adacore.com>
Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@petalogix.com>
上级 a8fb7ff3
......@@ -2391,6 +2391,12 @@ void gdb_exit(CPUState *env, int code)
snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
put_packet(s, buf);
#ifndef CONFIG_USER_ONLY
if (s->chr) {
qemu_chr_close(s->chr);
}
#endif
}
#ifdef CONFIG_USER_ONLY
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册