From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21391 invoked by alias); 27 Mar 2015 11:14:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21377 invoked by uid 89); 27 Mar 2015 11:14:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD 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; Fri, 27 Mar 2015 11:14:17 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2RBEDfj023158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 27 Mar 2015 07:14:14 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2RBEBOC010354; Fri, 27 Mar 2015 07:14:12 -0400 Message-ID: <55153B83.3060008@redhat.com> Date: Fri, 27 Mar 2015 11:14:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Don Breazeal , gdb-patches@sourceware.org Subject: Re: [PATCH v5 01/06] Identify remote fork event support References: <1427396432-4670-1-git-send-email-donb@codesourcery.com> In-Reply-To: <1427396432-4670-1-git-send-email-donb@codesourcery.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00896.txt.bz2 On 03/26/2015 07:00 PM, Don Breazeal wrote: > On 3/24/2015 3:57 AM, Pedro Alves wrote: >> On 03/17/2015 08:56 PM, Don Breazeal wrote: >> >>> @@ -12508,7 +12524,8 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL, >>> add_packet_config_cmd (&remote_protocol_packets[PACKET_hwbreak_feature], >>> "hwbreak-feature", "hwbreak-feature", 0); >>> >>> - /* Assert that we've registered commands for all packet configs. */ >>> + /* Assert that we've registered "set remote foo-packet" commands >>> + for all packet configs. */ >>> { >>> int i; >>> >> >> This hunk could go immediately/separately as obvious. > > Thanks, this has been pushed. > >>> @@ -12527,6 +12544,8 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL, >>> case PACKET_DisconnectedTracing_feature: >>> case PACKET_augmented_libraries_svr4_read_feature: >>> case PACKET_qCRC: >>> + case PACKET_fork_event_feature: >>> + case PACKET_vfork_event_feature: >>> /* Additions to this list need to be well justified: >>> pre-existing packets are OK; new packets are not. */ >> >> I think I mentioned this before: please do register commands for these >> features. As the comment says, new packets here are not OK without >> good justification, and I can't think of a good justification. >> Then you'll need to make sure remote_query_supported only includes the >> feature in GDB's query if the feature wasn't force-disabled. See >> the new swbreak+ feature's handling in that function. > > You did mention this before, but I misunderstood. I've made the updates > in this version. Sorry for the repeat. Sorry, I should probably have been clearer before then. The "pre-existing packets are OK" comment just means that when the assertion was added, those packets already existed. It'd be great to just add the commands for those, and get rid of that exceptions list... The code looks good to me. The docs still need a few tweaks: > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -35812,6 +35812,18 @@ extensions unless the stub also reports that it supports them by > including @samp{multiprocess+} in its @samp{qSupported} reply. > @xref{multiprocess extensions}, for details. > > +@item fork-events > +This feature indicates whether @value{GDBN} supports fork event > +extensions to the remote protocol. @value{GDBN} does not use such > +extensions unless the stub also reports that it supports them by > +including @samp{fork-events+} in its @samp{qSupported} reply. > + > +@item vfork-events > +This feature indicates whether @value{GDBN} supports vfork event > +extensions to the remote protocol. @value{GDBN} does not use such > +extensions unless the stub also reports that it supports them by > +including @samp{vfork-events+} in its @samp{qSupported} reply. > + > @item xmlRegisters > This feature indicates that @value{GDBN} supports the XML target > description. If the stub sees @samp{xmlRegisters=} with target > diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c > index e4c5420..06ac673 100644 You'll need to update the tables below, where it reads: "These are the currently defined stub features and their properties" and: "These are the currently defined stub features, in more detail" and also, mention the new commands in: "For each packet @var{name}, the command to enable or disable the packet is @code{set remote @var{name}-packet}. The available settings are:" Thanks, Pedro Alves