From patchwork Tue Nov 21 14:08:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Abakumov X-Patchwork-Id: 10068287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30ACB60375 for ; Tue, 21 Nov 2017 14:20:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2347B2868D for ; Tue, 21 Nov 2017 14:20:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17ED928D8D; Tue, 21 Nov 2017 14:20:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AB5B82868D for ; Tue, 21 Nov 2017 14:20:40 +0000 (UTC) Received: from localhost ([::1]:34672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eH9Pj-0001nz-SO for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Nov 2017 09:20:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eH9EQ-00012B-Sv for qemu-devel@nongnu.org; Tue, 21 Nov 2017 09:08:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eH9EM-0002i3-US for qemu-devel@nongnu.org; Tue, 21 Nov 2017 09:08:58 -0500 Received: from mail.ispras.ru ([83.149.199.45]:38012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eH9EM-0002ht-Lp for qemu-devel@nongnu.org; Tue, 21 Nov 2017 09:08:54 -0500 Received: from Misha-PC.lan02.inno (unknown [85.142.117.226]) by mail.ispras.ru (Postfix) with ESMTPSA id E07DE54006E; Tue, 21 Nov 2017 17:08:53 +0300 (MSK) From: Mihail Abakumov To: qemu-devel@nongnu.org Date: Tue, 21 Nov 2017 17:08:51 +0300 Message-ID: <151127333169.6888.10315185193447806092.stgit@Misha-PC.lan02.inno> In-Reply-To: <151127322955.6888.16198535123422076171.stgit@Misha-PC.lan02.inno> References: <151127322955.6888.16198535123422076171.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 v3 17/45] windbg: generate LoadSymbolsStateChange 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Added function for generate LoadSymbolsStateChange packet. Signed-off-by: Mihail Abakumov Signed-off-by: Pavel Dovgalyuk Signed-off-by: Dmitriy Koltunov --- include/exec/windbgstub-utils.h | 1 + target/i386/windbgstub.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/exec/windbgstub-utils.h b/include/exec/windbgstub-utils.h index f35873eca0..8558bc6c8a 100755 --- a/include/exec/windbgstub-utils.h +++ b/include/exec/windbgstub-utils.h @@ -87,6 +87,7 @@ InitedAddr *windbg_get_KPCR(void); InitedAddr *windbg_get_version(void); SizedBuf kd_gen_exception_sc(CPUState *cpu); +SizedBuf kd_gen_load_symbols_sc(CPUState *cpu); bool windbg_on_load(void); diff --git a/target/i386/windbgstub.c b/target/i386/windbgstub.c index f0edd94dde..261e441db1 100755 --- a/target/i386/windbgstub.c +++ b/target/i386/windbgstub.c @@ -133,4 +133,19 @@ SizedBuf kd_gen_exception_sc(CPUState *cpu) return buf; } +SizedBuf kd_gen_load_symbols_sc(CPUState *cpu) +{ + DBGKD_ANY_WAIT_STATE_CHANGE *sc; + SizedBuf buf; + + SBUF_MALLOC(buf, sizeof(DBGKD_ANY_WAIT_STATE_CHANGE)); + sc = (DBGKD_ANY_WAIT_STATE_CHANGE *) buf.data; + kd_init_state_change(cpu, sc); + + stl_p(&sc->NewState, DbgKdLoadSymbolsStateChange); + stl_p(&sc->u.LoadSymbols.PathNameLength, 0); + + return buf; +} + #endif