Re: MI: changing breakpoint location

Vladimir Prus
2006-03-16T16:12:04Z

On Thursday 16 March 2006 19:05, Daniel Jacobowitz wrote:
> On Thu, Mar 16, 2006 at 06:35:34PM +0300, Vladimir Prus wrote:
> > Hello!
> >
> > At the moment, the MI interface does not allow one to change location of
> > breakpoint, say to move breakpoint from main.cpp:9 to main.cpp:11.
> > CLI does not support this either, but I'm interested in MI.
> >
> > Was this an explicit design decision, or it just happened this way? The
> > use case when it matters if when, in KDevelop, user edits the field of
> > breakpoint table with the location.
> >
> > Now, I have to delete the old breakpoint and create the new one, which is
> > workable, but not convenient. How about adding 'change breakpoint
> > location' functionality to MI?
>
> How much trouble is it, really, to remove and recreate the breakpoint?

In code, something line 28 lines, 7 lines of actual code exclusing comments.
In development time -- something like an hour, including two failed attempts.
And this assumes the current version is bug free and nobody will break it in
future.

How much trouble is it to change breakpoint location in gdb?

> Presumably you know all the necessary information about the breakpoint,
> since you need it for the GUI.

Just like gdb knows all the necessary information.

> Almost all of the work of the "break" command is figuring out where the
> breakpoint should go. I don't see an advantage in having more commands
> that need to be able to work that out.

Can't that logic be factored out into a function?

- Volodya