mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[241317] Because GDB/MI is not ready to support multi-process for every context we have, I have reverted back to changes.
I have moved ISymbolDMContext, IBreakpointsTargetDMContext, ISourceLookupDMContext, ISignalsDMContext, IDisassemblyDMContext back to GDBControlDMContext. Maybe later, depending on GDB's final solution, we can move things back. So, GDBControlDMContext is no longer an IMemoryDMContext or an IContainerDMContext. Those interface are implemented by GDBContainerDMC.
This commit is contained in:
parent
9920518e26
commit
be2a572842
10 changed files with 30 additions and 53 deletions
|
@ -34,7 +34,6 @@ import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
|||
import org.eclipse.dd.dsf.concurrent.Sequence;
|
||||
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
|
||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
||||
|
@ -45,7 +44,6 @@ import org.eclipse.dd.gdb.internal.provisional.service.command.IGDBControl;
|
|||
import org.eclipse.dd.mi.service.CSourceLookup;
|
||||
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||
import org.eclipse.dd.mi.service.MIBreakpointsManager;
|
||||
import org.eclipse.dd.mi.service.MIProcesses;
|
||||
import org.eclipse.dd.mi.service.command.commands.CLISource;
|
||||
import org.eclipse.dd.mi.service.command.commands.MIEnvironmentCD;
|
||||
import org.eclipse.dd.mi.service.command.commands.MIFileExecAndSymbols;
|
||||
|
@ -353,8 +351,7 @@ public class FinalLaunchSequence extends Sequence {
|
|||
public void execute(RequestMonitor requestMonitor) {
|
||||
CSourceLookup sourceLookup = fTracker.getService(CSourceLookup.class);
|
||||
CSourceLookupDirector locator = (CSourceLookupDirector)fLaunch.getSourceLocator();
|
||||
IProcessDMContext procDmc = fProcService.createProcessContext(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||
ISourceLookupDMContext sourceLookupDmc = (ISourceLookupDMContext) fProcService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||
ISourceLookupDMContext sourceLookupDmc = (ISourceLookupDMContext)fCommandControl.getContext();
|
||||
|
||||
sourceLookup.setSourceLookupPath(sourceLookupDmc, locator.getSourceContainers(), requestMonitor);
|
||||
}},
|
||||
|
@ -481,8 +478,7 @@ public class FinalLaunchSequence extends Sequence {
|
|||
new Step() { @Override
|
||||
public void execute(final RequestMonitor requestMonitor) {
|
||||
MIBreakpointsManager bpmService = fTracker.getService(MIBreakpointsManager.class);
|
||||
IProcessDMContext procDmc = fProcService.createProcessContext(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||
IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext) fProcService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||
IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext)fCommandControl.getContext();
|
||||
|
||||
bpmService.startTrackingBreakpoints(breakpointDmc, requestMonitor);
|
||||
}},
|
||||
|
|
|
@ -23,14 +23,12 @@ import org.eclipse.dd.dsf.debug.service.IRegisters;
|
|||
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
||||
import org.eclipse.dd.dsf.debug.service.ISourceLookup;
|
||||
import org.eclipse.dd.dsf.debug.service.IStack;
|
||||
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||
import org.eclipse.dd.dsf.service.DsfSession;
|
||||
import org.eclipse.dd.mi.service.CSourceLookup;
|
||||
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||
import org.eclipse.dd.mi.service.MIBreakpointsManager;
|
||||
import org.eclipse.dd.mi.service.MIProcesses;
|
||||
|
||||
public class ServicesLaunchSequence extends Sequence {
|
||||
|
||||
|
@ -78,8 +76,7 @@ public class ServicesLaunchSequence extends Sequence {
|
|||
}},
|
||||
new Step() { @Override
|
||||
public void execute(RequestMonitor requestMonitor) {
|
||||
IProcessDMContext procDmc = fProcService.createProcessContext(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||
ISourceLookupDMContext sourceLookupDmc = (ISourceLookupDMContext)fProcService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||
ISourceLookupDMContext sourceLookupDmc = (ISourceLookupDMContext)fCommandControl.getContext();
|
||||
fSourceLookup.setSourceLookupDirector(sourceLookupDmc, (CSourceLookupDirector)fLaunch.getSourceLocator());
|
||||
requestMonitor.done();
|
||||
}},
|
||||
|
|
|
@ -25,13 +25,8 @@ import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
|||
import org.eclipse.dd.dsf.datamodel.DMContexts;
|
||||
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IProcesses;
|
||||
import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IDisassembly.IDisassemblyDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IModules.ISymbolDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.ISignals.ISignalsDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
|
||||
import org.eclipse.dd.dsf.service.DsfSession;
|
||||
|
@ -50,8 +45,7 @@ import org.osgi.framework.BundleContext;
|
|||
public class GDBProcesses extends MIProcesses {
|
||||
|
||||
private class GDBContainerDMC extends MIContainerDMC
|
||||
implements ISymbolDMContext, IMemoryDMContext, IBreakpointsTargetDMContext, ISourceLookupDMContext,
|
||||
ISignalsDMContext, IDisassemblyDMContext
|
||||
implements IMemoryDMContext
|
||||
{
|
||||
public GDBContainerDMC(String sessionId, IProcessDMContext processDmc, String groupId) {
|
||||
super(sessionId, processDmc, groupId);
|
||||
|
|
|
@ -26,10 +26,7 @@ import org.eclipse.dd.dsf.datamodel.DMContexts;
|
|||
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.ICachingService;
|
||||
import org.eclipse.dd.dsf.debug.service.IProcesses;
|
||||
import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IDisassembly.IDisassemblyDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IModules.ISymbolDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerResumedDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerSuspendedDMEvent;
|
||||
|
@ -38,8 +35,6 @@ import org.eclipse.dd.dsf.debug.service.IRunControl.IExitedDMEvent;
|
|||
import org.eclipse.dd.dsf.debug.service.IRunControl.IResumedDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IStartedDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.ISuspendedDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.service.ISignals.ISignalsDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.command.CommandCache;
|
||||
import org.eclipse.dd.dsf.debug.service.command.IEventListener;
|
||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
|
||||
|
@ -201,9 +196,8 @@ public class GDBProcesses_7_0 extends AbstractDsfService
|
|||
public int hashCode() { return super.baseHashCode() ^ (fId == null ? 0 : fId.hashCode()); }
|
||||
}
|
||||
|
||||
private class GDBContainerDMC extends MIContainerDMC
|
||||
implements ISymbolDMContext, IMemoryDMContext, IBreakpointsTargetDMContext, ISourceLookupDMContext,
|
||||
ISignalsDMContext, IDisassemblyDMContext
|
||||
private class GDBContainerDMC extends MIContainerDMC
|
||||
implements IMemoryDMContext
|
||||
{
|
||||
public GDBContainerDMC(String sessionId, IProcessDMContext processDmc, String groupId) {
|
||||
super(sessionId, processDmc, groupId);
|
||||
|
|
|
@ -39,7 +39,6 @@ import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants;
|
|||
import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
||||
import org.eclipse.dd.dsf.concurrent.Sequence;
|
||||
import org.eclipse.dd.dsf.datamodel.AbstractDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControl;
|
||||
|
@ -104,7 +103,7 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
|||
}
|
||||
|
||||
private static int fgInstanceCounter = 0;
|
||||
private final MIControlDMContext fControlDmc;
|
||||
private final GDBControlDMContext fControlDmc;
|
||||
|
||||
private SessionType fSessionType;
|
||||
|
||||
|
@ -136,7 +135,7 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
|||
} catch (CoreException e) {
|
||||
fExecPath = new Path(""); //$NON-NLS-1$
|
||||
}
|
||||
fControlDmc = new MIControlDMContext(session.getId(), getId());
|
||||
fControlDmc = new GDBControlDMContext(session.getId(), getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -379,11 +378,9 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
|||
return;
|
||||
}
|
||||
|
||||
final IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext)containerDmc;
|
||||
|
||||
// Insert a breakpoint at the requested stop symbol.
|
||||
queueCommand(
|
||||
new MIBreakInsert(breakpointDmc, true, false, null, 0, stopSymbol, 0),
|
||||
new MIBreakInsert(fControlDmc, true, false, null, 0, stopSymbol, 0),
|
||||
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) {
|
||||
@Override
|
||||
protected void handleSuccess() {
|
||||
|
|
|
@ -10,11 +10,23 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.dd.gdb.internal.provisional.service.command;
|
||||
|
||||
import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IDisassembly.IDisassemblyDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IModules.ISymbolDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.ISignals.ISignalsDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
|
||||
import org.eclipse.dd.mi.service.command.MIControlDMContext;
|
||||
|
||||
/**
|
||||
* To be removed
|
||||
*
|
||||
*/
|
||||
public class GDBControlDMContext
|
||||
public class GDBControlDMContext extends MIControlDMContext
|
||||
implements ISymbolDMContext, IBreakpointsTargetDMContext, ISourceLookupDMContext,
|
||||
ISignalsDMContext, IDisassemblyDMContext
|
||||
{
|
||||
public GDBControlDMContext(String sessionId, String commandControlId) {}
|
||||
|
||||
public GDBControlDMContext(String sessionId, String commandControlId) {
|
||||
super(sessionId, commandControlId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants;
|
|||
import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
||||
import org.eclipse.dd.dsf.concurrent.Sequence;
|
||||
import org.eclipse.dd.dsf.datamodel.AbstractDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControl;
|
||||
|
@ -104,7 +103,7 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
|||
}
|
||||
|
||||
private static int fgInstanceCounter = 0;
|
||||
private final MIControlDMContext fControlDmc;
|
||||
private final GDBControlDMContext fControlDmc;
|
||||
|
||||
private SessionType fSessionType;
|
||||
|
||||
|
@ -136,7 +135,7 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
|||
} catch (CoreException e) {
|
||||
fExecPath = new Path(""); //$NON-NLS-1$
|
||||
}
|
||||
fControlDmc = new MIControlDMContext(session.getId(), getId());
|
||||
fControlDmc = new GDBControlDMContext(session.getId(), getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -373,11 +372,9 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
|||
return;
|
||||
}
|
||||
|
||||
final IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext)containerDmc;
|
||||
|
||||
// Insert a breakpoint at the requested stop symbol.
|
||||
queueCommand(
|
||||
new MIBreakInsert(breakpointDmc, true, false, null, 0, stopSymbol, 0),
|
||||
new MIBreakInsert(fControlDmc, true, false, null, 0, stopSymbol, 0),
|
||||
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) {
|
||||
@Override
|
||||
protected void handleSuccess() {
|
||||
|
|
|
@ -34,16 +34,13 @@ import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsUpdatedEvent;
|
|||
import org.eclipse.dd.dsf.debug.service.IExpressions.IExpressionDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMData;
|
||||
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||
import org.eclipse.dd.dsf.service.DsfSession;
|
||||
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||
import org.eclipse.dd.mi.service.MIBreakpointDMData;
|
||||
import org.eclipse.dd.mi.service.MIBreakpoints;
|
||||
import org.eclipse.dd.mi.service.MIProcesses;
|
||||
import org.eclipse.dd.mi.service.MIRunControl;
|
||||
import org.eclipse.dd.mi.service.MIBreakpoints.MIBreakpointDMContext;
|
||||
import org.eclipse.dd.mi.service.command.events.MIBreakpointHitEvent;
|
||||
|
@ -181,9 +178,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
|||
assert(fServicesTracker != null);
|
||||
|
||||
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
||||
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
|
||||
IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||
fBreakpointsDmc = (IBreakpointsTargetDMContext)procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||
fBreakpointsDmc = (IBreakpointsTargetDMContext)commandControl.getContext();
|
||||
assert(fBreakpointsDmc != null);
|
||||
|
||||
fRunControl = fServicesTracker.getService(MIRunControl.class);
|
||||
|
|
|
@ -28,14 +28,11 @@ import org.eclipse.dd.dsf.debug.service.IDisassembly.IDisassemblyDMContext;
|
|||
import org.eclipse.dd.dsf.debug.service.IExpressions.IExpressionDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMData;
|
||||
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||
import org.eclipse.dd.dsf.service.DsfSession;
|
||||
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||
import org.eclipse.dd.mi.service.MIDisassembly;
|
||||
import org.eclipse.dd.mi.service.MIProcesses;
|
||||
import org.eclipse.dd.mi.service.command.events.MIStoppedEvent;
|
||||
import org.eclipse.dd.tests.gdb.framework.AsyncCompletionWaitor;
|
||||
import org.eclipse.dd.tests.gdb.framework.BackgroundRunner;
|
||||
|
@ -99,9 +96,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
|||
assert(fServicesTracker != null);
|
||||
|
||||
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
||||
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
|
||||
IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||
fDisassemblyDmc = (IDisassemblyDMContext)procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||
fDisassemblyDmc = (IDisassemblyDMContext)commandControl.getContext();
|
||||
assert(fDisassemblyDmc != null);
|
||||
|
||||
fDisassembly = fServicesTracker.getService(MIDisassembly.class);
|
||||
|
|
|
@ -79,7 +79,7 @@ public class SyncUtil {
|
|||
IProcessDMContext procDmc = procService.createProcessContext(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||
fGdbContainerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||
|
||||
fBreakpointsDmc = (IBreakpointsTargetDMContext)fGdbContainerDmc;
|
||||
fBreakpointsDmc = (IBreakpointsTargetDMContext)fCommandControl.getContext();
|
||||
|
||||
fRunControl = tracker.getService(MIRunControl.class);
|
||||
fStack = tracker.getService(MIStack.class);
|
||||
|
|
Loading…
Add table
Reference in a new issue