Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2005-08-31 17:47:27 +0000
committerMikhail Khodjaiants2005-08-31 17:47:27 +0000
commit0bb1f943aeb8086d47277ef978af94fbd16ea9f6 (patch)
tree747103da66eeb648d5281315f2bff84606f1ad10
parentaed2b9bd6bc101290df7422246e1c3eb7e11e4d5 (diff)
downloadorg.eclipse.cdt-CDT_21_branch.tar.gz
org.eclipse.cdt-CDT_21_branch.tar.xz
org.eclipse.cdt-CDT_21_branch.zip
Bug 108424: Debugger stops on removed breakpoints.CDT_21_branch
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/ChangeLog4
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java13
2 files changed, 12 insertions, 5 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
index a070e3d1769..1cfae81bcb1 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-31 Mikhail Khodjaiants
+ Bug 108424: Debugger stops on removed breakpoints.
+ * cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
+
2005-08-04 Alain Magloire
Fix for 92446
* cdi/org/eclipse/cdt/debug/mi/core/cdi/VariableManager.java
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
index ba16379342a..57d3fbdba1c 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/BreakpointManager.java
@@ -490,13 +490,14 @@ public class BreakpointManager extends Manager {
public void deleteBreakpoints(Target target, ICDIBreakpoint[] breakpoints) throws CDIException {
List bList = (List)breakMap.get(target);
+ List dList = (List)deferredMap.get(target);
// Do the sanity check first, we will accept all or none
if (bList == null) {
throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
}
for (int i = 0; i < breakpoints.length; i++) {
- if (!(breakpoints[i] instanceof Breakpoint && bList.contains(breakpoints[i]))) {
+ if (!(breakpoints[i] instanceof Breakpoint && (bList.contains(breakpoints[i]) || (dList != null && dList.contains(breakpoints[i]))))) {
throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Not_a_CDT_breakpoint")); //$NON-NLS-1$
}
}
@@ -504,10 +505,12 @@ public class BreakpointManager extends Manager {
MISession miSession = target.getMISession();
List eventList = new ArrayList(breakpoints.length);
for (int i = 0; i < breakpoints.length; i++) {
- MIBreakpoint[] miBreakpoints = ((Breakpoint)breakpoints[i]).getMIBreakpoints();
- if (miBreakpoints.length > 0) {
- deleteMIBreakpoints(target, miBreakpoints);
- eventList.add(new MIBreakpointDeletedEvent(miSession, miBreakpoints[0].getNumber()));
+ if (!(dList != null && dList.remove(breakpoints[i]))) {
+ MIBreakpoint[] miBreakpoints = ((Breakpoint)breakpoints[i]).getMIBreakpoints();
+ if (miBreakpoints.length > 0) {
+ deleteMIBreakpoints(target, miBreakpoints);
+ eventList.add(new MIBreakpointDeletedEvent(miSession, miBreakpoints[0].getNumber()));
+ }
}
}
MIEvent[] events = (MIEvent[])eventList.toArray(new MIEvent[0]);

Back to the top