]> git.proxmox.com Git - mirror_qemu.git/blobdiff - gdbstub.c
hw/mips/Kconfig: Malta machine requires the pcnet network card
[mirror_qemu.git] / gdbstub.c
index 3129b5c28424ecb35b163863869f5df321873964..bc774ae992588b9659db7e5b5e963bbae82a1d0c 100644 (file)
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1359,6 +1359,11 @@ 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 */
+            put_packet(s, "OK");
+            error_report("QEMU: Terminated via GDBstub");
+            exit(0);
         } else {
             goto unknown_command;
         }
@@ -2527,7 +2532,7 @@ int gdbserver_start(const char *device)
          * FIXME: it's a bit weird to allow using a mux chardev here
          * and implicitly setup a monitor. We may want to break this.
          */
-        chr = qemu_chr_new_noreplay("gdb", device, true);
+        chr = qemu_chr_new_noreplay("gdb", device, true, NULL);
         if (!chr)
             return -1;
     }
@@ -2541,7 +2546,7 @@ int gdbserver_start(const char *device)
 
         /* Initialize a monitor terminal for gdb */
         mon_chr = qemu_chardev_new(NULL, TYPE_CHARDEV_GDB,
-                                   NULL, &error_abort);
+                                   NULL, NULL, &error_abort);
         monitor_init(mon_chr, 0);
     } else {
         qemu_chr_fe_deinit(&s->chr, true);