From: Max Filippov Date: Tue, 5 Feb 2019 16:52:41 +0000 (+0000) Subject: gdbstub: allow killing QEMU via vKill command X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=45a4de25835b8c29283d40e47cc2291e7cea2337;p=qemu.git gdbstub: allow killing QEMU via vKill command With multiprocess extensions gdb uses 'vKill' packet instead of 'k' to kill the inferior. Handle 'vKill' the same way 'k' was handled in the presence of single process. Fixes: 7cf48f6752e5 ("gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo") Cc: Luc Michel Signed-off-by: Max Filippov Reviewed-by: Luc Michel Reviewed-by: KONRAD Frederic Tested-by: KONRAD Frederic Message-id: 20190130192403.13754-1-jcmvbkbc@gmail.com Signed-off-by: Peter Maydell --- diff --git a/gdbstub.c b/gdbstub.c index 3129b5c284..a4be63f6eb 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1359,6 +1359,10 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) put_packet(s, buf); break; + } else if (strncmp(p, "Kill;", 5) == 0) { + /* Kill the target */ + error_report("QEMU: Terminated via GDBstub"); + exit(0); } else { goto unknown_command; }