This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: Remove gdb-events
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 21 Jul 2008 21:13:09 +0400
- Subject: Re: RFA: Remove gdb-events
- References: <m3tzeubpw5.fsf@fleche.redhat.com>
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