From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31119 invoked by alias); 18 Aug 2004 13:45:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31086 invoked from network); 18 Aug 2004 13:45:39 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 18 Aug 2004 13:45:39 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BxQl0-0007Xd-4I; Wed, 18 Aug 2004 09:45:38 -0400 Date: Wed, 18 Aug 2004 13:45:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Andrew Cagney , jjohnstn@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [RFA]: Fix for pending breakpoints in manually loaded/unloaded shlibs Message-ID: <20040818134537.GA14377@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Andrew Cagney , jjohnstn@redhat.com, gdb-patches@sources.redhat.com References: <7494-Wed11Aug2004070352+0300-eliz@gnu.org> <411A4209.6020801@redhat.com> <411A5012.3000508@gnu.org> <9743-Wed11Aug2004205531+0300-eliz@gnu.org> <411A84B0.7020106@gnu.org> <2427-Thu12Aug2004064240+0300-eliz@gnu.org> <411B5E34.5020906@gnu.org> <3405-Thu12Aug2004214630+0300-eliz@gnu.org> <411BD678.3020504@gnu.org> <8011-Sat14Aug2004144712+0300-eliz@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8011-Sat14Aug2004144712+0300-eliz@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-08/txt/msg00554.txt.bz2 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 > > > > 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