This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [RFC] python: gdb.Type: strip typedefs past pointers too
On Sat, Sep 18, 2010 at 10:27:28PM +0200, Paul Bolle wrote:
> On Sat, 2010-09-18 at 10:12 -0400, Joel Brobecker wrote:
> > Personally, I think that the current behavior is correct. But I did
> > not participate in the design of the API, so others will probably
> > have a more informed opinion.
> >
> > If we want to support the behavior you are looking for, I think it
> > should be done either through the control of a parameter (defaulted
> > to current behavior), or another method (recursive_strip_typedef).
>
> The documentation reads:
> > -- Method on Type: strip_typedefs
> > Return a new `gdb.Type' that represents the real type, after
> > removing all layers of typedefs.
>
> I feel that both the name of this function (which uses typedefs in
> plural) and the documentation imply the behavior my patch tries to
> achieve.
I agree with Joel; the current behavior is correct. I'm surprised by
the CLI example you gave; I kind of consider that a bug too...
--
Daniel Jacobowitz
CodeSourcery