From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8666 invoked by alias); 12 Feb 2011 00:01:11 -0000 Received: (qmail 8658 invoked by uid 22791); 12 Feb 2011 00:01:10 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 12 Feb 2011 00:01:04 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 5B60F50062; Fri, 11 Feb 2011 16:01:03 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id 4EB48CD945; Fri, 11 Feb 2011 16:01:03 -0800 (PST) Message-ID: <4D55CDBE.4080801@vmware.com> Date: Sat, 12 Feb 2011 00:01:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: Pedro Alves CC: Tom Tromey , "gdb-patches@sourceware.org" Subject: Re: [rfa] clean up output of "info set" command. References: <4D5599E8.6030408@vmware.com> <4D55A1A4.5020208@vmware.com> <201102112333.05763.pedro@codesourcery.com> In-Reply-To: <201102112333.05763.pedro@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00230.txt.bz2 Pedro Alves wrote: > 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|..." > They're synonyms. But I still don't think that "show copying" is at all useful when presented in the middle of dozens of other show commands.