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

Bug 442394 - Sometimes breakpoints set and immediately deleted when debugging with GDB

Change-Id: I3d2e54c7ca65b0a7a83fff39b1eb4b02b939493d
Reviewed-on: https://git.eclipse.org/r/37310
Tested-by: Hudson CI
Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Alvaro Sanchez-Leon 2014-11-28 17:04:03 -05:00
parent 4fc7a1cf91
commit 07dcb970fa

View file

@ -15,6 +15,7 @@
* Marc Khouzam (Ericsson) - Generalize thread filtering logic (Bug 431986)
* Marc Khouzam (Ericsson) - Accept multiple calls to startTrackingBreakpoints (Bug 389945)
* Marc Khouzam (Ericsson) - Support for dynamic printf (Bug 400628)
* Alvaro Sanchez-Leon (Ericcson) - Sometimes breakpoints set and immediately deleted when debugging with GDB (Bug 442394)
*******************************************************************************/
package org.eclipse.cdt.dsf.mi.service;
@ -355,28 +356,19 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
* must have the proper IBreakpointsTargetDMContext in its hierarchy.
*
* @since 4.6
*/
public void startTrackingBpForProcess(final IContainerDMContext containerDmc, final RequestMonitor rm) {
final IBreakpointsTargetDMContext targetBpDmc = DMContexts.getAncestorOfType(containerDmc, IBreakpointsTargetDMContext.class);
startTrackingBreakpoints(targetBpDmc, new ImmediateRequestMonitor(rm) {
@Override
protected void handleSuccess() {
final Map<ICBreakpoint,Map<String, Object>> platformBPs = fPlatformBPs.get(targetBpDmc);
if (platformBPs == null) {
assert false;
rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INTERNAL_ERROR, "Missing bp target context", null)); //$NON-NLS-1$
return;
}
*/
public void startTrackingBpForProcess(final IContainerDMContext containerDmc, final RequestMonitor rm) {
final IBreakpointsTargetDMContext targetBpDmc = DMContexts.getAncestorOfType(containerDmc,
IBreakpointsTargetDMContext.class);
for (final ICBreakpoint breakpoint : platformBPs.keySet()) {
setTargetFilter(breakpoint, containerDmc);
}
rm.done();
}
});
}
IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(fDebugModelId);
for (IBreakpoint breakpoint : breakpoints) {
if (breakpoint instanceof ICBreakpoint && supportsBreakpoint(breakpoint)) {
setTargetFilter((ICBreakpoint) breakpoint, containerDmc);
}
}
startTrackingBreakpoints(targetBpDmc, rm);
}
//-------------------------------------------------------------------------
// startTrackingBreakpoints