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]

debugging demand loaded modules


Folks,

I've probably chosen the most complicated scenario to have
my fisrt experience with gdb but this is what I am up against.

I have a program which provides me a shell interface and 
from this shell I cause a module I have written to be loaded.
That module has a dependency on another dynamically linked
module, which in turn has more dependencies.  I need to debug
the module my module is loading.

The first problem I have is that to run the program you call
a small shell script which then calls a loader program which
then calls the main executable.  To get around this I have 
been running the program and then having gdb "attach" to it.

Now since I can't just set a break point on functions in my
module which because they haven't been loaded yet I modified
so that I have something I can break at just before it runs
the function I want to debug from the other module.

So now here I am with execution stopped and all the modules 
loaded (presumambly).  I now need to read the symbol tables
in so I want to run "add-symbol-file <libname> <address>".
What address do I give it?  I can't seem to figure out how
I learn this address.

I think I should learn more from "info share" however that
always returns "No executable file." which I am suspecting is 
because of the fact that I "attached" to the running process.

I'm in way over my head.  Anyone care to shine a light in 
here for me?


	-Vance


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