This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH:MI] Use observers for breakpoints
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Nick Roberts <nickrob at snap dot net dot nz>
- Cc: gdb-patches at sourceware dot org, ghost at cs dot msu dot su
- Date: Mon, 2 Jun 2008 22:08:18 -0700
- Subject: Re: [PATCH:MI] Use observers for breakpoints
- References: <18498.3436.91443.361769@kahikatea.snap.net.nz>
> Following Aleksandar Ristovski's patch for catchpoints in GDB/MI,
> here's a patch to demonstrate the use of observers for breakpoints.
> This relates to earlier patches I've submitted which uses event
> notification to communicate a change in state rather than using
> command output directly. Among other things this allows the use of
> CLI commands with MI.
I missed the earlier patch, but I think that the idea is sound.
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.
I'm wondering if it might be useful to create two specific events
for breakpoint created and deleted. Particularly for the "deleted"
event, where you end up outputing the entire description of a breakpoint
that is obsolete.
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.
--
Joel