bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdb7.x missing symbols for some functions


From: Soren
Subject: gdb7.x missing symbols for some functions
Date: Wed, 08 Dec 2010 15:03:36 -0000
User-agent: G2/1.0

Hi,

I am developing code in C++ on RHEL4.7 with gcc4.4.4 and using gdb7.1.

I am encountering a very strange problem debugging code in a shared
library (.so) with gdb7.x.  The shared library is built on a RHEL4.7
platform with gcc4.4.4. The library is linked from a mix of object
files most of which are compiled optimized, but a few are compiled
with debugging information using the '-g' option to gcc.

When I bring up my application in gdb, I can set break points in
functions and gdb breaks fine.  But some functions show no symbol
information and gdb says: "Single stepping until exit from
function ...., which has no line number information".  Other functions
(even in same source file) show symbol information fine.

The characteristic of the functions that show no symbol information is
member functions in a class derived from a templated class, something
like this:

foo.cxx:

...
class x : public baset<x,...> {

public:
  void fcn1() { ... };  // no symbols shown

};

void fcn2() { ... };    // symbols shown ok
...

I have made a couple of observation:

gcc4.4.4/gdb7.x: Problem as described above

gcc4.4.4/gdb6.6: If use an older gdb6.6 version then symbol
information is shown just fine.

gcc4.1.1/gdb7.x: If I compile the same shared library with gcc4.1.1
there are no problems at all.

If I compile all the object files with debug information '-g', then
debugging with gdb works as expected.

I am at a loss in regards what to do next.  Any help, ideas,
suggestions, etc.  would be greatly appreciated. For example, what can
I try or what information can I dump (and how) in order to debug this
problem?

Thank you.

Soren Soe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]