mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-21 16:05:25 +02:00
Bug 389070: Need to install disabled breakpoints
Change-Id: Iedc6bcb29030f8e9d8e05355e53c2d3fddfac3de Reviewed-on: https://git.eclipse.org/r/7700 Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
1735542b2d
commit
53b80f4d7e
1 changed files with 10 additions and 17 deletions
|
@ -431,8 +431,8 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
// Even if the breakpoint is disabled when we start, the target filter
|
// Even if the breakpoint is disabled when we start, the target filter
|
||||||
// can be accessed by the user through the breakpoint properties UI, so
|
// can be accessed by the user through the breakpoint properties UI, so
|
||||||
// we must set it right now.
|
// we must set it right now.
|
||||||
// This is the reason we don't do this in 'installBreakpoint', which is not
|
// This is the reason we don't do this in 'installBreakpoint', which used to not
|
||||||
// called right away if the breakpoint is disabled.
|
// be called right away if the breakpoint was disabled (this is no longer the case).
|
||||||
try {
|
try {
|
||||||
IContainerDMContext containerDmc = DMContexts.getAncestorOfType(dmc, IContainerDMContext.class);
|
IContainerDMContext containerDmc = DMContexts.getAncestorOfType(dmc, IContainerDMContext.class);
|
||||||
IDsfBreakpointExtension filterExt = getFilterExtension(breakpoint);
|
IDsfBreakpointExtension filterExt = getFilterExtension(breakpoint);
|
||||||
|
@ -444,14 +444,9 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Install only if the breakpoint is enabled at startup (Bug261082)
|
// Must install breakpoints right away, even if disabled, so that
|
||||||
// Note that Tracepoints are not affected by "skip-all"
|
// we can find out if they apply to this target (Bug 389070)
|
||||||
boolean bpEnabled = attributes.get(ICBreakpoint.ENABLED).equals(true) &&
|
|
||||||
(breakpoint instanceof ICTracepoint || fBreakpointManager.isEnabled());
|
|
||||||
if (bpEnabled)
|
|
||||||
installBreakpoint(dmc, breakpoint, attributes, countingRm);
|
installBreakpoint(dmc, breakpoint, attributes, countingRm);
|
||||||
else
|
|
||||||
countingRm.done();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -646,6 +641,8 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
// Convert the breakpoint attributes for the back-end
|
// Convert the breakpoint attributes for the back-end
|
||||||
attributes.put(ATTR_THREAD_ID, thread);
|
attributes.put(ATTR_THREAD_ID, thread);
|
||||||
Map<String,Object> targetAttributes = convertToTargetBreakpoint(breakpoint, attributes);
|
Map<String,Object> targetAttributes = convertToTargetBreakpoint(breakpoint, attributes);
|
||||||
|
// Must install breakpoint right away, even if disabled, so that
|
||||||
|
// we can find out if it applies to this target (Bug 389070)
|
||||||
fBreakpoints.insertBreakpoint(dmc, targetAttributes, drm);
|
fBreakpoints.insertBreakpoint(dmc, targetAttributes, drm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -855,15 +852,11 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the breakpoint is installed: it might not have been if it wasn't enabled at startup (Bug261082)
|
// Check if the breakpoint is installed:
|
||||||
// Or the installation might have failed; in this case, we still try to install it again because
|
// the installation might have failed; in this case, we try to install it again because
|
||||||
// some attribute might have changed which will make the install succeed.
|
// some attribute might have changed which will make the install succeed.
|
||||||
if (!breakpointIDs.containsKey(breakpoint) && !targetBPs.containsValue(breakpoint)) {
|
if (!breakpointIDs.containsKey(breakpoint) && !targetBPs.containsValue(breakpoint)) {
|
||||||
// Install only if the breakpoint is enabled
|
if (!filtered) {
|
||||||
// Note that Tracepoints are not affected by "skip-all"
|
|
||||||
boolean bpEnabled = attributes.get(ICBreakpoint.ENABLED).equals(true) &&
|
|
||||||
(breakpoint instanceof ICTracepoint || fBreakpointManager.isEnabled());
|
|
||||||
if (!filtered && bpEnabled) {
|
|
||||||
attributes.put(ATTR_DEBUGGER_PATH, NULL_STRING);
|
attributes.put(ATTR_DEBUGGER_PATH, NULL_STRING);
|
||||||
attributes.put(ATTR_THREAD_FILTER, extractThreads(dmc, breakpoint));
|
attributes.put(ATTR_THREAD_FILTER, extractThreads(dmc, breakpoint));
|
||||||
attributes.put(ATTR_THREAD_ID, NULL_STRING);
|
attributes.put(ATTR_THREAD_ID, NULL_STRING);
|
||||||
|
|
Loading…
Add table
Reference in a new issue