This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: how to examine the value in this compicated class
- From: Daniel Jacobowitz <drow at false dot org>
- To: lin q <linq936 at hotmail dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 2 May 2005 00:02:42 -0400
- Subject: Re: how to examine the value in this compicated class
- References: <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