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


> From: Fred Fish <fnf@diveadx.com>
> Date: Fri, 17 Feb 2006 15:31:27 -0500
> Cc: drow@false.org, jimb@red-bean.com, gdb-patches@sourceware.org,
>         fnf@specifix.com
> 
> 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.

Thanks.  The doc patch is approved, but please take care of this minor
issue:

>   @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.

Now that you've unified the descriptions, there's no need to have a
separate "@itemx whatis" without arguments, you can simply put the
argument in the other two @item's in [], to show that they are
optional.  I would even leave only one @item, and modify the
description slightly, like this:

  @item whatis [@var{arg}]
  Print the data type of expression @var{arg}, either an expression or
  a data type.  With no argument, print the data type of @code{$}, ...
  If @var{arg} is an expression, it is not actually evaluated, ...  If
  @var{arg} is a type name, it may be the name of a type or typedef, ...


>   @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}.

Same here.


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