This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: dlopen()
- From: Jim Blandy <jimb at red-bean dot com>
- To: Russell Shaw <rjshaw at netspace dot net dot au>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 16 Jan 2006 21:54:39 -0800
- Subject: Re: dlopen()
- References: <43CC73CE.2030709@netspace.net.au>
On 1/16/06, Russell Shaw <rjshaw@netspace.net.au> wrote:
> Hi,
>
> I do:
>
> void *handle = dlopen("libfile1.so", RTLD_NOW);
> ...
> newfunc = dlsym(handle, "afunc");
> ...
> int res = (*newfunc)(app);
>
> How do i stop inside the "newfunc" function? I set a breakpoint
> there, but it doesn't activate.
After you step over the dlopen call, GDB should have read the symbols
from libfile1.so. If you say "break afunc" at that point, what does
GDB say?
If that doesn't work for you, you'll need to give us more details.
You need to include an actual transcript of your GDB session to start
with, not just an English description of what you did and what
happened. If we don't see any misunderstandings there, then you'll
need to provide us with a test case we can use to make the problem
happen on our own machines.