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


On Friday 17 February 2006 04:15, Eli Zaretskii wrote:
> Will the manual's description of the differences between these two
> commands be still valid after this change?

Here is a patch for the doc change.

If there aren't any objections, I'd like to get this patch and the
code/testsuite patch checked in ASAP and get back to work on the
parser change to accept the 'file'::typename syntax.

-Fred

2006-02-17  Fred Fish  <fnf@specifix.com>

	* gdb.texinfo (Symbols): Update descriptions of 'whatis' and
	'ptype' commands to reflect the fact that the only significant
	difference between them is that ptype prints the complete type
	description instead of just the name.

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.313
diff -c -p -r1.313 gdb.texinfo
*** gdb.texinfo	10 Feb 2006 03:54:33 -0000	1.313
--- gdb.texinfo	17 Feb 2006 20:26:04 -0000
*************** it to find out the name of a variable or
*** 10364,10389 ****
  
  @kindex whatis
  @item whatis @var{expr}
! Print the data type of expression @var{expr}.  @var{expr} is not
! actually evaluated, and any side-effecting operations (such as
! assignments or function calls) inside it do not take place.
  @xref{Expressions, ,Expressions}.
  
- @item whatis
- Print the data type of @code{$}, the last value in the value history.
- 
  @kindex ptype
- @item ptype @var{typename}
- Print a description of data type @var{typename}.  @var{typename} may be
- the name of a type, or for C code it may have the form @samp{class
- @var{class-name}}, @samp{struct @var{struct-tag}}, @samp{union
- @var{union-tag}} or @samp{enum @var{enum-tag}}.
- 
  @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:
  
--- 10364,10388 ----
  
  @kindex whatis
  @item whatis @var{expr}
! @itemx whatis @var{typename}
! @itemx whatis
! Print the data type of expression @var{expr} or type @var{typename}.
! @var{expr} is not actually evaluated, and any side-effecting operations
! (such as assignments or function calls) inside it do not take place.
! @var{typename} may be the name of a type or typedef, or for C code it may
! have the form @samp{class @var{class-name}}, @samp{struct @var{struct-tag}},
! @samp{union @var{union-tag}} or @samp{enum @var{enum-tag}}.
! Without any arguments, print the data type of @code{$}, the last value
! in the value history.
  @xref{Expressions, ,Expressions}.
  
  @kindex ptype
  @item ptype @var{expr}
+ @itemx ptype @var{typename}
  @itemx ptype
! @code{ptype} accepts the same arguments as @code{whatis}, but prints a
! detailed description of the type, instead of just the name of the type.
! @xref{Expressions, ,Expressions}.
  
  For example, for this variable declaration:
  



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