This is the mail archive of the
mailing list for the GDB project.
catch load/unload not implemented on any target (remove?)
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 26 Oct 2008 17:40:44 -0700
- Subject: catch load/unload not implemented on any target (remove?)
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.
The "protocol" between the breakpoint solib layers is based on
some macros being defined:
SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid, tempflag, filename, cond_string)
These macros used to be defined in the various target-dependent solib
files. For instance, in gdb-5.3, it was defined in: coff-solib.h,
pa64solib.h, solib.h, and somsolib.h.
I think that the mechanism of using macros is definitely OBE now, and
one should use "methods" in the target_so_ops structure.
I am conflicted as to what to do in the meantime: Leave the code as is,
and update the documentation that this feature is currently implemented
on no platform. Or remove the code entirely.
I am leaning towards removing the code entirely, for several reasons:
- Documentating a feature as unimplemented seems silly;
- I don't think there is much in the current code that once can
reuse in order to implement this feature properly
- When someone is ready to implement this feature again for his platform,
there shouldn't be much to do in terms of infrastructure work to do at
the breakpoint module level. So it shouldn't be very difficult to
implement. There might be one little difficulty based on the fact
that some architectures will implement this feature using a phyical
breakpoint (eg: svr4) whereas others won't (eg: Windows), but that
shouldn't be very difficult to handle by using the right bp_kind.