This is the mail archive of the gdb@sources.redhat.com 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: psymtab/symtab error


Paul Koning wrote:

> I don't know.  I ran into this with gcc 3.0.1, NetBSD i386 host,
> NetBSD MIPS target.

Yikes.  gcc 3.0.4 had many bugs with C++ debugging information,
particularly with templates.

And the symbol `_ZN9CFreeListI7CVolumeE6m_baseE' demangles to
`CFreeList<CVolume>::m_base', which is definitely a template
symbol (probably a member, from the name).

I am assuming here that your gcc 3.0.1 on NetBSD MIPS will have
about the same symbol table code as my gcc 3.0.4 on native
i686-pc-linux-gnu.

I recommend that you upgrade to gcc 3.1 or gcc 3.1.1 or gcc 3.2 or
gcc 3.2.1.  gcc 3.2.1 would be the best but any of them are much better
than gcc 3.0.4.  Eschew the CVS versions of gcc, they are not measurably
better than gcc 3.2.1 at this time and in some ways they are worse.

If you can't upgrade gcc, you can try building your whole program
with "-gdwarf-2" and see if that helps.  If that doesn't help any,
building the whole program with "-gstabs+" and see if that helps.
-gdwarf-2 is the best debugging format for C++, and -gstabs+ is
second best.

I don't know a simple reliable way to tell which is the default
on your platform.  I usually compile a small test program with
"gcc -S foo.c" and then read the foo.s file and look for the
telltale dwarf-2 or stabs+ information.  But regardless of what
the default debug format is, you can try setting the debug format
explicitly.

Michael C


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