From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14315 invoked by alias); 11 Feb 2011 23:33:24 -0000 Received: (qmail 14307 invoked by uid 22791); 11 Feb 2011 23:33:24 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Feb 2011 23:33:12 +0000 Received: (qmail 15608 invoked from network); 11 Feb 2011 23:33:11 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Feb 2011 23:33:11 -0000 From: Pedro Alves To: Tom Tromey Subject: Re: [rfa] clean up output of "info set" command. Date: Fri, 11 Feb 2011 23:33:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.6.0; x86_64; ; ) Cc: Michael Snyder , "gdb-patches@sourceware.org" References: <4D5599E8.6030408@vmware.com> <4D55A1A4.5020208@vmware.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102112333.05763.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2011-02/txt/msg00228.txt.bz2 On Friday 11 February 2011 21:17:08, Tom Tromey wrote: > >>>>> "Michael" == Michael Snyder writes: > > Pedro> Isn't there a property of the command we could check > Pedro> instead of hardcoding specific command names? > > Michael> I'm open to suggestions. The only property I can think of is that > Michael> there is no corresponding entry in "setlist". I could search > Michael> setlist every time... > > You could stick a new flag on the command object. Yeah. You may even be able to set the flag from within the add_setshow_... functions and friends. The flag could mean "this show command shows something that is settable in some way" (or the reverse). > Or there is cmd_cfunc_eq, which is used for a similar purpose in some > places. I don't think this is super, but OTOH it isn't any worse than > existing code. I think we shouldn't allow ourselves to broadcast bad design when it's easy not to. The function Michael touched is within gdb/cli/cli-setshow.c. I'd prefer to keep this and the other core command files clean of specific knowledge of any specific commands their clients register. I notice that "info set" is basically an alias of "show". Does the change make sense in the context of "show", or should "show" keep showing everything showable under the show command? "show foo|bar|..." -- Pedro Alves