Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Debugging a C++ problem  in GDB on linux
@ 2006-01-21 21:46 yinglcs2
  2006-01-22 19:18 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: yinglcs2 @ 2006-01-21 21:46 UTC (permalink / raw)
  To: gdb

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 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Debugging a C++ problem  in GDB on linux
  2006-01-21 21:46 Debugging a C++ problem in GDB on linux yinglcs2
@ 2006-01-22 19:18 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2006-01-22 19:18 UTC (permalink / raw)
  To: yinglcs2; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-21 21:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-21 21:46 Debugging a C++ problem in GDB on linux yinglcs2
2006-01-22 19:18 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox