From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30474 invoked by alias); 21 Jul 2008 17:13:41 -0000 Received: (qmail 30463 invoked by uid 22791); 21 Jul 2008 17:13:41 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Jul 2008 17:13:21 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KKywm-0006UD-QQ for gdb-patches@sources.redhat.com; Mon, 21 Jul 2008 17:13:16 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Jul 2008 17:13:16 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Jul 2008 17:13:16 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: RFA: Remove gdb-events Date: Mon, 21 Jul 2008 17:13:00 -0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 X-IsSubscribed: yes 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-07/txt/msg00395.txt.bz2 Tom Tromey wrote: > My understanding is that the gdb "events" mechanism is deprecated in > favor of using observers. > > This patch removes events and adds observers where needed. > > Most of this patch is straightforward. There are a few odd pieces: > > * Removing the call to clear_gdb_event_hooks. In theory I think this > could confuse some caller. However, in practice I think it is > probably nothing to worry about. > > * The architecture_changed observer is needed for gdbtk, but the only > place where this is notified is deprecated. Since my goal here is > to remove events, I think this is probably fine. It certainly > doesn't seem any worse. > > * MI installs a new set of event handlers, does some work, then > uninstalls them. Instead of trying to replicate this behavior -- > say by deinstalling other observers -- I just made the MI observer > conditional on a global flag, which is set and reset at the > appropriate points. I think it would have been nicer to install observers in mi_interpreter_init, but it's not critical matter. The mi_can_breakpoint_notify will probably remain forever, so that we report breakpoints differently when they are created during -break-insert and when they are created by other commands -- the former needs to report new breakpoint as part of ^done reply, and the latter has to use notification. I don't have any objections to the MI part of this change -- thanks for asking for an opinion! - Volodya