[PATCH:MI] Use observers for breakpoints

Joel Brobecker brobecker@adacore.com
Thu Jun 5 22:05:00 GMT 2008


>  > 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



More information about the Gdb-patches mailing list