1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Always set the condition and the ignore count, it may be

away to reset some values.
This commit is contained in:
Alain Magloire 2002-09-04 16:07:14 +00:00
parent 3496b65bc6
commit 73bf2abf5a

View file

@ -208,35 +208,32 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
throw new CDIException("Not a CDT breakpoint");
}
// We only suppor expression not ignore count reset.
String exprCond = condition.getExpression();
if (exprCond != null) {
boolean state = suspendInferior();
CSession s = getCSession();
CommandFactory factory = s.getMISession().getCommandFactory();
// reset the values to sane states.
String exprCond = condition.getExpression();
if (exprCond == null) {
exprCond = "";
}
int ignoreCount = condition.getIgnoreCount();
if (ignoreCount < 0) {
ignoreCount = 0;
}
try {
MIBreakCondition breakCondition =
factory.createMIBreakCondition(number, exprCond);
try {
s.getMISession().postCommand(breakCondition);
MIInfo info = breakCondition.getMIInfo();
if (info == null) {
throw new CDIException("No answer");
}
} catch (MIException e) {
throw new CDIException(e.getMessage());
} finally {
resumeInferior(state);
}
} else {
int ignoreCount = condition.getIgnoreCount();
boolean state = suspendInferior();
CSession s = getCSession();
CommandFactory factory = s.getMISession().getCommandFactory();
MIBreakAfter breakAfter =
factory.createMIBreakAfter(number, ignoreCount);
try {
s.getMISession().postCommand(breakAfter);
MIInfo info = breakAfter.getMIInfo();
info = breakAfter.getMIInfo();
if (info == null) {
throw new CDIException("No answer");
}
@ -246,7 +243,6 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
resumeInferior(state);
}
}
}
/**
* @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpointManager#getBreakpoints()