mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[241317] Moved contexts interfaces from GDBControlDMContext to GDBContainerDMC.
[244385] Fixed all GDB JUnit tests (except the one in breakpoints that we know still fails with GDB 6.8)
This commit is contained in:
parent
d9cb3f8251
commit
7d97e3d053
20 changed files with 372 additions and 260 deletions
|
@ -26,6 +26,7 @@ import org.eclipse.dd.dsf.concurrent.Query;
|
||||||
import org.eclipse.dd.dsf.datamodel.DMContexts;
|
import org.eclipse.dd.dsf.datamodel.DMContexts;
|
||||||
import org.eclipse.dd.dsf.debug.service.IProcesses;
|
import org.eclipse.dd.dsf.debug.service.IProcesses;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
||||||
|
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IProcesses.IThreadDMContext;
|
import org.eclipse.dd.dsf.debug.service.IProcesses.IThreadDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IProcesses.IThreadDMData;
|
import org.eclipse.dd.dsf.debug.service.IProcesses.IThreadDMData;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext;
|
||||||
|
@ -37,6 +38,8 @@ import org.eclipse.dd.gdb.internal.provisional.launching.GdbLaunch;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.IGDBControl;
|
import org.eclipse.dd.gdb.internal.provisional.service.command.IGDBControl;
|
||||||
import org.eclipse.dd.gdb.internal.ui.GdbUIPlugin;
|
import org.eclipse.dd.gdb.internal.ui.GdbUIPlugin;
|
||||||
import org.eclipse.dd.mi.service.IMIExecutionDMContext;
|
import org.eclipse.dd.mi.service.IMIExecutionDMContext;
|
||||||
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses;
|
||||||
import org.eclipse.debug.core.DebugPlugin;
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
import org.eclipse.debug.core.ILaunch;
|
import org.eclipse.debug.core.ILaunch;
|
||||||
import org.eclipse.debug.core.ILaunchManager;
|
import org.eclipse.debug.core.ILaunchManager;
|
||||||
|
@ -375,17 +378,27 @@ public class GdbThreadFilterEditor {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceTracker tracker = new ServiceTracker(GdbUIPlugin.getBundleContext(), ICommandControlService.class
|
ServiceTracker tracker1 = new ServiceTracker(GdbUIPlugin.getBundleContext(), ICommandControlService.class
|
||||||
.getName(), null);
|
.getName(), null);
|
||||||
tracker.open();
|
tracker1.open();
|
||||||
ICommandControlService commandControl = (ICommandControlService) tracker.getService();
|
|
||||||
if (commandControl != null) {
|
ICommandControlService commandControl = (ICommandControlService) tracker1.getService();
|
||||||
rm.setData((IContainerDMContext)commandControl.getContext());
|
ServiceTracker tracker2 = new ServiceTracker(GdbUIPlugin.getBundleContext(), IMIProcesses.class
|
||||||
|
.getName(), null);
|
||||||
|
tracker2.open();
|
||||||
|
IMIProcesses procService = (IMIProcesses) tracker2.getService();
|
||||||
|
|
||||||
|
if (commandControl != null && procService != null) {
|
||||||
|
IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
IContainerDMContext containerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
|
||||||
|
rm.setData(containerDmc);
|
||||||
} else {
|
} else {
|
||||||
rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$
|
rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Control or Process service not accessible.")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
rm.done();
|
rm.done();
|
||||||
tracker.close();
|
tracker1.close();
|
||||||
|
tracker2.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,6 @@ import org.eclipse.dd.dsf.ui.viewmodel.AbstractVMAdapter;
|
||||||
import org.eclipse.dd.dsf.ui.viewmodel.IRootVMNode;
|
import org.eclipse.dd.dsf.ui.viewmodel.IRootVMNode;
|
||||||
import org.eclipse.dd.dsf.ui.viewmodel.IVMNode;
|
import org.eclipse.dd.dsf.ui.viewmodel.IVMNode;
|
||||||
import org.eclipse.dd.gdb.internal.ui.GdbUIPlugin;
|
import org.eclipse.dd.gdb.internal.ui.GdbUIPlugin;
|
||||||
import org.eclipse.dd.mi.service.command.MIInferiorProcess.InferiorExitedDMEvent;
|
|
||||||
import org.eclipse.dd.mi.service.command.MIInferiorProcess.InferiorStartedDMEvent;
|
|
||||||
import org.eclipse.debug.core.DebugPlugin;
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
import org.eclipse.debug.core.IDebugEventSetListener;
|
import org.eclipse.debug.core.IDebugEventSetListener;
|
||||||
import org.eclipse.debug.core.ILaunchesListener2;
|
import org.eclipse.debug.core.ILaunchesListener2;
|
||||||
|
@ -80,9 +78,7 @@ public class LaunchVMProvider extends AbstractLaunchVMProvider
|
||||||
@Override
|
@Override
|
||||||
protected boolean canSkipHandlingEvent(Object newEvent, Object eventToSkip) {
|
protected boolean canSkipHandlingEvent(Object newEvent, Object eventToSkip) {
|
||||||
// Never skip the process lifecycle events.
|
// Never skip the process lifecycle events.
|
||||||
if (eventToSkip instanceof InferiorExitedDMEvent ||
|
if (eventToSkip instanceof ICommandControlInitializedDMEvent ||
|
||||||
eventToSkip instanceof InferiorStartedDMEvent ||
|
|
||||||
eventToSkip instanceof ICommandControlInitializedDMEvent ||
|
|
||||||
eventToSkip instanceof ICommandControlShutdownDMEvent)
|
eventToSkip instanceof ICommandControlShutdownDMEvent)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -34,6 +34,7 @@ import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
||||||
import org.eclipse.dd.dsf.concurrent.Sequence;
|
import org.eclipse.dd.dsf.concurrent.Sequence;
|
||||||
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
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.debug.service.ISourceLookup.ISourceLookupDMContext;
|
||||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
||||||
|
@ -44,6 +45,7 @@ import org.eclipse.dd.gdb.internal.provisional.service.command.IGDBControl;
|
||||||
import org.eclipse.dd.mi.service.CSourceLookup;
|
import org.eclipse.dd.mi.service.CSourceLookup;
|
||||||
import org.eclipse.dd.mi.service.IMIProcesses;
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
import org.eclipse.dd.mi.service.MIBreakpointsManager;
|
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.CLISource;
|
||||||
import org.eclipse.dd.mi.service.command.commands.MIEnvironmentCD;
|
import org.eclipse.dd.mi.service.command.commands.MIEnvironmentCD;
|
||||||
import org.eclipse.dd.mi.service.command.commands.MIFileExecAndSymbols;
|
import org.eclipse.dd.mi.service.command.commands.MIFileExecAndSymbols;
|
||||||
|
@ -350,10 +352,11 @@ public class FinalLaunchSequence extends Sequence {
|
||||||
new Step() { @Override
|
new Step() { @Override
|
||||||
public void execute(RequestMonitor requestMonitor) {
|
public void execute(RequestMonitor requestMonitor) {
|
||||||
CSourceLookup sourceLookup = fTracker.getService(CSourceLookup.class);
|
CSourceLookup sourceLookup = fTracker.getService(CSourceLookup.class);
|
||||||
|
|
||||||
CSourceLookupDirector locator = (CSourceLookupDirector)fLaunch.getSourceLocator();
|
CSourceLookupDirector locator = (CSourceLookupDirector)fLaunch.getSourceLocator();
|
||||||
sourceLookup.setSourceLookupPath((ISourceLookupDMContext)fCommandControl.getContext(),
|
IProcessDMContext procDmc = fProcService.createProcessContext(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
locator.getSourceContainers(), requestMonitor);
|
ISourceLookupDMContext sourceLookupDmc = (ISourceLookupDMContext) fProcService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
|
||||||
|
sourceLookup.setSourceLookupPath(sourceLookupDmc, locator.getSourceContainers(), requestMonitor);
|
||||||
}},
|
}},
|
||||||
/*
|
/*
|
||||||
* If remote debugging, connect to target.
|
* If remote debugging, connect to target.
|
||||||
|
@ -478,7 +481,10 @@ public class FinalLaunchSequence extends Sequence {
|
||||||
new Step() { @Override
|
new Step() { @Override
|
||||||
public void execute(final RequestMonitor requestMonitor) {
|
public void execute(final RequestMonitor requestMonitor) {
|
||||||
MIBreakpointsManager bpmService = fTracker.getService(MIBreakpointsManager.class);
|
MIBreakpointsManager bpmService = fTracker.getService(MIBreakpointsManager.class);
|
||||||
bpmService.startTrackingBreakpoints((IBreakpointsTargetDMContext)fCommandControl.getContext(), requestMonitor);
|
IProcessDMContext procDmc = fProcService.createProcessContext(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext) fProcService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
|
||||||
|
bpmService.startTrackingBreakpoints(breakpointDmc, requestMonitor);
|
||||||
}},
|
}},
|
||||||
/*
|
/*
|
||||||
* Start the program.
|
* Start the program.
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.eclipse.dd.dsf.concurrent.ThreadSafeAndProhibitedFromDsfExecutor;
|
||||||
import org.eclipse.dd.dsf.debug.model.DsfMemoryBlockRetrieval;
|
import org.eclipse.dd.dsf.debug.model.DsfMemoryBlockRetrieval;
|
||||||
import org.eclipse.dd.dsf.debug.service.IDsfDebugServicesFactory;
|
import org.eclipse.dd.dsf.debug.service.IDsfDebugServicesFactory;
|
||||||
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryDMContext;
|
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryDMContext;
|
||||||
|
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
|
||||||
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
||||||
|
@ -39,6 +40,8 @@ import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.IGDBControl;
|
import org.eclipse.dd.gdb.internal.provisional.service.command.IGDBControl;
|
||||||
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses;
|
||||||
import org.eclipse.dd.mi.service.command.AbstractCLIProcess;
|
import org.eclipse.dd.mi.service.command.AbstractCLIProcess;
|
||||||
import org.eclipse.dd.mi.service.command.MIInferiorProcess;
|
import org.eclipse.dd.mi.service.command.MIInferiorProcess;
|
||||||
import org.eclipse.debug.core.DebugException;
|
import org.eclipse.debug.core.DebugException;
|
||||||
|
@ -109,12 +112,16 @@ public class GdbLaunch extends Launch
|
||||||
try {
|
try {
|
||||||
fExecutor.submit( new Callable<Object>() {
|
fExecutor.submit( new Callable<Object>() {
|
||||||
public Object call() throws CoreException {
|
public Object call() throws CoreException {
|
||||||
ICommandControlService gdbControl = fTracker.getService(ICommandControlService.class);
|
ICommandControlService commandControl = fTracker.getService(ICommandControlService.class);
|
||||||
if (gdbControl != null) {
|
IMIProcesses procService = fTracker.getService(IMIProcesses.class);
|
||||||
|
if (commandControl != null && procService != null) {
|
||||||
fMemRetrieval = new DsfMemoryBlockRetrieval(
|
fMemRetrieval = new DsfMemoryBlockRetrieval(
|
||||||
GdbLaunchDelegate.GDB_DEBUG_MODEL_ID, getLaunchConfiguration(), fSession);
|
GdbLaunchDelegate.GDB_DEBUG_MODEL_ID, getLaunchConfiguration(), fSession);
|
||||||
fSession.registerModelAdapter(IMemoryBlockRetrieval.class, fMemRetrieval);
|
fSession.registerModelAdapter(IMemoryBlockRetrieval.class, fMemRetrieval);
|
||||||
fMemRetrieval.initialize((IMemoryDMContext) gdbControl.getContext());
|
|
||||||
|
IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
IMemoryDMContext memoryDmc = (IMemoryDMContext)procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fMemRetrieval.initialize(memoryDmc);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,14 @@ import org.eclipse.dd.dsf.debug.service.IRegisters;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
||||||
import org.eclipse.dd.dsf.debug.service.ISourceLookup;
|
import org.eclipse.dd.dsf.debug.service.ISourceLookup;
|
||||||
import org.eclipse.dd.dsf.debug.service.IStack;
|
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.ISourceLookup.ISourceLookupDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.mi.service.CSourceLookup;
|
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.MIBreakpointsManager;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses;
|
||||||
|
|
||||||
public class ServicesLaunchSequence extends Sequence {
|
public class ServicesLaunchSequence extends Sequence {
|
||||||
|
|
||||||
|
@ -45,7 +48,8 @@ public class ServicesLaunchSequence extends Sequence {
|
||||||
},
|
},
|
||||||
new Step() { @Override
|
new Step() { @Override
|
||||||
public void execute(RequestMonitor requestMonitor) {
|
public void execute(RequestMonitor requestMonitor) {
|
||||||
fLaunch.getServiceFactory().createService(IProcesses.class, fSession).initialize(requestMonitor);
|
fProcService = (IMIProcesses)fLaunch.getServiceFactory().createService(IProcesses.class, fSession);
|
||||||
|
fProcService.initialize(requestMonitor);
|
||||||
}},
|
}},
|
||||||
new Step() { @Override
|
new Step() { @Override
|
||||||
public void execute(RequestMonitor requestMonitor) {
|
public void execute(RequestMonitor requestMonitor) {
|
||||||
|
@ -74,7 +78,9 @@ public class ServicesLaunchSequence extends Sequence {
|
||||||
}},
|
}},
|
||||||
new Step() { @Override
|
new Step() { @Override
|
||||||
public void execute(RequestMonitor requestMonitor) {
|
public void execute(RequestMonitor requestMonitor) {
|
||||||
fSourceLookup.setSourceLookupDirector((ISourceLookupDMContext)fCommandControl.getContext(), (CSourceLookupDirector)fLaunch.getSourceLocator());
|
IProcessDMContext procDmc = fProcService.createProcessContext(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
ISourceLookupDMContext sourceLookupDmc = (ISourceLookupDMContext)fProcService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fSourceLookup.setSourceLookupDirector(sourceLookupDmc, (CSourceLookupDirector)fLaunch.getSourceLocator());
|
||||||
requestMonitor.done();
|
requestMonitor.done();
|
||||||
}},
|
}},
|
||||||
new Step() { @Override
|
new Step() { @Override
|
||||||
|
@ -102,6 +108,7 @@ public class ServicesLaunchSequence extends Sequence {
|
||||||
GdbLaunch fLaunch;
|
GdbLaunch fLaunch;
|
||||||
|
|
||||||
ICommandControlService fCommandControl;
|
ICommandControlService fCommandControl;
|
||||||
|
IMIProcesses fProcService;
|
||||||
CSourceLookup fSourceLookup;
|
CSourceLookup fSourceLookup;
|
||||||
|
|
||||||
public ServicesLaunchSequence(DsfSession session, GdbLaunch launch) {
|
public ServicesLaunchSequence(DsfSession session, GdbLaunch launch) {
|
||||||
|
|
|
@ -25,7 +25,14 @@ import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
||||||
import org.eclipse.dd.dsf.datamodel.DMContexts;
|
import org.eclipse.dd.dsf.datamodel.DMContexts;
|
||||||
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IProcesses;
|
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.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.debug.service.command.ICommandControlService.ICommandControlDMContext;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
||||||
|
@ -42,6 +49,15 @@ import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
public class GDBProcesses extends MIProcesses {
|
public class GDBProcesses extends MIProcesses {
|
||||||
|
|
||||||
|
private class GDBContainerDMC extends MIContainerDMC
|
||||||
|
implements ISymbolDMContext, IMemoryDMContext, IBreakpointsTargetDMContext, ISourceLookupDMContext,
|
||||||
|
ISignalsDMContext, IDisassemblyDMContext
|
||||||
|
{
|
||||||
|
public GDBContainerDMC(String sessionId, IProcessDMContext processDmc, String groupId) {
|
||||||
|
super(sessionId, processDmc, groupId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private IGDBControl fGdb;
|
private IGDBControl fGdb;
|
||||||
|
|
||||||
// A map of pid to names. It is filled when we get all the
|
// A map of pid to names. It is filled when we get all the
|
||||||
|
@ -81,6 +97,11 @@ public class GDBProcesses extends MIProcesses {
|
||||||
GDBProcesses.class.getName() },
|
GDBProcesses.class.getName() },
|
||||||
new Hashtable<String, String>());
|
new Hashtable<String, String>());
|
||||||
|
|
||||||
|
ICommandControlService commandControl = getServicesTracker().getService(ICommandControlService.class);
|
||||||
|
IProcessDMContext procDmc = createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
IContainerDMContext containerDmc = createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fGdb.getInferiorProcess().setContainerContext(containerDmc);
|
||||||
|
|
||||||
requestMonitor.done();
|
requestMonitor.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,6 +119,12 @@ public class GDBProcesses extends MIProcesses {
|
||||||
return GdbPlugin.getBundleContext();
|
return GdbPlugin.getBundleContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IMIContainerDMContext createContainerContext(IProcessDMContext processDmc,
|
||||||
|
String groupId) {
|
||||||
|
return new GDBContainerDMC(getSession().getId(), processDmc, groupId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getExecutionData(IThreadDMContext dmc, DataRequestMonitor<IThreadDMData> rm) {
|
public void getExecutionData(IThreadDMContext dmc, DataRequestMonitor<IThreadDMData> rm) {
|
||||||
if (dmc instanceof IMIProcessDMContext) {
|
if (dmc instanceof IMIProcessDMContext) {
|
||||||
|
|
|
@ -25,6 +25,10 @@ import org.eclipse.dd.dsf.datamodel.DMContexts;
|
||||||
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.ICachingService;
|
import org.eclipse.dd.dsf.debug.service.ICachingService;
|
||||||
import org.eclipse.dd.dsf.debug.service.IProcesses;
|
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.IContainerDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerResumedDMEvent;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerResumedDMEvent;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerSuspendedDMEvent;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerSuspendedDMEvent;
|
||||||
|
@ -33,6 +37,8 @@ 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.IResumedDMEvent;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IStartedDMEvent;
|
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.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.CommandCache;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
|
||||||
import org.eclipse.dd.dsf.service.AbstractDsfService;
|
import org.eclipse.dd.dsf.service.AbstractDsfService;
|
||||||
|
@ -185,6 +191,15 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IMIProcesses
|
||||||
public int hashCode() { return super.baseHashCode() ^ (fId == null ? 0 : fId.hashCode()); }
|
public int hashCode() { return super.baseHashCode() ^ (fId == null ? 0 : fId.hashCode()); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class GDBContainerDMC extends MIContainerDMC
|
||||||
|
implements ISymbolDMContext, IMemoryDMContext, IBreakpointsTargetDMContext, ISourceLookupDMContext,
|
||||||
|
ISignalsDMContext, IDisassemblyDMContext
|
||||||
|
{
|
||||||
|
public GDBContainerDMC(String sessionId, IProcessDMContext processDmc, String groupId) {
|
||||||
|
super(sessionId, processDmc, groupId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context representing a thread.
|
* Context representing a thread.
|
||||||
*/
|
*/
|
||||||
|
@ -297,7 +312,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IMIProcesses
|
||||||
public static class ContainerStartedDMEvent extends AbstractDMEvent<IExecutionDMContext>
|
public static class ContainerStartedDMEvent extends AbstractDMEvent<IExecutionDMContext>
|
||||||
implements IStartedDMEvent
|
implements IStartedDMEvent
|
||||||
{
|
{
|
||||||
public ContainerStartedDMEvent(IMIContainerDMContext context) {
|
public ContainerStartedDMEvent(IContainerDMContext context) {
|
||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -413,7 +428,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IMIProcesses
|
||||||
|
|
||||||
public IMIContainerDMContext createContainerContext(IProcessDMContext processDmc,
|
public IMIContainerDMContext createContainerContext(IProcessDMContext processDmc,
|
||||||
String groupId) {
|
String groupId) {
|
||||||
return new MIContainerDMC(getSession().getId(), processDmc, groupId);
|
return new GDBContainerDMC(getSession().getId(), processDmc, groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -39,21 +39,27 @@ import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants;
|
||||||
import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
||||||
import org.eclipse.dd.dsf.concurrent.Sequence;
|
import org.eclipse.dd.dsf.concurrent.Sequence;
|
||||||
import org.eclipse.dd.dsf.datamodel.AbstractDMEvent;
|
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;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControl;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
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.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.launching.GdbLaunch;
|
import org.eclipse.dd.gdb.internal.provisional.launching.GdbLaunch;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.launching.LaunchUtils;
|
import org.eclipse.dd.gdb.internal.provisional.launching.LaunchUtils;
|
||||||
|
import org.eclipse.dd.gdb.internal.provisional.service.GDBProcesses;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.SessionType;
|
import org.eclipse.dd.gdb.internal.provisional.service.SessionType;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses.ContainerStartedDMEvent;
|
||||||
import org.eclipse.dd.mi.service.command.AbstractCLIProcess;
|
import org.eclipse.dd.mi.service.command.AbstractCLIProcess;
|
||||||
import org.eclipse.dd.mi.service.command.AbstractMIControl;
|
import org.eclipse.dd.mi.service.command.AbstractMIControl;
|
||||||
import org.eclipse.dd.mi.service.command.CLIEventProcessor;
|
import org.eclipse.dd.mi.service.command.CLIEventProcessor;
|
||||||
import org.eclipse.dd.mi.service.command.MIControlDMContext;
|
import org.eclipse.dd.mi.service.command.MIControlDMContext;
|
||||||
import org.eclipse.dd.mi.service.command.MIInferiorProcess;
|
import org.eclipse.dd.mi.service.command.MIInferiorProcess;
|
||||||
import org.eclipse.dd.mi.service.command.MIRunControlEventProcessor;
|
import org.eclipse.dd.mi.service.command.MIRunControlEventProcessor;
|
||||||
import org.eclipse.dd.mi.service.command.MIInferiorProcess.InferiorStartedDMEvent;
|
|
||||||
import org.eclipse.dd.mi.service.command.commands.MIBreakInsert;
|
import org.eclipse.dd.mi.service.command.commands.MIBreakInsert;
|
||||||
import org.eclipse.dd.mi.service.command.commands.MICommand;
|
import org.eclipse.dd.mi.service.command.commands.MICommand;
|
||||||
import org.eclipse.dd.mi.service.command.commands.MIExecContinue;
|
import org.eclipse.dd.mi.service.command.commands.MIExecContinue;
|
||||||
|
@ -98,7 +104,7 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int fgInstanceCounter = 0;
|
private static int fgInstanceCounter = 0;
|
||||||
private final GDBControlDMContext fControlDmc;
|
private final MIControlDMContext fControlDmc;
|
||||||
|
|
||||||
private SessionType fSessionType;
|
private SessionType fSessionType;
|
||||||
|
|
||||||
|
@ -130,7 +136,7 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
fExecPath = new Path(""); //$NON-NLS-1$
|
fExecPath = new Path(""); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
fControlDmc = new GDBControlDMContext(session.getId(), getId());
|
fControlDmc = new MIControlDMContext(session.getId(), getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -190,13 +196,6 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
||||||
return fControlDmc;
|
return fControlDmc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* More strongly typed version of {@link #getControlDMContext()}.
|
|
||||||
*/
|
|
||||||
public GDBControlDMContext getGDBDMContext() {
|
|
||||||
return (GDBControlDMContext) getControlDMContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SessionType getSessionType() {
|
public SessionType getSessionType() {
|
||||||
return fSessionType;
|
return fSessionType;
|
||||||
}
|
}
|
||||||
|
@ -336,12 +335,18 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DsfServicesTracker servicesTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), getSession().getId());
|
||||||
|
GDBProcesses procService = servicesTracker.getService(GDBProcesses.class);
|
||||||
|
servicesTracker.dispose();
|
||||||
|
IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
final IContainerDMContext containerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
|
||||||
final MICommand<MIInfo> execCommand;
|
final MICommand<MIInfo> execCommand;
|
||||||
if (fSessionType == SessionType.REMOTE) {
|
if (fSessionType == SessionType.REMOTE) {
|
||||||
// When doing remote debugging, we use -exec-continue instead of -exec-run
|
// When doing remote debugging, we use -exec-continue instead of -exec-run
|
||||||
execCommand = new MIExecContinue(fControlDmc);
|
execCommand = new MIExecContinue(containerDmc);
|
||||||
} else {
|
} else {
|
||||||
execCommand = new MIExecRun(fControlDmc, new String[0]);
|
execCommand = new MIExecRun(containerDmc, new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean stopInMain = false;
|
boolean stopInMain = false;
|
||||||
|
@ -356,7 +361,7 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
||||||
final DataRequestMonitor<MIInfo> execMonitor = new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
|
final DataRequestMonitor<MIInfo> execMonitor = new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
getSession().dispatchEvent(new InferiorStartedDMEvent(getGDBDMContext()), getProperties());
|
getSession().dispatchEvent(new ContainerStartedDMEvent(containerDmc), getProperties());
|
||||||
super.handleSuccess();
|
super.handleSuccess();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -374,9 +379,11 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext)containerDmc;
|
||||||
|
|
||||||
// Insert a breakpoint at the requested stop symbol.
|
// Insert a breakpoint at the requested stop symbol.
|
||||||
queueCommand(
|
queueCommand(
|
||||||
new MIBreakInsert(fControlDmc, true, false, null, 0, stopSymbol, 0),
|
new MIBreakInsert(breakpointDmc, true, false, null, 0, stopSymbol, 0),
|
||||||
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) {
|
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
|
@ -733,7 +740,7 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
|
||||||
AbstractMIControl.class.getName(),
|
AbstractMIControl.class.getName(),
|
||||||
IGDBControl.class.getName() },
|
IGDBControl.class.getName() },
|
||||||
new Hashtable<String,String>());
|
new Hashtable<String,String>());
|
||||||
getSession().dispatchEvent(new GDBControlInitializedDMEvent(getGDBDMContext()), getProperties());
|
getSession().dispatchEvent(new GDBControlInitializedDMEvent(fControlDmc), getProperties());
|
||||||
requestMonitor.done();
|
requestMonitor.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,25 +10,11 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.dd.gdb.internal.provisional.service.command;
|
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.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.mi.service.command.MIControlDMContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* To be removed
|
||||||
*/
|
*/
|
||||||
public class GDBControlDMContext extends MIControlDMContext
|
public class GDBControlDMContext
|
||||||
implements IContainerDMContext, ISymbolDMContext, IMemoryDMContext, IBreakpointsTargetDMContext, ISourceLookupDMContext,
|
|
||||||
ISignalsDMContext, IDisassemblyDMContext
|
|
||||||
{
|
{
|
||||||
|
public GDBControlDMContext(String sessionId, String commandControlId) {}
|
||||||
public GDBControlDMContext(String sessionId, String commandControlId) {
|
|
||||||
super(sessionId, commandControlId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,21 +40,26 @@ import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants;
|
||||||
import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
import org.eclipse.dd.dsf.concurrent.RequestMonitor;
|
||||||
import org.eclipse.dd.dsf.concurrent.Sequence;
|
import org.eclipse.dd.dsf.concurrent.Sequence;
|
||||||
import org.eclipse.dd.dsf.datamodel.AbstractDMEvent;
|
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;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControl;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
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.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
import org.eclipse.dd.gdb.internal.GdbPlugin;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.launching.GdbLaunch;
|
import org.eclipse.dd.gdb.internal.provisional.launching.GdbLaunch;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.launching.LaunchUtils;
|
import org.eclipse.dd.gdb.internal.provisional.launching.LaunchUtils;
|
||||||
|
import org.eclipse.dd.gdb.internal.provisional.service.GDBProcesses;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.SessionType;
|
import org.eclipse.dd.gdb.internal.provisional.service.SessionType;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses;
|
||||||
import org.eclipse.dd.mi.service.command.AbstractCLIProcess;
|
import org.eclipse.dd.mi.service.command.AbstractCLIProcess;
|
||||||
import org.eclipse.dd.mi.service.command.AbstractMIControl;
|
import org.eclipse.dd.mi.service.command.AbstractMIControl;
|
||||||
import org.eclipse.dd.mi.service.command.CLIEventProcessor_7_0;
|
import org.eclipse.dd.mi.service.command.CLIEventProcessor_7_0;
|
||||||
import org.eclipse.dd.mi.service.command.MIControlDMContext;
|
import org.eclipse.dd.mi.service.command.MIControlDMContext;
|
||||||
import org.eclipse.dd.mi.service.command.MIInferiorProcess;
|
import org.eclipse.dd.mi.service.command.MIInferiorProcess;
|
||||||
import org.eclipse.dd.mi.service.command.MIRunControlEventProcessor_7_0;
|
import org.eclipse.dd.mi.service.command.MIRunControlEventProcessor_7_0;
|
||||||
import org.eclipse.dd.mi.service.command.MIInferiorProcess.InferiorStartedDMEvent;
|
|
||||||
import org.eclipse.dd.mi.service.command.commands.MIBreakInsert;
|
import org.eclipse.dd.mi.service.command.commands.MIBreakInsert;
|
||||||
import org.eclipse.dd.mi.service.command.commands.MICommand;
|
import org.eclipse.dd.mi.service.command.commands.MICommand;
|
||||||
import org.eclipse.dd.mi.service.command.commands.MIExecContinue;
|
import org.eclipse.dd.mi.service.command.commands.MIExecContinue;
|
||||||
|
@ -99,7 +104,7 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int fgInstanceCounter = 0;
|
private static int fgInstanceCounter = 0;
|
||||||
private final GDBControlDMContext fControlDmc;
|
private final MIControlDMContext fControlDmc;
|
||||||
|
|
||||||
private SessionType fSessionType;
|
private SessionType fSessionType;
|
||||||
|
|
||||||
|
@ -131,7 +136,7 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
fExecPath = new Path(""); //$NON-NLS-1$
|
fExecPath = new Path(""); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
fControlDmc = new GDBControlDMContext(session.getId(), getId());
|
fControlDmc = new MIControlDMContext(session.getId(), getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -191,13 +196,6 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
||||||
return fControlDmc;
|
return fControlDmc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* More strongly typed version of {@link #getControlDMContext()}.
|
|
||||||
*/
|
|
||||||
public GDBControlDMContext getGDBDMContext() {
|
|
||||||
return (GDBControlDMContext) getControlDMContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
public SessionType getSessionType() {
|
public SessionType getSessionType() {
|
||||||
return fSessionType;
|
return fSessionType;
|
||||||
}
|
}
|
||||||
|
@ -337,12 +335,18 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DsfServicesTracker servicesTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), getSession().getId());
|
||||||
|
GDBProcesses procService = servicesTracker.getService(GDBProcesses.class);
|
||||||
|
servicesTracker.dispose();
|
||||||
|
IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
final IContainerDMContext containerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
|
||||||
final MICommand<MIInfo> execCommand;
|
final MICommand<MIInfo> execCommand;
|
||||||
if (fSessionType == SessionType.REMOTE) {
|
if (fSessionType == SessionType.REMOTE) {
|
||||||
// When doing remote debugging, we use -exec-continue instead of -exec-run
|
// When doing remote debugging, we use -exec-continue instead of -exec-run
|
||||||
execCommand = new MIExecContinue(fControlDmc);
|
execCommand = new MIExecContinue(containerDmc);
|
||||||
} else {
|
} else {
|
||||||
execCommand = new MIExecRun(fControlDmc, new String[0]);
|
execCommand = new MIExecRun(containerDmc, new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean stopInMain = false;
|
boolean stopInMain = false;
|
||||||
|
@ -354,13 +358,7 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final DataRequestMonitor<MIInfo> execMonitor = new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
|
final DataRequestMonitor<MIInfo> execMonitor = new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor);
|
||||||
@Override
|
|
||||||
protected void handleSuccess() {
|
|
||||||
getSession().dispatchEvent(new InferiorStartedDMEvent(getGDBDMContext()), getProperties());
|
|
||||||
super.handleSuccess();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!stopInMain) {
|
if (!stopInMain) {
|
||||||
// Just start the program.
|
// Just start the program.
|
||||||
|
@ -375,9 +373,11 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final IBreakpointsTargetDMContext breakpointDmc = (IBreakpointsTargetDMContext)containerDmc;
|
||||||
|
|
||||||
// Insert a breakpoint at the requested stop symbol.
|
// Insert a breakpoint at the requested stop symbol.
|
||||||
queueCommand(
|
queueCommand(
|
||||||
new MIBreakInsert(fControlDmc, true, false, null, 0, stopSymbol, 0),
|
new MIBreakInsert(breakpointDmc, true, false, null, 0, stopSymbol, 0),
|
||||||
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) {
|
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
|
@ -734,7 +734,7 @@ public class GDBControl_7_0 extends AbstractMIControl implements IGDBControl {
|
||||||
AbstractMIControl.class.getName(),
|
AbstractMIControl.class.getName(),
|
||||||
IGDBControl.class.getName() },
|
IGDBControl.class.getName() },
|
||||||
new Hashtable<String,String>());
|
new Hashtable<String,String>());
|
||||||
getSession().dispatchEvent(new GDBControlInitializedDMEvent(getGDBDMContext()), getProperties());
|
getSession().dispatchEvent(new GDBControlInitializedDMEvent(fControlDmc), getProperties());
|
||||||
requestMonitor.done();
|
requestMonitor.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ import java.util.concurrent.RejectedExecutionException;
|
||||||
import org.eclipse.cdt.utils.pty.PTY;
|
import org.eclipse.cdt.utils.pty.PTY;
|
||||||
import org.eclipse.dd.dsf.concurrent.DsfRunnable;
|
import org.eclipse.dd.dsf.concurrent.DsfRunnable;
|
||||||
import org.eclipse.dd.dsf.concurrent.ThreadSafeAndProhibitedFromDsfExecutor;
|
import org.eclipse.dd.dsf.concurrent.ThreadSafeAndProhibitedFromDsfExecutor;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext;
|
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.mi.service.command.MIInferiorProcess;
|
import org.eclipse.dd.mi.service.command.MIInferiorProcess;
|
||||||
|
|
||||||
|
@ -28,11 +27,11 @@ class GDBInferiorProcess extends MIInferiorProcess {
|
||||||
|
|
||||||
|
|
||||||
public GDBInferiorProcess(ICommandControlService commandControl, PTY p) {
|
public GDBInferiorProcess(ICommandControlService commandControl, PTY p) {
|
||||||
super(commandControl, (IExecutionDMContext)commandControl.getContext(), p);
|
super(commandControl, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GDBInferiorProcess(ICommandControlService commandControl, OutputStream gdbOutputStream) {
|
public GDBInferiorProcess(ICommandControlService commandControl, OutputStream gdbOutputStream) {
|
||||||
super(commandControl, (IExecutionDMContext)commandControl.getContext(), gdbOutputStream);
|
super(commandControl, gdbOutputStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
* Context representing a thread group of GDB/MI.
|
* Context representing a thread group of GDB/MI.
|
||||||
*/
|
*/
|
||||||
@Immutable
|
@Immutable
|
||||||
private static class MIContainerDMC extends AbstractDMContext
|
protected static class MIContainerDMC extends AbstractDMContext
|
||||||
implements IMIContainerDMContext
|
implements IMIContainerDMContext
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -283,7 +283,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
public static class ContainerStartedDMEvent extends AbstractDMEvent<IExecutionDMContext>
|
public static class ContainerStartedDMEvent extends AbstractDMEvent<IExecutionDMContext>
|
||||||
implements IStartedDMEvent
|
implements IStartedDMEvent
|
||||||
{
|
{
|
||||||
public ContainerStartedDMEvent(IMIContainerDMContext context) {
|
public ContainerStartedDMEvent(IContainerDMContext context) {
|
||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants;
|
||||||
import org.eclipse.dd.dsf.concurrent.ImmediateExecutor;
|
import org.eclipse.dd.dsf.concurrent.ImmediateExecutor;
|
||||||
import org.eclipse.dd.dsf.concurrent.Query;
|
import org.eclipse.dd.dsf.concurrent.Query;
|
||||||
import org.eclipse.dd.dsf.datamodel.AbstractDMEvent;
|
import org.eclipse.dd.dsf.datamodel.AbstractDMEvent;
|
||||||
|
import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IExitedDMEvent;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.IExitedDMEvent;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IStartedDMEvent;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.IStartedDMEvent;
|
||||||
|
@ -43,6 +44,7 @@ import org.eclipse.dd.dsf.debug.service.command.ICommandToken;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.IEventListener;
|
import org.eclipse.dd.dsf.debug.service.command.IEventListener;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.mi.internal.MIPlugin;
|
import org.eclipse.dd.mi.internal.MIPlugin;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses.ContainerExitedDMEvent;
|
||||||
import org.eclipse.dd.mi.service.command.commands.CLICommand;
|
import org.eclipse.dd.mi.service.command.commands.CLICommand;
|
||||||
import org.eclipse.dd.mi.service.command.commands.CLIExecAbort;
|
import org.eclipse.dd.mi.service.command.commands.CLIExecAbort;
|
||||||
import org.eclipse.dd.mi.service.command.commands.MIGDBShowExitCode;
|
import org.eclipse.dd.mi.service.command.commands.MIGDBShowExitCode;
|
||||||
|
@ -70,8 +72,10 @@ public class MIInferiorProcess extends Process
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event indicating that the GDB inferior process has started. This event
|
* Event indicating that the GDB inferior process has started. This event
|
||||||
* implements the {@link IStartedMDEvent} from the IRunControl service.
|
* implements the {@link IStartedDMEvent} from the IRunControl service.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static class InferiorStartedDMEvent extends AbstractDMEvent<IExecutionDMContext>
|
public static class InferiorStartedDMEvent extends AbstractDMEvent<IExecutionDMContext>
|
||||||
implements IStartedDMEvent
|
implements IStartedDMEvent
|
||||||
{
|
{
|
||||||
|
@ -82,8 +86,10 @@ public class MIInferiorProcess extends Process
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event indicating that the GDB inferior process has exited. This event
|
* Event indicating that the GDB inferior process has exited. This event
|
||||||
* implements the {@link IExitedMDEvent} from the IRunControl service.
|
* implements the {@link IExitedDMEvent} from the IRunControl service.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static class InferiorExitedDMEvent extends AbstractDMEvent<IExecutionDMContext>
|
public static class InferiorExitedDMEvent extends AbstractDMEvent<IExecutionDMContext>
|
||||||
implements IExitedDMEvent
|
implements IExitedDMEvent
|
||||||
{
|
{
|
||||||
|
@ -107,7 +113,7 @@ public class MIInferiorProcess extends Process
|
||||||
|
|
||||||
private final ICommandControlService fCommandControl;
|
private final ICommandControlService fCommandControl;
|
||||||
|
|
||||||
private final IExecutionDMContext fExecutionDMContext;
|
private IContainerDMContext fContainerDMContext;
|
||||||
|
|
||||||
@ConfinedToDsfExecutor("fSession#getExecutor")
|
@ConfinedToDsfExecutor("fSession#getExecutor")
|
||||||
private boolean fDisposed = false;
|
private boolean fDisposed = false;
|
||||||
|
@ -143,13 +149,13 @@ public class MIInferiorProcess extends Process
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
@ConfinedToDsfExecutor("fSession#getExecutor")
|
@ConfinedToDsfExecutor("fSession#getExecutor")
|
||||||
public MIInferiorProcess(ICommandControlService commandControl, IExecutionDMContext inferiorExecCtx, OutputStream gdbOutputStream) {
|
public MIInferiorProcess(ICommandControlService commandControl, OutputStream gdbOutputStream) {
|
||||||
this(commandControl, inferiorExecCtx, gdbOutputStream, null);
|
this(commandControl, gdbOutputStream, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MIInferiorProcess(AbstractMIControl commandControl, IExecutionDMContext inferiorExecCtx, OutputStream gdbOutputStream) {
|
public MIInferiorProcess(AbstractMIControl commandControl, IExecutionDMContext inferiorExecCtx, OutputStream gdbOutputStream) {
|
||||||
this(commandControl, inferiorExecCtx, gdbOutputStream, null);
|
this(commandControl, gdbOutputStream, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -159,7 +165,7 @@ public class MIInferiorProcess extends Process
|
||||||
@ConfinedToDsfExecutor("fSession#getExecutor")
|
@ConfinedToDsfExecutor("fSession#getExecutor")
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MIInferiorProcess(AbstractMIControl commandControl, OutputStream gdbOutputStream) {
|
public MIInferiorProcess(AbstractMIControl commandControl, OutputStream gdbOutputStream) {
|
||||||
this(commandControl, null, gdbOutputStream, null);
|
this(commandControl, gdbOutputStream, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -173,13 +179,13 @@ public class MIInferiorProcess extends Process
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
@ConfinedToDsfExecutor("fSession#getExecutor")
|
@ConfinedToDsfExecutor("fSession#getExecutor")
|
||||||
public MIInferiorProcess(ICommandControlService commandControl, IExecutionDMContext inferiorExecCtx, PTY p) {
|
public MIInferiorProcess(ICommandControlService commandControl, PTY p) {
|
||||||
this(commandControl, inferiorExecCtx, null, p);
|
this(commandControl, null, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MIInferiorProcess(AbstractMIControl commandControl, IExecutionDMContext inferiorExecCtx, PTY p) {
|
public MIInferiorProcess(AbstractMIControl commandControl, IExecutionDMContext inferiorExecCtx, PTY p) {
|
||||||
this(commandControl, inferiorExecCtx, null, p);
|
this(commandControl, (OutputStream)null, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -189,14 +195,13 @@ public class MIInferiorProcess extends Process
|
||||||
@ConfinedToDsfExecutor("fSession#getExecutor")
|
@ConfinedToDsfExecutor("fSession#getExecutor")
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MIInferiorProcess(AbstractMIControl commandControl, PTY p) {
|
public MIInferiorProcess(AbstractMIControl commandControl, PTY p) {
|
||||||
this(commandControl, null, null, p);
|
this(commandControl, (OutputStream)null, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfinedToDsfExecutor("fSession#getExecutor")
|
@ConfinedToDsfExecutor("fSession#getExecutor")
|
||||||
private MIInferiorProcess(ICommandControlService commandControl, IExecutionDMContext execCtx, final OutputStream gdbOutputStream, PTY p) {
|
private MIInferiorProcess(ICommandControlService commandControl, final OutputStream gdbOutputStream, PTY p) {
|
||||||
fCommandControl = commandControl;
|
fCommandControl = commandControl;
|
||||||
fSession = commandControl.getSession();
|
fSession = commandControl.getSession();
|
||||||
fExecutionDMContext = execCtx;
|
|
||||||
|
|
||||||
commandControl.addEventListener(this);
|
commandControl.addEventListener(this);
|
||||||
commandControl.addCommandListener(this);
|
commandControl.addCommandListener(this);
|
||||||
|
@ -413,16 +418,24 @@ public class MIInferiorProcess extends Process
|
||||||
}
|
}
|
||||||
|
|
||||||
public IExecutionDMContext getExecutionContext() {
|
public IExecutionDMContext getExecutionContext() {
|
||||||
return fExecutionDMContext;
|
return fContainerDMContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 1.1
|
||||||
|
*/
|
||||||
|
public void setContainerContext(IContainerDMContext containerDmc) {
|
||||||
|
fContainerDMContext = containerDmc;
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized void setState(State state) {
|
synchronized void setState(State state) {
|
||||||
if (fState == State.TERMINATED) return;
|
if (fState == State.TERMINATED) return;
|
||||||
fState = state;
|
fState = state;
|
||||||
if (fState == State.TERMINATED) {
|
if (fState == State.TERMINATED) {
|
||||||
if (fExecutionDMContext != null) {
|
if (fContainerDMContext != null) {
|
||||||
|
// This may not be necessary in 7.0 because of the =thread-group-exited event
|
||||||
getSession().dispatchEvent(
|
getSession().dispatchEvent(
|
||||||
new InferiorExitedDMEvent(fExecutionDMContext),
|
new ContainerExitedDMEvent(fContainerDMContext),
|
||||||
getCommandControlService().getProperties());
|
getCommandControlService().getProperties());
|
||||||
}
|
}
|
||||||
closeIO();
|
closeIO();
|
||||||
|
|
|
@ -86,14 +86,21 @@ public class MIRunControlEventProcessor
|
||||||
* control.
|
* control.
|
||||||
* @param connection
|
* @param connection
|
||||||
* @param inferior
|
* @param inferior
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
public MIRunControlEventProcessor(AbstractMIControl connection, IContainerDMContext containerDmc) {
|
public MIRunControlEventProcessor(AbstractMIControl connection, ICommandControlDMContext controlDmc) {
|
||||||
fCommandControl = connection;
|
fCommandControl = connection;
|
||||||
fControlDmc = DMContexts.getAncestorOfType(containerDmc, ICommandControlDMContext.class);
|
fControlDmc = controlDmc;
|
||||||
fServicesTracker = new DsfServicesTracker(MIPlugin.getBundleContext(), fCommandControl.getSession().getId());
|
fServicesTracker = new DsfServicesTracker(MIPlugin.getBundleContext(), fCommandControl.getSession().getId());
|
||||||
connection.addEventListener(this);
|
connection.addEventListener(this);
|
||||||
connection.addCommandListener(this);
|
connection.addCommandListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public MIRunControlEventProcessor(AbstractMIControl connection, IContainerDMContext containerDmc) {
|
||||||
|
this(connection, DMContexts.getAncestorOfType(containerDmc, ICommandControlDMContext.class));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This processor must be disposed before the control service is un-registered.
|
* This processor must be disposed before the control service is un-registered.
|
||||||
|
@ -200,9 +207,9 @@ public class MIRunControlEventProcessor
|
||||||
} else if ("function-finished".equals(reason)) { //$NON-NLS-1$
|
} else if ("function-finished".equals(reason)) { //$NON-NLS-1$
|
||||||
event = MIFunctionFinishedEvent.parse(execDmc, exec.getToken(), exec.getMIResults());
|
event = MIFunctionFinishedEvent.parse(execDmc, exec.getToken(), exec.getMIResults());
|
||||||
} else if ("exited-normally".equals(reason) || "exited".equals(reason)) { //$NON-NLS-1$ //$NON-NLS-2$
|
} else if ("exited-normally".equals(reason) || "exited".equals(reason)) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
event = MIInferiorExitEvent.parse(fCommandControl.getControlDMContext(), exec.getToken(), exec.getMIResults());
|
event = MIInferiorExitEvent.parse(fCommandControl.getContext(), exec.getToken(), exec.getMIResults());
|
||||||
} else if ("exited-signalled".equals(reason)) { //$NON-NLS-1$
|
} else if ("exited-signalled".equals(reason)) { //$NON-NLS-1$
|
||||||
event = MIInferiorSignalExitEvent.parse(fCommandControl.getControlDMContext(), exec.getToken(), exec.getMIResults());
|
event = MIInferiorSignalExitEvent.parse(fCommandControl.getContext(), exec.getToken(), exec.getMIResults());
|
||||||
} else if (STOPPED_REASON.equals(reason)) {
|
} else if (STOPPED_REASON.equals(reason)) {
|
||||||
event = MIStoppedEvent.parse(execDmc, exec.getToken(), exec.getMIResults());
|
event = MIStoppedEvent.parse(execDmc, exec.getToken(), exec.getMIResults());
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,14 +34,16 @@ 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.IExpressions.IExpressionDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
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.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.IStack.IFrameDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
||||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControlDMContext;
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
import org.eclipse.dd.mi.service.MIBreakpointDMData;
|
import org.eclipse.dd.mi.service.MIBreakpointDMData;
|
||||||
import org.eclipse.dd.mi.service.MIBreakpoints;
|
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.MIRunControl;
|
||||||
import org.eclipse.dd.mi.service.MIBreakpoints.MIBreakpointDMContext;
|
import org.eclipse.dd.mi.service.MIBreakpoints.MIBreakpointDMContext;
|
||||||
import org.eclipse.dd.mi.service.command.events.MIBreakpointHitEvent;
|
import org.eclipse.dd.mi.service.command.events.MIBreakpointHitEvent;
|
||||||
|
@ -91,7 +93,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Services references
|
// Services references
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
private GDBControlDMContext fGdbControlDmc;
|
private IBreakpointsTargetDMContext fBreakpointsDmc;
|
||||||
private DsfServicesTracker fServicesTracker;
|
private DsfServicesTracker fServicesTracker;
|
||||||
private MIRunControl fRunControl;
|
private MIRunControl fRunControl;
|
||||||
private IBreakpoints fBreakpointService;
|
private IBreakpoints fBreakpointService;
|
||||||
|
@ -179,8 +181,10 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
assert(fServicesTracker != null);
|
assert(fServicesTracker != null);
|
||||||
|
|
||||||
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
||||||
fGdbControlDmc = (GDBControlDMContext)commandControl.getContext();
|
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
|
||||||
assert(fGdbControlDmc != null);
|
IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fBreakpointsDmc = (IBreakpointsTargetDMContext)procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
assert(fBreakpointsDmc != null);
|
||||||
|
|
||||||
fRunControl = fServicesTracker.getService(MIRunControl.class);
|
fRunControl = fServicesTracker.getService(MIRunControl.class);
|
||||||
assert(fRunControl != null);
|
assert(fRunControl != null);
|
||||||
|
@ -643,7 +647,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = BREAKPOINT_INSERTION_FAILURE;
|
String expected = BREAKPOINT_INSERTION_FAILURE;
|
||||||
insertBreakpoint(fGdbControlDmc, breakpoint);
|
insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
fWait.getMessage().contains(expected));
|
fWait.getMessage().contains(expected));
|
||||||
|
@ -667,7 +671,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = BREAKPOINT_INSERTION_FAILURE;
|
String expected = BREAKPOINT_INSERTION_FAILURE;
|
||||||
insertBreakpoint(fGdbControlDmc, breakpoint);
|
insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
fWait.getMessage().contains(expected));
|
fWait.getMessage().contains(expected));
|
||||||
|
@ -691,7 +695,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = BREAKPOINT_INSERTION_FAILURE;
|
String expected = BREAKPOINT_INSERTION_FAILURE;
|
||||||
insertBreakpoint(fGdbControlDmc, breakpoint);
|
insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
fWait.getMessage().contains(expected));
|
fWait.getMessage().contains(expected));
|
||||||
|
@ -714,7 +718,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = BREAKPOINT_INSERTION_FAILURE;
|
String expected = BREAKPOINT_INSERTION_FAILURE;
|
||||||
insertBreakpoint(fGdbControlDmc, breakpoint);
|
insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
fWait.getMessage().contains(expected));
|
fWait.getMessage().contains(expected));
|
||||||
|
@ -740,7 +744,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(ADDRESS_TAG, "0x"+ADDRESS.toString(16));
|
breakpoint.put(ADDRESS_TAG, "0x"+ADDRESS.toString(16));
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
waitForBreakpointEvent();
|
waitForBreakpointEvent();
|
||||||
|
@ -762,7 +766,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint1.isEnabled());
|
breakpoint1.isEnabled());
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right breakpoints
|
// Ensure the BreakpointService holds only the right breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 1);
|
+ breakpoints.length, breakpoints.length == 1);
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -785,7 +789,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -810,7 +814,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint1.isEnabled());
|
breakpoint1.isEnabled());
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right breakpoints
|
// Ensure the BreakpointService holds only the right breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 1);
|
+ breakpoints.length, breakpoints.length == 1);
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -834,7 +838,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(IS_ENABLED_TAG, false);
|
breakpoint.put(IS_ENABLED_TAG, false);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -859,7 +863,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
!breakpoint1.isEnabled());
|
!breakpoint1.isEnabled());
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right breakpoints
|
// Ensure the BreakpointService holds only the right breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 1);
|
+ breakpoints.length, breakpoints.length == 1);
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -882,7 +886,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -905,7 +909,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint1.getIgnoreCount() == 0);
|
breakpoint1.getIgnoreCount() == 0);
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right breakpoints
|
// Ensure the BreakpointService holds only the right breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 1);
|
+ breakpoints.length, breakpoints.length == 1);
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -929,7 +933,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -952,7 +956,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint1.getIgnoreCount() == 0);
|
breakpoint1.getIgnoreCount() == 0);
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right breakpoints
|
// Ensure the BreakpointService holds only the right breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 1);
|
+ breakpoints.length, breakpoints.length == 1);
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -976,7 +980,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -999,7 +1003,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint1.getIgnoreCount() == IGNORE_COUNT_1);
|
breakpoint1.getIgnoreCount() == IGNORE_COUNT_1);
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right breakpoints
|
// Ensure the BreakpointService holds only the right breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 1);
|
+ breakpoints.length, breakpoints.length == 1);
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -1022,7 +1026,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1051,7 +1055,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1074,7 +1078,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint2.getIgnoreCount() == 0);
|
breakpoint2.getIgnoreCount() == 0);
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right breakpoints
|
// Ensure the BreakpointService holds only the right breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 2 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 2 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 2);
|
+ breakpoints.length, breakpoints.length == 2);
|
||||||
MIBreakpointDMData svc_bp1 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData svc_bp1 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -1108,7 +1112,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1131,7 +1135,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint1.getIgnoreCount() == 0);
|
breakpoint1.getIgnoreCount() == 0);
|
||||||
|
|
||||||
// Create a second line breakpoint, same attributes...
|
// Create a second line breakpoint, same attributes...
|
||||||
ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1154,7 +1158,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint2.getIgnoreCount() == 0);
|
breakpoint2.getIgnoreCount() == 0);
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right breakpoints
|
// Ensure the BreakpointService holds only the right breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 2 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 2 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 2);
|
+ breakpoints.length, breakpoints.length == 2);
|
||||||
MIBreakpointDMData svc_bp1 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData svc_bp1 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -1192,7 +1196,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1215,7 +1219,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
!watchpoint1.isAccessWatchpoint());
|
!watchpoint1.isAccessWatchpoint());
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right watchpoints
|
// Ensure the BreakpointService holds only the right watchpoints
|
||||||
IBreakpointDMContext[] watchpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] watchpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " watchpoints(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " watchpoints(s), received "
|
||||||
+ watchpoints.length, watchpoints.length == 1);
|
+ watchpoints.length, watchpoints.length == 1);
|
||||||
MIBreakpointDMData watchpoint2 = (MIBreakpointDMData) getBreakpoint(watchpoints[0]);
|
MIBreakpointDMData watchpoint2 = (MIBreakpointDMData) getBreakpoint(watchpoints[0]);
|
||||||
|
@ -1238,7 +1242,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(READ_TAG, true);
|
watchpoint.put(READ_TAG, true);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1261,7 +1265,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
!watchpoint1.isAccessWatchpoint());
|
!watchpoint1.isAccessWatchpoint());
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right watchpoints
|
// Ensure the BreakpointService holds only the right watchpoints
|
||||||
IBreakpointDMContext[] watchpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] watchpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " watchpoints(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " watchpoints(s), received "
|
||||||
+ watchpoints.length, watchpoints.length == 1);
|
+ watchpoints.length, watchpoints.length == 1);
|
||||||
MIBreakpointDMData watchpoint2 = (MIBreakpointDMData) getBreakpoint(watchpoints[0]);
|
MIBreakpointDMData watchpoint2 = (MIBreakpointDMData) getBreakpoint(watchpoints[0]);
|
||||||
|
@ -1285,7 +1289,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1308,7 +1312,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint1.isAccessWatchpoint());
|
watchpoint1.isAccessWatchpoint());
|
||||||
|
|
||||||
// Ensure the BreakpointService holds only the right watchpoints
|
// Ensure the BreakpointService holds only the right watchpoints
|
||||||
IBreakpointDMContext[] watchpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] watchpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " watchpoints(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " watchpoints(s), received "
|
||||||
+ watchpoints.length, watchpoints.length == 1);
|
+ watchpoints.length, watchpoints.length == 1);
|
||||||
MIBreakpointDMData watchpoint2 = (MIBreakpointDMData) getBreakpoint(watchpoints[0]);
|
MIBreakpointDMData watchpoint2 = (MIBreakpointDMData) getBreakpoint(watchpoints[0]);
|
||||||
|
@ -1335,7 +1339,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1359,7 +1363,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Ensure the breakpoint was effectively removed
|
// Ensure the breakpoint was effectively removed
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 0 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 0 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 0);
|
+ breakpoints.length, breakpoints.length == 0);
|
||||||
}
|
}
|
||||||
|
@ -1373,7 +1377,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Create an invalid breakpoint reference
|
// Create an invalid breakpoint reference
|
||||||
IBreakpointDMContext invalid_ref =
|
IBreakpointDMContext invalid_ref =
|
||||||
new MIBreakpointDMContext((MIBreakpoints) fBreakpointService, new IDMContext[] { fGdbControlDmc }, 0);
|
new MIBreakpointDMContext((MIBreakpoints) fBreakpointService, new IDMContext[] { fBreakpointsDmc }, 0);
|
||||||
|
|
||||||
// Remove the invalid breakpoint
|
// Remove the invalid breakpoint
|
||||||
String expected = UNKNOWN_BREAKPOINT;
|
String expected = UNKNOWN_BREAKPOINT;
|
||||||
|
@ -1393,7 +1397,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
IBreakpointDMContext saved_ref = ref;
|
IBreakpointDMContext saved_ref = ref;
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
|
@ -1406,7 +1410,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Ensure the breakpoint list is OK
|
// Ensure the breakpoint list is OK
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 1);
|
+ breakpoints.length, breakpoints.length == 1);
|
||||||
|
|
||||||
|
@ -1423,7 +1427,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Ensure the breakpoint list is OK
|
// Ensure the breakpoint list is OK
|
||||||
breakpoints = getBreakpoints(fGdbControlDmc);
|
breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 0 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 0 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 0);
|
+ breakpoints.length, breakpoints.length == 0);
|
||||||
|
|
||||||
|
@ -1438,12 +1442,12 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
+ fBreakpointEventCount, fBreakpointEventCount == 0);
|
+ fBreakpointEventCount, fBreakpointEventCount == 0);
|
||||||
|
|
||||||
// Ensure the breakpoint list is OK
|
// Ensure the breakpoint list is OK
|
||||||
breakpoints = getBreakpoints(fGdbControlDmc);
|
breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 0 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 0 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 0);
|
+ breakpoints.length, breakpoints.length == 0);
|
||||||
|
|
||||||
// Re-install the breakpoint
|
// Re-install the breakpoint
|
||||||
ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
|
|
||||||
|
@ -1466,7 +1470,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
+ fBreakpointEventCount, fBreakpointEventCount == 0);
|
+ fBreakpointEventCount, fBreakpointEventCount == 0);
|
||||||
|
|
||||||
// Ensure that the existing breakpoint is unaffected
|
// Ensure that the existing breakpoint is unaffected
|
||||||
breakpoints = getBreakpoints(fGdbControlDmc);
|
breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 1 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 1);
|
+ breakpoints.length, breakpoints.length == 1);
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(breakpoints[0]);
|
||||||
|
@ -1488,7 +1492,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1 + i);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1 + i);
|
||||||
insertBreakpoint(fGdbControlDmc, breakpoint);
|
insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1502,7 +1506,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Get the list of breakpoints
|
// Get the list of breakpoints
|
||||||
IBreakpointDMContext[] breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + 4 + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + 4 + " breakpoint(s), received "
|
||||||
+ breakpoints.length, breakpoints.length == 4);
|
+ breakpoints.length, breakpoints.length == 4);
|
||||||
|
|
||||||
|
@ -1527,7 +1531,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
+ getBreakpointEventCount(BP_REMOVED), getBreakpointEventCount(BP_REMOVED) == expected);
|
+ getBreakpointEventCount(BP_REMOVED), getBreakpointEventCount(BP_REMOVED) == expected);
|
||||||
|
|
||||||
// Ensure the breakpoint was effectively removed
|
// Ensure the breakpoint was effectively removed
|
||||||
IBreakpointDMContext[] remaining_breakpoints = getBreakpoints(fGdbControlDmc);
|
IBreakpointDMContext[] remaining_breakpoints = getBreakpoints(fBreakpointsDmc);
|
||||||
assertTrue("BreakpointService problem: expected " + breakpoints_left + " breakpoint(s), received "
|
assertTrue("BreakpointService problem: expected " + breakpoints_left + " breakpoint(s), received "
|
||||||
+ remaining_breakpoints.length, remaining_breakpoints.length == breakpoints_left);
|
+ remaining_breakpoints.length, remaining_breakpoints.length == breakpoints_left);
|
||||||
for (int j = 0; i < breakpoints_left; i++) {
|
for (int j = 0; i < breakpoints_left; i++) {
|
||||||
|
@ -1552,7 +1556,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Create an invalid breakpoint reference
|
// Create an invalid breakpoint reference
|
||||||
IBreakpointDMContext invalid_ref =
|
IBreakpointDMContext invalid_ref =
|
||||||
new MIBreakpointDMContext((MIBreakpoints) fBreakpointService, new IDMContext[] { fGdbControlDmc }, 0);
|
new MIBreakpointDMContext((MIBreakpoints) fBreakpointService, new IDMContext[] { fBreakpointsDmc }, 0);
|
||||||
|
|
||||||
// Update the invalid breakpoint
|
// Update the invalid breakpoint
|
||||||
String expected = UNKNOWN_BREAKPOINT;
|
String expected = UNKNOWN_BREAKPOINT;
|
||||||
|
@ -1585,7 +1589,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1632,7 +1636,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1679,7 +1683,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1730,7 +1734,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1782,7 +1786,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(CONDITION_TAG, CONDITION_1);
|
watchpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1834,7 +1838,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(CONDITION_TAG, CONDITION_1);
|
watchpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1880,7 +1884,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1927,7 +1931,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_2);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_2);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -1974,7 +1978,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2020,7 +2024,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref1 = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref1 = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Create a second line breakpoint
|
// Create a second line breakpoint
|
||||||
|
@ -2030,7 +2034,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_2);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_2);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref2 = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref2 = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2097,7 +2101,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref1 = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref1 = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Create a second line breakpoint
|
// Create a second line breakpoint
|
||||||
|
@ -2107,7 +2111,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_2);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_2);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
IBreakpointDMContext ref2 = insertBreakpoint(fGdbControlDmc, breakpoint);
|
IBreakpointDMContext ref2 = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2209,7 +2213,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fGdbControlDmc, breakpoint);
|
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2249,7 +2253,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fGdbControlDmc, breakpoint);
|
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2292,7 +2296,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fGdbControlDmc, breakpoint);
|
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2339,7 +2343,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fGdbControlDmc, breakpoint);
|
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2401,7 +2405,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_2);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_2);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fGdbControlDmc, breakpoint);
|
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2448,7 +2452,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fGdbControlDmc, breakpoint);
|
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2508,7 +2512,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2554,7 +2558,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(READ_TAG, true);
|
watchpoint.put(READ_TAG, true);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2601,7 +2605,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2653,7 +2657,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2720,7 +2724,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2788,7 +2792,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Install the watchpoint
|
// Install the watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fGdbControlDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
|
@ -2814,7 +2818,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Ensure the watchpoint is gone
|
// Ensure the watchpoint is gone
|
||||||
getBreakpoints(fGdbControlDmc);
|
getBreakpoints(fBreakpointsDmc);
|
||||||
watchpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
watchpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointEvent problem: expected watchpoint to be deleted after going out of scope",
|
assertTrue("BreakpointEvent problem: expected watchpoint to be deleted after going out of scope",
|
||||||
watchpoint1 == null);
|
watchpoint1 == null);
|
||||||
|
|
|
@ -28,12 +28,14 @@ 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.IExpressions.IExpressionDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
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.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.IStack.IFrameDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControlDMContext;
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
import org.eclipse.dd.mi.service.MIDisassembly;
|
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.mi.service.command.events.MIStoppedEvent;
|
||||||
import org.eclipse.dd.tests.gdb.framework.AsyncCompletionWaitor;
|
import org.eclipse.dd.tests.gdb.framework.AsyncCompletionWaitor;
|
||||||
import org.eclipse.dd.tests.gdb.framework.BackgroundRunner;
|
import org.eclipse.dd.tests.gdb.framework.BackgroundRunner;
|
||||||
|
@ -70,7 +72,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
private DsfServicesTracker fServicesTracker;
|
private DsfServicesTracker fServicesTracker;
|
||||||
private GDBControlDMContext fGdbControlDmc;
|
private IDisassemblyDMContext fDisassemblyDmc;
|
||||||
private MIDisassembly fDisassembly;
|
private MIDisassembly fDisassembly;
|
||||||
private IExpressions fExpressionService;
|
private IExpressions fExpressionService;
|
||||||
|
|
||||||
|
@ -97,8 +99,10 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
assert(fServicesTracker != null);
|
assert(fServicesTracker != null);
|
||||||
|
|
||||||
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
||||||
fGdbControlDmc = (GDBControlDMContext)commandControl.getContext();
|
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
|
||||||
assert(fGdbControlDmc != null);
|
IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fDisassemblyDmc = (IDisassemblyDMContext)procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
assert(fDisassemblyDmc != null);
|
||||||
|
|
||||||
fDisassembly = fServicesTracker.getService(MIDisassembly.class);
|
fDisassembly = fServicesTracker.getService(MIDisassembly.class);
|
||||||
assert(fDisassembly != null);
|
assert(fDisassembly != null);
|
||||||
|
@ -400,7 +404,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getInstruction(fGdbControlDmc, startAddress, endAddress);
|
getInstruction(fDisassemblyDmc, startAddress, endAddress);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
@ -422,7 +426,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getInstruction(fGdbControlDmc, startAddress, endAddress);
|
getInstruction(fDisassemblyDmc, startAddress, endAddress);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
@ -444,7 +448,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getInstruction(fGdbControlDmc, startAddress, endAddress);
|
getInstruction(fDisassemblyDmc, startAddress, endAddress);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
@ -466,7 +470,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getInstruction(fGdbControlDmc, filename, linenum, count);
|
getInstruction(fDisassemblyDmc, filename, linenum, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
@ -489,7 +493,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getInstruction(fGdbControlDmc, filename, linenum, count);
|
getInstruction(fDisassemblyDmc, filename, linenum, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
@ -512,7 +516,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getInstruction(fGdbControlDmc, filename, linenum, count);
|
getInstruction(fDisassemblyDmc, filename, linenum, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
@ -534,7 +538,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getInstruction(fGdbControlDmc, filename, linenum, count);
|
getInstruction(fDisassemblyDmc, filename, linenum, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
@ -557,7 +561,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getMixedInstruction(fGdbControlDmc, startAddress, endAddress);
|
getMixedInstruction(fDisassemblyDmc, startAddress, endAddress);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
@ -579,7 +583,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
getMixedInstruction(fGdbControlDmc, filename, linenum, count);
|
getMixedInstruction(fDisassemblyDmc, filename, linenum, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Verify the result
|
// Verify the result
|
||||||
|
|
|
@ -27,13 +27,15 @@ 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.IFormattedValues.FormattedValueDMData;
|
||||||
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryChangedEvent;
|
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryChangedEvent;
|
||||||
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryDMContext;
|
import org.eclipse.dd.dsf.debug.service.IMemory.IMemoryDMContext;
|
||||||
|
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.StepType;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.StepType;
|
||||||
import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext;
|
import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
import org.eclipse.dd.dsf.service.DsfServiceEventHandler;
|
||||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControlDMContext;
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses;
|
||||||
import org.eclipse.dd.mi.service.MIRunControl;
|
import org.eclipse.dd.mi.service.MIRunControl;
|
||||||
import org.eclipse.dd.mi.service.command.events.MIStoppedEvent;
|
import org.eclipse.dd.mi.service.command.events.MIStoppedEvent;
|
||||||
import org.eclipse.dd.tests.gdb.framework.AsyncCompletionWaitor;
|
import org.eclipse.dd.tests.gdb.framework.AsyncCompletionWaitor;
|
||||||
|
@ -68,7 +70,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
private DsfServicesTracker fServicesTracker;
|
private DsfServicesTracker fServicesTracker;
|
||||||
private GDBControlDMContext fGdbControlDmc;
|
private IMemoryDMContext fMemoryDmc;
|
||||||
private MIRunControl fRunControl;
|
private MIRunControl fRunControl;
|
||||||
private IMemory fMemoryService;
|
private IMemory fMemoryService;
|
||||||
private IExpressions fExpressionService;
|
private IExpressions fExpressionService;
|
||||||
|
@ -102,8 +104,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
assert(fServicesTracker != null);
|
assert(fServicesTracker != null);
|
||||||
|
|
||||||
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
||||||
fGdbControlDmc = (GDBControlDMContext)commandControl.getContext();
|
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
|
||||||
assert(fGdbControlDmc != null);
|
IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fMemoryDmc = (IMemoryDMContext)procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
assert(fMemoryDmc != null);
|
||||||
|
|
||||||
fRunControl = fServicesTracker.getService(MIRunControl.class);
|
fRunControl = fServicesTracker.getService(MIRunControl.class);
|
||||||
assert(fRunControl != null);
|
assert(fRunControl != null);
|
||||||
|
@ -484,7 +488,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
||||||
// Ensure that we receive a block of invalid memory bytes
|
// Ensure that we receive a block of invalid memory bytes
|
||||||
|
@ -518,14 +522,14 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = "Word size not supported (!= 1)";
|
String expected = "Word size not supported (!= 1)";
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, 0, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, 0, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
fWait.getMessage().contains(expected));
|
fWait.getMessage().contains(expected));
|
||||||
|
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, 2, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, 2, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
|
@ -557,7 +561,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = "Invalid word count (< 0)";
|
String expected = "Invalid word count (< 0)";
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
|
@ -590,7 +594,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
for (int i = 0; i < BLOCK_SIZE; i++) {
|
for (int i = 0; i < BLOCK_SIZE; i++) {
|
||||||
IAddress address = fBaseAddress.add(i);
|
IAddress address = fBaseAddress.add(i);
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, address, offset, word_size, count);
|
readMemory(fMemoryDmc, address, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -607,7 +611,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
for (int i = 0; i < BLOCK_SIZE; i++) {
|
for (int i = 0; i < BLOCK_SIZE; i++) {
|
||||||
IAddress address = fBaseAddress.add(i);
|
IAddress address = fBaseAddress.add(i);
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, address, offset, word_size, count);
|
readMemory(fMemoryDmc, address, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
@ -640,7 +644,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Verify that all bytes are '0'
|
// Verify that all bytes are '0'
|
||||||
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -656,7 +660,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Verify that all bytes are set
|
// Verify that all bytes are set
|
||||||
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -689,7 +693,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Get the memory block
|
// Get the memory block
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -707,7 +711,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Get the memory block
|
// Get the memory block
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -780,7 +784,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
writeMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, buffer);
|
writeMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, buffer);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
String expected = "Cannot access memory at address"; // Error msg returned by gdb
|
String expected = "Cannot access memory at address"; // Error msg returned by gdb
|
||||||
|
@ -813,14 +817,14 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = "Word size not supported (!= 1)";
|
String expected = "Word size not supported (!= 1)";
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
writeMemory(fGdbControlDmc, fBaseAddress, offset, 0, count, buffer);
|
writeMemory(fMemoryDmc, fBaseAddress, offset, 0, count, buffer);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
fWait.getMessage().contains(expected));
|
fWait.getMessage().contains(expected));
|
||||||
|
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
writeMemory(fGdbControlDmc, fBaseAddress, offset, 2, count, buffer);
|
writeMemory(fMemoryDmc, fBaseAddress, offset, 2, count, buffer);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
|
@ -853,7 +857,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = "Invalid word count (< 0)";
|
String expected = "Invalid word count (< 0)";
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
writeMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, buffer);
|
writeMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, buffer);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
|
@ -886,7 +890,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = "Buffer too short";
|
String expected = "Buffer too short";
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
writeMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, buffer);
|
writeMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, buffer);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
|
@ -921,7 +925,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// [1] Ensure that the memory byte = 0
|
// [1] Ensure that the memory byte = 0
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, i, word_size, 1);
|
readMemory(fMemoryDmc, fBaseAddress, i, word_size, 1);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -933,7 +937,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
byte expected = (byte) (count - i - 1);
|
byte expected = (byte) (count - i - 1);
|
||||||
buffer[0] = expected;
|
buffer[0] = expected;
|
||||||
writeMemory(fGdbControlDmc, address, offset, word_size, 1, buffer);
|
writeMemory(fMemoryDmc, address, offset, word_size, 1, buffer);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
|
@ -945,7 +949,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// [4] Verify that the memory byte was written correctly
|
// [4] Verify that the memory byte was written correctly
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, i, word_size, 1);
|
readMemory(fMemoryDmc, fBaseAddress, i, word_size, 1);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
block = (MemoryByte[]) fWait.getReturnInfo();
|
block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -983,7 +987,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// [1] Ensure that the memory byte = 0
|
// [1] Ensure that the memory byte = 0
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, 1);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, 1);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -994,7 +998,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
byte expected = (byte) (count - offset - 1);
|
byte expected = (byte) (count - offset - 1);
|
||||||
buffer[0] = expected;
|
buffer[0] = expected;
|
||||||
writeMemory(fGdbControlDmc, fBaseAddress, offset, word_size, 1, buffer);
|
writeMemory(fMemoryDmc, fBaseAddress, offset, word_size, 1, buffer);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
|
@ -1005,7 +1009,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// [4] Verify that the memory byte was written correctly
|
// [4] Verify that the memory byte was written correctly
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, 1);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, 1);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
block = (MemoryByte[]) fWait.getReturnInfo();
|
block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1041,7 +1045,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Make sure that the memory block is zeroed
|
// Make sure that the memory block is zeroed
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1056,13 +1060,13 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
buffer[i] = (byte) i;
|
buffer[i] = (byte) i;
|
||||||
}
|
}
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
writeMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, buffer);
|
writeMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, buffer);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Make sure that the memory block is initialized
|
// Make sure that the memory block is initialized
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
block = (MemoryByte[]) fWait.getReturnInfo();
|
block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1136,7 +1140,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
fillMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, pattern);
|
fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
String expected = "Cannot access memory at address"; // Error msg returned by gdb
|
String expected = "Cannot access memory at address"; // Error msg returned by gdb
|
||||||
|
@ -1169,14 +1173,14 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = "Word size not supported (!= 1)";
|
String expected = "Word size not supported (!= 1)";
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
fillMemory(fGdbControlDmc, fBaseAddress, offset, 0, count, pattern);
|
fillMemory(fMemoryDmc, fBaseAddress, offset, 0, count, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
fWait.getMessage().contains(expected));
|
fWait.getMessage().contains(expected));
|
||||||
|
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
fillMemory(fGdbControlDmc, fBaseAddress, offset, 2, count, pattern);
|
fillMemory(fMemoryDmc, fBaseAddress, offset, 2, count, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
|
@ -1209,7 +1213,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = "Invalid repeat count (< 0)";
|
String expected = "Invalid repeat count (< 0)";
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
fillMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, pattern);
|
fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
|
@ -1242,7 +1246,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
// Perform the test
|
// Perform the test
|
||||||
String expected = "Empty pattern";
|
String expected = "Empty pattern";
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
fillMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, pattern);
|
fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'",
|
||||||
|
@ -1276,7 +1280,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Ensure that the memory is zeroed
|
// Ensure that the memory is zeroed
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count * length);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count * length);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1287,7 +1291,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
for (int i = 0; i < BLOCK_SIZE; i += length) {
|
for (int i = 0; i < BLOCK_SIZE; i += length) {
|
||||||
IAddress address = fBaseAddress.add(i);
|
IAddress address = fBaseAddress.add(i);
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
fillMemory(fGdbControlDmc, address, offset, word_size, count, pattern);
|
fillMemory(fMemoryDmc, address, offset, word_size, count, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
|
@ -1295,7 +1299,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Verify that the memory is correctly set
|
// Verify that the memory is correctly set
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, 0, word_size, count * length);
|
readMemory(fMemoryDmc, fBaseAddress, 0, word_size, count * length);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
block = (MemoryByte[]) fWait.getReturnInfo();
|
block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1337,7 +1341,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Ensure that the memory is zeroed
|
// Ensure that the memory is zeroed
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count * length);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count * length);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1348,7 +1352,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
for (int i = 0; i < (BLOCK_SIZE / length); i++) {
|
for (int i = 0; i < (BLOCK_SIZE / length); i++) {
|
||||||
offset = i * length;
|
offset = i * length;
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
fillMemory(fGdbControlDmc, fBaseAddress, offset, word_size, 1, pattern);
|
fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, 1, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
|
@ -1356,7 +1360,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Verify that the memory is correctly set
|
// Verify that the memory is correctly set
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, 0, word_size, count * length);
|
readMemory(fMemoryDmc, fBaseAddress, 0, word_size, count * length);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
block = (MemoryByte[]) fWait.getReturnInfo();
|
block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1398,7 +1402,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Ensure that the memory is zeroed
|
// Ensure that the memory is zeroed
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count * length);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count * length);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1408,13 +1412,13 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Write the pattern [count] times
|
// Write the pattern [count] times
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
fillMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, pattern);
|
fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, pattern);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Verify that the memory is correctly set
|
// Verify that the memory is correctly set
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count * length);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count * length);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
block = (MemoryByte[]) fWait.getReturnInfo();
|
block = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1455,7 +1459,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
MemoryByte[] buffer = new MemoryByte[BLOCK_SIZE];
|
MemoryByte[] buffer = new MemoryByte[BLOCK_SIZE];
|
||||||
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
||||||
fWait.increment();
|
fWait.increment();
|
||||||
readMemoryByteAtOffset(fGdbControlDmc, fBaseAddress, offset, word_size, count, buffer);
|
readMemoryByteAtOffset(fMemoryDmc, fBaseAddress, offset, word_size, count, buffer);
|
||||||
}
|
}
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
@ -1470,7 +1474,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.increment();
|
fWait.increment();
|
||||||
byte[] block = new byte[count];
|
byte[] block = new byte[count];
|
||||||
block[0] = (byte) offset;
|
block[0] = (byte) offset;
|
||||||
writeMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count, block);
|
writeMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, block);
|
||||||
}
|
}
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
@ -1485,7 +1489,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
||||||
fWait.increment();
|
fWait.increment();
|
||||||
readMemoryByteAtOffset(fGdbControlDmc, fBaseAddress, offset, word_size, count, buffer);
|
readMemoryByteAtOffset(fMemoryDmc, fBaseAddress, offset, word_size, count, buffer);
|
||||||
}
|
}
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
@ -1516,7 +1520,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
|
|
||||||
// Get the 'reference' memory block
|
// Get the 'reference' memory block
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
MemoryByte[] buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1534,7 +1538,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
offset = 0;
|
offset = 0;
|
||||||
count = 64;
|
count = 64;
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1549,7 +1553,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
offset = 128;
|
offset = 128;
|
||||||
count = 64;
|
count = 64;
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1564,7 +1568,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
offset = 80;
|
offset = 80;
|
||||||
count = 32;
|
count = 32;
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1579,7 +1583,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
offset = 192;
|
offset = 192;
|
||||||
count = 32;
|
count = 32;
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1594,7 +1598,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
offset = 192;
|
offset = 192;
|
||||||
count = 64;
|
count = 64;
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1609,7 +1613,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
offset = 32;
|
offset = 32;
|
||||||
count = 128;
|
count = 128;
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1624,7 +1628,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
offset = 48;
|
offset = 48;
|
||||||
count = 192;
|
count = 192;
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
@ -1639,7 +1643,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
offset = 0;
|
offset = 0;
|
||||||
count = BLOCK_SIZE;
|
count = BLOCK_SIZE;
|
||||||
readMemory(fGdbControlDmc, fBaseAddress, offset, word_size, count);
|
readMemory(fMemoryDmc, fBaseAddress, offset, word_size, count);
|
||||||
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
buffer = (MemoryByte[]) fWait.getReturnInfo();
|
||||||
|
|
|
@ -19,6 +19,7 @@ import org.eclipse.dd.dsf.debug.service.IFormattedValues;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRegisters;
|
import org.eclipse.dd.dsf.debug.service.IRegisters;
|
||||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.FormattedValueDMContext;
|
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.IFormattedValues.FormattedValueDMData;
|
||||||
|
import org.eclipse.dd.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterDMContext;
|
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterDMData;
|
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterDMData;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMContext;
|
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMContext;
|
||||||
|
@ -29,7 +30,8 @@ import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControlDMContext;
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses;
|
||||||
import org.eclipse.dd.mi.service.command.events.MIStoppedEvent;
|
import org.eclipse.dd.mi.service.command.events.MIStoppedEvent;
|
||||||
import org.eclipse.dd.tests.gdb.framework.AsyncCompletionWaitor;
|
import org.eclipse.dd.tests.gdb.framework.AsyncCompletionWaitor;
|
||||||
import org.eclipse.dd.tests.gdb.framework.BackgroundRunner;
|
import org.eclipse.dd.tests.gdb.framework.BackgroundRunner;
|
||||||
|
@ -63,7 +65,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
//private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
//private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
private DsfServicesTracker fServicesTracker;
|
private DsfServicesTracker fServicesTracker;
|
||||||
private GDBControlDMContext fGdbControlDmc;
|
private IContainerDMContext fContainerDmc;
|
||||||
private IRegisters fRegService;
|
private IRegisters fRegService;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
@ -74,7 +76,10 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
fServicesTracker = new DsfServicesTracker(TestsPlugin.getBundleContext(), fSession.getId());
|
fServicesTracker = new DsfServicesTracker(TestsPlugin.getBundleContext(), fSession.getId());
|
||||||
|
|
||||||
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
ICommandControlService commandControl = fServicesTracker.getService(ICommandControlService.class);
|
||||||
fGdbControlDmc = (GDBControlDMContext)commandControl.getContext();
|
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
|
||||||
|
IProcessDMContext procDmc = procService.createProcessContext(commandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fContainerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
|
||||||
|
|
||||||
fRegService = fServicesTracker.getService(IRegisters.class);
|
fRegService = fServicesTracker.getService(IRegisters.class);
|
||||||
}
|
}
|
||||||
|
@ -113,7 +118,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
|
|
||||||
fRegService.getExecutor().submit(new Runnable() {
|
fRegService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
fRegService.getRegisterGroups(fGdbControlDmc, regGroupDone);
|
fRegService.getRegisterGroups(fContainerDmc, regGroupDone);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.eclipse.dd.dsf.debug.service.IRunControl.IStartedDMEvent;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.StateChangeReason;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.StateChangeReason;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.StepType;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.StepType;
|
||||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControlDMContext;
|
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.IGDBControl;
|
import org.eclipse.dd.gdb.internal.provisional.service.command.IGDBControl;
|
||||||
import org.eclipse.dd.mi.service.IMIExecutionDMContext;
|
import org.eclipse.dd.mi.service.IMIExecutionDMContext;
|
||||||
import org.eclipse.dd.mi.service.IMIProcesses;
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
|
@ -56,7 +55,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
private MIRunControl fRunCtrl;
|
private MIRunControl fRunCtrl;
|
||||||
private IMIProcesses fProcService;
|
private IMIProcesses fProcService;
|
||||||
|
|
||||||
private GDBControlDMContext fGdbControlDmc;
|
private IContainerDMContext fContainerDmc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Path to executable
|
* Path to executable
|
||||||
|
@ -74,7 +73,11 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
new DsfServicesTracker(TestsPlugin.getBundleContext(),
|
new DsfServicesTracker(TestsPlugin.getBundleContext(),
|
||||||
getGDBLaunch().getSession().getId());
|
getGDBLaunch().getSession().getId());
|
||||||
fGDBCtrl = fServicesTracker.getService(IGDBControl.class);
|
fGDBCtrl = fServicesTracker.getService(IGDBControl.class);
|
||||||
fGdbControlDmc = (GDBControlDMContext)fGDBCtrl.getContext();
|
|
||||||
|
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
|
||||||
|
IProcessDMContext procDmc = procService.createProcessContext(fGDBCtrl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fContainerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
|
||||||
fRunCtrl = fServicesTracker.getService(MIRunControl.class);
|
fRunCtrl = fServicesTracker.getService(MIRunControl.class);
|
||||||
fProcService = fServicesTracker.getService(IMIProcesses.class);
|
fProcService = fServicesTracker.getService(IMIProcesses.class);
|
||||||
}
|
}
|
||||||
|
@ -177,7 +180,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
/*
|
/*
|
||||||
* Run till line for 2 threads to be created
|
* Run till line for 2 threads to be created
|
||||||
*/
|
*/
|
||||||
SyncUtil.SyncRunToLine(fGdbControlDmc, SOURCE_NAME, "22", true);
|
SyncUtil.SyncRunToLine(fContainerDmc, SOURCE_NAME, "22", true);
|
||||||
}
|
}
|
||||||
catch(Throwable t){
|
catch(Throwable t){
|
||||||
Assert.fail("Exception in SyncUtil.SyncRunToLine: " + t.getMessage());
|
Assert.fail("Exception in SyncUtil.SyncRunToLine: " + t.getMessage());
|
||||||
|
@ -382,7 +385,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
|
|
||||||
fRunCtrl.getExecutor().submit(new Runnable() {
|
fRunCtrl.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
fRunCtrl.getExecutionData(fGdbControlDmc, rm);
|
fRunCtrl.getExecutionData(fContainerDmc, rm);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
@ -422,7 +425,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
fRunCtrl.getExecutor().submit(new Runnable() {
|
fRunCtrl.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
// Pass an invalid dmc
|
// Pass an invalid dmc
|
||||||
fRunCtrl.getExecutionContexts(fGdbControlDmc, rm);
|
fRunCtrl.getExecutionContexts(fContainerDmc, rm);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
@ -530,7 +533,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
|
|
||||||
fRunCtrl.getExecutor().submit(new Runnable() {
|
fRunCtrl.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
fRunCtrl.resume(fGdbControlDmc, rm);
|
fRunCtrl.resume(fContainerDmc, rm);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
|
|
@ -23,9 +23,11 @@ import org.eclipse.dd.dsf.concurrent.Query;
|
||||||
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
import org.eclipse.dd.dsf.datamodel.IDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IExpressions;
|
import org.eclipse.dd.dsf.debug.service.IExpressions;
|
||||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues;
|
import org.eclipse.dd.dsf.debug.service.IFormattedValues;
|
||||||
|
import org.eclipse.dd.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IExpressions.IExpressionDMContext;
|
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.FormattedValueDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IFormattedValues.IFormattedDataDMContext;
|
import org.eclipse.dd.dsf.debug.service.IFormattedValues.IFormattedDataDMContext;
|
||||||
|
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.IRunControl.IContainerDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.IRunControl.StepType;
|
import org.eclipse.dd.dsf.debug.service.IRunControl.StepType;
|
||||||
|
@ -33,8 +35,9 @@ import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext;
|
||||||
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.dd.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
import org.eclipse.dd.dsf.service.DsfSession;
|
import org.eclipse.dd.dsf.service.DsfSession;
|
||||||
import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControlDMContext;
|
|
||||||
import org.eclipse.dd.mi.service.IMIExecutionDMContext;
|
import org.eclipse.dd.mi.service.IMIExecutionDMContext;
|
||||||
|
import org.eclipse.dd.mi.service.IMIProcesses;
|
||||||
|
import org.eclipse.dd.mi.service.MIProcesses;
|
||||||
import org.eclipse.dd.mi.service.MIRunControl;
|
import org.eclipse.dd.mi.service.MIRunControl;
|
||||||
import org.eclipse.dd.mi.service.MIStack;
|
import org.eclipse.dd.mi.service.MIStack;
|
||||||
import org.eclipse.dd.mi.service.command.commands.MIBreakDelete;
|
import org.eclipse.dd.mi.service.command.commands.MIBreakDelete;
|
||||||
|
@ -60,7 +63,8 @@ public class SyncUtil {
|
||||||
private static IExpressions fExpressions;
|
private static IExpressions fExpressions;
|
||||||
private static DsfSession fSession;
|
private static DsfSession fSession;
|
||||||
|
|
||||||
private static GDBControlDMContext fGdbControlDmc;
|
private static IContainerDMContext fGdbContainerDmc;
|
||||||
|
private static IBreakpointsTargetDMContext fBreakpointsDmc;
|
||||||
|
|
||||||
// Initialize some common things, once the session has been established
|
// Initialize some common things, once the session has been established
|
||||||
public static void initialize(DsfSession session) {
|
public static void initialize(DsfSession session) {
|
||||||
|
@ -71,7 +75,12 @@ public class SyncUtil {
|
||||||
fSession.getId());
|
fSession.getId());
|
||||||
|
|
||||||
fCommandControl = tracker.getService(ICommandControlService.class);
|
fCommandControl = tracker.getService(ICommandControlService.class);
|
||||||
fGdbControlDmc = (GDBControlDMContext)fCommandControl.getContext();
|
IMIProcesses procService = tracker.getService(IMIProcesses.class);
|
||||||
|
IProcessDMContext procDmc = procService.createProcessContext(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
fGdbContainerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
|
||||||
|
|
||||||
|
fBreakpointsDmc = (IBreakpointsTargetDMContext)fGdbContainerDmc;
|
||||||
|
|
||||||
fRunControl = tracker.getService(MIRunControl.class);
|
fRunControl = tracker.getService(MIRunControl.class);
|
||||||
fStack = tracker.getService(MIStack.class);
|
fStack = tracker.getService(MIStack.class);
|
||||||
fExpressions = tracker.getService(IExpressions.class);
|
fExpressions = tracker.getService(IExpressions.class);
|
||||||
|
@ -88,7 +97,7 @@ public class SyncUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncStep(final StepType stepType) throws Throwable {
|
public static MIStoppedEvent SyncStep(final StepType stepType) throws Throwable {
|
||||||
return SyncStep(fGdbControlDmc, stepType);
|
return SyncStep(fGdbContainerDmc, stepType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncStep(final IExecutionDMContext dmc, final StepType stepType) throws Throwable {
|
public static MIStoppedEvent SyncStep(final IExecutionDMContext dmc, final StepType stepType) throws Throwable {
|
||||||
|
@ -147,11 +156,11 @@ public class SyncUtil {
|
||||||
|
|
||||||
public static MIStoppedEvent SyncRunToLine(final String fileName, final String lineNo,
|
public static MIStoppedEvent SyncRunToLine(final String fileName, final String lineNo,
|
||||||
final boolean skipBreakpoints) throws Throwable {
|
final boolean skipBreakpoints) throws Throwable {
|
||||||
return SyncRunToLine(fGdbControlDmc, fileName, lineNo, skipBreakpoints);
|
return SyncRunToLine(fGdbContainerDmc, fileName, lineNo, skipBreakpoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncRunToLine(final String fileName, final String lineNo) throws Throwable {
|
public static MIStoppedEvent SyncRunToLine(final String fileName, final String lineNo) throws Throwable {
|
||||||
return SyncRunToLine(fGdbControlDmc, fileName, lineNo, false);
|
return SyncRunToLine(fGdbContainerDmc, fileName, lineNo, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,7 +186,7 @@ public class SyncUtil {
|
||||||
};
|
};
|
||||||
|
|
||||||
fCommandControl.queueCommand(
|
fCommandControl.queueCommand(
|
||||||
new MIBreakInsert(fGdbControlDmc, temporary, false, null, 0, location, 0),
|
new MIBreakInsert(fBreakpointsDmc, temporary, false, null, 0, location, 0),
|
||||||
addBreakDone);
|
addBreakDone);
|
||||||
|
|
||||||
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
@ -202,7 +211,7 @@ public class SyncUtil {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
fCommandControl.queueCommand(new MIBreakList(fGdbControlDmc), listDRM);
|
fCommandControl.queueCommand(new MIBreakList(fBreakpointsDmc), listDRM);
|
||||||
|
|
||||||
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
assertTrue(wait.getMessage(), wait.isOK());
|
assertTrue(wait.getMessage(), wait.isOK());
|
||||||
|
@ -236,7 +245,7 @@ public class SyncUtil {
|
||||||
};
|
};
|
||||||
|
|
||||||
fCommandControl.queueCommand(
|
fCommandControl.queueCommand(
|
||||||
new MIBreakDelete(fGdbControlDmc, breakpointIndices), //$NON-NLS-1$
|
new MIBreakDelete(fBreakpointsDmc, breakpointIndices), //$NON-NLS-1$
|
||||||
deleteBreakDone);
|
deleteBreakDone);
|
||||||
|
|
||||||
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
|
||||||
|
@ -265,7 +274,7 @@ public class SyncUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncResumeUntilStopped() throws Throwable {
|
public static MIStoppedEvent SyncResumeUntilStopped() throws Throwable {
|
||||||
return SyncResumeUntilStopped(fGdbControlDmc);
|
return SyncResumeUntilStopped(fGdbContainerDmc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncRunToLocation(final String location) throws Throwable {
|
public static MIStoppedEvent SyncRunToLocation(final String location) throws Throwable {
|
||||||
|
|
Loading…
Add table
Reference in a new issue