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:
parent
1983087aaf
commit
a07093fbe2
1 changed files with 30 additions and 14 deletions
|
@ -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.mi.core.MIException;
|
||||
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.MIBreakDelete;
|
||||
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.
|
||||
String exprCond = condition.getExpression();
|
||||
if (exprCond == null) {
|
||||
throw new CDIException("ignore count not supported");
|
||||
}
|
||||
if (exprCond != null) {
|
||||
CSession s = getCSession();
|
||||
CommandFactory factory = s.getMISession().getCommandFactory();
|
||||
MIBreakCondition breakCondition =
|
||||
|
@ -188,7 +187,24 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
|||
} catch (MIException e) {
|
||||
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()
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue