Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: psymtab/symtab error
@ 2002-12-16 18:15 Michael Elizabeth Chastain
  2002-12-16 18:26 ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Elizabeth Chastain @ 2002-12-16 18:15 UTC (permalink / raw)
  To: carlton, pkoning; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 9+ messages in thread
* psymtab/symtab error
@ 2002-11-14 14:50 Paul Koning
  2002-11-14 21:49 ` Jim Blandy
  2002-12-16 11:41 ` David Carlton
  0 siblings, 2 replies; 9+ messages in thread
From: Paul Koning @ 2002-11-14 14:50 UTC (permalink / raw)
  To: gdb

Gentlepeople,

I've been wading all over the guts of gdb for most of today, trying to
track down the cause of this message:

(gdb)  info addr CFreeList<CVolume>::m_base
Internal: global symbol `_ZN9CFreeListI7CVolumeE6m_baseE' found in iSCSIInit.cpp psymtab but not in symtab.
_ZN9CFreeListI7CVolumeE6m_baseE may be an inlined function, or may be a template function
(if a template, try specifying an instantiation: _ZN9CFreeListI7CVolumeE6m_baseE<type>).
(gdb)  info addr CFreeList<CVolume>::m_base
Symbol "_ZN9CFreeListI7CVolumeE6m_baseE" is static storage at address 0x4000dcf4.
(gdb) 

I get this simply by invoking gdb and loading the symbol table of the
image in question (a large RTOS application).

I dove deep into the guts of symbol table processing without getting
particularly enlightened.  As a guess, perhaps the problem is that
this symbol is entered into the symtab in its friendly form?  

The curious part is that (as shown above) reissuing the offending
command makes it work right, i.e., the symbol is actually entered in
the various gdb tables correctly so it can be found on the second
attempt. 

I'm using gdb from the 5.3 branch, as of 9/30/02.  Any hints?

    paul


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-12-17  2:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-16 18:15 psymtab/symtab error Michael Elizabeth Chastain
2002-12-16 18:26 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2002-11-14 14:50 Paul Koning
2002-11-14 21:49 ` Jim Blandy
2002-11-15  7:32   ` Paul Koning
2002-12-16 11:41 ` David Carlton
2002-12-16 17:00   ` Paul Koning
2002-12-16 17:05     ` Daniel Jacobowitz
2002-12-16 17:09     ` David Carlton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox