This is the mail archive of the gdb-patches@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: catch load/unload not implemented on any target (remove?)


On Sun, Oct 26, 2008 at 05:40:44PM -0700, Joel Brobecker wrote:
> Hello,
> 
> I was looking at converting the catch load/unload implementation
> to using the bp_catchpoint kind. But looking at the implementation,
> I realized there isn't any platform where this feature is implemented.
> The documentation says HP/UX, but this isn't correct either, AFAICT.

It used to be, IIRC.

> I think that the mechanism of using macros is definitely OBE now, and
> one should use "methods" in the target_so_ops structure.

I think it should be even higher level than that.  The core solib
machinery knows how to stop on load/unload (set stop-on-solib-events).
And it knows how to update the list of loaded libraries based on
current_sos.  All that's missing is a 'diff' operation: report which
libraries have been added or removed, so that the common code can
report them sensibly to the user.  I'd love if I could replace "set
stop-on-solib-events 1" with "catch load" and have GDB say "Stopped at
load of libfoo.so.1" or "Stopped at load of 6 libraries".  The latter
is not as important, since (on svr4 targets) it happens only during
program startup, when the dynamic loader initializes.

IOW I don't think we need any new breakpoint that we don't already
have.

-- 
Daniel Jacobowitz
CodeSourcery


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