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: "taylor, david" <david dot taylor at emc dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 18 Jul 2016 15:59:54 +0000
- 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> <83oa5v0yo1.fsf@gnu.org>
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Eli Zaretskii
> > 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.
Thank you for taking the time to review the doc parts.
> > +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.
Good point. Fixed.
> Also, there's a type in "asociated".
Fixed.
> > +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.
Fixed.
> > +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.
Fixed.
> The documentation parts are approved with these fixed.
Thanks. I'll repost once the non doc parts are reviewed.
> > 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.
Good catch. Fixed.
> > +Options:\n\
> > + -at Use LOCATION rather than the current PC for selecting
> macros.\n\
>
> "Selecting" sounds not very accurate. Wouldn't "expanding" be better?
Changed.
Thanks.