This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb cannot print object casted to a pointer of certain class
- From: Daniel Jacobowitz <drow at false dot org>
- To: Sp3cial K <ikiwibebe at hotmail dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 3 Nov 2005 16:22:18 -0500
- Subject: Re: gdb cannot print object casted to a pointer of certain class
- References: <BAY105-F3EBE8A17823677C4B43F4BA610@phx.gbl>
On Wed, Nov 02, 2005 at 07:04:45PM -0500, Sp3cial K wrote:
> Has anyone encountered a problem where ptype prints out the class info in
> most frames, but it complaints "Type xxx has no component named xxx." in
> one frame? Ironically, the frame where it doesn't print out correctly is
> in a function of that class!
The more details you snip out of a bug report, the less likely it is
that we can help you. But I believe I know what this problem is:
> Also, when I tried to print out an object casted to that class, as follows:
> p *(xxx *)0x12345678
> it complains:
> A parse error in expression, near `)0x12345678'
The name is being interpreted differently in that scope, probably as
the constructor rather than the class. A testcase might let us fix
this.
--
Daniel Jacobowitz
CodeSourcery, LLC