]> git.proxmox.com Git - mirror_qemu.git/blobdiff - gdbstub.c
gdbstub: ensure we clean-up when terminated
[mirror_qemu.git] / gdbstub.c
index 8fc41ea526c25e107c52992da90ef8af1306ced5..c7ca7e9f889f40242bacb581be2195c1ef0ecabc 100644 (file)
--- 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':
         {