how to debug deman-loaded programs

Ian Wienand ianw@gelato.unsw.edu.au
Wed Apr 28 04:41:00 GMT 2004


On Wed, Apr 28, 2004 at 09:51:27AM +0530, Banibrata Dutta wrote:
> how does one debug a demand-loaded part of a process, i.e. the fault is
> suspected in the shared object part of a program, which has been loaded
> on-demand using dlopen()/dlsym(), but when i run gdb on it (or it's "core"),
> going to a stack frame, and doing list, doesn't provide me with any info,
> but simply prints out "rtld.c", that's it. all my code is compiled with "-g"
> option.

At a minimum, I'd say you need versions of the glibc libraries with
debugging information available.  On Debian, for example, you would
install the libc6.1-dbg packages, and run gdb with
LD_LIBRARY_PATH=/usr/lib/debug. 

This isn't a binutils thing however, so isn't appropriate for this
list (actually, I'm struggling to think where to take these problems,
probably one of your distribution support lists or IRC -- include what
architecture and some example code for more responses).

-i
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20040428/45e4c3bb/attachment.sig>


More information about the Binutils mailing list