This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Modified Watchthreads Patch
> Date: Sat, 11 Dec 2004 12:32:56 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: jjohnstn@redhat.com, gdb-patches@sources.redhat.com
>
> I think that every current use of observers is in this sense "we don't
> really know in advance what needs to be done". For instance, we've got
> observer_notify_inferior_created, which is uesd for actions that we
> don't know statically will be necessary at inferior creation - vsyscall
> DSO loading on targets which have one, and some HP/UX specific code
> that I don't recall the purpose of.
>
> Or consider target_changed, which is attached by the frame code (always
> part of GDB!) and the regcache (likewise!) and notified by valops.c
> (likewise!).
What about solib_unloaded?
> Observe, we're back to the core question of the role of observers here.
> I prefer #2 to #1. But #2 is _functionally_ equivalent to providing an
> observer named linux_enable_watchpoints_for_new_threads.
It is functionally equivalent, but ideologically different: it's a
detail of GDB internals as opposed to a general-purpose extension
mechanism.
As for its documentation, it boils down to a couple of sentences, so I
don't think it's a big deal.