From patchwork Tue Oct 17 13:09:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Abakumov X-Patchwork-Id: 826970 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yGbKb4G9jz9sBZ for ; Wed, 18 Oct 2017 00:15:47 +1100 (AEDT) Received: from localhost ([::1]:39175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4Rij-0007dW-KA for incoming@patchwork.ozlabs.org; Tue, 17 Oct 2017 09:15:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4RcY-0002md-Uf for qemu-devel@nongnu.org; Tue, 17 Oct 2017 09:09:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4RcS-0004cL-Ro for qemu-devel@nongnu.org; Tue, 17 Oct 2017 09:09:22 -0400 Received: from mail.ispras.ru ([83.149.199.45]:56484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4RcS-0004bZ-IQ for qemu-devel@nongnu.org; Tue, 17 Oct 2017 09:09:16 -0400 Received: from Misha-PC.lan02.inno (unknown [85.142.117.226]) by mail.ispras.ru (Postfix) with ESMTPSA id D12EA54006C; Tue, 17 Oct 2017 16:09:15 +0300 (MSK) From: Mihail Abakumov To: qemu-devel@nongnu.org Date: Tue, 17 Oct 2017 16:09:13 +0300 Message-ID: <150824575325.6816.580234093427015826.stgit@Misha-PC.lan02.inno> In-Reply-To: <150824572545.6816.5099701189660002212.stgit@Misha-PC.lan02.inno> References: <150824572545.6816.5099701189660002212.stgit@Misha-PC.lan02.inno> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 83.149.199.45 Subject: [Qemu-devel] [PATCH v2 04/43] windbg: added '-windbg' option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de, lprosek@redhat.com, dovgaluk@ispras.ru, rkagan@virtuozzo.com, pbonzini@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This option starts windbg server. Signed-off-by: Mihail Abakumov Acked-by: Alistair Francis Signed-off-by: Pavel Dovgalyuk Signed-off-by: Dmitriy Koltunov --- qemu-options.hx | 8 ++++++++ vl.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 9f6e2adfff..1c84eb56d9 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3544,6 +3544,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 +@item -windbg +@findex -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 8e247cc2a2..d6378cf03f 100644 --- a/vl.c +++ b/vl.c @@ -80,6 +80,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" @@ -2436,6 +2437,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; @@ -3445,6 +3447,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; @@ -4586,6 +4591,9 @@ int main(int argc, char **argv, char **envp) exit(1); } + 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)