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

Use -break-after.

This commit is contained in:
Alain Magloire 2002-08-26 20:22:09 +00:00
parent 1983087aaf
commit a07093fbe2

View file

@ -19,6 +19,7 @@ import org.eclipse.cdt.debug.core.cdi.ICDILocationBreakpoint;
import org.eclipse.cdt.debug.core.cdi.ICDIWatchpoint; import org.eclipse.cdt.debug.core.cdi.ICDIWatchpoint;
import org.eclipse.cdt.debug.mi.core.MIException; import org.eclipse.cdt.debug.mi.core.MIException;
import org.eclipse.cdt.debug.mi.core.command.CommandFactory; import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
import org.eclipse.cdt.debug.mi.core.command.MIBreakAfter;
import org.eclipse.cdt.debug.mi.core.command.MIBreakCondition; import org.eclipse.cdt.debug.mi.core.command.MIBreakCondition;
import org.eclipse.cdt.debug.mi.core.command.MIBreakDelete; import org.eclipse.cdt.debug.mi.core.command.MIBreakDelete;
import org.eclipse.cdt.debug.mi.core.command.MIBreakDisable; import org.eclipse.cdt.debug.mi.core.command.MIBreakDisable;
@ -172,9 +173,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
// We only suppor expression not ignore count reset. // We only suppor expression not ignore count reset.
String exprCond = condition.getExpression(); String exprCond = condition.getExpression();
if (exprCond == null) { if (exprCond != null) {
throw new CDIException("ignore count not supported");
}
CSession s = getCSession(); CSession s = getCSession();
CommandFactory factory = s.getMISession().getCommandFactory(); CommandFactory factory = s.getMISession().getCommandFactory();
MIBreakCondition breakCondition = MIBreakCondition breakCondition =
@ -188,7 +187,24 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
} catch (MIException e) { } catch (MIException e) {
throw new CDIException(e.toString()); throw new CDIException(e.toString());
} }
} else {
int ignoreCount = condition.getIgnoreCount();
CSession s = getCSession();
CommandFactory factory = s.getMISession().getCommandFactory();
MIBreakAfter breakAfter =
factory.createMIBreakAfter(number, ignoreCount);
try {
s.getMISession().postCommand(breakAfter);
MIInfo info = breakAfter.getMIInfo();
if (info == null) {
throw new CDIException("No answer");
} }
} catch (MIException e) {
throw new CDIException(e.toString());
}
}
}
/** /**
* @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpointManager#getBreakpoints() * @see org.eclipse.cdt.debug.core.cdi.ICDIBreakpointManager#getBreakpoints()
*/ */