mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-29 13:01:52 -06:00
gdbstub: send a termination packet instead of crashing gdb
Since the commit:
commit 4486e89c21
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Wed Mar 7 14:42:05 2018 +0000
vl: introduce vm_shutdown()
GDB crashes when qemu exits (at least on sparc-softmmu):
Remote communication error. Target disconnected.: Connection reset by peer.
Quitting: putpkt: write failed: Broken pipe.
So send a packet to exit GDB before we exit QEMU:
[Inferior 1 (Thread 0) exited normally]
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com>
Message-id: 1521538773-30802-1-git-send-email-frederic.konrad@adacore.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
f55e88f2ab
commit
1bb982b8fc
3 changed files with 11 additions and 0 deletions
|
@ -2052,6 +2052,13 @@ int gdbserver_start(const char *device)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void gdbserver_cleanup(void)
|
||||
{
|
||||
if (gdbserver_state) {
|
||||
put_packet(gdbserver_state, "W00");
|
||||
}
|
||||
}
|
||||
|
||||
static void register_types(void)
|
||||
{
|
||||
type_register_static(&char_gdb_type_info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue