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] [RFC] python: gdb.Type: strip typedefs past pointers too


On Mon, 2010-09-20 at 12:04 +0200, Jan Kratochvil wrote:
> On Fri, 17 Sep 2010 21:55:56 +0200, Paul Bolle wrote:
> > 1) I drafted a patch (pasted below this message) that works around this
> > limitation:
> > 
> > (gdb) ptype wchar_t
> > type = long int
> > (gdb) ptype wchar_t *
> > type = long int *
> 
> What is the goal of this patch?  strip_typedefs I understand to be the Python
> interface to check_typedef.

Basically I tried to emulate the current behavior of the ptype command,
which goes past pointers to look whether their target is typedef'd too
(see the second example above). Daniel explained that this seems to be a
bug in the ptype command.

> The strip_typedefs description should be fixed anyway as the text is now
> ambiguous.

Do you mean that the current text is ambiguous? In the commit message of
my draft patch I noted that strip_typedefs() "doesn't really behave as
advertised (well, as I understand the advertisement)". I understood that
text to mean that behavior similar to that of the ptype command was
intended.


Paul Bolle


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