mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
create the breakpoint disable if it was disable.
This commit is contained in:
parent
ab89c5a46e
commit
4cd3ad7c88
1 changed files with 21 additions and 1 deletions
|
@ -304,7 +304,7 @@ public class BreakpointManager extends Manager {
|
||||||
setLocationBreakpoint(bpt);
|
setLocationBreakpoint(bpt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fire a changed Event.
|
// Fire a changed Event.
|
||||||
miBreakpoints = bpt.getMIBreakpoints();
|
miBreakpoints = bpt.getMIBreakpoints();
|
||||||
if (miBreakpoints != null && miBreakpoints.length > 0) {
|
if (miBreakpoints != null && miBreakpoints.length > 0) {
|
||||||
|
@ -619,6 +619,8 @@ public class BreakpointManager extends Manager {
|
||||||
MIBreakInsert[] breakInserts = createMIBreakInsert(bkpt);
|
MIBreakInsert[] breakInserts = createMIBreakInsert(bkpt);
|
||||||
List pointList = new ArrayList();
|
List pointList = new ArrayList();
|
||||||
try {
|
try {
|
||||||
|
CommandFactory factory = miSession.getCommandFactory();
|
||||||
|
boolean enable = bkpt.isEnabled();
|
||||||
for (int i = 0; i < breakInserts.length; i++) {
|
for (int i = 0; i < breakInserts.length; i++) {
|
||||||
miSession.postCommand(breakInserts[i]);
|
miSession.postCommand(breakInserts[i]);
|
||||||
MIBreakInsertInfo info = breakInserts[i].getMIBreakInsertInfo();
|
MIBreakInsertInfo info = breakInserts[i].getMIBreakInsertInfo();
|
||||||
|
@ -629,6 +631,24 @@ public class BreakpointManager extends Manager {
|
||||||
if (points == null || points.length == 0) {
|
if (points == null || points.length == 0) {
|
||||||
throw new CDIException(CdiResources.getString("cdi.BreakpointManager.Parsing_Error")); //$NON-NLS-1$
|
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));
|
pointList.addAll(Arrays.asList(points));
|
||||||
}
|
}
|
||||||
} catch (MIException e) {
|
} catch (MIException e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue