summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdbstub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 8fc41ea526..c7ca7e9f88 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1978,6 +1978,7 @@ static void handle_v_kill(GdbCmdContext *gdb_ctx, void *user_ctx)
/* Kill the target */
put_packet("OK");
error_report("QEMU: Terminated via GDBstub");
+ gdb_exit(0);
exit(0);
}
@@ -2539,6 +2540,7 @@ static int gdb_handle_packet(const char *line_buf)
case 'k':
/* Kill the target */
error_report("QEMU: Terminated via GDBstub");
+ gdb_exit(0);
exit(0);
case 'D':
{