This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: <incomplete type>
On Tue, Sep 06, 2005 at 05:14:01PM +1000, Craig Jeffree wrote:
> > Failing that, could you post the readelf output for the entire
> > compilation unit containing Soi::Waypoint? From the compilation unit
> > header all the way down to the next one.
> >
>
> Yes. However, Daniel, Jim, I will send this to you privately as my
> company wishes to keep it off the public archives. I will send it in a
> separate email.
>
> Thanks for helping me through this.
First of all, I note that you're using GCC 3.2.3. That version didn't
output proper DWARF debugging information for namespaces, so it
triggers a different path through GDB (that involves a lot more
guessing).
Here's what I think is happening.
There's considerable code in GDB to guess the namespace of a structure
when this problem is encountered. But that code relies upon the
mangled names of member functions of the type. Probably it is
successfully triggering for the _definition_ of the type, but in some
other compilation unit (the one with the reference that shows up as
incomplete), the DIE containing the declaration of Soi::Waypoint
doesn't have enough information. So the best GDB can come up with is
"Waypoint". Then it looks, and doesn't find Waypoint - the only
definition was Soi::Waypoint, with a namespace qualifier. So, no
match.
There's just nothing GDB can do, if that's what's happening. You may
be able to find a GCC patch in the archives of gcc-patches or
gdb-patches to add DW_AT_namespace support to GCC 3.2.3, if rebuilding
the compiler is an option. Otherwise you're stuck until you upgrade
GCC.
--
Daniel Jacobowitz
CodeSourcery, LLC