From: Daniel Jacobowitz <drow@false.org>
To: "yinglcs2@yahoo.com" <yinglcs2@yahoo.com>
Cc: gdb@sourceware.org
Subject: Re: Debugging a C++ problem in GDB on linux
Date: Sun, 22 Jan 2006 19:18:00 -0000 [thread overview]
Message-ID: <20060121214629.GA7495@nevyn.them.org> (raw)
In-Reply-To: <20060121203559.41933.qmail@web35715.mail.mud.yahoo.com>
On Sat, Jan 21, 2006 at 12:35:59PM -0800, yinglcs2@yahoo.com wrote:
> Hi
>
> I am trying to debug a C++ program in GDB on linux.
> I want to dump out the content of the "this" object,
> Here is what I get:
> (gdb) print *this
> $2 = {path = <incomplete type>}
>
> My question is why I don't see the content of 'path'?
> It said
> '<incomplete type>'.
>
> In the code, path is:
> ostringstream path;
>
> When I try to do this: at GDB prompt 'print
> this->path.str()' , I get
> this error:
>
> (gdb) print this->path.str()
> Couldn't find method ostringstream::str
This is often a consequence of having no debug information for the C++
standard library. However, there's always a chance it's a bug in GDB;
can you post a complete testcase?
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2006-01-21 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-21 21:46 yinglcs2
2006-01-22 19:18 ` 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=20060121214629.GA7495@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=yinglcs2@yahoo.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