From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17304 invoked by alias); 22 Oct 2014 21:48:36 -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 17263 invoked by uid 89); 22 Oct 2014 21:48:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_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; Wed, 22 Oct 2014 21:48:32 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9MLmSkt009697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 22 Oct 2014 17:48:29 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9MLmQ3i004285; Wed, 22 Oct 2014 17:48:27 -0400 Message-ID: <5448262A.5020203@redhat.com> Date: Wed, 22 Oct 2014 21:48:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: "Breazeal, Don" , gdb-patches@sourceware.org Subject: Re: [PATCH 04/16 v2] Determine supported extended-remote features References: <1407434395-19089-1-git-send-email-donb@codesourcery.com> <1408580964-27916-5-git-send-email-donb@codesourcery.com> <543E9E09.80009@redhat.com> <5446EB04.7010208@codesourcery.com> In-Reply-To: <5446EB04.7010208@codesourcery.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg00591.txt.bz2 On 10/22/2014 12:23 AM, Breazeal, Don wrote: > Hi Pedro, > Thanks for looking at this. I should have made the rationale for > the new qExtendedFeatures packet more clear in my original > submission. I'll try to answer all of your questions in the > explanation below. > > I had started out trying to report the features as > supported/unsupported using qSupported, following the > implementation of PACKET_multiprocess_feature as a model. > I abandoned that approach when I saw these comments in > remote.c_initialize_remote: > > /* Ideally all configs would have a command associated. Some > still don't though. */ > [---snip---] > case PACKET_multiprocess_feature: > [---snip---] > /* Additions to this list need to be well justified: > pre-existing packets are OK; new packets are not. */ > > I interpreted this to mean that the qSupported query was intended > to be used only to enable/disable packets that mapped to commands, > and that defining new packets that represented something else was > discouraged. Oh, you're reading this backwards --- this block is making sure that we don't forget to call add_packet_config_cmd whenever we add a new feature/packet. The commands that is talking about are the "set remote foo-packet" commands that add_packet_config_cmd registers. Those are commands that allow force- enable/disabling a given RSP packet/feature. That loop is allowing some exceptions for some packets/features that already didn't have the corresponding "set remote foo-packet" commands when that assertion was first added: /* Assert that we've registered commands for all packet configs. */ { int i; for (i = 0; i < PACKET_MAX; i++) { /* Ideally all configs would have a command associated. Some still don't though. */ int excepted; See the log of ca4f7f8be, the commit that added this. We can certainly add new qSupported features that don't map to regular user commands. Guess this would make it clearer: - /* Assert that we've registered commands for all packet configs. */ + /* Assert that we've registered "set remote foo-packet" commands for all packet configs. */ > In refreshing my memory about this I wrote up some detailed notes on > it. Let me know if you want to see the gruesome details. > > Do you think the qSupported approach is preferable despite the > comment? Did I misinterpret it? Yes, qSupported is preferable. I'm sorry about not foreseeing this potential confusion when I wrote that comment. Thanks, Pedro Alves