This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add '-at location' support to 'macro expand', 'macro expand-once', 'info macro', 'ptype', and 'whatis' commands.


> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]