1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 09:15:38 +02:00

Bug 214463 - disabled watchpoints aren't disabled during launch

This commit is contained in:
James Blackburn 2009-06-02 19:39:38 +00:00
parent 00fc40ee0b
commit bd657f12b8

View file

@ -774,6 +774,7 @@ public class BreakpointManager extends Manager {
boolean access = watchpoint.isReadType() && watchpoint.isWriteType(); boolean access = watchpoint.isReadType() && watchpoint.isWriteType();
boolean read = ! watchpoint.isWriteType() && watchpoint.isReadType(); boolean read = ! watchpoint.isWriteType() && watchpoint.isReadType();
String expression = watchpoint.getDerivedExpression(); String expression = watchpoint.getDerivedExpression();
boolean enable = watchpoint.isEnabled();
MISession miSession = target.getMISession(); MISession miSession = target.getMISession();
CommandFactory factory = miSession.getCommandFactory(); 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$ 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 ??? // how to deal with threads ???
} catch (MIException e) { } catch (MIException e) {
throw new MI2CDIException(e); throw new MI2CDIException(e);