This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA]: Modified Watchthreads Patch


> Date: Fri, 11 Feb 2005 12:17:51 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: jjohnstn@redhat.com, gdb-patches@sources.redhat.com
> 
> My current feeling is that either:
>   (A) we should use the same mechanism to create two sets of hooks,
>       one to be considered a general extension mechanism and the other
>       an internal modularity aid;
> or
>   (B) we should define the observers as the latter rather than the
>       former, and declare the former niche unfilled.
> 
> Otherwise there's just a lot of wasted code duplication.
> 
> What do you think?  Am I way off on the role of observers?  Since we
> don't "support" plugging arbitrary code into them, I have trouble
> considering them an extension mechanism.

I initially thought that observers were introduced as an extension
mechanism.  But it begins to look like they are intended to be used as
in the C++ observer paradigm.  I don't like that, since GDB is not a
C++ program, and because using observers in GDB obfuscates the flow of
control and data and makes the GDB code harder to understand.  But it
looks like mine is the minority opinion, judging by past discussions
of this.


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