This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit/Ada] Add handling of "ptype TYPE_NAME.FIELD0.[...].FIELDN" expressions
> > Actually, it isn't. But it seemed like a natural extension...
>
> For C you can use this:
>
> (gdb) ptype ((circle)0).pos
That's clever. Thinking more about it, I'm realizing that it might
not be as natural as I first thought it would be. The fact is that
I did use it without really thinking about it a couple of times,
but it's as easy to do: ptype circle, see what the type of pos is,
then do ptype of that type, etc.
IIRC, the extension was requested by a customer, so we (AdaCore)
cannot remove it from our sources. But we can certainly remove it
from the FSF tree if we want to. At this point, I think it's
harmless, so I'm inclined to leave it for now. Comments welcome.
--
Joel