From patchwork Thu Feb 14 19:06:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 158444 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1765069jaa; Thu, 14 Feb 2019 11:26:05 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib7nDeWcwktESmJiwgSdpq7D9jL7EvEt2aHe70UbcYrOKEU1IKfIR7+jZDYUqInr17X8L5k X-Received: by 2002:a81:a48c:: with SMTP id b134mr4790877ywh.462.1550172365442; Thu, 14 Feb 2019 11:26:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550172365; cv=none; d=google.com; s=arc-20160816; b=s+EXwW6tLExhnqoZeGi+UKmLIzBtiJQuN0uInU5HJicrgGcqHMPKERD6B4Ty4xJg0C 8bktKeRBmUnqQjSt0C+cPjAFdvTAZhUuGKNVbjGczd1Ml96z3e2XxC8hwJIJjRbs8H1t wioRP83wqdT5yldaqa2FTRPmimDLbEfey2LH3S8jrJeqqiBP6GA+ZQTh7UAg06qlhGnx KPfinko/5O5ze+LEV0CmEt3gQf8rSrLyA8HqHWUgnkOW6cIiTem3RIdv7bvcGDxoIN3a JS+tXnGkOLMwa/u1eISLgiBuYCR7/oCkN3zPMJ90R5ZPrNCquMurVSUFwqnFhbbgnD1H lgCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=cuA1RdS68JNeoUv0kGUH7c6hIlhmzvR7JUXyBHWSCMA=; b=K29zC5Tsad7iVNTfO7Y5Q2cfwvRgrBh3D5st7fdnyl0FeMvNB30qBz40GUsvqoGdPz 9XLFQq15d1AMWwogsPdcNx8IClPiW3LECnXSyq1WwECwIqekevenklLG1GoC/3xbjI8x z4K52aqZUsJprJOhC9YBk6mEL0LLCnBTdXIqQ+t6MMss6Am0XybW83HjkE1xgp02a7tJ LrJ7l3SwRW+daggFauPXmRcnSvKuQzsMxGGmBG6OisR4l7SW5zf/RNBJAzBHK0S6RswA pGafi3sMCOEZvJyr/QwkZsLMwg0TjlfnpB0MlD/tnicBH0nbxEdYsppp6ivJbywhMINh 1g+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="ZPHDgy/S"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h127si848011ywd.378.2019.02.14.11.26.05 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 14 Feb 2019 11:26:05 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="ZPHDgy/S"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:53800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guMe5-0006FV-0B for patch@linaro.org; Thu, 14 Feb 2019 14:26:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guMLL-00084L-VI for qemu-devel@nongnu.org; Thu, 14 Feb 2019 14:06:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guMLK-0004up-DS for qemu-devel@nongnu.org; Thu, 14 Feb 2019 14:06:43 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:40351) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guMLK-0004rs-3m for qemu-devel@nongnu.org; Thu, 14 Feb 2019 14:06:42 -0500 Received: by mail-wm1-x344.google.com with SMTP id q21so7181776wmc.5 for ; Thu, 14 Feb 2019 11:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cuA1RdS68JNeoUv0kGUH7c6hIlhmzvR7JUXyBHWSCMA=; b=ZPHDgy/SKzW0BXEqOz5dPJmmfoENtvC1vB03V/N6lmWVWwN7uwxTZ77yPXhDtYTys/ Q6SExUlUDypzChBuP9JuT5T7bYLxl+wFRJYvyQdvM6pjowYT4nBPPbd6lnvIK/Wud/2H QgOLP3B8VXBrfp0iuE12MkfiP+v1LWAbhYALnnDjpZltQ4UuY9jtomkGCxXe0Sw6UaJi bYEfEyAMcCua3//GtuF11KhpAp8E64YmS3tKdjvcIOZJqcBa9oWUO1Nq/79s44aPBi6X 6u+2yMD8TFY+1XbNsLoPXPgP1NoL97TVtyDnFJ4t0vY4pvgRg+g4DEIgghW/3gvcHU7e nmpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cuA1RdS68JNeoUv0kGUH7c6hIlhmzvR7JUXyBHWSCMA=; b=ZtdP/Vc8C5KQZiOdMrTaH42ys7QxqIxpDNIZ8sidU/DtwRi7w9VKdyLZ7yH+ANqXqX 4bWuakfuazxvnfZr8u9dtiT5XvdzqpzQ5t6sa5O1vLQ+8Ixxj33cYsBaT3CJ3py2Hl3/ zmJ5gALdqSxoO0rwtim8DSbN5yZ8BQAjWaHkHJHWakMxBG31Ig8lYAS4lIOP0+q3PFTk sQ+7m6cZig9YhfVBVFlXnD0v+pvLZ3CpQXdAPzVvJijh83gFHSOLlxtvl9qcXuv0iE4U 3GiMHo08y2TfTPjJ5DHAlG0yYs9ftoUvZpvAnuRoXAR8rkYmucrSeKQGIWn3qXFguHAT XvdQ== X-Gm-Message-State: AHQUAuZkbo9OxhzzLUbJyHWHuHni38DGeWNZqLx5F9V57jgZzWx43HEE TR4Y2bkC6jd6NVzxr5DJSVsDCYdVU+c3mw== X-Received: by 2002:a1c:eb0a:: with SMTP id j10mr3786563wmh.115.1550171197967; Thu, 14 Feb 2019 11:06:37 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n184sm7798471wmf.5.2019.02.14.11.06.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 11:06:37 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 14 Feb 2019 19:06:03 +0000 Message-Id: <20190214190603.25030-28-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190214190603.25030-1-peter.maydell@linaro.org> References: <20190214190603.25030-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PULL 27/27] gdbstub: Send a reply to the vKill 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Sandra Loosemore Per the GDB remote protocol documentation https://sourceware.org/gdb/current/onlinedocs/gdb/Packets.html#index-vKill-packet the debug stub is expected to send a reply to the 'vKill' packet. At least some versions of GDB crash if the gdb stub simply exits without sending a reply. This patch fixes QEMU's gdb stub to conform to the expected behavior. Note that QEMU's existing handling of the legacy 'k' packet is correct: in that case GDB does not expect a reply, and QEMU does not send one. Signed-off-by: Sandra Loosemore Message-id: 1550008033-26540-1-git-send-email-sandra@codesourcery.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- gdbstub.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/gdbstub.c b/gdbstub.c index ff19579452d..bc774ae9925 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1361,6 +1361,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_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 {