[PATCH] Fix ptype problem printing typedefs defined differently in different compilation units

Daniel Jacobowitz drow@false.org
Sat Feb 11 18:35:00 GMT 2006


On Fri, Feb 10, 2006 at 07:35:06PM -0500, Fred Fish wrote:
> On Monday 23 January 2006 15:45, Jim Blandy wrote:
> > On 1/23/06, Fred Fish <fnf@specifix.com> wrote:
> > > This is why I think the correct and complete solution is to allow the
> > > user to directly specify the context.
> > 
> > Sure.  That would entail extending the 'type_exp' non-terminal to have
> > a FILENAME COLONCOLON TYPE production.  Sounds like the right thing.
> 
> The below patch seems to fix ptype and whatis to allow the
> 'file'::typename syntax, without breaking anything else and also
> simplifying ptype_command.
> 
> Comments?

Don't you get a warning compiling this?  It looks to me like, with
objectprint set, ptype and whatis will now blow up; they call
value_rtti_target_type without initializing val.

Also ptype will now do the RTTI lookup; I'm not sure whether it should
or not.  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.


-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list