This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix ptype problem printing typedefs defined differently in different compilation units
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Fred Fish <fnf at specifix dot com>, Jim Blandy <jimb at red-bean dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 11 Feb 2006 21:08:10 +0200
- Subject: Re: [PATCH] Fix ptype problem printing typedefs defined differently in different compilation units
- References: <200601031517.50309.fnf@specifix.com> <200601231435.47790.fnf@specifix.com> <8f2776cb0601231245y6bc1e8a4yc80070284575e654@mail.gmail.com> <200602101935.06700.fnf@specifix.com> <20060211183500.GA25132@nevyn.them.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sat, 11 Feb 2006 13:35:00 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Jim Blandy <jimb@red-bean.com>, gdb-patches@sourceware.org
>
> The documentation for whatis and ptype leaves me way unenlightened
> about what the difference between them is supposed to be; perhaps we
> should eliminate the difference.
Is the following excerpt from the manual incorrect? If it's correct,
it seems to answer your question:
@item ptype @var{expr}
@itemx ptype
Print a description of the type of expression @var{expr}. @code{ptype}
differs from @code{whatis} by printing a detailed description, instead
of just the name of the type.
For example, for this variable declaration:
@smallexample
struct complex @{double real; double imag;@} v;
@end smallexample
@noindent
the two commands give this output:
@smallexample
@group
(@value{GDBP}) whatis v
type = struct complex
(@value{GDBP}) ptype v
type = struct complex @{
double real;
double imag;
@}
@end group
@end smallexample