From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24194 invoked by alias); 5 Jun 2008 22:05:51 -0000 Received: (qmail 23944 invoked by uid 22791); 5 Jun 2008 22:05:50 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Jun 2008 22:05:32 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AD7E32A9721; Thu, 5 Jun 2008 18:05:30 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1fT7JE+Pths1; Thu, 5 Jun 2008 18:05:30 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7418F2A971C; Thu, 5 Jun 2008 18:05:30 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 6FCB2E7ACD; Thu, 5 Jun 2008 15:05:28 -0700 (PDT) Date: Thu, 05 Jun 2008 22:05:00 -0000 From: Joel Brobecker To: Nick Roberts Cc: gdb-patches@sourceware.org, ghost@cs.msu.su Subject: Re: [PATCH:MI] Use observers for breakpoints Message-ID: <20080605220528.GB3602@adacore.com> References: <18498.3436.91443.361769@kahikatea.snap.net.nz> <20080603050818.GA19062@adacore.com> <18501.51738.226990.896238@kahikatea.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18501.51738.226990.896238@kahikatea.snap.net.nz> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00085.txt.bz2 > > I suggest you change the observer profile to take a breakpoint > > rather than a breakpoint number, to avoid having going from > > the breakpoint number back to the breakpoint itself should an > > observer need it. > > My observer just uses a function called breakpoint_query (based on > gdb_breakpoint_query) which only needs the breakpoint number. I > think this is an internal detail which could easily be changed should > the need arise. I would still prefer it if you passed the breakpoint rather than the breakpoint number. I'd rather not have to change the interface later if the breakpoint ended up being needed. > breakpoint_create_event > breakpoint_modify_event > breakpoint_delete_event > > I don't know if there's much to be gained in differentiating between > creating and modifying a breakpoint but it would certainly make sense > to have two observers, breakpoints_changed and breakpoints_deleted, say. We can indeed start with 2 for now. > > Just as an aside, I don't know how others would feel about that, > > but I wouldn't mind seeing annotate.c:breakpoints_changed being > > renamed to annotate_breakpoints_changed. > > This function was moved from breakpoint.c. A couple of years ago I > submitted a patch to remove this and some other annotations, just > keeping the level three annotations. If we are going to keep it, I > suggest calling it annotate_breakpoints_invalid after the name of the > associated annotation and to be consistent with > annotate_frames_invalid. Sounds good to me. -- Joel