ide, debugger; fixed breakpoints issues when using run to cursor together with breakp...
authorRejean Loyer <rejean.loyer@gmail.com>
Thu, 23 May 2013 03:12:53 +0000 (23:12 -0400)
committerRejean Loyer <rejean.loyer@gmail.com>
Mon, 27 May 2013 17:15:22 +0000 (13:15 -0400)
ide/src/debugger/Debugger.ec

index dfb1124..0e9e984 100644 (file)
@@ -2708,13 +2708,6 @@ class Debugger
                      GoToStackFrameLine(activeFrameLevel, true);
                      ideMainFrame.Activate();   // TOFIX: ide.Activate() is not reliable (app inactive)
                      ide.Update(null);
-                     if(bp.type == BreakpointType::runToCursor)
-                     {
-                        if(symbols)
-                           GdbCommand(false, "-break-delete %d", bp.bp.number);
-                        delete bpRunToCursor;
-                        bpRunToCursor = null;
-                     }
                   }
                   else
                   {
@@ -2730,6 +2723,13 @@ class Debugger
       }
       else
          ide.outputView.debugBox.Logf("Debugger Error: Breakpoint hit could not match breakpoint instance\n");
+
+      if(bpRunToCursor)
+      {
+         if(symbols && bpRunToCursor.inserted)
+            GdbCommand(false, "-break-delete %d", bpRunToCursor.bp.number);
+         delete bpRunToCursor;
+      }
    }
 
    void GdbThreadExit()