Help using gdb with shared libraries and child processes

Help using gdb with shared libraries and child processes

Post by D.G . Christense » Fri, 09 Aug 1996 04:00:00

Help!  I'm having problems using gdb with shared libraries.  I suspect
that my problem is that I'm dealing with the latest (ie. beta) releases
of gdb (4.16) and (1.8).  If so, I'd like to know so that I can
stop pulling out my hair trying to figure out how to do it.  BTW I'm
using Linux 2.0.0 and gcc 2.7.2.

First one is easy--I can't step into any function.  This was working on
previous releases so I'm assuming this is a bug.

Second one is much more complex--I have a system that loads functions
from a shared library (via dlopen() and dlsym() ) and executes them; no
problem.  Occasionaly my system receives a message that causes it to
create a new process (via fork() ).  The child process then calls the
same functions in the shared library; OK so far.  The problem occurs when
I want to debug the dynamic functions.  To do this I attach a new gdb
session to the child process.  The problem is that I can't get the new
gdb session to load the symbols for the shared library.  I've tried all
the different commands in gdb and nothing seems to work.  Does anybody
know how to load the symbols?

One last thing--if these are bugs, what's the best way to keep track of
the progress of the latest releases of gdb and

Big thanks in advance