1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 08:46:02 +02:00

Bug 515768: Don't install BPs that are entirely filtered

This check already existed for modifying breakpoints, but didn't exist
for creating new breakpoints or installing initial breakpoints.

Change-Id: I5ff5ce0b3ac603ccffa49bd98d60f7202505a7bd
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
This commit is contained in:
Jonah Graham 2017-04-25 14:41:01 +01:00
parent a797534968
commit 98a578cf94

View file

@ -494,6 +494,8 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
IBreakpoint[] breakpoints = fBreakpointManager.getBreakpoints(fDebugModelId); IBreakpoint[] breakpoints = fBreakpointManager.getBreakpoints(fDebugModelId);
for (IBreakpoint breakpoint : breakpoints) { for (IBreakpoint breakpoint : breakpoints) {
if (supportsBreakpoint(breakpoint)) { if (supportsBreakpoint(breakpoint)) {
boolean filtered = isBreakpointEntirelyFiltered(dmc, (ICBreakpoint) breakpoint);
if (!filtered) {
Map<String, Object> attributes = breakpoint.getMarker().getAttributes(); Map<String, Object> attributes = breakpoint.getMarker().getAttributes();
attributes.put(ATTR_DEBUGGER_PATH, NULL_STRING); attributes.put(ATTR_DEBUGGER_PATH, NULL_STRING);
attributes.put(ATTR_THREAD_FILTER, extractThreads(dmc, (ICBreakpoint) breakpoint)); attributes.put(ATTR_THREAD_FILTER, extractThreads(dmc, (ICBreakpoint) breakpoint));
@ -501,6 +503,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
platformBPs.put((ICBreakpoint) breakpoint, attributes); platformBPs.put((ICBreakpoint) breakpoint, attributes);
} }
} }
}
} catch (CoreException e) { } catch (CoreException e) {
IStatus status = new Status( IStatus status = new Status(
IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, UNABLE_TO_READ_BREAKPOINT, e); IStatus.ERROR, GdbPlugin.PLUGIN_ID, REQUEST_FAILED, UNABLE_TO_READ_BREAKPOINT, e);
@ -1344,6 +1347,8 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
countingRm.setDoneCount(fPlatformToAttributesMaps.size()); countingRm.setDoneCount(fPlatformToAttributesMaps.size());
for (final IBreakpointsTargetDMContext dmc : fPlatformToAttributesMaps.keySet()) { for (final IBreakpointsTargetDMContext dmc : fPlatformToAttributesMaps.keySet()) {
boolean filtered = isBreakpointEntirelyFiltered(dmc, (ICBreakpoint)breakpoint);
if (!filtered) {
determineDebuggerPath(dmc, attrs, determineDebuggerPath(dmc, attrs,
new RequestMonitor(getExecutor(), countingRm) { new RequestMonitor(getExecutor(), countingRm) {
@Override @Override
@ -1352,6 +1357,9 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
attrs, countingRm); attrs, countingRm);
} }
}); });
} else {
countingRm.done();
}
} }
} }