From: Daniel Jacobowitz <drow@false.org>
To: lin q <linq936@hotmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: how to examine the value in this compicated class
Date: Mon, 02 May 2005 04:02:00 -0000 [thread overview]
Message-ID: <20050502040242.GA9943@nevyn.them.org> (raw)
In-Reply-To: <BAY10-F3743778D9AF77910340D77E9270@phx.gbl>
On Sun, May 01, 2005 at 08:43:48PM -0600, lin q wrote:
> Hi,
> I am new to gdb, in using print and display commands I can easily examine
> the value of simple data type. But how about this one:
>
> class C2;
>
> class C1{
> char* s1;
> C2* c2;
> };
>
> class C2{
> char* s2;
> };
>
> Let's say in the code there is a variable, c1, whose type is C1*. Then in
> GDB how I can check the value of c1->c2->s2?
Exactly like that. "print c1->c2->s2". You may want to take a look at
the GDB documentation.
--
Daniel Jacobowitz
CodeSourcery, LLC
prev parent reply other threads:[~2005-05-02 4:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-02 2:43 lin q
2005-05-02 4:02 ` Daniel Jacobowitz [this message]
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=20050502040242.GA9943@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=linq936@hotmail.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