Re: getting subclass type from base class pointer

André Pönitz <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.