This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Debugging a C++ problem in GDB on linux
- From: Daniel Jacobowitz <drow at false dot org>
- To: "yinglcs2 at yahoo dot com" <yinglcs2 at yahoo dot com>
- Cc: gdb at sourceware dot org
- Date: Sat, 21 Jan 2006 16:46:29 -0500
- Subject: Re: Debugging a C++ problem in GDB on linux
- References: <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