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: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
This commit is contained in:
parent
a8fb7ff3fd
commit
e2af15b2ad
@ -2391,6 +2391,12 @@ void gdb_exit(CPUState *env, int code)
|
|||||||
|
|
||||||
snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
|
snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
|
||||||
put_packet(s, buf);
|
put_packet(s, buf);
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_ONLY
|
||||||
|
if (s->chr) {
|
||||||
|
qemu_chr_close(s->chr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_USER_ONLY
|
#ifdef CONFIG_USER_ONLY
|
||||||
|
Loading…
Reference in New Issue
Block a user