Skip to content

Commit

Permalink
gdbstub: allow killing QEMU via vKill command
Browse files Browse the repository at this point in the history
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: 7cf48f6 ("gdbstub: add multiprocess support to
(f|s)ThreadInfo and ThreadExtraInfo")

Cc: Luc Michel <luc.michel@greensocs.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: KONRAD Frederic <frederic.konrad@adacore.com>
Tested-by: KONRAD Frederic <frederic.konrad@adacore.com>
Message-id: 20190130192403.13754-1-jcmvbkbc@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
jcmvbkbc authored and pm215 committed Feb 5, 2019
1 parent f6a148f commit 45a4de2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gdbstub.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 45a4de2

Please sign in to comment.