This is the mail archive of the gdb@sourceware.cygnus.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]

dlopen() and GDB?


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.

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