This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add '-at location' support to 'macro expand', 'macro expand-once', 'info macro', 'ptype', and 'whatis' commands.
- From: Eli Zaretskii <eliz at gnu dot org>
- To: David Taylor <dtaylor at emc dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 18 Jul 2016 18:10:54 +0300
- Subject: Re: [PATCH] Add '-at location' support to 'macro expand', 'macro expand-once', 'info macro', 'ptype', and 'whatis' commands.
- Authentication-results: sourceware.org; auth=none
- References: <24519.1468851836@usendtaylorx2l>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: David Taylor <dtaylor@emc.com>
> Date: Mon, 18 Jul 2016 10:23:56 -0400
>
> Add '-at location' support to 'macro expand', 'macro expand-once', 'info
> macro', 'ptype', and 'whatis' commands.
Thanks.
> +it can be any string of tokens. If the optional @var{location} is
> +specified, it is used to determine which macro definitions are in
> +scope; otherwise, as before, it uses the source and line asociated with
> +the current program counter.
Please lose the "as before" part, it is not appropriate for the
manual, since we always describe the current state of events.
Also, there's a type in "asociated".
> +can be any string of tokens. If the optional @var{location} is
> +specified, it is used to determine which macro definitions are in
> +scope; otherwise, as before, it uses the source and line asociated with
> +the current program counter.
Likewise.
> +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.
Likewise.
The documentation parts are approved with these fixed.
> add_cmd ("expand", no_class, macro_expand_command, _("\
> Fully expand any C/C++ preprocessor macro invocations in EXPRESSION.\n\
> -Show the expanded expression."),
> +Show the expanded expression.\n\
> +Usage: macro expand [-at LCOATION,] [--] EXPR\n\
^^^^^^^^
Typo.
> +Options:\n\
> + -at Use LOCATION rather than the current PC for selecting macros.\n\
"Selecting" sounds not very accurate. Wouldn't "expanding" be better?