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

create the breakpoint disable if it was disable.

This commit is contained in:
Alain Magloire 2004-11-12 20:51:09 +00:00
parent ab89c5a46e
commit 4cd3ad7c88

View file

@ -304,7 +304,7 @@ public class BreakpointManager extends Manager {
setLocationBreakpoint(bpt);
}
}
// Fire a changed Event.
miBreakpoints = bpt.getMIBreakpoints();
if (miBreakpoints != null && miBreakpoints.length > 0) {
@ -619,6 +619,8 @@ public class BreakpointManager extends Manager {
MIBreakInsert[] breakInserts = createMIBreakInsert(bkpt);
List pointList = new ArrayList();
try {
CommandFactory factory = miSession.getCommandFactory();
boolean enable = bkpt.isEnabled();
for (int i = 0; i < breakInserts.length; i++) {
miSession.postCommand(breakInserts[i]);
MIBreakInsertInfo info = breakInserts[i].getMIBreakInsertInfo();
@ -629,6 +631,24 @@ public class BreakpointManager extends Manager {
if (points == null || points.length == 0) {
throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Parsing_Error")); //$NON-NLS-1$
}
// Make sure that if the breakpoint was disable we create them disable.
if (!enable) {
int[] numbers = new int[points.length];
for (int j = 0; j < points.length; j++) {
numbers[j] = points[j].getNumber();
}
MIBreakDisable breakDisable = factory.createMIBreakDisable(numbers);
try {
miSession.postCommand(breakDisable);
MIInfo disableInfo = breakDisable.getMIInfo();
if (info == null) {
throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$
}
} catch (MIException e) {
throw new MI2CDIException(e);
}
}
pointList.addAll(Arrays.asList(points));
}
} catch (MIException e) {