From patchwork Mon Oct 1 11:57:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luc Michel X-Patchwork-Id: 10621929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8098015A7 for ; Mon, 1 Oct 2018 12:10:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C50F2946E for ; Mon, 1 Oct 2018 12:10:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5ECD62948B; Mon, 1 Oct 2018 12:10:02 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 DF4E72946E for ; Mon, 1 Oct 2018 12:10:01 +0000 (UTC) Received: from localhost ([::1]:37936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6x1U-0006vE-NC for patchwork-qemu-devel@patchwork.kernel.org; Mon, 01 Oct 2018 08:10:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6wpn-0002kP-Fc for qemu-devel@nongnu.org; Mon, 01 Oct 2018 07:57:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6wpm-00061p-Lp for qemu-devel@nongnu.org; Mon, 01 Oct 2018 07:57:55 -0400 Received: from greensocs.com ([193.104.36.180]:40141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6wph-0005jR-AE; Mon, 01 Oct 2018 07:57:49 -0400 Received: from localhost (localhost [127.0.0.1]) by greensocs.com (Postfix) with ESMTP id E72B1511C6F; Mon, 1 Oct 2018 13:57:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1538395035; bh=KdNu9QGOUCYSzJWzlap/9zyYoowEZ7QOtkLhorspP1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Vpnme4Hcwp6+JXnt6V/2++4iIw1OlipkiM8ty678X8b9pqUSrQZzzOEc49Q3yuG5/ ulzU9dReuMiLhHXwzlDCler0evfQt7W28H5ITaXg9tOe6FBdm8uIoZlwtXaic4Gkap e3PMKEmm6bJKWIob/U0bTXuo86Qqpf6joSFsoFfU= X-Virus-Scanned: amavisd-new at greensocs.com Authentication-Results: gs-01.greensocs.com (amavisd-new); dkim=pass (1024-bit key) header.d=greensocs.com header.b=nD+spMeP; dkim=pass (1024-bit key) header.d=greensocs.com header.b=tuO/KFn9 Received: from greensocs.com ([127.0.0.1]) by localhost (gs-01.greensocs.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4MNwaX5qi0Fh; Mon, 1 Oct 2018 13:57:15 +0200 (CEST) Received: by greensocs.com (Postfix, from userid 998) id 2820D511C51; Mon, 1 Oct 2018 13:57:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1538395033; bh=KdNu9QGOUCYSzJWzlap/9zyYoowEZ7QOtkLhorspP1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nD+spMePMBQqIfGHevLYYAXfsZKbFSINbD8Itpu54ZE+kg+ku5zh0fAM9ZLlbfObR I4O55rQQnIUiGxS0Y+DQwKNSpGLpGbHPudZu0gVbv4I/8hyftm1JIHSCie7bl0CVxA 6hNoCQd6cj6m8bZFE/ehEjXTGo/oktUe2feH24xg= Received: from michell-laptop.home.lmichel.fr (LFbn-1-8165-82.w90-112.abo.wanadoo.fr [90.112.74.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: luc.michel@greensocs.com) by greensocs.com (Postfix) with ESMTPSA id 8A7C7511C78; Mon, 1 Oct 2018 13:57:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1538395032; bh=KdNu9QGOUCYSzJWzlap/9zyYoowEZ7QOtkLhorspP1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tuO/KFn9GagAZrQ4kFQ/J5vtpcyzaeFJC4HSG4u7qo3UVVQcTlwqgLHCIrvjdwT7u 3r5q1kMWf+Emyx4KbhbX23zt5ARSETjpqF66+0XYBt3p6X+eEuXroISod0XKSy5HbF CkX2srPKuzPDEt9EILPRr4OvSuj2k3vigca2lUd0= From: Luc Michel To: qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 13:57:03 +0200 Message-Id: <20181001115704.701-15-luc.michel@greensocs.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181001115704.701-1-luc.michel@greensocs.com> References: <20181001115704.701-1-luc.michel@greensocs.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 193.104.36.180 Subject: [Qemu-devel] [PATCH v2 14/15] gdbstub: add multiprocess extension support 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: Peter Maydell , alistair@alistair23.me, mark.burton@greensocs.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , saipava@xilinx.com, edgari@xilinx.com, qemu-arm@nongnu.org, Luc Michel Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add multiprocess extension support by enabling multiprocess mode when the peer requests it, and by replying that we actually support it in the qSupported reply packet. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 51cc11981e..89f6803533 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1692,15 +1692,19 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) put_packet(s, "OK"); break; } #endif /* !CONFIG_USER_ONLY */ if (is_query_packet(p, "Supported", ':')) { + if (strstr(p, "multiprocess+")) { + s->multiprocess = true; + } snprintf(buf, sizeof(buf), "PacketSize=%x", MAX_PACKET_LENGTH); cc = CPU_GET_CLASS(first_cpu); if (cc->gdb_core_xml_file != NULL) { pstrcat(buf, sizeof(buf), ";qXfer:features:read+"); } + pstrcat(buf, sizeof(buf), ";multiprocess+"); put_packet(s, buf); break; } if (strncmp(p, "Xfer:features:read:", 19) == 0) { const char *xml;