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]

Re: <incomplete type>


On Thu, 2005-09-15 at 15:11 +1000, Craig Jeffree wrote:
> On Sun, 2005-09-11 at 21:34 -0400, Daniel Jacobowitz wrote:
> > 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.
> > 
> > 

Just for the record I found the patch to dwarf2out.c (rev 1.466) and
applied it to gcc 3.2.3 (with a little bit of massaging).  I then used
this patched compiler to build my app and was able to resolve the
troubled incomplete type in GDB.  So in short, Daniel was spot on
regarding what occured inside GDB and this issue is resolved when using
the namespace patch mentioned above which comes in the stock 3.4.x
version of gcc.

Thanks for helping.
Craig


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