From bd657f12b8cfbb790961109db29334f47925fe9e Mon Sep 17 00:00:00 2001 From: James Blackburn Date: Tue, 2 Jun 2009 19:39:38 +0000 Subject: [PATCH] Bug 214463 - disabled watchpoints aren't disabled during launch --- .../cdt/debug/mi/core/cdi/BreakpointManager.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 829566de0fe..c98c6000d25 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 @@ -774,6 +774,7 @@ public class BreakpointManager extends Manager { boolean access = watchpoint.isReadType() && watchpoint.isWriteType(); boolean read = ! watchpoint.isWriteType() && watchpoint.isReadType(); String expression = watchpoint.getDerivedExpression(); + boolean enable = watchpoint.isEnabled(); MISession miSession = target.getMISession(); CommandFactory factory = miSession.getCommandFactory(); @@ -820,6 +821,20 @@ public class BreakpointManager extends Manager { throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$ } } + if (!enable) { + int[] numbers = new int[1]; + numbers[0] = no; + MIBreakDisable breakDisable = factory.createMIBreakDisable(numbers); + try { + miSession.postCommand(breakDisable); + MIInfo disableInfo = breakDisable.getMIInfo(); + if (disableInfo == null) { + throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$ + } + } catch (MIException e) { + throw new MI2CDIException(e); + } + } // how to deal with threads ??? } catch (MIException e) { throw new MI2CDIException(e);