From patchwork Mon Aug 24 17:10:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 8411 Received: (qmail 43172 invoked by alias); 24 Aug 2015 17:10:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 43142 invoked by uid 89); 24 Aug 2015 17:10:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 24 Aug 2015 17:10:41 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id DD949A5890 for ; Mon, 24 Aug 2015 17:10:39 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7OHAbGo022369 for ; Mon, 24 Aug 2015 13:10:39 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 1/2] Add "set remote multiprocess-extensions-packet" command Date: Mon, 24 Aug 2015 18:10:36 +0100 Message-Id: <1440436237-24015-2-git-send-email-palves@redhat.com> In-Reply-To: <1440436237-24015-1-git-send-email-palves@redhat.com> References: <1440436237-24015-1-git-send-email-palves@redhat.com> Being able to force-disable the RSP multiprocess extensions is useful for testing. gdb/ChangeLog: 2015-08-24 Pedro Alves * NEWS (New commands): Mention set/show remote multiprocess-extensions-packet. * remote.c (remote_query_supported): Only tell the server to use the multiprocess extensions if the user hasn't force-disabled them with "set remote multiprocess-extensions-packet off". gdb/doc/ChangeLog: 2015-08-24 Pedro Alves * gdb.texinfo (Remote Configuration): Document the "set/show remote multiprocess-extensions-packet" commands. --- gdb/NEWS | 4 ++++ gdb/doc/gdb.texinfo | 4 ++++ gdb/remote.c | 7 +++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gdb/NEWS b/gdb/NEWS index 9edfd5e..cc1866f 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -28,6 +28,10 @@ set debug bfd-cache show debug bfd-cache Control display of debugging info regarding bfd caching. +set remote multiprocess-extensions-packet +show remote multiprocess-extensions--packet + Set/show the use of the remote protocol multiprocess extensions. + * The "disassemble" command accepts a new modifier: /s. It prints mixed source+disassembly like /m with two differences: - disassembled instructions are now printed in program order, and diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 5dfb14b..cd0abad 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20205,6 +20205,10 @@ are: @tab @code{Z0 and Z1} @tab @code{Support for target-side breakpoint condition evaluation} +@item @code{multiprocess-extensions} +@tab @code{multiprocess extensions} +@tab Debug multiple processes and remote process PID awareness + @item @code{swbreak-feature} @tab @code{swbreak stop reason} @tab @code{break} diff --git a/gdb/remote.c b/gdb/remote.c index 12294bc..a06037f 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4352,7 +4352,8 @@ remote_query_supported (void) char *q = NULL; struct cleanup *old_chain = make_cleanup (free_current_contents, &q); - q = remote_query_supported_append (q, "multiprocess+"); + if (packet_set_cmd_state (PACKET_multiprocess_feature) != AUTO_BOOLEAN_FALSE) + q = remote_query_supported_append (q, "multiprocess+"); if (packet_set_cmd_state (PACKET_swbreak_feature) != AUTO_BOOLEAN_FALSE) q = remote_query_supported_append (q, "swbreak+"); @@ -13231,6 +13232,9 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL, add_packet_config_cmd (&remote_protocol_packets[PACKET_Qbtrace_conf_bts_size], "Qbtrace-conf:bts:size", "btrace-conf-bts-size", 0); + add_packet_config_cmd (&remote_protocol_packets[PACKET_multiprocess_feature], + "multiprocess-feature", "multiprocess-feature", 0); + add_packet_config_cmd (&remote_protocol_packets[PACKET_swbreak_feature], "swbreak-feature", "swbreak-feature", 0); @@ -13260,7 +13264,6 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL, switch (i) { case PACKET_QNonStop: - case PACKET_multiprocess_feature: case PACKET_EnableDisableTracepoints_feature: case PACKET_tracenz_feature: case PACKET_DisconnectedTracing_feature: