This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: info macro [-at LOCATION,]
- From: Eli Zaretskii <eliz at gnu dot org>
- To: David Taylor <dtaylor at emc dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 11 Nov 2014 05:44:43 +0200
- Subject: Re: RFA: info macro [-at LOCATION,]
- Authentication-results: sourceware.org; auth=none
- References: <31913 dot 1415655693 at usendtaylorx2l>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: David Taylor <dtaylor@emc.com>
> 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.
> gdb/doc/ChangeLog:
>
> 2014-11-10 David Taylor <dtaylor@emc.com>
>
> * 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).
> -@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.
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.