getting subclass type from base class pointer

André Pönitz apoenitz@t-online.de
Fri Oct 30 07:20:00 GMT 2015


On Thu, Oct 29, 2015 at 11:38:27PM +0000, Paul Marquess wrote:
> > gdb) python x = gdb.parse_and_eval("pTest")
> > (gdb) python print x.type
> > SuperClass *

(gdb) python print(x.type)
SuperClass *
(gdb) python print(x.dynamic_type)
SubClass *

Andre'



More information about the Gdb mailing list