GNOME Bugzilla – Bug 634227
Better BP re-setting on restart
Last modified: 2010-11-07 17:03:49 UTC
When we restart Nemiver we need to delete the breakpoints set, restart the inferior and set the breakpoints back again. The way we do this in DBGPerspective::execute_program is not very maintainable. We instruct IDebugger to delete the breakpoint. When it notifies the perspective that the breakoint is deleted, we make this case a special case and we do not remove the breakpoint marker associated to the breakpoint because we know that we are going to be setting the breakpoint right after the inferior as been restarted. This is not very maintainable because a lot of things can happen while we try to restart the inferior. Basically, the inferior can fail to restart. Or the breakpoint location might have moved etc. Instead of handling this as a special case, we should rather copy the breakpoints we want to delete and set back. Then we just have to delete the breakpoints we copied and then set them back when the inferior is restarted. The copying is useful because otherwise once we delete a breakpoint, it's lost and so we we can't set it back.
Fixed by commit http://git.gnome.org/browse/nemiver/commit/?id=8291326f6e34672cbc4db4d36ceb77d68308d9f7