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] Fix ptype problem printing typedefs defined differently in different compilation units


> 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


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