From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23300 invoked by alias); 23 Sep 2011 17:21:16 -0000 Received: (qmail 23272 invoked by uid 22791); 23 Sep 2011 17:21:11 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Sep 2011 17:20:56 +0000 Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id p8NHKtL4028633 for ; Fri, 23 Sep 2011 10:20:55 -0700 Received: from qyk7 (qyk7.prod.google.com [10.241.83.135]) by wpaz24.hot.corp.google.com with ESMTP id p8NHKSpF002965 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 23 Sep 2011 10:20:54 -0700 Received: by qyk7 with SMTP id 7so4107681qyk.19 for ; Fri, 23 Sep 2011 10:20:54 -0700 (PDT) Received: by 10.224.217.194 with SMTP id hn2mr2068192qab.11.1316798454756; Fri, 23 Sep 2011 10:20:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.217.194 with SMTP id hn2mr2068185qab.11.1316798454594; Fri, 23 Sep 2011 10:20:54 -0700 (PDT) Received: by 10.224.80.149 with HTTP; Fri, 23 Sep 2011 10:20:54 -0700 (PDT) In-Reply-To: References: <20110921190419.542512461A9@ruffy.mtv.corp.google.com> Date: Fri, 23 Sep 2011 17:38:00 -0000 Message-ID: Subject: Re: Rename "info definitions"? From: Doug Evans To: Matt Rice Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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-09/txt/msg00434.txt.bz2 On Wed, Sep 21, 2011 at 12:33 PM, Matt Rice wrote: > On Wed, Sep 21, 2011 at 12:04 PM, Doug Evans wrote: >> Hi. >> >> I was wondering if it's not too late to rename "info definitions", >> or better delete it and enhance "info macros" to replace it. >> I look at "info definitions" and think "Definitions of what? =A0That cou= ld be >> anything." and then I find out what it refers to, look at both >> "info macros" and "info definitions", and wish I didn't have to >> think about when to use which one. >> > > IMO not too late since its never hit a tar ball > > in fact I'd tried to merge info macros/info definitions but the > resulting command would have 2 optional arguments, and be fairly > difficult to comprehend. > > now that I think about it maybe add an optional arg to 'info macro' > replace `info definitions MACRO' with 'info macro -all MACRO' ? That would be better alright. Also, I see calls to error() when there are no macros. I think this shouldn't be an error. For example, if it were done in a script it shouldn't break the script if no macro info was found. An informational message would be better IMO. "info var foo" doesn't print an error on stripped binaries, for example. E.g. here: if (! ms || ! ms->file || ! ms->file->table) error (_("GDB has no preprocessor macro information for that code."));