Re: MI: changing breakpoint location

Vladimir Prus
2006-03-16T16:40:51Z

Daniel Jacobowitz wrote:

> On Thu, Mar 16, 2006 at 07:11:54PM +0300, Vladimir Prus wrote:
>> > 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?
>
> A whole lot more than that. We'd have to destroy most of the existing
> breakpoint.

I trust you on that, though I don't understand why GUI is in better position
to emit "-break-delete" + "-break-insert" then gdb itself, internally.

>> > 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?
>
> Of course, it already is. But that's not the point; I don't want a
> proliferation of commands with similar functionality, when they aren't
> needed. The larger the MI interface grows, the harder it is to test
> and maintain.

I think there's a tradeoff here -- in this specific case, all frontend
authors will have to implement the same functionality, likely with bugs. If
this is done right once in gdb, all frontends will work correctly.

Of course, frontend maintainers and gdb maintainers are different groups, so
if you mean adding this to gdb will move work from frontend maintainers to
gdb maintainers and you don't like that idea, I understand. Or you object
to the idea even if it will backed up by a patch eventually?

- Volodya