Subject: Re: gdb and dlopen()
To: Ben Harris <firstname.lastname@example.org>
From: None <email@example.com>
Date: 08/27/2002 06:57:00
On Tue, Aug 27, 2002 at 11:52:26AM +0100, Ben Harris wrote:
> In article <20020827012623.GA8382@endersgame.net> you write:
> >The only issue I have with this is ease of debugging. Blackbox crashes on
> >me sometimes, and it's impossible to debug (or at least seems to be), as
> >the stack trace is invariably dlopen() dlopen() dlopen() dlopen() ... with
> >no useful info. Is there a way to get a useful stack trace from a
> >dynamically linked binary that uses dlopen?
> It certainly should be possible. gdb hooks itself into the dynamic linker
> so that it can keep track of which libraries are loaded where, and on my
> Linux/i386 system it can give meaningful stack backtraces spanning multiple
> shared libraries, both dlopen()ed and otherwise. If this doesn't work on a
> particular NetBSD port, that's a bug.
In 1999 when I was using Linux, gdb could give backtraces into dlopen()ed
code, but it could not set breakpoints in it. I don't think it could step
into it either, but I am not sure.