From 364fce6f82b20537a803c6bfb3cf9bab5590f850 Mon Sep 17 00:00:00 2001 From: Luc Michel Date: Mon, 7 Jan 2019 15:23:46 +0000 Subject: [PATCH] gdbstub: add multiprocess extension support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias Message-id: 20181207090135.7651-16-luc.michel@greensocs.com Signed-off-by: Peter Maydell --- gdbstub.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 1517563abe..bfc7afb509 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1732,6 +1732,12 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) if (cc->gdb_core_xml_file != NULL) { pstrcat(buf, sizeof(buf), ";qXfer:features:read+"); } + + if (strstr(p, "multiprocess+")) { + s->multiprocess = true; + } + pstrcat(buf, sizeof(buf), ";multiprocess+"); + put_packet(s, buf); break; }