From: Jason Molenda <jmolenda@apple.com>
To: Alex Bennee <kernel-hacker@bennee.com>
Cc: gdb@sources.redhat.com
Subject: Re: Getting to the source for a given C++ object
Date: Wed, 10 Aug 2005 20:35:00 -0000 [thread overview]
Message-ID: <186AD8EB-8137-4F61-8715-7A4CF6E00E7A@apple.com> (raw)
In-Reply-To: <1123694226.6601.12.camel@okra.transitives.com>
On Aug 10, 2005, at 10:17 AM, Alex Bennee wrote:
> I'm currently trying to debug a C++ program that makes heavy use of
> templates and derived classes. Is there an easy way to get to the
> actual
> code for a given class pointer?
I'm not sure exactly what you're looking for. ptype can tell you
the class - is that what you want? e.g.
(gdb) p beta
$1 = {<A> = {_vptr$A = 0x30b0, a1 = 200}, b1 = 201, b2 = 202}
(gdb) ptype beta
type = class B : public A {
public:
int b1;
int b2;
B(B const&);
B(B const&);
B();
B();
~B();
virtual ~B();
virtual ~B();
}
(gdb)
J
next prev parent reply other threads:[~2005-08-10 20:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-10 17:17 Alex Bennee
2005-08-10 20:35 ` Jason Molenda [this message]
2005-08-11 9:27 ` Alex Bennee
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=186AD8EB-8137-4F61-8715-7A4CF6E00E7A@apple.com \
--to=jmolenda@apple.com \
--cc=gdb@sources.redhat.com \
--cc=kernel-hacker@bennee.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).