This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: dlopen()


Jim Blandy wrote:
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.

It works now, for some reason. After dlopen(), "info shared" shows that the symbols are read.


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