mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 358754: NPE in MIBreakpointsManager
This commit is contained in:
parent
1a8212ca62
commit
bc856eeea5
1 changed files with 46 additions and 43 deletions
|
@ -1447,9 +1447,6 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
|||
*/
|
||||
private void clearBreakpointStatus(final ICBreakpoint[] bps, final IBreakpointsTargetDMContext ctx)
|
||||
{
|
||||
new Job("Clear Breakpoints Status") { //$NON-NLS-1$
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
IWorkspaceRunnable wr = new IWorkspaceRunnable() {
|
||||
public void run(IProgressMonitor monitor) throws CoreException {
|
||||
// For every platform breakpoint that has at least one target breakpoint installed
|
||||
|
@ -1466,17 +1463,6 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
|||
}
|
||||
};
|
||||
|
||||
// First clear any problem markers
|
||||
for (IMarker marker : fBreakpointMarkerProblems.values()) {
|
||||
if (marker != null) {
|
||||
try {
|
||||
marker.delete();
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
fBreakpointMarkerProblems.clear();
|
||||
|
||||
// Create the scheduling rule to clear all bp planted.
|
||||
ISchedulingRule rule = null;
|
||||
List<ISchedulingRule> markerRules = new ArrayList<ISchedulingRule>();
|
||||
|
@ -1499,10 +1485,27 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
|||
}
|
||||
|
||||
try {
|
||||
// Will run the workspace runnable on the current thread, which
|
||||
// is the DSF executor.
|
||||
ResourcesPlugin.getWorkspace().run(wr, rule, 0, null);
|
||||
} catch (CoreException e) {
|
||||
return e.getStatus();
|
||||
GdbPlugin.getDefault().getLog().log(e.getStatus());
|
||||
}
|
||||
|
||||
new Job("Clear Breakpoints Status") { //$NON-NLS-1$
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
// Clear any problem markers
|
||||
for (IMarker marker : fBreakpointMarkerProblems.values()) {
|
||||
if (marker != null) {
|
||||
try {
|
||||
marker.delete();
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
fBreakpointMarkerProblems.clear();
|
||||
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
}.schedule();
|
||||
|
|
Loading…
Add table
Reference in a new issue