This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH:MI] Use observers for breakpoints


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]