Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* catch load/unload not implemented on any target (remove?)
@ 2008-10-27  0:41 Joel Brobecker
  2008-10-27  4:16 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Joel Brobecker @ 2008-10-27  0:41 UTC (permalink / raw)
  To: gdb-patches

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.

The "protocol" between the breakpoint solib layers is based on
some macros being defined:

    SOLIB_LOADED_LIBRARY_PATHNAME(pid)
    LIB_UNLOADED_LIBRARY_PATHNAME(pid)
    SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string)
    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.

Thoughts?

-- 
Joel


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-27 17:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-27  0:41 catch load/unload not implemented on any target (remove?) Joel Brobecker
2008-10-27  4:16 ` Eli Zaretskii
2008-10-27 14:19 ` Aleksandar Ristovski
2008-10-27 13:57   ` Aleksandar Ristovski
2008-10-27 15:43 ` Daniel Jacobowitz
2008-10-27 17:45   ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox