Message ID | 20181106110548.4209-15-luc.michel@greensocs.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=greensocs.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=greensocs.com header.i=@greensocs.com header.b="HeVVH0he"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=greensocs.com header.i=@greensocs.com header.b="R4N11l2t"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=greensocs.com header.i=@greensocs.com header.b="R4N11l2t"; dkim-atps=neutral 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 42q6ZN2xzqz9sDL for <incoming@patchwork.ozlabs.org>; Tue, 6 Nov 2018 22:21:48 +1100 (AEDT) Received: from localhost ([::1]:40382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1gJzQX-0007MG-SH for incoming@patchwork.ozlabs.org; Tue, 06 Nov 2018 06:21:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <luc.michel@greensocs.com>) id 1gJzC9-0006mj-KK for qemu-devel@nongnu.org; Tue, 06 Nov 2018 06:06:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <luc.michel@greensocs.com>) id 1gJzC4-0001u0-Is for qemu-devel@nongnu.org; Tue, 06 Nov 2018 06:06:53 -0500 Received: from greensocs.com ([193.104.36.180]:46757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <luc.michel@greensocs.com>) id 1gJzBt-0000rN-0B; Tue, 06 Nov 2018 06:06:37 -0500 Received: from localhost (localhost [127.0.0.1]) by greensocs.com (Postfix) with ESMTP id BEE325C024F; Tue, 6 Nov 2018 12:06:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1541502375; bh=WgnMQ5pr+n/ESL8puF7jtpCC/FdzwfDNBDnQ0ACltqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HeVVH0heJOMDA+QGO9c54JgekKX6dhBEfx2lf244IXICmBfEA+lQwpW2/StL9Wkvn d9D1Aex0QeOwSK2odlPuaZlyM8kiXAgVRh+BI3/2Rqu4x6W2mFFdJ7nxttuV9gwzFQ FOvFlciOAmuAG0c7/h37yu9lDLQh1oCVd94Wm+Fc= 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=R4N11l2t; dkim=pass (1024-bit key) header.d=greensocs.com header.b=R4N11l2t 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 ak2o_1jwB_cM; Tue, 6 Nov 2018 12:06:15 +0100 (CET) Received: by greensocs.com (Postfix, from userid 998) id 619705C9D9A; Tue, 6 Nov 2018 12:06:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1541502371; bh=WgnMQ5pr+n/ESL8puF7jtpCC/FdzwfDNBDnQ0ACltqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R4N11l2tv026tICF5QcMKE9GdctVx+m843XPTPvZ0tvJOnAU0b6RQ2bm3pKeyoZjZ 8Wr21x0Uco3kFN7UDS+sUW2m63ZdFEDwZSL1JoZeF788Q3odXQjGSmVhOj9dlB226H JAvxuiLe7Lyvfa4iwtMSDyGxHZHgOAAzSzNs/Ubs= 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 CE81A5C0276; Tue, 6 Nov 2018 12:06:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1541502371; bh=WgnMQ5pr+n/ESL8puF7jtpCC/FdzwfDNBDnQ0ACltqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R4N11l2tv026tICF5QcMKE9GdctVx+m843XPTPvZ0tvJOnAU0b6RQ2bm3pKeyoZjZ 8Wr21x0Uco3kFN7UDS+sUW2m63ZdFEDwZSL1JoZeF788Q3odXQjGSmVhOj9dlB226H JAvxuiLe7Lyvfa4iwtMSDyGxHZHgOAAzSzNs/Ubs= From: Luc Michel <luc.michel@greensocs.com> To: qemu-devel@nongnu.org Date: Tue, 6 Nov 2018 12:05:46 +0100 Message-Id: <20181106110548.4209-15-luc.michel@greensocs.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181106110548.4209-1-luc.michel@greensocs.com> References: <20181106110548.4209-1-luc.michel@greensocs.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 193.104.36.180 Subject: [Qemu-devel] [PATCH v4 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org>, Eduardo Habkost <ehabkost@redhat.com>, alistair@alistair23.me, mark.burton@greensocs.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>, saipava@xilinx.com, edgari@xilinx.com, qemu-arm@nongnu.org, Luc Michel <luc.michel@greensocs.com> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
gdbstub: support for the multiprocess extension
|
expand
|
diff --git a/gdbstub.c b/gdbstub.c index 1a3353ff3c..c662ada6ff 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1787,10 +1787,19 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) return RS_IDLE; } void gdb_set_stop_cpu(CPUState *cpu) { + GDBProcess *p = gdb_get_cpu_process(gdbserver_state, cpu); + + if (!p->attached) { + /* Having a stop CPU corresponding to a process that is not attached + * confuses GDB. So we ignore the request. + */ + return; + } + gdbserver_state->c_cpu = cpu; gdbserver_state->g_cpu = cpu; } #ifndef CONFIG_USER_ONLY