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]: Fix for pending breakpoints in manually loaded/unloaded shlibs


On Sat, Aug 14, 2004 at 02:47:13PM +0300, Eli Zaretskii wrote:
> > Date: Thu, 12 Aug 2004 16:43:36 -0400
> > From: Andrew Cagney <cagney@gnu.org>
> > 
> > Here's a reference http://patterndigest.com/patterns/Observer.html
> 
> I'm well aware of the observer pattern and its general usefulness.
> 
> What I'm not sure about is whether this specific case justifies an
> introduction of a _new_ observer, when it could easily (or so it seems
> to me) be fixed in another, more traditional, way.  Sorry if that
> concern was unclear from my original wording.
> 
> > Conversely, the breakpoint code, doesn't care about the course of events 
> > that lead to an shlib-unload, just that it occured.
> 
> Our breakpoint code is replete with things it cares about that happen
> in other parts of the code.  I don't understand why this minor problem
> justifies to be solved in such a different, non-minor way.

I think that using a new observer here improves clarity - for instance
it lets us easily identify all the points in the code where the
breakpoint module has hooks.  And, the observer seems generally useful;
breakpoint.c isn't the only thing that will be affected when a shared
library vanishes.

Does that work for you?

-- 
Daniel Jacobowitz


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