From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVC1q-0008OY-G3 for qemu-devel@nongnu.org; Fri, 07 Dec 2018 04:02:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVC1n-0005sQ-5H for qemu-devel@nongnu.org; Fri, 07 Dec 2018 04:02:34 -0500 From: Luc Michel Date: Fri, 7 Dec 2018 10:01:33 +0100 Message-Id: <20181207090135.7651-16-luc.michel@greensocs.com> In-Reply-To: <20181207090135.7651-1-luc.michel@greensocs.com> References: <20181207090135.7651-1-luc.michel@greensocs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v8 15/16] gdbstub: add multiprocess extension support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Luc Michel , qemu-arm@nongnu.org, Peter Maydell , saipava@xilinx.com, edgari@xilinx.com, alistair@alistair23.me, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , mark.burton@greensocs.com, Eduardo Habkost 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=C3=A9 Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- gdbstub.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 48b49195f7..bb82d97c5c 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1730,10 +1730,16 @@ static int gdb_handle_packet(GDBState *s, const c= har *line_buf) snprintf(buf, sizeof(buf), "PacketSize=3D%x", MAX_PACKET_LEN= GTH); cc =3D CPU_GET_CLASS(first_cpu); if (cc->gdb_core_xml_file !=3D NULL) { pstrcat(buf, sizeof(buf), ";qXfer:features:read+"); } + + if (strstr(p, "multiprocess+")) { + s->multiprocess =3D true; + } + pstrcat(buf, sizeof(buf), ";multiprocess+"); + put_packet(s, buf); break; } if (strncmp(p, "Xfer:features:read:", 19) =3D=3D 0) { const char *xml; --=20 2.19.2