[commit/Ada] Add handling of "ptype TYPE_NAME.FIELD0.[...].FIELDN" expressions
Joel Brobecker
brobecker@adacore.com
Mon Jan 7 14:48:00 GMT 2008
> > 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
More information about the Gdb-patches
mailing list