This is the mail archive of the gdb@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: MI: changing breakpoint location


Daniel Jacobowitz wrote:

> I'm thinking something like "remember a couple lines of context, if you
> can find the same context, adjust the breakpoint and warn the user".
> But there's some risk of it landing in the wrong place; I don't know
> how to do it reliably but I bet a motivated developer would come up
> with something :-)
> 
> Of course, then we'd have to let the MI interpreter know about the
> change too, so that the editor could refresh.  I have no idea whether
> GUIs would want this behavior or not; wouldn't they want to track it
> themselves assuming you used the GUI's editor?

I think that automatic moving of breakpoints is better done in GUI. GUI has
more data, including specific set of editing operations, and it has more
feedback mechanisms, it can even show dialog box "This breakpoint was
moved, if that OK?", after all.

GDB, on the other hand, can only guess right breakpoint positions based on
analysing the source. And imagine you type in comment right before
breakpoint position. This will break all context-based analysis.

- Volodya





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