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: gdbarch_skip_solib_resolver question


On 01/11/2012 12:43 AM, Mark Kettenis wrote:
  I noticed that gdbarch_skip_solib_resolver() invokes
  glibc_skip_solib_resolver() on x86, mips, and sh to identify
  that gdb is stepping into _dl_runtime_resolve.

On PowerPC, gdbarch_skip_solib_resolver() always returns a zero.

  I don't see any problem with gdb stopping in _dl_runtime_resolve
  or not stepping over the routine.

  So, what does this mean?  Is calling glibc_skip_solib_resolver()
  optional?  Or is the handle_inferior_event() code so convoluted
  or intelligent that it works even when pieces are missing?


If I remember correctly, gdbarch_skip_solib_resolver() is just an optimization. If it returns an address where GDB can set a breakpoint that gets hit upon return from the dynamic linker. If gdbarch_skip_solib_resolver() returns zero GDB just single-steps through the dynamic linker, which works, but is a bit slower.

OK, that matches what I see. Except that gdb always steps over the call and never stops in the target function.


-- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077


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