mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +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:
parent
4fc7a1cf91
commit
07dcb970fa
1 changed files with 13 additions and 21 deletions
|
@ -15,6 +15,7 @@
|
||||||
* Marc Khouzam (Ericsson) - Generalize thread filtering logic (Bug 431986)
|
* Marc Khouzam (Ericsson) - Generalize thread filtering logic (Bug 431986)
|
||||||
* Marc Khouzam (Ericsson) - Accept multiple calls to startTrackingBreakpoints (Bug 389945)
|
* Marc Khouzam (Ericsson) - Accept multiple calls to startTrackingBreakpoints (Bug 389945)
|
||||||
* Marc Khouzam (Ericsson) - Support for dynamic printf (Bug 400628)
|
* 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;
|
package org.eclipse.cdt.dsf.mi.service;
|
||||||
|
@ -357,25 +358,16 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
* @since 4.6
|
* @since 4.6
|
||||||
*/
|
*/
|
||||||
public void startTrackingBpForProcess(final IContainerDMContext containerDmc, final RequestMonitor rm) {
|
public void startTrackingBpForProcess(final IContainerDMContext containerDmc, final RequestMonitor rm) {
|
||||||
final IBreakpointsTargetDMContext targetBpDmc = DMContexts.getAncestorOfType(containerDmc, IBreakpointsTargetDMContext.class);
|
final IBreakpointsTargetDMContext targetBpDmc = DMContexts.getAncestorOfType(containerDmc,
|
||||||
|
IBreakpointsTargetDMContext.class);
|
||||||
|
|
||||||
startTrackingBreakpoints(targetBpDmc, new ImmediateRequestMonitor(rm) {
|
IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(fDebugModelId);
|
||||||
@Override
|
for (IBreakpoint breakpoint : breakpoints) {
|
||||||
protected void handleSuccess() {
|
if (breakpoint instanceof ICBreakpoint && supportsBreakpoint(breakpoint)) {
|
||||||
final Map<ICBreakpoint,Map<String, Object>> platformBPs = fPlatformBPs.get(targetBpDmc);
|
setTargetFilter((ICBreakpoint) breakpoint, containerDmc);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (final ICBreakpoint breakpoint : platformBPs.keySet()) {
|
|
||||||
setTargetFilter(breakpoint, containerDmc);
|
|
||||||
}
|
}
|
||||||
|
startTrackingBreakpoints(targetBpDmc, rm);
|
||||||
rm.done();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Reference in a new issue