qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 03/39] windbg: add -windbg option


From: Mikhail Abakumov
Subject: [Qemu-devel] [PATCH v3 03/39] windbg: add -windbg option
Date: Thu, 06 Dec 2018 14:58:55 +0300
User-agent: StGit/0.17.1-dirty

This option starts windbg server.

Signed-off-by: Mikhail Abakumov <address@hidden>
Acked-by: Alistair Francis <address@hidden>
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
 qemu-options.hx |    8 ++++++++
 vl.c            |    8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/qemu-options.hx b/qemu-options.hx
index f7df472f43..13b1157114 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3317,6 +3317,14 @@ Shorthand for -gdb tcp::1234, i.e. open a gdbserver on 
TCP port 1234
 (@pxref{gdb_usage}).
 ETEXI
 
+DEF("windbg", HAS_ARG, QEMU_OPTION_windbg, \
+    "-windbg         wait for windbg connection\n", QEMU_ARCH_I386)
+STEXI
address@hidden -windbg
address@hidden -windbg
+Wait for windbg connection.
+ETEXI
+
 DEF("d", HAS_ARG, QEMU_OPTION_d, \
     "-d item1,...    enable logging of specified items (use '-d help' for a 
list of log items)\n",
     QEMU_ARCH_ALL)
diff --git a/vl.c b/vl.c
index fa25d1ae2d..bfcecf9a5c 100644
--- a/vl.c
+++ b/vl.c
@@ -76,6 +76,7 @@ int main(int argc, char **argv)
 #include "sysemu/sysemu.h"
 #include "sysemu/numa.h"
 #include "exec/gdbstub.h"
+#include "exec/windbgstub.h"
 #include "qemu/timer.h"
 #include "chardev/char.h"
 #include "qemu/bitmap.h"
@@ -2372,6 +2373,7 @@ struct device_config {
         DEV_VIRTCON,   /* -virtioconsole */
         DEV_DEBUGCON,  /* -debugcon */
         DEV_GDB,       /* -gdb, -s */
+        DEV_WINDBG,    /* -windbg */
         DEV_SCLP,      /* s390 sclp */
     } type;
     const char *cmdline;
@@ -3324,6 +3326,9 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_gdb:
                 add_device_config(DEV_GDB, optarg);
                 break;
+            case QEMU_OPTION_windbg:
+                 add_device_config(DEV_WINDBG, optarg);
+                 break;
             case QEMU_OPTION_L:
                 if (is_help_option(optarg)) {
                     list_data_dirs = true;
@@ -4464,6 +4469,9 @@ int main(int argc, char **argv, char **envp)
     qemu_opts_foreach(qemu_find_opts("mon"),
                       mon_init_func, NULL, &error_fatal);
 
+    if (foreach_device_config(DEV_WINDBG, windbg_server_start) < 0) {
+        exit(1);
+    }
     if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
         exit(1);
     if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]