From patchwork Thu Nov 29 14:29:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Abakumov X-Patchwork-Id: 1005425 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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ispras.ru Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 435KwD4fhLz9sNH for ; Fri, 30 Nov 2018 01:41:32 +1100 (AEDT) Received: from localhost ([::1]:54519 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSNVS-00083a-5U for incoming@patchwork.ozlabs.org; Thu, 29 Nov 2018 09:41:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSNJk-0005FI-Gy for qemu-devel@nongnu.org; Thu, 29 Nov 2018 09:29:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSNJj-0007kq-Q1 for qemu-devel@nongnu.org; Thu, 29 Nov 2018 09:29:24 -0500 Received: from mail.ispras.ru ([83.149.199.45]:39648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSNJh-0007X7-QW for qemu-devel@nongnu.org; Thu, 29 Nov 2018 09:29:22 -0500 Received: from Misha-PC.lan02.inno (unknown [85.142.117.226]) by mail.ispras.ru (Postfix) with ESMTPSA id C63CD540125; Thu, 29 Nov 2018 17:29:19 +0300 (MSK) From: Mikhail Abakumov To: qemu-devel@nongnu.org Date: Thu, 29 Nov 2018 17:29:17 +0300 Message-ID: <154350175732.8036.9184331245906503259.stgit@Misha-PC.lan02.inno> In-Reply-To: <154350164526.8036.12623669071583857903.stgit@Misha-PC.lan02.inno> References: <154350164526.8036.12623669071583857903.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 19/39] windbg: implement windbg_process_data_packet 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" Signed-off-by: Mikhail Abakumov Signed-off-by: Pavel Dovgalyuk --- windbgstub.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/windbgstub.c b/windbgstub.c index f13c9a6c1e..8cbece40da 100644 --- a/windbgstub.c +++ b/windbgstub.c @@ -134,8 +134,35 @@ static void windbg_vm_stop(void) vm_stop(RUN_STATE_PAUSED); } +static void windbg_process_manipulate_packet(WindbgState *state) +{ +} + static void windbg_process_data_packet(WindbgState *state) { + ParsingContext *ctx = &state->ctx; + + if (state->wait_packet_type == PACKET_TYPE_KD_ACKNOWLEDGE) { + /* We received something different */ + windbg_send_control_packet(state, PACKET_TYPE_KD_RESEND, 0); + return; + } + + switch (ctx->packet.PacketType) { + case PACKET_TYPE_KD_STATE_MANIPULATE: + windbg_send_control_packet(state, PACKET_TYPE_KD_ACKNOWLEDGE, + ctx->packet.PacketId); + windbg_process_manipulate_packet(state); + state->curr_packet_id &= ~SYNC_PACKET_ID; + break; + + default: + WINDBG_ERROR("Caught unsupported data packet 0x%x", + ctx->packet.PacketType); + + windbg_send_control_packet(state, PACKET_TYPE_KD_RESEND, 0); + break; + } } static void windbg_process_control_packet(WindbgState *state)