Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "André Pönitz" <apoenitz@t-online.de>
To: Paul Marquess <Paul.Marquess@owmobility.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: getting subclass type from base class pointer
Date: Fri, 30 Oct 2015 07:20:00 -0000	[thread overview]
Message-ID: <20151030072010.GA12621@klara.mpi.htwm.de> (raw)
In-Reply-To: <CY1PR0501MB11786B043D21E72D27B73A8D95200@CY1PR0501MB1178.namprd05.prod.outlook.com>

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'


  reply	other threads:[~2015-10-30  7:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 19:41 Paul Marquess
2015-10-29 23:38 ` Paul Marquess
2015-10-30  7:20   ` André Pönitz [this message]
2015-10-30 11:26     ` Paul Marquess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151030072010.GA12621@klara.mpi.htwm.de \
    --to=apoenitz@t-online.de \
    --cc=Paul.Marquess@owmobility.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox