dlopen() and GDB?
George T. Talbot
george@moberg.com
Tue Aug 31 11:07:00 GMT 1999
I'm writing a program using dlopen() to load in modules for various
tasks. I'm having some trouble with debugging the program with GDB
(linux x86, gcc 2.95.1, glibc 2.1.1pre2, gdb 4.17 w/thread support).
I've been trying to use the 'add-symbol-file <file> <addr>' command to
tell GDB where the dlopen()'d object is in memory, but I can't seem to
get it right.
I've tried passing the address returned in the dli_fbase field of the
Dlinfo structure returned by a call to dladdr() on the entry point of my
library. That didn't work, nor did adding the offset to the .rel_text
section of the object to the dli_fbase address.
I'm stuck. What address do I need to pass to add-symbol-file?
Thanks for your help.
--
George T. Talbot
<george@moberg.com>
P.S. I read the archives and couldn't find anything about this.
More information about the Gdb
mailing list