From patchwork Tue Nov 11 14:01:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Taylor X-Patchwork-Id: 3650 Received: (qmail 32650 invoked by alias); 11 Nov 2014 14:01:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 32638 invoked by uid 89); 11 Nov 2014 14:01:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailuogwhop.emc.com Received: from mailuogwhop.emc.com (HELO mailuogwhop.emc.com) (168.159.213.141) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 11 Nov 2014 14:01:38 +0000 Received: from maildlpprd03.lss.emc.com (maildlpprd03.lss.emc.com [10.253.24.35]) by mailuogwprd04.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id sABE1Xrn003311 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Nov 2014 09:01:35 -0500 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com sABE1Xrn003311 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com sABE1Xrn003311 Received: from mailsyshubprd05.lss.emc.com (mailsyshubprd05.lss.emc.com [10.253.24.23]) by maildlpprd03.lss.emc.com (RSA Interceptor); Tue, 11 Nov 2014 09:00:58 -0500 Received: from usendtaylorx2l.lss.emc.com (usendtaylorx2l.lss.emc.com [10.243.10.188]) by mailsyshubprd05.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id sABE1Hhb025860; Tue, 11 Nov 2014 09:01:17 -0500 Received: by usendtaylorx2l.lss.emc.com (Postfix, from userid 26043) id B44615D7C01; Tue, 11 Nov 2014 09:01:15 -0500 (EST) Received: from usendtaylorx2l (localhost [127.0.0.1]) by usendtaylorx2l.lss.emc.com (Postfix) with ESMTP id 0E06E5D7C00; Tue, 11 Nov 2014 09:01:15 -0500 (EST) To: Eli Zaretskii cc: "gdb-patches@sourceware.org" Subject: Re: RFA: info macro [-at LOCATION,] In-reply-to: <83mw7ymmdw.fsf@gnu.org> References: <31913.1415655693@usendtaylorx2l> <83mw7ymmdw.fsf@gnu.org> Comments: In-reply-to Eli Zaretskii message dated "Mon, 10 Nov 2014 22:44:43 -0500." Date: Tue, 11 Nov 2014 09:01:15 -0500 Message-ID: <7612.1415714475@usendtaylorx2l> From: David Taylor X-RSA-Classifications: public X-Sentrion-Hostname: mailuogwprd04.lss.emc.com Eli Zaretskii wrote: > > From: David Taylor > > Date: Mon, 10 Nov 2014 16:41:33 -0500 > > > > A few releases ago it was possible to set a location that would be used > > by 'info location' by typing something like: > > > > list file.c:42 > > > > and then do: > > > > info macro MACRONAME > > > > . Sometime between release 7.1 and 7.8 that stopped working. > > > > The following patch adds the option [-at LOCATION,] to 'info macro' to > > enable the use of a user selected location as a documented feature. > > > > Three files, three change log entries: > > Thanks. I think this warrants a NEWS entry as well. Thanks. How are diffs for NEWS handled? For the text, how about: * New options The info macro command now takes an optional location ([-at LOCATION,]) for determining which definition, if any, of the macro is in scope. If left unspecified it, as before, uses the source and line associated with the current program counter. > > gdb/doc/ChangeLog: > > > > 2014-11-10 David Taylor > > > > * gdb.texinfo: Document new -at LOCATION option of the 'info > > macro' command. > > Please state the node in which the change was made (as if it were a > function, i.e. in parentheses). Okay, how about: 2014-11-10 David Taylor * gdb.texinfo (Macros): Document new -at LOCATION option of the 'info macro' command. > > -@item info macro [-a|-all] [--] @var{macro} > > +@item info macro [-a|-all] [-at LOCATION,] [--] @var{macro} > > Show the current definition or all definitions of the named @var{macro}, > > and describe the source location or compiler command-line where that > > definition was established. The optional double dash is to signify the end of > > argument processing and the beginning of @var{macro} for non C-like macros where > > -the macro may begin with a hyphen. > > +the macro may begin with a hyphen. If the optional LOCATION is specified, > > +it is used instead of the current location. > > First, "LOCATION" should be "@var{location}", as it is a parameter, > not a literal string. Easy enough. Done. > And second, "it is used instead of the current location" leaves too > much unsaid. The reader will wonder why does location matter for this > purpose. I suggest to make that explicit in the text. I'm not sure how to word it nor exactly what you are looking for. How about the following for the gdb/doc/gdb.texinfo piece: Thanks for reviewing the doc changes so quickly. Index: gdb/doc/gdb.texinfo =================================================================== RCS file: /home/cvsroot/GDB/gdb/doc/gdb.texinfo,v retrieving revision 1.3 diff -u -r1.3 gdb.texinfo --- gdb/doc/gdb.texinfo 21 Aug 2014 14:07:17 -0000 1.3 +++ gdb/doc/gdb.texinfo 11 Nov 2014 13:53:09 -0000 @@ -11412,12 +11412,15 @@ @cindex macro definition, showing @cindex definition of a macro, showing @cindex macros, from debug info -@item info macro [-a|-all] [--] @var{macro} +@item info macro [-a|-all] [-at LOCATION,] [--] @var{macro} Show the current definition or all definitions of the named @var{macro}, and describe the source location or compiler command-line where that -definition was established. The optional double dash is to signify the end of -argument processing and the beginning of @var{macro} for non C-like macros where -the macro may begin with a hyphen. +definition was established. The optional double dash is to signify the +end of argument processing and the beginning of @var{macro} for non +C-like macros where the macro may begin with a hyphen. If the optional +@var{location} is specified, it is used to determine which definition, +if any, of the macro is in scope; otherwise, as before, it uses the +source and line asociated with the current program counter. @kindex info macros @item info macros @var{linespec}