From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9838 invoked by alias); 12 Feb 2011 00:08:24 -0000 Received: (qmail 9824 invoked by uid 22791); 12 Feb 2011 00:08:19 -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:08:09 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id F275B52007; Fri, 11 Feb 2011 16:08:07 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost2.vmware.com (Postfix) with ESMTP id E51528ED04; Fri, 11 Feb 2011 16:08:07 -0800 (PST) Message-ID: <4D55CF67.9070003@vmware.com> Date: Sat, 12 Feb 2011 00:08: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> <4D55CDBE.4080801@vmware.com> In-Reply-To: <4D55CDBE.4080801@vmware.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/msg00231.txt.bz2 Michael Snyder wrote: > 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. More specifically, "info set" is a synonym for "show" with no arguments. However "info set" does not accept any arguments itself. It's really a pretty useless command, when you think about it. I would have proposed deleting it, but that would require modifying help.exp and default.exp, and still wouldn't help the case of "show" with no arguments.