mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
gdbstub: Send a reply to the vKill packet.
Per the GDB remote protocol documentation https://sourceware.org/gdb/current/onlinedocs/gdb/Packets.html#index-vKill-packet the debug stub is expected to send a reply to the 'vKill' packet. At least some versions of GDB crash if the gdb stub simply exits without sending a reply. This patch fixes QEMU's gdb stub to conform to the expected behavior. Note that QEMU's existing handling of the legacy 'k' packet is correct: in that case GDB does not expect a reply, and QEMU does not send one. Signed-off-by: Sandra Loosemore <sandra@codesourcery.com> Message-id: 1550008033-26540-1-git-send-email-sandra@codesourcery.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
d8efe78e80
commit
0f8b09b222
1 changed files with 1 additions and 0 deletions
|
@ -1361,6 +1361,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
|
|||
break;
|
||||
} else if (strncmp(p, "Kill;", 5) == 0) {
|
||||
/* Kill the target */
|
||||
put_packet(s, "OK");
|
||||
error_report("QEMU: Terminated via GDBstub");
|
||||
exit(0);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue