This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

<incomplete type>


Hi all,

I'm having trouble with GDB reporting an incomplete type...

(gdb) p *acft->posn_->fpi_->seg_->wpApi_[0]
$1 = <incomplete type>
(gdb) p *(*acft->posn_->fpi_->seg_->wpApi_)
$2 = <incomplete type>

Although the variable I'm printing is deeply nested there is nothing
unusual or complicated about it.  There is no templating involved in
this hierarchy of objects.  It's simply classes, structs and an array of
a class type.

I can successfully do the following when stopped at the same breakpoint:

(gdb) p *acft->posn_->fpi_->seg_->wpApi_
$3 = (struct Soi::Waypoint *) 0x94d58b8

And I also get...
(gdb) ptype *acft->posn_->fpi_->seg_->wpApi_[0]
type = struct Soi::Waypoint {
    <incomplete type>
}

What is going on???

I'm using gdb 6.3 and gcc 3.2.3 with '-g' so it has the default debug
format for x86 Linux.  The OS is Red Hat Enterprise Linux 3.


I'm sorry I can't be much more specific at the moment.  I'm only seeing
this in a huge application (the debug binary is hundreds of megs).  My
attempts to recreate this on a small scale have failed.  I'm at a loss
as to what I should try next.  Any advice on what might be happening and
what I could look at would be greatly appreciated.

My attempts to recreate it in a simpler environment have included:
- recreated the object hierarchy with dummy classes that don't have
seemingly unrelated dependencies.
- trying to reproduce this: http://lists.gnu.org/archive/html/bug-
gdb/2001-09/msg00092.html
- creating a class hierarchy and functions where I can break inside a
compilation unit that was not compiled with the class hierarchy in scope
and then using the class hierarchy in GDB.
- assorted other random smatterings of code that I don't remember the
details of.

All of the above simply result in the debugger understanding exactly
what I'm doing, it never shows an incomplete type.

Cheers,
Craig.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]