Source:
public void attachDebuggerToProcess(final IProcessDMContext procCtx, String binaryPath, final DataRequestMonitor<IDMContext> rm) { final IMIContainerDMContext containerDmc = createContainerContext(procCtx, MIProcesses.UNIQUE_GROUP_ID); DataRequestMonitor<MIInfo> attachRm = new ImmediateDataRequestMonitor<MIInfo>(rm) { @Override protected void handleSuccess() { GDBProcesses.super.attachDebuggerToProcess( procCtx, new ImmediateDataRequestMonitor<IDMContext>(rm) { @Override protected void handleSuccess() { fProcId = ((IMIProcessDMContext)procCtx).getProcId(); final IDMContext ctx = getData(); rm.setData(ctx); ImmediateExecutor.getInstance().execute( new Sequence(getExecutor(),new ImmediateRequestMonitor(rm)) { private Step[] fSteps = new Step[] { new Step() { @Override public void execute(RequestMonitor rm1) { IGDBMemory memory = getServicesTracker().getService(IGDBMemory.class); IContainerDMContext containerDmc = DMContexts.getParentOfType(ctx, IContainerDMContext.class); if (memory == null || containerDmc == null) { rm.done(); return; } memory.initializeMemoryData(containerDmc, rm1); }; }, new Step() { @Override public void execute(RequestMonitor rm1) { MIBreakpointsManager bpmService = getServicesTracker().getService(MIBreakpointsManager.class); IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(ctx, IBreakpointsTargetDMContext.class); bpmService.startTrackingBreakpoints(bpTargetDmc, rm); }; } }; @Override public Step[] getSteps() { return fSteps; } }); } }); } }; if (binaryPath != null) { fGdb.queueCommand( fCommandFactory.createMIFileExecAndSymbols(containerDmc, binaryPath), attachRm); return; } attachRm.done(); }

Target:
public void attachDebuggerToProcess(final IProcessDMContext procCtx, String binaryPath, final DataRequestMonitor<IDMContext> rm) { final IMIContainerDMContext containerDmc = createContainerContext(procCtx, MIProcesses.UNIQUE_GROUP_ID); DataRequestMonitor<MIInfo> attachRm = new ImmediateDataRequestMonitor<MIInfo>(rm) { @Override protected void handleSuccess() { GDBProcesses.super.attachDebuggerToProcess( procCtx, new ImmediateDataRequestMonitor<IDMContext>(rm) { @Override protected void handleSuccess() { fProcId = ((IMIProcessDMContext)procCtx).getProcId(); final IDMContext ctx = getData(); rm.setData(ctx); ImmediateExecutor.getInstance().execute( new Sequence(getExecutor(), rm) { private Step[] fSteps = new Step[] { new Step() { @Override public void execute(RequestMonitor memoryDataRm) { IGDBMemory memory = getServicesTracker().getService(IGDBMemory.class); IContainerDMContext containerDmc = DMContexts.getParentOfType(ctx, IContainerDMContext.class); if (memory == null || containerDmc == null) { memoryDataRm.done(); return; } IMemoryDMContext memContext = DMContexts.getAncestorOfType(ctx, IMemoryDMContext.class); if (memContext == null) { memoryDataRm.done(); return; } memory.initializeMemoryData(memContext, memoryDataRm); }; }, new Step() { @Override public void execute(RequestMonitor trackBpRm) { MIBreakpointsManager bpmService = getServicesTracker().getService(MIBreakpointsManager.class); IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(ctx, IBreakpointsTargetDMContext.class); bpmService.startTrackingBreakpoints(bpTargetDmc, trackBpRm); }; } }; @Override public Step[] getSteps() { return fSteps; } }); } }); } }; if (binaryPath != null) { fGdb.queueCommand( fCommandFactory.createMIFileExecAndSymbols(containerDmc, binaryPath), attachRm); return; } attachRm.done(); }