mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 317173: Fix new warnings of missing @Override now that we use java 6, in org.eclipse.cdt.dsf.gdb
This commit is contained in:
parent
dd2d478fc1
commit
b549d4759d
47 changed files with 327 additions and 10 deletions
|
@ -34,12 +34,14 @@ public class CBreakpointGdbThreadsFilterExtension implements IDsfBreakpointExten
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICBreakpointExtension#initialize(org.eclipse.cdt.debug.core.model.ICBreakpoint)
|
* @see org.eclipse.cdt.debug.core.model.ICBreakpointExtension#initialize(org.eclipse.cdt.debug.core.model.ICBreakpoint)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void initialize(ICBreakpoint breakpoint) {
|
public void initialize(ICBreakpoint breakpoint) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#getTargetFilters()
|
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#getTargetFilters()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IContainerDMContext[] getTargetFilters() throws CoreException {
|
public IContainerDMContext[] getTargetFilters() throws CoreException {
|
||||||
Set<IContainerDMContext> set = fFilteredThreadsByTarget.keySet();
|
Set<IContainerDMContext> set = fFilteredThreadsByTarget.keySet();
|
||||||
return set.toArray( new IContainerDMContext[set.size()] );
|
return set.toArray( new IContainerDMContext[set.size()] );
|
||||||
|
@ -48,6 +50,7 @@ public class CBreakpointGdbThreadsFilterExtension implements IDsfBreakpointExten
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#getThreadFilters(org.eclipse.cdt.debug.core.model.ICDebugTarget)
|
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#getThreadFilters(org.eclipse.cdt.debug.core.model.ICDebugTarget)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IExecutionDMContext[] getThreadFilters( IContainerDMContext target ) throws CoreException {
|
public IExecutionDMContext[] getThreadFilters( IContainerDMContext target ) throws CoreException {
|
||||||
Set<IExecutionDMContext> set = fFilteredThreadsByTarget.get( target );
|
Set<IExecutionDMContext> set = fFilteredThreadsByTarget.get( target );
|
||||||
return ( set != null ) ? set.toArray( new IExecutionDMContext[set.size()] ) : null;
|
return ( set != null ) ? set.toArray( new IExecutionDMContext[set.size()] ) : null;
|
||||||
|
@ -56,6 +59,7 @@ public class CBreakpointGdbThreadsFilterExtension implements IDsfBreakpointExten
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#removeTargetFilter(org.eclipse.cdt.debug.core.model.ICDebugTarget)
|
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#removeTargetFilter(org.eclipse.cdt.debug.core.model.ICDebugTarget)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeTargetFilter( IContainerDMContext target ) throws CoreException {
|
public void removeTargetFilter( IContainerDMContext target ) throws CoreException {
|
||||||
if ( fFilteredThreadsByTarget.containsKey( target ) ) {
|
if ( fFilteredThreadsByTarget.containsKey( target ) ) {
|
||||||
fFilteredThreadsByTarget.remove( target );
|
fFilteredThreadsByTarget.remove( target );
|
||||||
|
@ -65,6 +69,7 @@ public class CBreakpointGdbThreadsFilterExtension implements IDsfBreakpointExten
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#removeThreadFilters(org.eclipse.cdt.debug.core.model.ICThread[])
|
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#removeThreadFilters(org.eclipse.cdt.debug.core.model.ICThread[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeThreadFilters( IExecutionDMContext[] threads ) throws CoreException {
|
public void removeThreadFilters( IExecutionDMContext[] threads ) throws CoreException {
|
||||||
if ( threads != null && threads.length > 0 ) {
|
if ( threads != null && threads.length > 0 ) {
|
||||||
IContainerDMContext target = DMContexts.getAncestorOfType(threads[0], IContainerDMContext.class);
|
IContainerDMContext target = DMContexts.getAncestorOfType(threads[0], IContainerDMContext.class);
|
||||||
|
@ -83,6 +88,7 @@ public class CBreakpointGdbThreadsFilterExtension implements IDsfBreakpointExten
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#setTargetFilter(org.eclipse.cdt.debug.core.model.ICDebugTarget)
|
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#setTargetFilter(org.eclipse.cdt.debug.core.model.ICDebugTarget)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setTargetFilter( IContainerDMContext target ) throws CoreException {
|
public void setTargetFilter( IContainerDMContext target ) throws CoreException {
|
||||||
fFilteredThreadsByTarget.put( target, null );
|
fFilteredThreadsByTarget.put( target, null );
|
||||||
}
|
}
|
||||||
|
@ -90,6 +96,7 @@ public class CBreakpointGdbThreadsFilterExtension implements IDsfBreakpointExten
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#setThreadFilters(org.eclipse.cdt.debug.core.model.ICThread[])
|
* @see org.eclipse.cdt.debug.core.model.ICBreakpoint#setThreadFilters(org.eclipse.cdt.debug.core.model.ICThread[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setThreadFilters( IExecutionDMContext[] threads ) throws CoreException {
|
public void setThreadFilters( IExecutionDMContext[] threads ) throws CoreException {
|
||||||
if ( threads != null && threads.length > 0 ) {
|
if ( threads != null && threads.length > 0 ) {
|
||||||
IContainerDMContext target = DMContexts.getAncestorOfType(threads[0], IContainerDMContext.class);
|
IContainerDMContext target = DMContexts.getAncestorOfType(threads[0], IContainerDMContext.class);
|
||||||
|
|
|
@ -70,6 +70,7 @@ public class GdbMemoryBlock extends DsfMemoryBlock implements IMemorySpaceAwareM
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IMemorySpaces.IMemorySpaceDMContext#getMemorySpaceId()
|
* @see org.eclipse.cdt.dsf.debug.service.IMemorySpaces.IMemorySpaceDMContext#getMemorySpaceId()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getMemorySpaceId() {
|
public String getMemorySpaceId() {
|
||||||
return fMemorySpaceId;
|
return fMemorySpaceId;
|
||||||
}
|
}
|
||||||
|
@ -245,6 +246,7 @@ public class GdbMemoryBlock extends DsfMemoryBlock implements IMemorySpaceAwareM
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlock#getMemorySpaceID()
|
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlock#getMemorySpaceID()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getMemorySpaceID() {
|
public String getMemorySpaceID() {
|
||||||
return fMemorySpaceID;
|
return fMemorySpaceID;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,6 +106,7 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#getExtendedMemoryBlock(java.lang.String, java.lang.Object, java.lang.String)
|
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#getExtendedMemoryBlock(java.lang.String, java.lang.Object, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IMemorySpaceAwareMemoryBlock getMemoryBlock(String expression, Object context, String memorySpaceID) throws DebugException {
|
public IMemorySpaceAwareMemoryBlock getMemoryBlock(String expression, Object context, String memorySpaceID) throws DebugException {
|
||||||
// Drill for the actual DMC
|
// Drill for the actual DMC
|
||||||
IMemoryDMContext memoryDmc = null;
|
IMemoryDMContext memoryDmc = null;
|
||||||
|
@ -185,6 +186,7 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
|
||||||
* implementation of
|
* implementation of
|
||||||
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceManagement#getMemorySpaces(Object context)
|
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceManagement#getMemorySpaces(Object context)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getMemorySpaces(final Object context, final GetMemorySpacesRequest request) {
|
public void getMemorySpaces(final Object context, final GetMemorySpacesRequest request) {
|
||||||
Query<String[]> query = new Query<String[]>() {
|
Query<String[]> query = new Query<String[]>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -227,6 +229,7 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#encodeAddress(java.lang.String, java.lang.String)
|
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#encodeAddress(java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String encodeAddress(String expression, String memorySpaceID) {
|
public String encodeAddress(String expression, String memorySpaceID) {
|
||||||
String result = null;
|
String result = null;
|
||||||
IMemorySpaces service = (IMemorySpaces)fMemorySpaceServiceTracker.getService();
|
IMemorySpaces service = (IMemorySpaces)fMemorySpaceServiceTracker.getService();
|
||||||
|
@ -244,13 +247,16 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#decodeAddress(java.lang.String)
|
* @see org.eclipse.cdt.debug.internal.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#decodeAddress(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public DecodeResult decodeAddress(String str) throws CoreException {
|
public DecodeResult decodeAddress(String str) throws CoreException {
|
||||||
IMemorySpaces service = (IMemorySpaces)fMemorySpaceServiceTracker.getService();
|
IMemorySpaces service = (IMemorySpaces)fMemorySpaceServiceTracker.getService();
|
||||||
if (service != null) {
|
if (service != null) {
|
||||||
final IMemorySpaces.DecodeResult result = service.decodeAddress(str);
|
final IMemorySpaces.DecodeResult result = service.decodeAddress(str);
|
||||||
if (result != null) { // service can return null to tell use to use default decoding
|
if (result != null) { // service can return null to tell use to use default decoding
|
||||||
return new DecodeResult() {
|
return new DecodeResult() {
|
||||||
|
@Override
|
||||||
public String getMemorySpaceId() { return result.getMemorySpaceId(); }
|
public String getMemorySpaceId() { return result.getMemorySpaceId(); }
|
||||||
|
@Override
|
||||||
public String getExpression() { return result.getExpression(); }
|
public String getExpression() { return result.getExpression(); }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -265,7 +271,9 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
|
||||||
final String memorySpaceID = str.substring(0, index);
|
final String memorySpaceID = str.substring(0, index);
|
||||||
final String expression = (index < str.length()-1) ? str.substring(index+1) : ""; //$NON-NLS-1$
|
final String expression = (index < str.length()-1) ? str.substring(index+1) : ""; //$NON-NLS-1$
|
||||||
return new DecodeResult() {
|
return new DecodeResult() {
|
||||||
|
@Override
|
||||||
public String getMemorySpaceId() { return memorySpaceID; }
|
public String getMemorySpaceId() { return memorySpaceID; }
|
||||||
|
@Override
|
||||||
public String getExpression() { return expression; }
|
public String getExpression() { return expression; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -365,6 +373,7 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#creatingBlockRequiresMemorySpaceID()
|
* @see org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval#creatingBlockRequiresMemorySpaceID()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean creatingBlockRequiresMemorySpaceID() {
|
public boolean creatingBlockRequiresMemorySpaceID() {
|
||||||
IMemorySpaces service = (IMemorySpaces)fMemorySpaceServiceTracker.getService();
|
IMemorySpaces service = (IMemorySpaces)fMemorySpaceServiceTracker.getService();
|
||||||
if (service != null) {
|
if (service != null) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ public abstract class AbstractTracepointAction extends AbstractBreakpointAction
|
||||||
/**
|
/**
|
||||||
* Tracepoint commands, by default, are not executed in Eclipse, but are executed by the backend.
|
* Tracepoint commands, by default, are not executed in Eclipse, but are executed by the backend.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IStatus execute(IBreakpoint breakpoint, IAdaptable context, IProgressMonitor monitor) {
|
public IStatus execute(IBreakpoint breakpoint, IAdaptable context, IProgressMonitor monitor) {
|
||||||
return new Status(IStatus.OK, GdbPlugin.PLUGIN_ID, null);
|
return new Status(IStatus.OK, GdbPlugin.PLUGIN_ID, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ public class CollectAction extends AbstractTracepointAction {
|
||||||
|
|
||||||
private String fCollectString = ""; //$NON-NLS-1$
|
private String fCollectString = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getDefaultName() {
|
public String getDefaultName() {
|
||||||
return MessagesForTracepointActions.TracepointActions_Untitled_Collect;
|
return MessagesForTracepointActions.TracepointActions_Untitled_Collect;
|
||||||
}
|
}
|
||||||
|
@ -49,10 +50,12 @@ public class CollectAction extends AbstractTracepointAction {
|
||||||
fCollectString = str;
|
fCollectString = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return COLLECT_ACTION_ID;
|
return COLLECT_ACTION_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getMemento() {
|
public String getMemento() {
|
||||||
String collectData = new String(""); //$NON-NLS-1$
|
String collectData = new String(""); //$NON-NLS-1$
|
||||||
|
|
||||||
|
@ -86,14 +89,17 @@ public class CollectAction extends AbstractTracepointAction {
|
||||||
return collectData;
|
return collectData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getSummary() {
|
public String getSummary() {
|
||||||
return MessageFormat.format(MessagesForTracepointActions.TracepointActions_Collect_text, new Object[] { fCollectString });
|
return MessageFormat.format(MessagesForTracepointActions.TracepointActions_Collect_text, new Object[] { fCollectString });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTypeName() {
|
public String getTypeName() {
|
||||||
return MessagesForTracepointActions.TracepointActions_Collect_Name;
|
return MessagesForTracepointActions.TracepointActions_Collect_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initializeFromMemento(String data) {
|
public void initializeFromMemento(String data) {
|
||||||
Element root = null;
|
Element root = null;
|
||||||
DocumentBuilder parser;
|
DocumentBuilder parser;
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class EvaluateAction extends AbstractTracepointAction {
|
||||||
|
|
||||||
private String fEvalString = ""; //$NON-NLS-1$
|
private String fEvalString = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getDefaultName() {
|
public String getDefaultName() {
|
||||||
return MessagesForTracepointActions.TracepointActions_Untitled_Evaluate;
|
return MessagesForTracepointActions.TracepointActions_Untitled_Evaluate;
|
||||||
}
|
}
|
||||||
|
@ -48,10 +49,12 @@ public class EvaluateAction extends AbstractTracepointAction {
|
||||||
fEvalString = str;
|
fEvalString = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return EVALUATE_ACTION_ID;
|
return EVALUATE_ACTION_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getMemento() {
|
public String getMemento() {
|
||||||
String collectData = new String(""); //$NON-NLS-1$
|
String collectData = new String(""); //$NON-NLS-1$
|
||||||
|
|
||||||
|
@ -85,14 +88,17 @@ public class EvaluateAction extends AbstractTracepointAction {
|
||||||
return collectData;
|
return collectData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getSummary() {
|
public String getSummary() {
|
||||||
return MessageFormat.format(MessagesForTracepointActions.TracepointActions_Evaluate_text, new Object[] { fEvalString });
|
return MessageFormat.format(MessagesForTracepointActions.TracepointActions_Evaluate_text, new Object[] { fEvalString });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTypeName() {
|
public String getTypeName() {
|
||||||
return MessagesForTracepointActions.TracepointActions_Evaluate_Name;
|
return MessagesForTracepointActions.TracepointActions_Evaluate_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initializeFromMemento(String data) {
|
public void initializeFromMemento(String data) {
|
||||||
Element root = null;
|
Element root = null;
|
||||||
DocumentBuilder parser;
|
DocumentBuilder parser;
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class WhileSteppingAction extends AbstractTracepointAction {
|
||||||
// The number of steps this while-stepping command will occur
|
// The number of steps this while-stepping command will occur
|
||||||
private int fStepCount = 1;
|
private int fStepCount = 1;
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getDefaultName() {
|
public String getDefaultName() {
|
||||||
return MessagesForTracepointActions.TracepointActions_Untitled_WhileStepping;
|
return MessagesForTracepointActions.TracepointActions_Untitled_WhileStepping;
|
||||||
}
|
}
|
||||||
|
@ -84,10 +85,12 @@ public class WhileSteppingAction extends AbstractTracepointAction {
|
||||||
fStepCount = count;
|
fStepCount = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return WHILE_STEPPING_ACTION_ID;
|
return WHILE_STEPPING_ACTION_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getMemento() {
|
public String getMemento() {
|
||||||
String collectData = new String(""); //$NON-NLS-1$
|
String collectData = new String(""); //$NON-NLS-1$
|
||||||
|
|
||||||
|
@ -122,14 +125,17 @@ public class WhileSteppingAction extends AbstractTracepointAction {
|
||||||
return collectData;
|
return collectData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getSummary() {
|
public String getSummary() {
|
||||||
return MessageFormat.format(MessagesForTracepointActions.TracepointActions_WhileStepping_text, new Object[] { fStepCount, fSubActionContent });
|
return MessageFormat.format(MessagesForTracepointActions.TracepointActions_WhileStepping_text, new Object[] { fStepCount, fSubActionContent });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTypeName() {
|
public String getTypeName() {
|
||||||
return MessagesForTracepointActions.TracepointActions_WhileStepping_Name;
|
return MessagesForTracepointActions.TracepointActions_WhileStepping_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void initializeFromMemento(String data) {
|
public void initializeFromMemento(String data) {
|
||||||
Element root = null;
|
Element root = null;
|
||||||
DocumentBuilder parser;
|
DocumentBuilder parser;
|
||||||
|
|
|
@ -103,6 +103,7 @@ public class GdbLaunch extends DsfLaunch
|
||||||
fSession.registerModelAdapter(ILaunch.class, this);
|
fSession.registerModelAdapter(ILaunch.class, this);
|
||||||
|
|
||||||
Runnable initRunnable = new DsfRunnable() {
|
Runnable initRunnable = new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), fSession.getId());
|
fTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), fSession.getId());
|
||||||
fSession.addServiceEventListener(GdbLaunch.this, null);
|
fSession.addServiceEventListener(GdbLaunch.this, null);
|
||||||
|
@ -128,6 +129,7 @@ public class GdbLaunch extends DsfLaunch
|
||||||
// Create a memory retrieval and register it with the session
|
// Create a memory retrieval and register it with the session
|
||||||
try {
|
try {
|
||||||
fExecutor.submit( new Callable<Object>() {
|
fExecutor.submit( new Callable<Object>() {
|
||||||
|
@Override
|
||||||
public Object call() throws CoreException {
|
public Object call() throws CoreException {
|
||||||
ICommandControlService commandControl = fTracker.getService(ICommandControlService.class);
|
ICommandControlService commandControl = fTracker.getService(ICommandControlService.class);
|
||||||
IMIProcesses procService = fTracker.getService(IMIProcesses.class);
|
IMIProcesses procService = fTracker.getService(IMIProcesses.class);
|
||||||
|
@ -160,6 +162,7 @@ public class GdbLaunch extends DsfLaunch
|
||||||
// Add the CLI process object to the launch.
|
// Add the CLI process object to the launch.
|
||||||
AbstractCLIProcess cliProc =
|
AbstractCLIProcess cliProc =
|
||||||
getDsfExecutor().submit( new Callable<AbstractCLIProcess>() {
|
getDsfExecutor().submit( new Callable<AbstractCLIProcess>() {
|
||||||
|
@Override
|
||||||
public AbstractCLIProcess call() throws CoreException {
|
public AbstractCLIProcess call() throws CoreException {
|
||||||
IGDBControl gdb = fTracker.getService(IGDBControl.class);
|
IGDBControl gdb = fTracker.getService(IGDBControl.class);
|
||||||
if (gdb != null) {
|
if (gdb != null) {
|
||||||
|
|
|
@ -93,6 +93,7 @@ public class ShutdownSequence extends Sequence {
|
||||||
}
|
}
|
||||||
Collections.sort( services, new Comparator<IDsfService>() {
|
Collections.sort( services, new Comparator<IDsfService>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public int compare( IDsfService o1, IDsfService o2 ) {
|
public int compare( IDsfService o1, IDsfService o2 ) {
|
||||||
return o2.getStartupNumber() - o1.getStartupNumber();
|
return o2.getStartupNumber() - o1.getStartupNumber();
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,6 +148,7 @@ public class CSourceLookup extends AbstractDsfService implements ISourceLookup {
|
||||||
super.shutdown(requestMonitor);
|
super.shutdown(requestMonitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getDebuggerPath(ISourceLookupDMContext sourceLookupCtx, Object source, final DataRequestMonitor<String> rm) {
|
public void getDebuggerPath(ISourceLookupDMContext sourceLookupCtx, Object source, final DataRequestMonitor<String> rm) {
|
||||||
if (!(source instanceof String)) {
|
if (!(source instanceof String)) {
|
||||||
// In future if needed other elements such as URIs could be supported.
|
// In future if needed other elements such as URIs could be supported.
|
||||||
|
@ -179,6 +180,7 @@ public class CSourceLookup extends AbstractDsfService implements ISourceLookup {
|
||||||
}.schedule();
|
}.schedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getSource(ISourceLookupDMContext sourceLookupCtx, final String debuggerPath, final DataRequestMonitor<Object> rm) {
|
public void getSource(ISourceLookupDMContext sourceLookupCtx, final String debuggerPath, final DataRequestMonitor<Object> rm) {
|
||||||
if (!fDirectors.containsKey(sourceLookupCtx)) {
|
if (!fDirectors.containsKey(sourceLookupCtx)) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
||||||
|
|
|
@ -218,6 +218,7 @@ public class MIBreakpointDMData implements IBreakpointDMData {
|
||||||
// IBreakpointDMData
|
// IBreakpointDMData
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getBreakpointType() {
|
public String getBreakpointType() {
|
||||||
return (String) fProperties.get(MIBreakpoints.BREAKPOINT_TYPE);
|
return (String) fProperties.get(MIBreakpoints.BREAKPOINT_TYPE);
|
||||||
}
|
}
|
||||||
|
@ -226,36 +227,44 @@ public class MIBreakpointDMData implements IBreakpointDMData {
|
||||||
return fBreakpoint.getNumber();
|
return fBreakpoint.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IAddress[] getAddresses() {
|
public IAddress[] getAddresses() {
|
||||||
IAddress[] addresses = new IAddress[1];
|
IAddress[] addresses = new IAddress[1];
|
||||||
addresses[0] = new Addr64(fBreakpoint.getAddress());
|
addresses[0] = new Addr64(fBreakpoint.getAddress());
|
||||||
return addresses;
|
return addresses;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getCondition() {
|
public String getCondition() {
|
||||||
return fBreakpoint.getCondition();
|
return fBreakpoint.getCondition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getExpression() {
|
public String getExpression() {
|
||||||
return fBreakpoint.getExpression();
|
return fBreakpoint.getExpression();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFileName() {
|
public String getFileName() {
|
||||||
return fBreakpoint.getFile();
|
return fBreakpoint.getFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFunctionName() {
|
public String getFunctionName() {
|
||||||
return fBreakpoint.getFunction();
|
return fBreakpoint.getFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getIgnoreCount() {
|
public int getIgnoreCount() {
|
||||||
return fBreakpoint.getIgnoreCount();
|
return fBreakpoint.getIgnoreCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getLineNumber() {
|
public int getLineNumber() {
|
||||||
return fBreakpoint.getLine();
|
return fBreakpoint.getLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return fBreakpoint.isEnabled();
|
return fBreakpoint.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,6 +188,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I
|
||||||
super(DMContexts.getAncestorOfType(bp, IBreakpointsTargetDMContext.class));
|
super(DMContexts.getAncestorOfType(bp, IBreakpointsTargetDMContext.class));
|
||||||
fEventBreakpoints = new IBreakpointDMContext[] { bp };
|
fEventBreakpoints = new IBreakpointDMContext[] { bp };
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public IBreakpointDMContext[] getBreakpoints() {
|
public IBreakpointDMContext[] getBreakpoints() {
|
||||||
return fEventBreakpoints;
|
return fEventBreakpoints;
|
||||||
}
|
}
|
||||||
|
@ -383,6 +384,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#getBreakpoints(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#getBreakpoints(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getBreakpoints(final IBreakpointsTargetDMContext context, final DataRequestMonitor<IBreakpointDMContext[]> drm)
|
public void getBreakpoints(final IBreakpointsTargetDMContext context, final DataRequestMonitor<IBreakpointDMContext[]> drm)
|
||||||
{
|
{
|
||||||
// Validate the context
|
// Validate the context
|
||||||
|
@ -430,6 +432,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#getBreakpointDMData(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IDsfBreakpointDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#getBreakpointDMData(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IDsfBreakpointDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getBreakpointDMData(IBreakpointDMContext dmc, DataRequestMonitor<IBreakpointDMData> drm)
|
public void getBreakpointDMData(IBreakpointDMContext dmc, DataRequestMonitor<IBreakpointDMData> drm)
|
||||||
{
|
{
|
||||||
// Validate the breakpoint context
|
// Validate the breakpoint context
|
||||||
|
@ -479,6 +482,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#insertBreakpoint(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext, java.util.Map, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#insertBreakpoint(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext, java.util.Map, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void insertBreakpoint(IBreakpointsTargetDMContext context, Map<String, Object> attributes, DataRequestMonitor<IBreakpointDMContext> drm) {
|
public void insertBreakpoint(IBreakpointsTargetDMContext context, Map<String, Object> attributes, DataRequestMonitor<IBreakpointDMContext> drm) {
|
||||||
|
|
||||||
// Validate the context
|
// Validate the context
|
||||||
|
@ -524,6 +528,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getExecutionContextBreakpoints(IExecutionDMContext ctx, DataRequestMonitor<IBreakpointDMContext[]> rm) {
|
public void getExecutionContextBreakpoints(IExecutionDMContext ctx, DataRequestMonitor<IBreakpointDMContext[]> rm) {
|
||||||
IBreakpointDMContext[] bps = fBreakpointHitMap.get(ctx);
|
IBreakpointDMContext[] bps = fBreakpointHitMap.get(ctx);
|
||||||
if (bps == null && ctx instanceof IContainerDMContext) {
|
if (bps == null && ctx instanceof IContainerDMContext) {
|
||||||
|
@ -866,6 +871,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#removeBreakpoint(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#removeBreakpoint(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeBreakpoint(final IBreakpointDMContext dmc, final RequestMonitor finalRm) {
|
public void removeBreakpoint(final IBreakpointDMContext dmc, final RequestMonitor finalRm) {
|
||||||
|
|
||||||
// Validate the breakpoint context
|
// Validate the breakpoint context
|
||||||
|
@ -940,6 +946,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#updateBreakpoint(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext, java.util.Map, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IBreakpoints#updateBreakpoint(org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext, java.util.Map, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void updateBreakpoint(IBreakpointDMContext dmc, Map<String, Object> properties, RequestMonitor rm)
|
public void updateBreakpoint(IBreakpointDMContext dmc, Map<String, Object> properties, RequestMonitor rm)
|
||||||
{
|
{
|
||||||
// Validate the breakpoint context
|
// Validate the breakpoint context
|
||||||
|
|
|
@ -365,7 +365,8 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
// Submit the runnable to plant the breakpoints on dispatch thread.
|
// Submit the runnable to plant the breakpoints on dispatch thread.
|
||||||
getExecutor().submit(new Runnable() {
|
getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
installInitialBreakpoints(dmc, rm);
|
installInitialBreakpoints(dmc, rm);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -399,7 +400,6 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(fDebugModelId);
|
IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(fDebugModelId);
|
||||||
for (IBreakpoint breakpoint : breakpoints) {
|
for (IBreakpoint breakpoint : breakpoints) {
|
||||||
if (supportsBreakpoint(breakpoint)) {
|
if (supportsBreakpoint(breakpoint)) {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
Map<String, Object> attributes = breakpoint.getMarker().getAttributes();
|
Map<String, Object> attributes = breakpoint.getMarker().getAttributes();
|
||||||
attributes.put(ATTR_DEBUGGER_PATH, NULL_STRING);
|
attributes.put(ATTR_DEBUGGER_PATH, NULL_STRING);
|
||||||
attributes.put(ATTR_THREAD_FILTER, extractThreads(dmc, (ICBreakpoint) breakpoint));
|
attributes.put(ATTR_THREAD_FILTER, extractThreads(dmc, (ICBreakpoint) breakpoint));
|
||||||
|
@ -1108,6 +1108,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.core.IBreakpointManagerListener#breakpointManagerEnablementChanged(boolean)
|
* @see org.eclipse.debug.core.IBreakpointManagerListener#breakpointManagerEnablementChanged(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void breakpointManagerEnablementChanged(boolean enabled) {
|
public void breakpointManagerEnablementChanged(boolean enabled) {
|
||||||
|
|
||||||
// Only modify enabled breakpoints
|
// Only modify enabled breakpoints
|
||||||
|
@ -1136,15 +1137,16 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
* @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)
|
* @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
|
@Override
|
||||||
public void breakpointAdded(final IBreakpoint breakpoint) {
|
public void breakpointAdded(final IBreakpoint breakpoint) {
|
||||||
|
|
||||||
if (supportsBreakpoint(breakpoint)) {
|
if (supportsBreakpoint(breakpoint)) {
|
||||||
try {
|
try {
|
||||||
// Retrieve the breakpoint attributes
|
// Retrieve the breakpoint attributes
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
final Map<String, Object> attrs = breakpoint.getMarker().getAttributes();
|
final Map<String, Object> attrs = breakpoint.getMarker().getAttributes();
|
||||||
|
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), null) {
|
final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1199,13 +1201,13 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
|
* @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void breakpointChanged(final IBreakpoint breakpoint, final IMarkerDelta delta) {
|
public void breakpointChanged(final IBreakpoint breakpoint, final IMarkerDelta delta) {
|
||||||
|
|
||||||
if (supportsBreakpoint(breakpoint)) {
|
if (supportsBreakpoint(breakpoint)) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Retrieve the breakpoint attributes
|
// Retrieve the breakpoint attributes
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
final Map<String, Object> attrs = breakpoint.getMarker().getAttributes();
|
final Map<String, Object> attrs = breakpoint.getMarker().getAttributes();
|
||||||
// Tracepoints are not affected by "skip-all"
|
// Tracepoints are not affected by "skip-all"
|
||||||
if (!(breakpoint instanceof ICTracepoint) && !fBreakpointManager.isEnabled()) {
|
if (!(breakpoint instanceof ICTracepoint) && !fBreakpointManager.isEnabled()) {
|
||||||
|
@ -1214,6 +1216,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
|
|
||||||
// Modify the breakpoint in all the target contexts
|
// Modify the breakpoint in all the target contexts
|
||||||
getExecutor().execute( new DsfRunnable() {
|
getExecutor().execute( new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
// If the breakpoint is currently being updated, queue the request and exit
|
// If the breakpoint is currently being updated, queue the request and exit
|
||||||
|
@ -1269,11 +1272,13 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
|
* @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void breakpointRemoved(final IBreakpoint breakpoint, IMarkerDelta delta) {
|
public void breakpointRemoved(final IBreakpoint breakpoint, IMarkerDelta delta) {
|
||||||
|
|
||||||
if (supportsBreakpoint(breakpoint)) {
|
if (supportsBreakpoint(breakpoint)) {
|
||||||
try {
|
try {
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), null) {
|
CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1448,6 +1453,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
private void clearBreakpointStatus(final ICBreakpoint[] bps, final IBreakpointsTargetDMContext ctx)
|
private void clearBreakpointStatus(final ICBreakpoint[] bps, final IBreakpointsTargetDMContext ctx)
|
||||||
{
|
{
|
||||||
IWorkspaceRunnable wr = new IWorkspaceRunnable() {
|
IWorkspaceRunnable wr = new IWorkspaceRunnable() {
|
||||||
|
@Override
|
||||||
public void run(IProgressMonitor monitor) throws CoreException {
|
public void run(IProgressMonitor monitor) throws CoreException {
|
||||||
// For every platform breakpoint that has at least one target breakpoint installed
|
// For every platform breakpoint that has at least one target breakpoint installed
|
||||||
// we must decrement the install count, for every target breakpoint.
|
// we must decrement the install count, for every target breakpoint.
|
||||||
|
|
|
@ -97,6 +97,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IDisassembly#getInstructions(org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext, java.math.BigInteger, java.math.BigInteger, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IDisassembly#getInstructions(org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext, java.math.BigInteger, java.math.BigInteger, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getInstructions(IDisassemblyDMContext context,
|
public void getInstructions(IDisassemblyDMContext context,
|
||||||
BigInteger startAddress, BigInteger endAddress,
|
BigInteger startAddress, BigInteger endAddress,
|
||||||
final DataRequestMonitor<IInstruction[]> drm)
|
final DataRequestMonitor<IInstruction[]> drm)
|
||||||
|
@ -125,6 +126,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IDisassembly#getInstructions(org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext, java.lang.String, int, int, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IDisassembly#getInstructions(org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext, java.lang.String, int, int, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getInstructions(IDisassemblyDMContext context, String filename,
|
public void getInstructions(IDisassemblyDMContext context, String filename,
|
||||||
int linenum, int lines, final DataRequestMonitor<IInstruction[]> drm)
|
int linenum, int lines, final DataRequestMonitor<IInstruction[]> drm)
|
||||||
{
|
{
|
||||||
|
@ -150,6 +152,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IDisassembly#getMixedInstructions(org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext, java.math.BigInteger, java.math.BigInteger, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IDisassembly#getMixedInstructions(org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext, java.math.BigInteger, java.math.BigInteger, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getMixedInstructions(IDisassemblyDMContext context,
|
public void getMixedInstructions(IDisassemblyDMContext context,
|
||||||
BigInteger startAddress, BigInteger endAddress,
|
BigInteger startAddress, BigInteger endAddress,
|
||||||
final DataRequestMonitor<IMixedInstruction[]> drm)
|
final DataRequestMonitor<IMixedInstruction[]> drm)
|
||||||
|
@ -178,6 +181,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IDisassembly#getMixedInstructions(org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext, java.lang.String, int, int, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IDisassembly#getMixedInstructions(org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext, java.lang.String, int, int, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getMixedInstructions(IDisassemblyDMContext context,
|
public void getMixedInstructions(IDisassemblyDMContext context,
|
||||||
String filename, int linenum, int lines,
|
String filename, int linenum, int lines,
|
||||||
final DataRequestMonitor<IMixedInstruction[]> drm)
|
final DataRequestMonitor<IMixedInstruction[]> drm)
|
||||||
|
|
|
@ -349,6 +349,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
/**
|
/**
|
||||||
* @return The full expression string represented by this ExpressionDMC
|
* @return The full expression string represented by this ExpressionDMC
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getExpression() {
|
public String getExpression() {
|
||||||
return exprInfo.getFullExpr();
|
return exprInfo.getFullExpr();
|
||||||
}
|
}
|
||||||
|
@ -407,6 +408,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
return baseToString() + ".invalid_expr[" + expression + "]"; //$NON-NLS-1$ //$NON-NLS-2$
|
return baseToString() + ".invalid_expr[" + expression + "]"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getExpression() {
|
public String getExpression() {
|
||||||
return expression;
|
return expression;
|
||||||
}
|
}
|
||||||
|
@ -437,7 +439,9 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IAddress getAddress() { return fAddr; }
|
public IAddress getAddress() { return fAddr; }
|
||||||
|
@Override
|
||||||
public int getSize() { return fSize; }
|
public int getSize() { return fSize; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -468,14 +472,17 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
*/
|
*/
|
||||||
protected class InvalidDMAddress implements IExpressionDMLocation {
|
protected class InvalidDMAddress implements IExpressionDMLocation {
|
||||||
|
|
||||||
|
@Override
|
||||||
public IAddress getAddress() {
|
public IAddress getAddress() {
|
||||||
return IExpressions.IExpressionDMLocation.INVALID_ADDRESS;
|
return IExpressions.IExpressionDMLocation.INVALID_ADDRESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getLocation() {
|
public String getLocation() {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -525,22 +532,27 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
fBasicType = basicType;
|
fBasicType = basicType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public BasicType getBasicType() {
|
public BasicType getBasicType() {
|
||||||
return fBasicType;
|
return fBasicType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getEncoding() {
|
public String getEncoding() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<String, Integer> getEnumerations() {
|
public Map<String, Integer> getEnumerations() {
|
||||||
return new HashMap<String, Integer>();
|
return new HashMap<String, Integer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return relativeExpression;
|
return relativeExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRegisterDMContext getRegister() {
|
public IRegisterDMContext getRegister() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -550,10 +562,12 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTypeId() {
|
public String getTypeId() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTypeName() {
|
public String getTypeName() {
|
||||||
return exprType;
|
return exprType;
|
||||||
}
|
}
|
||||||
|
@ -586,6 +600,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
/**
|
/**
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasChildren() {
|
public boolean hasChildren() {
|
||||||
return numChildrenHint > 0;
|
return numChildrenHint > 0;
|
||||||
}
|
}
|
||||||
|
@ -739,6 +754,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
/**
|
/**
|
||||||
* Create an expression context with the same full and relative expression
|
* Create an expression context with the same full and relative expression
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IExpressionDMContext createExpression(IDMContext ctx, String expression) {
|
public IExpressionDMContext createExpression(IDMContext ctx, String expression) {
|
||||||
return createExpression(ctx, expression, expression);
|
return createExpression(ctx, expression, expression);
|
||||||
}
|
}
|
||||||
|
@ -797,6 +813,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* of an expression in a specific format.
|
* of an expression in a specific format.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public FormattedValueDMContext getFormattedValueContext(
|
public FormattedValueDMContext getFormattedValueContext(
|
||||||
IFormattedDataDMContext dmc, String formatId) {
|
IFormattedDataDMContext dmc, String formatId) {
|
||||||
return new FormattedValueDMContext(this, dmc, formatId);
|
return new FormattedValueDMContext(this, dmc, formatId);
|
||||||
|
@ -813,6 +830,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getAvailableFormats(IFormattedDataDMContext dmc,
|
public void getAvailableFormats(IFormattedDataDMContext dmc,
|
||||||
final DataRequestMonitor<String[]> rm) {
|
final DataRequestMonitor<String[]> rm) {
|
||||||
rm.setData(FORMATS_SUPPORTED);
|
rm.setData(FORMATS_SUPPORTED);
|
||||||
|
@ -828,6 +846,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @param rm
|
* @param rm
|
||||||
* The data request monitor that will contain the requested data
|
* The data request monitor that will contain the requested data
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getExpressionData(
|
public void getExpressionData(
|
||||||
final IExpressionDMContext dmc,
|
final IExpressionDMContext dmc,
|
||||||
final DataRequestMonitor<IExpressionDMData> rm)
|
final DataRequestMonitor<IExpressionDMData> rm)
|
||||||
|
@ -892,6 +911,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @param rm
|
* @param rm
|
||||||
* The data request monitor that will contain the requested data
|
* The data request monitor that will contain the requested data
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getExpressionAddressData(
|
public void getExpressionAddressData(
|
||||||
IExpressionDMContext dmc,
|
IExpressionDMContext dmc,
|
||||||
final DataRequestMonitor<IExpressionDMAddress> rm) {
|
final DataRequestMonitor<IExpressionDMAddress> rm) {
|
||||||
|
@ -961,6 +981,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @param rm
|
* @param rm
|
||||||
* The data request monitor that will contain the requested data
|
* The data request monitor that will contain the requested data
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getFormattedExpressionValue(
|
public void getFormattedExpressionValue(
|
||||||
final FormattedValueDMContext dmc,
|
final FormattedValueDMContext dmc,
|
||||||
final DataRequestMonitor<FormattedValueDMData> rm)
|
final DataRequestMonitor<FormattedValueDMData> rm)
|
||||||
|
@ -1025,6 +1046,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IExpressions#getBaseExpressions(org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IExpressions#getBaseExpressions(org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getBaseExpressions(IExpressionDMContext exprContext,
|
public void getBaseExpressions(IExpressionDMContext exprContext,
|
||||||
DataRequestMonitor<IExpressionDMContext[]> rm) {
|
DataRequestMonitor<IExpressionDMContext[]> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
||||||
|
@ -1041,6 +1063,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @param rm
|
* @param rm
|
||||||
* The data request monitor that will contain the requested data
|
* The data request monitor that will contain the requested data
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getSubExpressions(final IExpressionDMContext dmc,
|
public void getSubExpressions(final IExpressionDMContext dmc,
|
||||||
final DataRequestMonitor<IExpressionDMContext[]> rm)
|
final DataRequestMonitor<IExpressionDMContext[]> rm)
|
||||||
{
|
{
|
||||||
|
@ -1085,6 +1108,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @param rm
|
* @param rm
|
||||||
* The data request monitor that will contain the requested data
|
* The data request monitor that will contain the requested data
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getSubExpressions(final IExpressionDMContext exprCtx, final int startIndex,
|
public void getSubExpressions(final IExpressionDMContext exprCtx, final int startIndex,
|
||||||
final int length, final DataRequestMonitor<IExpressionDMContext[]> rm) {
|
final int length, final DataRequestMonitor<IExpressionDMContext[]> rm) {
|
||||||
|
|
||||||
|
@ -1131,6 +1155,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
/**
|
/**
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void safeToAskForAllSubExpressions(IExpressionDMContext dmc,
|
public void safeToAskForAllSubExpressions(IExpressionDMContext dmc,
|
||||||
final DataRequestMonitor<Boolean> rm) {
|
final DataRequestMonitor<Boolean> rm) {
|
||||||
if (dmc instanceof MIExpressionDMC) {
|
if (dmc instanceof MIExpressionDMC) {
|
||||||
|
@ -1157,6 +1182,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
/**
|
/**
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getSubExpressionCount(IExpressionDMContext dmc,
|
public void getSubExpressionCount(IExpressionDMContext dmc,
|
||||||
final int numChildLimit, final DataRequestMonitor<Integer> rm) {
|
final int numChildLimit, final DataRequestMonitor<Integer> rm) {
|
||||||
|
|
||||||
|
@ -1188,6 +1214,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @param rm
|
* @param rm
|
||||||
* The data request monitor that will contain the requested data
|
* The data request monitor that will contain the requested data
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getSubExpressionCount(IExpressionDMContext dmc,
|
public void getSubExpressionCount(IExpressionDMContext dmc,
|
||||||
final DataRequestMonitor<Integer> rm)
|
final DataRequestMonitor<Integer> rm)
|
||||||
{
|
{
|
||||||
|
@ -1202,6 +1229,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @param rm Data Request monitor containing True if this expression's value can be edited. False otherwise.
|
* @param rm Data Request monitor containing True if this expression's value can be edited. False otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public void canWriteExpression(IExpressionDMContext dmc, final DataRequestMonitor<Boolean> rm) {
|
public void canWriteExpression(IExpressionDMContext dmc, final DataRequestMonitor<Boolean> rm) {
|
||||||
if (dmc instanceof MIExpressionDMC) {
|
if (dmc instanceof MIExpressionDMC) {
|
||||||
fExpressionCache.execute(
|
fExpressionCache.execute(
|
||||||
|
@ -1236,6 +1264,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @param rm
|
* @param rm
|
||||||
* The request monitor that will indicate the completion of the operation
|
* The request monitor that will indicate the completion of the operation
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void writeExpression(final IExpressionDMContext dmc, String expressionValue,
|
public void writeExpression(final IExpressionDMContext dmc, String expressionValue,
|
||||||
String formatId, final RequestMonitor rm) {
|
String formatId, final RequestMonitor rm) {
|
||||||
|
|
||||||
|
@ -1305,6 +1334,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void flushCache(IDMContext context) {
|
public void flushCache(IDMContext context) {
|
||||||
fExpressionCache.reset(context);
|
fExpressionCache.reset(context);
|
||||||
// We must also mark all variable objects as out-of-date
|
// We must also mark all variable objects as out-of-date
|
||||||
|
@ -1331,6 +1361,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IExpressions2.ICastedExpressionDMContext#getCastInfo()
|
* @see org.eclipse.cdt.dsf.debug.service.IExpressions2.ICastedExpressionDMContext#getCastInfo()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public CastInfo getCastInfo() {
|
public CastInfo getCastInfo() {
|
||||||
return fCastInfo;
|
return fCastInfo;
|
||||||
}
|
}
|
||||||
|
@ -1364,6 +1395,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IExpressions2#createCastedExpression(org.eclipse.cdt.dsf.datamodel.IDMContext, java.lang.String, org.eclipse.cdt.dsf.debug.service.IExpressions2.ICastedExpressionDMContext)
|
* @see org.eclipse.cdt.dsf.debug.service.IExpressions2#createCastedExpression(org.eclipse.cdt.dsf.datamodel.IDMContext, java.lang.String, org.eclipse.cdt.dsf.debug.service.IExpressions2.ICastedExpressionDMContext)
|
||||||
*/
|
*/
|
||||||
/** @since 3.0 */
|
/** @since 3.0 */
|
||||||
|
@Override
|
||||||
public ICastedExpressionDMContext createCastedExpression(IExpressionDMContext exprDMC, CastInfo castInfo) {
|
public ICastedExpressionDMContext createCastedExpression(IExpressionDMContext exprDMC, CastInfo castInfo) {
|
||||||
if (exprDMC instanceof MIExpressionDMC && castInfo != null) {
|
if (exprDMC instanceof MIExpressionDMC && castInfo != null) {
|
||||||
String castType = castInfo.getTypeString();
|
String castType = castInfo.getTypeString();
|
||||||
|
@ -1400,6 +1432,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IExpressions3#getExpressionDataExtension(org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IExpressions3#getExpressionDataExtension(org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
/** @since 4.0 */
|
/** @since 4.0 */
|
||||||
|
@Override
|
||||||
public void getExpressionDataExtension(IExpressionDMContext dmc, final DataRequestMonitor<IExpressionDMDataExtension> rm) {
|
public void getExpressionDataExtension(IExpressionDMContext dmc, final DataRequestMonitor<IExpressionDMDataExtension> rm) {
|
||||||
getExpressionData(dmc, new DataRequestMonitor<IExpressionDMData>(getExecutor(), rm) {
|
getExpressionData(dmc, new DataRequestMonitor<IExpressionDMData>(getExecutor(), rm) {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -75,6 +75,7 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer
|
||||||
fAddresses = addresses;
|
fAddresses = addresses;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IAddress[] getAddresses() {
|
public IAddress[] getAddresses() {
|
||||||
return fAddresses;
|
return fAddresses;
|
||||||
}
|
}
|
||||||
|
@ -199,6 +200,7 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IMemory#getMemory(org.eclipse.cdt.dsf.datamodel.IDMContext, org.eclipse.cdt.core.IAddress, long, int, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IMemory#getMemory(org.eclipse.cdt.dsf.datamodel.IDMContext, org.eclipse.cdt.core.IAddress, long, int, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getMemory(IMemoryDMContext memoryDMC, IAddress address, long offset,
|
public void getMemory(IMemoryDMContext memoryDMC, IAddress address, long offset,
|
||||||
int word_size, int count, DataRequestMonitor<MemoryByte[]> drm)
|
int word_size, int count, DataRequestMonitor<MemoryByte[]> drm)
|
||||||
{
|
{
|
||||||
|
@ -231,6 +233,7 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IMemory#setMemory(org.eclipse.cdt.dsf.datamodel.IDMContext, org.eclipse.cdt.core.IAddress, long, int, byte[], org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IMemory#setMemory(org.eclipse.cdt.dsf.datamodel.IDMContext, org.eclipse.cdt.core.IAddress, long, int, byte[], org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setMemory(IMemoryDMContext memoryDMC, IAddress address, long offset,
|
public void setMemory(IMemoryDMContext memoryDMC, IAddress address, long offset,
|
||||||
int word_size, int count, byte[] buffer, RequestMonitor rm)
|
int word_size, int count, byte[] buffer, RequestMonitor rm)
|
||||||
{
|
{
|
||||||
|
@ -270,6 +273,7 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IMemory#fillMemory(org.eclipse.cdt.dsf.datamodel.IDMContext, org.eclipse.cdt.core.IAddress, long, int, byte[], org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IMemory#fillMemory(org.eclipse.cdt.dsf.datamodel.IDMContext, org.eclipse.cdt.core.IAddress, long, int, byte[], org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void fillMemory(IMemoryDMContext memoryDMC, IAddress address, long offset,
|
public void fillMemory(IMemoryDMContext memoryDMC, IAddress address, long offset,
|
||||||
int word_size, int count, byte[] pattern, RequestMonitor rm)
|
int word_size, int count, byte[] pattern, RequestMonitor rm)
|
||||||
{
|
{
|
||||||
|
@ -994,6 +998,7 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void flushCache(IDMContext context) {
|
public void flushCache(IDMContext context) {
|
||||||
fCommandCache.reset(context);
|
fCommandCache.reset(context);
|
||||||
|
|
||||||
|
|
|
@ -121,30 +121,37 @@ public class MIModules extends AbstractDsfService implements IModules, ICachingS
|
||||||
fIsSymbolsRead = isSymsRead;
|
fIsSymbolsRead = isSymsRead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFile() {
|
public String getFile() {
|
||||||
return fFile;
|
return fFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return fFile;
|
return fFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getTimeStamp() {
|
public long getTimeStamp() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBaseAddress() {
|
@Override
|
||||||
|
public String getBaseAddress() {
|
||||||
return fFromAddress;
|
return fFromAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getToAddress() {
|
public String getToAddress() {
|
||||||
return fToAddress;
|
return fToAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isSymbolsLoaded() {
|
public boolean isSymbolsLoaded() {
|
||||||
return fIsSymbolsRead;
|
return fIsSymbolsRead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getSize() {
|
public long getSize() {
|
||||||
long result = 0;
|
long result = 0;
|
||||||
if(getBaseAddress() == null || getToAddress() == null)
|
if(getBaseAddress() == null || getToAddress() == null)
|
||||||
|
@ -158,6 +165,7 @@ public class MIModules extends AbstractDsfService implements IModules, ICachingS
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getModules(final ISymbolDMContext symCtx, final DataRequestMonitor<IModuleDMContext[]> rm) {
|
public void getModules(final ISymbolDMContext symCtx, final DataRequestMonitor<IModuleDMContext[]> rm) {
|
||||||
if(symCtx != null){
|
if(symCtx != null){
|
||||||
fModulesCache.execute(fCommandFactory.createCLIInfoSharedLibrary(symCtx),
|
fModulesCache.execute(fCommandFactory.createCLIInfoSharedLibrary(symCtx),
|
||||||
|
@ -186,6 +194,7 @@ public class MIModules extends AbstractDsfService implements IModules, ICachingS
|
||||||
return modules;
|
return modules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getModuleData(final IModuleDMContext dmc, final DataRequestMonitor<IModuleDMData> rm) {
|
public void getModuleData(final IModuleDMContext dmc, final DataRequestMonitor<IModuleDMData> rm) {
|
||||||
assert dmc != null;
|
assert dmc != null;
|
||||||
if (dmc instanceof ModuleDMContext) {
|
if (dmc instanceof ModuleDMContext) {
|
||||||
|
@ -213,11 +222,13 @@ public class MIModules extends AbstractDsfService implements IModules, ICachingS
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void calcAddressInfo(ISymbolDMContext symCtx, String file, int line, int col, DataRequestMonitor<AddressRange[]> rm) {
|
public void calcAddressInfo(ISymbolDMContext symCtx, String file, int line, int col, DataRequestMonitor<AddressRange[]> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Functionality not supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Functionality not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void calcLineInfo(ISymbolDMContext symCtx, IAddress address, DataRequestMonitor<LineInfo[]> rm) {
|
public void calcLineInfo(ISymbolDMContext symCtx, IAddress address, DataRequestMonitor<LineInfo[]> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Functionality not supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Functionality not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -227,6 +238,7 @@ public class MIModules extends AbstractDsfService implements IModules, ICachingS
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void flushCache(IDMContext context) {
|
public void flushCache(IDMContext context) {
|
||||||
fModulesCache.reset();
|
fModulesCache.reset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
* Returns the GDB/MI thread identifier of this context.
|
* Returns the GDB/MI thread identifier of this context.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getThreadId(){
|
public int getThreadId(){
|
||||||
try {
|
try {
|
||||||
return Integer.parseInt(fThreadId);
|
return Integer.parseInt(fThreadId);
|
||||||
|
@ -162,6 +163,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
/**
|
/**
|
||||||
* Returns the GDB/MI thread group identifier of this context.
|
* Returns the GDB/MI thread group identifier of this context.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getGroupId(){ return fId; }
|
public String getGroupId(){ return fId; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -249,6 +251,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
fId = id;
|
fId = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getProcId() { return fId; }
|
public String getProcId() { return fId; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -302,8 +305,11 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
fId = id;
|
fId = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getId() { return fId; }
|
public String getId() { return fId; }
|
||||||
|
@Override
|
||||||
public String getName() { return fName; }
|
public String getName() { return fName; }
|
||||||
|
@Override
|
||||||
public boolean isDebuggerAttached() {
|
public boolean isDebuggerAttached() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -423,36 +429,43 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
return GdbPlugin.getBundleContext();
|
return GdbPlugin.getBundleContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IThreadDMContext createThreadContext(IProcessDMContext processDmc, String threadId) {
|
public IThreadDMContext createThreadContext(IProcessDMContext processDmc, String threadId) {
|
||||||
return new MIThreadDMC(getSession().getId(), processDmc, threadId);
|
return new MIThreadDMC(getSession().getId(), processDmc, threadId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IProcessDMContext createProcessContext(ICommandControlDMContext controlDmc, String pid) {
|
public IProcessDMContext createProcessContext(ICommandControlDMContext controlDmc, String pid) {
|
||||||
return new MIProcessDMC(getSession().getId(), controlDmc, pid);
|
return new MIProcessDMC(getSession().getId(), controlDmc, pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IMIExecutionDMContext createExecutionContext(IContainerDMContext containerDmc,
|
public IMIExecutionDMContext createExecutionContext(IContainerDMContext containerDmc,
|
||||||
IThreadDMContext threadDmc,
|
IThreadDMContext threadDmc,
|
||||||
String threadId) {
|
String threadId) {
|
||||||
return new MIExecutionDMC(getSession().getId(), containerDmc, threadDmc, threadId);
|
return new MIExecutionDMC(getSession().getId(), containerDmc, threadDmc, threadId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IMIContainerDMContext createContainerContext(IProcessDMContext processDmc,
|
public IMIContainerDMContext createContainerContext(IProcessDMContext processDmc,
|
||||||
String groupId) {
|
String groupId) {
|
||||||
return new MIContainerDMC(getSession().getId(), processDmc, groupId);
|
return new MIContainerDMC(getSession().getId(), processDmc, groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IMIContainerDMContext createContainerContextFromThreadId(ICommandControlDMContext controlDmc, String threadId) {
|
public IMIContainerDMContext createContainerContextFromThreadId(ICommandControlDMContext controlDmc, String threadId) {
|
||||||
return createContainerContextFromGroupId(controlDmc, UNIQUE_GROUP_ID);
|
return createContainerContextFromGroupId(controlDmc, UNIQUE_GROUP_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 4.0 */
|
/** @since 4.0 */
|
||||||
|
@Override
|
||||||
public IMIContainerDMContext createContainerContextFromGroupId(ICommandControlDMContext controlDmc, String groupId) {
|
public IMIContainerDMContext createContainerContextFromGroupId(ICommandControlDMContext controlDmc, String groupId) {
|
||||||
IProcessDMContext processDmc = createProcessContext(controlDmc, UNKNOWN_PROCESS_ID);
|
IProcessDMContext processDmc = createProcessContext(controlDmc, UNKNOWN_PROCESS_ID);
|
||||||
return createContainerContext(processDmc, groupId);
|
return createContainerContext(processDmc, groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getExecutionData(IThreadDMContext dmc, final DataRequestMonitor<IThreadDMData> rm) {
|
public void getExecutionData(IThreadDMContext dmc, final DataRequestMonitor<IThreadDMData> rm) {
|
||||||
if (dmc instanceof MIProcessDMC) {
|
if (dmc instanceof MIProcessDMC) {
|
||||||
rm.setData(new MIThreadDMData("", ((MIProcessDMC)dmc).getProcId())); //$NON-NLS-1$
|
rm.setData(new MIThreadDMData("", ((MIProcessDMC)dmc).getProcId())); //$NON-NLS-1$
|
||||||
|
@ -495,6 +508,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getDebuggingContext(IThreadDMContext dmc, DataRequestMonitor<IDMContext> rm) {
|
public void getDebuggingContext(IThreadDMContext dmc, DataRequestMonitor<IDMContext> rm) {
|
||||||
if (dmc instanceof MIProcessDMC) {
|
if (dmc instanceof MIProcessDMC) {
|
||||||
MIProcessDMC procDmc = (MIProcessDMC)dmc;
|
MIProcessDMC procDmc = (MIProcessDMC)dmc;
|
||||||
|
@ -511,11 +525,13 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void isDebuggerAttachSupported(IDMContext dmc, DataRequestMonitor<Boolean> rm) {
|
public void isDebuggerAttachSupported(IDMContext dmc, DataRequestMonitor<Boolean> rm) {
|
||||||
rm.setData(false);
|
rm.setData(false);
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void attachDebuggerToProcess(final IProcessDMContext procCtx, final DataRequestMonitor<IDMContext> rm) {
|
public void attachDebuggerToProcess(final IProcessDMContext procCtx, final DataRequestMonitor<IDMContext> rm) {
|
||||||
if (procCtx instanceof IMIProcessDMContext) {
|
if (procCtx instanceof IMIProcessDMContext) {
|
||||||
|
|
||||||
|
@ -539,11 +555,13 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void canDetachDebuggerFromProcess(IDMContext dmc, DataRequestMonitor<Boolean> rm) {
|
public void canDetachDebuggerFromProcess(IDMContext dmc, DataRequestMonitor<Boolean> rm) {
|
||||||
rm.setData(false);
|
rm.setData(false);
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void detachDebuggerFromProcess(final IDMContext dmc, final RequestMonitor rm) {
|
public void detachDebuggerFromProcess(final IDMContext dmc, final RequestMonitor rm) {
|
||||||
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
|
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
|
||||||
|
|
||||||
|
@ -574,16 +592,19 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void canTerminate(IThreadDMContext thread, DataRequestMonitor<Boolean> rm) {
|
public void canTerminate(IThreadDMContext thread, DataRequestMonitor<Boolean> rm) {
|
||||||
rm.setData(true);
|
rm.setData(true);
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void isDebugNewProcessSupported(IDMContext dmc, DataRequestMonitor<Boolean> rm) {
|
public void isDebugNewProcessSupported(IDMContext dmc, DataRequestMonitor<Boolean> rm) {
|
||||||
rm.setData(false);
|
rm.setData(false);
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void debugNewProcess(IDMContext dmc, String file,
|
public void debugNewProcess(IDMContext dmc, String file,
|
||||||
Map<String, Object> attributes, DataRequestMonitor<IDMContext> rm) {
|
Map<String, Object> attributes, DataRequestMonitor<IDMContext> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
||||||
|
@ -591,6 +612,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getProcessesBeingDebugged(IDMContext dmc, final DataRequestMonitor<IDMContext[]> rm) {
|
public void getProcessesBeingDebugged(IDMContext dmc, final DataRequestMonitor<IDMContext[]> rm) {
|
||||||
final IMIContainerDMContext containerDmc = DMContexts.getAncestorOfType(dmc, IMIContainerDMContext.class);
|
final IMIContainerDMContext containerDmc = DMContexts.getAncestorOfType(dmc, IMIContainerDMContext.class);
|
||||||
if (containerDmc != null) {
|
if (containerDmc != null) {
|
||||||
|
@ -636,16 +658,20 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getRunningProcesses(IDMContext dmc, final DataRequestMonitor<IProcessDMContext[]> rm) {
|
public void getRunningProcesses(IDMContext dmc, final DataRequestMonitor<IProcessDMContext[]> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
||||||
NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void isRunNewProcessSupported(IDMContext dmc, DataRequestMonitor<Boolean> rm) {
|
public void isRunNewProcessSupported(IDMContext dmc, DataRequestMonitor<Boolean> rm) {
|
||||||
rm.setData(false);
|
rm.setData(false);
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void runNewProcess(IDMContext dmc, String file,
|
public void runNewProcess(IDMContext dmc, String file,
|
||||||
Map<String, Object> attributes, DataRequestMonitor<IProcessDMContext> rm) {
|
Map<String, Object> attributes, DataRequestMonitor<IProcessDMContext> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
||||||
|
@ -653,6 +679,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void terminate(IThreadDMContext thread, RequestMonitor rm) {
|
public void terminate(IThreadDMContext thread, RequestMonitor rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID,
|
||||||
NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
NOT_SUPPORTED, "Not supported", null)); //$NON-NLS-1$
|
||||||
|
@ -716,6 +743,7 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
fContainerCommandCache.reset();
|
fContainerCommandCache.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void flushCache(IDMContext context) {
|
public void flushCache(IDMContext context) {
|
||||||
fContainerCommandCache.reset(context);
|
fContainerCommandCache.reset(context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,6 +136,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
fRegisterDmc = registerDMC;
|
fRegisterDmc = registerDMC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IRegisterDMContext getDMContext() {
|
public IRegisterDMContext getDMContext() {
|
||||||
return fRegisterDmc;
|
return fRegisterDmc;
|
||||||
}
|
}
|
||||||
|
@ -221,6 +222,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
|
|
||||||
public boolean isValid() { return true; }
|
public boolean isValid() { return true; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getFormattedExpressionValue(FormattedValueDMContext dmc, DataRequestMonitor<FormattedValueDMData> rm) {
|
public void getFormattedExpressionValue(FormattedValueDMContext dmc, DataRequestMonitor<FormattedValueDMData> rm) {
|
||||||
if (dmc.getParents().length == 1 && dmc.getParents()[0] instanceof MIRegisterDMC) {
|
if (dmc.getParents().length == 1 && dmc.getParents()[0] instanceof MIRegisterDMC) {
|
||||||
getRegisterDataValue( (MIRegisterDMC) dmc.getParents()[0], dmc.getFormatID(), rm);
|
getRegisterDataValue( (MIRegisterDMC) dmc.getParents()[0], dmc.getFormatID(), rm);
|
||||||
|
@ -230,13 +232,16 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getRegisterGroupData(IRegisterGroupDMContext regGroupDmc, DataRequestMonitor<IRegisterGroupDMData> rm) {
|
public void getRegisterGroupData(IRegisterGroupDMContext regGroupDmc, DataRequestMonitor<IRegisterGroupDMData> rm) {
|
||||||
/**
|
/**
|
||||||
* For the GDB GDBMI implementation there is only on group. The GPR and FPU registers are grouped into
|
* For the GDB GDBMI implementation there is only on group. The GPR and FPU registers are grouped into
|
||||||
* one set. We are going to hard wire this set as the "General Registers".
|
* one set. We are going to hard wire this set as the "General Registers".
|
||||||
*/
|
*/
|
||||||
class RegisterGroupData implements IRegisterGroupDMData {
|
class RegisterGroupData implements IRegisterGroupDMData {
|
||||||
|
@Override
|
||||||
public String getName() { return "General Registers"; } //$NON-NLS-1$
|
public String getName() { return "General Registers"; } //$NON-NLS-1$
|
||||||
|
@Override
|
||||||
public String getDescription() { return "General Purpose and FPU Register Group"; } //$NON-NLS-1$
|
public String getDescription() { return "General Purpose and FPU Register Group"; } //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,6 +249,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getBitFieldData(IBitFieldDMContext dmc, DataRequestMonitor<IBitFieldDMData> rm) {
|
public void getBitFieldData(IBitFieldDMContext dmc, DataRequestMonitor<IBitFieldDMData> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Bit fields not yet supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Bit fields not yet supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -254,6 +260,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* this group as a single list we maintain within this service. So we
|
* this group as a single list we maintain within this service. So we
|
||||||
* need to search this list to see if we have a current value.
|
* need to search this list to see if we have a current value.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getRegisterData(IRegisterDMContext regDmc , final DataRequestMonitor<IRegisterDMData> rm) {
|
public void getRegisterData(IRegisterDMContext regDmc , final DataRequestMonitor<IRegisterDMData> rm) {
|
||||||
if (regDmc instanceof MIRegisterDMC) {
|
if (regDmc instanceof MIRegisterDMC) {
|
||||||
final MIRegisterDMC miRegDmc = (MIRegisterDMC)regDmc;
|
final MIRegisterDMC miRegDmc = (MIRegisterDMC)regDmc;
|
||||||
|
@ -362,15 +369,24 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
fIsFloat = isFloat;
|
fIsFloat = isFloat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isReadable() { return true; }
|
public boolean isReadable() { return true; }
|
||||||
|
@Override
|
||||||
public boolean isReadOnce() { return false; }
|
public boolean isReadOnce() { return false; }
|
||||||
|
@Override
|
||||||
public boolean isWriteable() { return true; }
|
public boolean isWriteable() { return true; }
|
||||||
|
@Override
|
||||||
public boolean isWriteOnce() { return false; }
|
public boolean isWriteOnce() { return false; }
|
||||||
|
@Override
|
||||||
public boolean hasSideEffects() { return false; }
|
public boolean hasSideEffects() { return false; }
|
||||||
|
@Override
|
||||||
public boolean isVolatile() { return true; }
|
public boolean isVolatile() { return true; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isFloat() { return fIsFloat; }
|
public boolean isFloat() { return fIsFloat; }
|
||||||
|
@Override
|
||||||
public String getName() { return fRegName; }
|
public String getName() { return fRegName; }
|
||||||
|
@Override
|
||||||
public String getDescription() { return fRegDesc; }
|
public String getDescription() { return fRegDesc; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,6 +459,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#getRegisterGroups(org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext, org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#getRegisterGroups(org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext, org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getRegisterGroups(IDMContext ctx, DataRequestMonitor<IRegisterGroupDMContext[]> rm ) {
|
public void getRegisterGroups(IDMContext ctx, DataRequestMonitor<IRegisterGroupDMContext[]> rm ) {
|
||||||
IContainerDMContext contDmc = DMContexts.getAncestorOfType(ctx, IContainerDMContext.class);
|
IContainerDMContext contDmc = DMContexts.getAncestorOfType(ctx, IContainerDMContext.class);
|
||||||
if (contDmc == null) {
|
if (contDmc == null) {
|
||||||
|
@ -464,6 +481,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#getRegisters(org.eclipse.cdt.dsf.debug.service.IRegisters.IRegisterGroupDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#getRegisters(org.eclipse.cdt.dsf.debug.service.IRegisters.IRegisterGroupDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getRegisters(final IDMContext dmc, final DataRequestMonitor<IRegisterDMContext[]> rm) {
|
public void getRegisters(final IDMContext dmc, final DataRequestMonitor<IRegisterDMContext[]> rm) {
|
||||||
final MIRegisterGroupDMC groupDmc = DMContexts.getAncestorOfType(dmc, MIRegisterGroupDMC.class);
|
final MIRegisterGroupDMC groupDmc = DMContexts.getAncestorOfType(dmc, MIRegisterGroupDMC.class);
|
||||||
if ( groupDmc == null ) {
|
if ( groupDmc == null ) {
|
||||||
|
@ -513,6 +531,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#getBitFields(org.eclipse.cdt.dsf.debug.service.IRegisters.IRegisterDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#getBitFields(org.eclipse.cdt.dsf.debug.service.IRegisters.IRegisterDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getBitFields( IDMContext regDmc , DataRequestMonitor<IBitFieldDMContext[]> rm ) {
|
public void getBitFields( IDMContext regDmc , DataRequestMonitor<IBitFieldDMContext[]> rm ) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "BitField not supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "BitField not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -522,6 +541,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#writeRegister(org.eclipse.cdt.dsf.debug.service.IRegisters.IRegisterDMContext, java.lang.String, java.lang.String, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#writeRegister(org.eclipse.cdt.dsf.debug.service.IRegisters.IRegisterDMContext, java.lang.String, java.lang.String, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void writeRegister(IRegisterDMContext regCtx, final String regValue, final String formatId, final RequestMonitor rm) {
|
public void writeRegister(IRegisterDMContext regCtx, final String regValue, final String formatId, final RequestMonitor rm) {
|
||||||
MIRegisterGroupDMC grpDmc = DMContexts.getAncestorOfType(regCtx, MIRegisterGroupDMC.class);
|
MIRegisterGroupDMC grpDmc = DMContexts.getAncestorOfType(regCtx, MIRegisterGroupDMC.class);
|
||||||
if ( grpDmc == null ) {
|
if ( grpDmc == null ) {
|
||||||
|
@ -569,6 +589,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#writeBitField(org.eclipse.cdt.dsf.debug.service.IRegisters.IBitFieldDMContext, java.lang.String, java.lang.String, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#writeBitField(org.eclipse.cdt.dsf.debug.service.IRegisters.IBitFieldDMContext, java.lang.String, java.lang.String, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void writeBitField(IBitFieldDMContext bitFieldCtx, String bitFieldValue, String formatId, RequestMonitor rm) {
|
public void writeBitField(IBitFieldDMContext bitFieldCtx, String bitFieldValue, String formatId, RequestMonitor rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Writing bit field not supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Writing bit field not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -578,6 +599,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#writeBitField(org.eclipse.cdt.dsf.debug.service.IRegisters.IBitFieldDMContext, org.eclipse.cdt.dsf.debug.service.IRegisters.IMnemonic, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#writeBitField(org.eclipse.cdt.dsf.debug.service.IRegisters.IBitFieldDMContext, org.eclipse.cdt.dsf.debug.service.IRegisters.IMnemonic, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void writeBitField(IBitFieldDMContext bitFieldCtx, IMnemonic mnemonic, RequestMonitor rm) {
|
public void writeBitField(IBitFieldDMContext bitFieldCtx, IMnemonic mnemonic, RequestMonitor rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Writing bit field not supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Writing bit field not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -587,6 +609,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IFormattedValues#getAvailableFormats(org.eclipse.cdt.dsf.debug.service.IFormattedValues.IFormattedDataDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IFormattedValues#getAvailableFormats(org.eclipse.cdt.dsf.debug.service.IFormattedValues.IFormattedDataDMContext, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void getAvailableFormats(IFormattedDataDMContext dmc, DataRequestMonitor<String[]> rm) {
|
public void getAvailableFormats(IFormattedDataDMContext dmc, DataRequestMonitor<String[]> rm) {
|
||||||
|
|
||||||
rm.setData(new String[] { HEX_FORMAT, DECIMAL_FORMAT, OCTAL_FORMAT, BINARY_FORMAT, NATURAL_FORMAT });
|
rm.setData(new String[] { HEX_FORMAT, DECIMAL_FORMAT, OCTAL_FORMAT, BINARY_FORMAT, NATURAL_FORMAT });
|
||||||
|
@ -597,6 +620,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IFormattedValues#getFormattedValueContext(org.eclipse.cdt.dsf.debug.service.IFormattedValues.IFormattedDataDMContext, java.lang.String)
|
* @see org.eclipse.cdt.dsf.debug.service.IFormattedValues#getFormattedValueContext(org.eclipse.cdt.dsf.debug.service.IFormattedValues.IFormattedDataDMContext, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public FormattedValueDMContext getFormattedValueContext(IFormattedDataDMContext dmc, String formatId) {
|
public FormattedValueDMContext getFormattedValueContext(IFormattedDataDMContext dmc, String formatId) {
|
||||||
if ( dmc instanceof MIRegisterDMC ) {
|
if ( dmc instanceof MIRegisterDMC ) {
|
||||||
MIRegisterDMC regDmc = (MIRegisterDMC) dmc;
|
MIRegisterDMC regDmc = (MIRegisterDMC) dmc;
|
||||||
|
@ -609,6 +633,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#findRegisterGroup(org.eclipse.cdt.dsf.datamodel.IDMContext, java.lang.String, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#findRegisterGroup(org.eclipse.cdt.dsf.datamodel.IDMContext, java.lang.String, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void findRegisterGroup(IDMContext ctx, String name, DataRequestMonitor<IRegisterGroupDMContext> rm) {
|
public void findRegisterGroup(IDMContext ctx, String name, DataRequestMonitor<IRegisterGroupDMContext> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Finding a Register Group context not supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Finding a Register Group context not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -618,6 +643,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#findRegister(org.eclipse.cdt.dsf.datamodel.IDMContext, java.lang.String, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#findRegister(org.eclipse.cdt.dsf.datamodel.IDMContext, java.lang.String, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void findRegister(IDMContext ctx, String name, DataRequestMonitor<IRegisterDMContext> rm) {
|
public void findRegister(IDMContext ctx, String name, DataRequestMonitor<IRegisterDMContext> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Finding a Register context not supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Finding a Register context not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -627,6 +653,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#findBitField(org.eclipse.cdt.dsf.datamodel.IDMContext, java.lang.String, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.IRegisters#findBitField(org.eclipse.cdt.dsf.datamodel.IDMContext, java.lang.String, org.eclipse.cdt.dsf.concurrent.DataRequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void findBitField(IDMContext ctx, String name, DataRequestMonitor<IBitFieldDMContext> rm) {
|
public void findBitField(IDMContext ctx, String name, DataRequestMonitor<IBitFieldDMContext> rm) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Finding a Register Group context not supported", null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, NOT_SUPPORTED, "Finding a Register Group context not supported", null)); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -636,6 +663,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void flushCache(IDMContext context) {
|
public void flushCache(IDMContext context) {
|
||||||
fRegisterNameCache.reset(context);
|
fRegisterNameCache.reset(context);
|
||||||
fRegisterValueCache.reset(context);
|
fRegisterValueCache.reset(context);
|
||||||
|
|
|
@ -120,6 +120,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
* Returns the GDB/MI thread identifier of this context.
|
* Returns the GDB/MI thread identifier of this context.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getThreadId(){
|
public int getThreadId(){
|
||||||
return fThreadId;
|
return fThreadId;
|
||||||
}
|
}
|
||||||
|
@ -144,7 +145,9 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
fReason = reason;
|
fReason = reason;
|
||||||
fDetails = details;
|
fDetails = details;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public StateChangeReason getStateChangeReason() { return fReason; }
|
public StateChangeReason getStateChangeReason() { return fReason; }
|
||||||
|
@Override
|
||||||
public String getDetails() { return fDetails; }
|
public String getDetails() { return fDetails; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,6 +170,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
fMIInfo = miInfo;
|
fMIInfo = miInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public T getMIEvent() { return fMIInfo; }
|
public T getMIEvent() { return fMIInfo; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,6 +185,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
super(ctx, miInfo);
|
super(ctx, miInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public StateChangeReason getReason() {
|
public StateChangeReason getReason() {
|
||||||
if (getMIEvent() instanceof MICatchpointHitEvent) { // must precede MIBreakpointHitEvent
|
if (getMIEvent() instanceof MICatchpointHitEvent) { // must precede MIBreakpointHitEvent
|
||||||
return StateChangeReason.EVENT_BREAKPOINT;
|
return StateChangeReason.EVENT_BREAKPOINT;
|
||||||
|
@ -244,6 +249,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
fBreakpoints = new IBreakpointDMContext[] { bpCtx };
|
fBreakpoints = new IBreakpointDMContext[] { bpCtx };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBreakpointDMContext[] getBreakpoints() {
|
public IBreakpointDMContext[] getBreakpoints() {
|
||||||
return fBreakpoints;
|
return fBreakpoints;
|
||||||
}
|
}
|
||||||
|
@ -261,6 +267,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
? new IExecutionDMContext[] { triggeringDmc } : new IExecutionDMContext[0];
|
? new IExecutionDMContext[] { triggeringDmc } : new IExecutionDMContext[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IExecutionDMContext[] getTriggeringContexts() {
|
public IExecutionDMContext[] getTriggeringContexts() {
|
||||||
return triggeringDmcs;
|
return triggeringDmcs;
|
||||||
}
|
}
|
||||||
|
@ -282,6 +289,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
fBreakpoints = new IBreakpointDMContext[] { bpCtx };
|
fBreakpoints = new IBreakpointDMContext[] { bpCtx };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBreakpointDMContext[] getBreakpoints() {
|
public IBreakpointDMContext[] getBreakpoints() {
|
||||||
return fBreakpoints;
|
return fBreakpoints;
|
||||||
}
|
}
|
||||||
|
@ -295,6 +303,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
super(ctx, miInfo);
|
super(ctx, miInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public StateChangeReason getReason() {
|
public StateChangeReason getReason() {
|
||||||
switch(getMIEvent().getType()) {
|
switch(getMIEvent().getType()) {
|
||||||
case MIRunningEvent.CONTINUE:
|
case MIRunningEvent.CONTINUE:
|
||||||
|
@ -327,6 +336,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
? new IExecutionDMContext[] { triggeringDmc } : new IExecutionDMContext[0];
|
? new IExecutionDMContext[] { triggeringDmc } : new IExecutionDMContext[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IExecutionDMContext[] getTriggeringContexts() {
|
public IExecutionDMContext[] getTriggeringContexts() {
|
||||||
return triggeringDmcs;
|
return triggeringDmcs;
|
||||||
}
|
}
|
||||||
|
@ -655,6 +665,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// IRunControl
|
// IRunControl
|
||||||
|
@Override
|
||||||
public void canResume(IExecutionDMContext context, DataRequestMonitor<Boolean> rm) {
|
public void canResume(IExecutionDMContext context, DataRequestMonitor<Boolean> rm) {
|
||||||
rm.setData(doCanResume(context));
|
rm.setData(doCanResume(context));
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -665,6 +676,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
return !fTerminated && isSuspended(context) && !fResumePending;
|
return !fTerminated && isSuspended(context) && !fResumePending;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void canSuspend(IExecutionDMContext context, DataRequestMonitor<Boolean> rm) {
|
public void canSuspend(IExecutionDMContext context, DataRequestMonitor<Boolean> rm) {
|
||||||
rm.setData(doCanSuspend(context));
|
rm.setData(doCanSuspend(context));
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -674,14 +686,17 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
return !fTerminated && !isSuspended(context);
|
return !fTerminated && !isSuspended(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isSuspended(IExecutionDMContext context) {
|
public boolean isSuspended(IExecutionDMContext context) {
|
||||||
return !fTerminated && fSuspended;
|
return !fTerminated && fSuspended;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isStepping(IExecutionDMContext context) {
|
public boolean isStepping(IExecutionDMContext context) {
|
||||||
return !fTerminated && fStepping;
|
return !fTerminated && fStepping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void resume(final IExecutionDMContext context, final RequestMonitor rm) {
|
public void resume(final IExecutionDMContext context, final RequestMonitor rm) {
|
||||||
assert context != null;
|
assert context != null;
|
||||||
|
|
||||||
|
@ -723,6 +738,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void suspend(IExecutionDMContext context, final RequestMonitor rm){
|
public void suspend(IExecutionDMContext context, final RequestMonitor rm){
|
||||||
assert context != null;
|
assert context != null;
|
||||||
|
|
||||||
|
@ -747,6 +763,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void canStep(IExecutionDMContext context, StepType stepType, DataRequestMonitor<Boolean> rm) {
|
public void canStep(IExecutionDMContext context, StepType stepType, DataRequestMonitor<Boolean> rm) {
|
||||||
if (context instanceof IContainerDMContext) {
|
if (context instanceof IContainerDMContext) {
|
||||||
rm.setData(false);
|
rm.setData(false);
|
||||||
|
@ -756,6 +773,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
canResume(context, rm);
|
canResume(context, rm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void step(final IExecutionDMContext context, StepType stepType, final RequestMonitor rm) {
|
public void step(final IExecutionDMContext context, StepType stepType, final RequestMonitor rm) {
|
||||||
assert context != null;
|
assert context != null;
|
||||||
|
|
||||||
|
@ -826,6 +844,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getExecutionContexts(final IContainerDMContext containerDmc, final DataRequestMonitor<IExecutionDMContext[]> rm) {
|
public void getExecutionContexts(final IContainerDMContext containerDmc, final DataRequestMonitor<IExecutionDMContext[]> rm) {
|
||||||
fMICommandCache.execute(
|
fMICommandCache.execute(
|
||||||
fCommandFactory.createMIThreadListIds(containerDmc),
|
fCommandFactory.createMIThreadListIds(containerDmc),
|
||||||
|
@ -856,6 +875,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getExecutionData(IExecutionDMContext dmc, DataRequestMonitor<IExecutionDMData> rm){
|
public void getExecutionData(IExecutionDMContext dmc, DataRequestMonitor<IExecutionDMData> rm){
|
||||||
if (dmc instanceof IContainerDMContext) {
|
if (dmc instanceof IContainerDMContext) {
|
||||||
rm.setData( new ExecutionData(fStateChangeReason, fStateChangeDetails) );
|
rm.setData( new ExecutionData(fStateChangeReason, fStateChangeDetails) );
|
||||||
|
@ -1123,6 +1143,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void executeWithTargetAvailable(IDMContext ctx, final Sequence.Step[] steps, final RequestMonitor rm) {
|
public void executeWithTargetAvailable(IDMContext ctx, final Sequence.Step[] steps, final RequestMonitor rm) {
|
||||||
if (!fOngoingOperation) {
|
if (!fOngoingOperation) {
|
||||||
// We are the first operation of this kind currently requested
|
// We are the first operation of this kind currently requested
|
||||||
|
@ -1362,6 +1383,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void flushCache(IDMContext context) {
|
public void flushCache(IDMContext context) {
|
||||||
fMICommandCache.reset(context);
|
fMICommandCache.reset(context);
|
||||||
}
|
}
|
||||||
|
@ -1397,6 +1419,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void canRunToLine(IExecutionDMContext context, String sourceFile,
|
public void canRunToLine(IExecutionDMContext context, String sourceFile,
|
||||||
int lineNumber, DataRequestMonitor<Boolean> rm) {
|
int lineNumber, DataRequestMonitor<Boolean> rm) {
|
||||||
canResume(context, rm);
|
canResume(context, rm);
|
||||||
|
@ -1408,6 +1431,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void runToLine(IExecutionDMContext context, String sourceFile,
|
public void runToLine(IExecutionDMContext context, String sourceFile,
|
||||||
int lineNumber, boolean skipBreakpoints, RequestMonitor rm) {
|
int lineNumber, boolean skipBreakpoints, RequestMonitor rm) {
|
||||||
|
|
||||||
|
@ -1423,6 +1447,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void canRunToAddress(IExecutionDMContext context, IAddress address,
|
public void canRunToAddress(IExecutionDMContext context, IAddress address,
|
||||||
DataRequestMonitor<Boolean> rm) {
|
DataRequestMonitor<Boolean> rm) {
|
||||||
canResume(context, rm);
|
canResume(context, rm);
|
||||||
|
@ -1434,6 +1459,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void runToAddress(IExecutionDMContext context, IAddress address,
|
public void runToAddress(IExecutionDMContext context, IAddress address,
|
||||||
boolean skipBreakpoints, RequestMonitor rm) {
|
boolean skipBreakpoints, RequestMonitor rm) {
|
||||||
runToLocation(context, "*0x" + address.toString(16), skipBreakpoints, rm); //$NON-NLS-1$
|
runToLocation(context, "*0x" + address.toString(16), skipBreakpoints, rm); //$NON-NLS-1$
|
||||||
|
@ -1445,6 +1471,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void canMoveToLine(IExecutionDMContext context, String sourceFile,
|
public void canMoveToLine(IExecutionDMContext context, String sourceFile,
|
||||||
int lineNumber, boolean resume, DataRequestMonitor<Boolean> rm) {
|
int lineNumber, boolean resume, DataRequestMonitor<Boolean> rm) {
|
||||||
canResume(context, rm);
|
canResume(context, rm);
|
||||||
|
@ -1456,6 +1483,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void moveToLine(IExecutionDMContext context, String sourceFile,
|
public void moveToLine(IExecutionDMContext context, String sourceFile,
|
||||||
int lineNumber, boolean resume, RequestMonitor rm) {
|
int lineNumber, boolean resume, RequestMonitor rm) {
|
||||||
IMIExecutionDMContext threadExecDmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class);
|
IMIExecutionDMContext threadExecDmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class);
|
||||||
|
@ -1489,6 +1517,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void canMoveToAddress(IExecutionDMContext context, IAddress address,
|
public void canMoveToAddress(IExecutionDMContext context, IAddress address,
|
||||||
boolean resume, DataRequestMonitor<Boolean> rm) {
|
boolean resume, DataRequestMonitor<Boolean> rm) {
|
||||||
canResume(context, rm);
|
canResume(context, rm);
|
||||||
|
@ -1500,6 +1529,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void moveToAddress(IExecutionDMContext context, IAddress address,
|
public void moveToAddress(IExecutionDMContext context, IAddress address,
|
||||||
boolean resume, RequestMonitor rm) {
|
boolean resume, RequestMonitor rm) {
|
||||||
IMIExecutionDMContext threadExecDmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class);
|
IMIExecutionDMContext threadExecDmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class);
|
||||||
|
@ -1527,11 +1557,13 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 4.0 */
|
/** @since 4.0 */
|
||||||
|
@Override
|
||||||
public IRunMode getRunMode() {
|
public IRunMode getRunMode() {
|
||||||
return MIRunMode.ALL_STOP;
|
return MIRunMode.ALL_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 4.0 */
|
/** @since 4.0 */
|
||||||
|
@Override
|
||||||
public boolean isTargetAcceptingCommands() {
|
public boolean isTargetAcceptingCommands() {
|
||||||
// For all-stop mode:
|
// For all-stop mode:
|
||||||
// 1- if GDB is not terminated and
|
// 1- if GDB is not terminated and
|
||||||
|
|
|
@ -70,6 +70,7 @@ public class MIStack extends AbstractDsfService
|
||||||
fLevel = level;
|
fLevel = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getLevel() { return fLevel; }
|
public int getLevel() { return fLevel; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -244,10 +245,12 @@ public class MIStack extends AbstractDsfService
|
||||||
return new MIFrameDMC(getSession().getId(), execDmc, level);
|
return new MIFrameDMC(getSession().getId(), execDmc, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getFrames(final IDMContext ctx, final DataRequestMonitor<IFrameDMContext[]> rm) {
|
public void getFrames(final IDMContext ctx, final DataRequestMonitor<IFrameDMContext[]> rm) {
|
||||||
getFrames(ctx, 0, ALL_FRAMES, rm);
|
getFrames(ctx, 0, ALL_FRAMES, rm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getFrames(final IDMContext ctx, final int startIndex, final int endIndex, final DataRequestMonitor<IFrameDMContext[]> rm) {
|
public void getFrames(final IDMContext ctx, final int startIndex, final int endIndex, final DataRequestMonitor<IFrameDMContext[]> rm) {
|
||||||
|
|
||||||
if (startIndex < 0 || endIndex > 0 && endIndex < startIndex) {
|
if (startIndex < 0 || endIndex > 0 && endIndex < startIndex) {
|
||||||
|
@ -304,6 +307,7 @@ public class MIStack extends AbstractDsfService
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getTopFrame(final IDMContext ctx, final DataRequestMonitor<IFrameDMContext> rm) {
|
public void getTopFrame(final IDMContext ctx, final DataRequestMonitor<IFrameDMContext> rm) {
|
||||||
final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(ctx, IMIExecutionDMContext.class);
|
final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(ctx, IMIExecutionDMContext.class);
|
||||||
if (execDmc == null) {
|
if (execDmc == null) {
|
||||||
|
@ -357,6 +361,7 @@ public class MIStack extends AbstractDsfService
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getFrameData(final IFrameDMContext frameDmc, final DataRequestMonitor<IFrameDMData> rm) {
|
public void getFrameData(final IFrameDMContext frameDmc, final DataRequestMonitor<IFrameDMData> rm) {
|
||||||
if (!(frameDmc instanceof MIFrameDMC)) {
|
if (!(frameDmc instanceof MIFrameDMC)) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context type " + frameDmc, null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context type " + frameDmc, null)); //$NON-NLS-1$
|
||||||
|
@ -381,6 +386,7 @@ public class MIStack extends AbstractDsfService
|
||||||
{
|
{
|
||||||
abstract protected MIFrame getMIFrame();
|
abstract protected MIFrame getMIFrame();
|
||||||
|
|
||||||
|
@Override
|
||||||
public IAddress getAddress() {
|
public IAddress getAddress() {
|
||||||
String addr = getMIFrame().getAddress();
|
String addr = getMIFrame().getAddress();
|
||||||
if (addr == null || addr.length() == 0) {
|
if (addr == null || addr.length() == 0) {
|
||||||
|
@ -396,11 +402,16 @@ public class MIStack extends AbstractDsfService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getColumn() { return 0; }
|
public int getColumn() { return 0; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFile() { return getMIFrame().getFile(); }
|
public String getFile() { return getMIFrame().getFile(); }
|
||||||
|
@Override
|
||||||
public int getLine() { return getMIFrame().getLine(); }
|
public int getLine() { return getMIFrame().getLine(); }
|
||||||
|
@Override
|
||||||
public String getFunction() { return getMIFrame().getFunction(); }
|
public String getFunction() { return getMIFrame().getFunction(); }
|
||||||
|
@Override
|
||||||
public String getModule() { return ""; }//$NON-NLS-1$
|
public String getModule() { return ""; }//$NON-NLS-1$
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -494,6 +505,7 @@ public class MIStack extends AbstractDsfService
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getArguments(final IFrameDMContext frameDmc, final DataRequestMonitor<IVariableDMContext[]> rm) {
|
public void getArguments(final IFrameDMContext frameDmc, final DataRequestMonitor<IVariableDMContext[]> rm) {
|
||||||
final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(frameDmc, IMIExecutionDMContext.class);
|
final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(frameDmc, IMIExecutionDMContext.class);
|
||||||
if (execDmc == null) {
|
if (execDmc == null) {
|
||||||
|
@ -578,6 +590,7 @@ public class MIStack extends AbstractDsfService
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getVariableData(IVariableDMContext variableDmc, final DataRequestMonitor<IVariableDMData> rm) {
|
public void getVariableData(IVariableDMContext variableDmc, final DataRequestMonitor<IVariableDMData> rm) {
|
||||||
if (!(variableDmc instanceof MIVariableDMC)) {
|
if (!(variableDmc instanceof MIVariableDMC)) {
|
||||||
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context type " + variableDmc, null)); //$NON-NLS-1$
|
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context type " + variableDmc, null)); //$NON-NLS-1$
|
||||||
|
@ -610,7 +623,9 @@ public class MIStack extends AbstractDsfService
|
||||||
VariableData(MIArg arg){
|
VariableData(MIArg arg){
|
||||||
dsfMIArg = arg;
|
dsfMIArg = arg;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public String getName() { return dsfMIArg.getName(); }
|
public String getName() { return dsfMIArg.getName(); }
|
||||||
|
@Override
|
||||||
public String getValue() { return dsfMIArg.getValue(); }
|
public String getValue() { return dsfMIArg.getValue(); }
|
||||||
@Override
|
@Override
|
||||||
public String toString() { return dsfMIArg.toString(); }
|
public String toString() { return dsfMIArg.toString(); }
|
||||||
|
@ -753,6 +768,7 @@ public class MIStack extends AbstractDsfService
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getLocals(final IFrameDMContext frameDmc, final DataRequestMonitor<IVariableDMContext[]> rm) {
|
public void getLocals(final IFrameDMContext frameDmc, final DataRequestMonitor<IVariableDMContext[]> rm) {
|
||||||
|
|
||||||
final List<IVariableDMContext> localsList = new ArrayList<IVariableDMContext>();
|
final List<IVariableDMContext> localsList = new ArrayList<IVariableDMContext>();
|
||||||
|
@ -811,6 +827,7 @@ public class MIStack extends AbstractDsfService
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void getStackDepth(final IDMContext dmc, final int maxDepth, final DataRequestMonitor<Integer> rm) {
|
public void getStackDepth(final IDMContext dmc, final int maxDepth, final DataRequestMonitor<Integer> rm) {
|
||||||
final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(dmc, IMIExecutionDMContext.class);
|
final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(dmc, IMIExecutionDMContext.class);
|
||||||
if (execDmc != null) {
|
if (execDmc != null) {
|
||||||
|
@ -939,6 +956,7 @@ public class MIStack extends AbstractDsfService
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void flushCache(IDMContext context) {
|
public void flushCache(IDMContext context) {
|
||||||
fMICommandCache.reset(context);
|
fMICommandCache.reset(context);
|
||||||
fStackDepthCache.clear(context);
|
fStackDepthCache.clear(context);
|
||||||
|
|
|
@ -2752,9 +2752,11 @@ public class MIVariableManager implements ICommandControl {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public <V extends ICommandResult> ICommandToken queueCommand(final ICommand<V> command, DataRequestMonitor<V> rm) {
|
public <V extends ICommandResult> ICommandToken queueCommand(final ICommand<V> command, DataRequestMonitor<V> rm) {
|
||||||
|
|
||||||
final ICommandToken token = new ICommandToken() {
|
final ICommandToken token = new ICommandToken() {
|
||||||
|
@Override
|
||||||
public ICommand<? extends ICommandResult> getCommand() {
|
public ICommand<? extends ICommandResult> getCommand() {
|
||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
|
@ -2939,6 +2941,7 @@ public class MIVariableManager implements ICommandControl {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#removeCommand(org.eclipse.cdt.dsf.mi.service.command.commands.ICommand)
|
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#removeCommand(org.eclipse.cdt.dsf.mi.service.command.commands.ICommand)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeCommand(ICommandToken token) {
|
public void removeCommand(ICommandToken token) {
|
||||||
// It is impossible to remove a command from the MIVariableManager.
|
// It is impossible to remove a command from the MIVariableManager.
|
||||||
// This should never be called, if we did things right.
|
// This should never be called, if we did things right.
|
||||||
|
@ -2955,9 +2958,13 @@ public class MIVariableManager implements ICommandControl {
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#cancelCommand(org.eclipse.cdt.dsf.mi.service.command.commands.ICommand)
|
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#cancelCommand(org.eclipse.cdt.dsf.mi.service.command.commands.ICommand)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addCommandListener(ICommandListener processor) { fCommandProcessors.add(processor); }
|
public void addCommandListener(ICommandListener processor) { fCommandProcessors.add(processor); }
|
||||||
|
@Override
|
||||||
public void removeCommandListener(ICommandListener processor) { fCommandProcessors.remove(processor); }
|
public void removeCommandListener(ICommandListener processor) { fCommandProcessors.remove(processor); }
|
||||||
|
@Override
|
||||||
public void addEventListener(IEventListener processor) {}
|
public void addEventListener(IEventListener processor) {}
|
||||||
|
@Override
|
||||||
public void removeEventListener(IEventListener processor) {}
|
public void removeEventListener(IEventListener processor) {}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class BreakpointActionAdapter implements IAdaptable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
|
@Override
|
||||||
public Object getAdapter(Class adapter) {
|
public Object getAdapter(Class adapter) {
|
||||||
if (adapter.equals(ILogActionEnabler.class)) {
|
if (adapter.equals(ILogActionEnabler.class)) {
|
||||||
return new MILogActionEnabler(fExecutor, fServiceTracker, fContext);
|
return new MILogActionEnabler(fExecutor, fServiceTracker, fContext);
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class MILogActionEnabler implements ILogActionEnabler {
|
||||||
fContext = DMContexts.getAncestorOfType(context, IBreakpointsTargetDMContext.class);
|
fContext = DMContexts.getAncestorOfType(context, IBreakpointsTargetDMContext.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String evaluateExpression(final String expression) throws Exception {
|
public String evaluateExpression(final String expression) throws Exception {
|
||||||
// Use a Query to synchronize the call
|
// Use a Query to synchronize the call
|
||||||
Query<String> query = new Query<String>() {
|
Query<String> query = new Query<String>() {
|
||||||
|
|
|
@ -35,8 +35,10 @@ public class MIResumeActionEnabler implements IResumeActionEnabler {
|
||||||
fContext = (IExecutionDMContext) context;
|
fContext = (IExecutionDMContext) context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void resume() throws Exception {
|
public void resume() throws Exception {
|
||||||
fExecutor.execute(new DsfRunnable() {
|
fExecutor.execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final IRunControl runControlService = fServiceTracker.getService(IRunControl.class);
|
final IRunControl runControlService = fServiceTracker.getService(IRunControl.class);
|
||||||
if (runControlService != null) {
|
if (runControlService != null) {
|
||||||
|
|
|
@ -205,6 +205,7 @@ public abstract class AbstractCLIProcess extends Process
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void eventReceived(Object output) {
|
public void eventReceived(Object output) {
|
||||||
if (fSuppressConsoleOutputCounter > 0) return;
|
if (fSuppressConsoleOutputCounter > 0) return;
|
||||||
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
||||||
|
@ -250,10 +251,12 @@ public abstract class AbstractCLIProcess extends Process
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandQueued(ICommandToken token) {
|
public void commandQueued(ICommandToken token) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandSent(ICommandToken token) {
|
public void commandSent(ICommandToken token) {
|
||||||
// Bug 285170
|
// Bug 285170
|
||||||
// Don't reset the fPrompt here, in case we are
|
// Don't reset the fPrompt here, in case we are
|
||||||
|
@ -340,10 +343,12 @@ public abstract class AbstractCLIProcess extends Process
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandRemoved(ICommandToken token) {
|
public void commandRemoved(ICommandToken token) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandDone(ICommandToken token, ICommandResult result) {
|
public void commandDone(ICommandToken token, ICommandResult result) {
|
||||||
// Whenever we get a command that is completed, we know we must be in the primary prompt
|
// Whenever we get a command that is completed, we know we must be in the primary prompt
|
||||||
fPrompt = PromptType.IN_PRIMARY_PROMPT;
|
fPrompt = PromptType.IN_PRIMARY_PROMPT;
|
||||||
|
@ -405,7 +410,7 @@ public abstract class AbstractCLIProcess extends Process
|
||||||
final String bufString = buf.toString().trim();
|
final String bufString = buf.toString().trim();
|
||||||
buf.setLength(0);
|
buf.setLength(0);
|
||||||
try {
|
try {
|
||||||
fSession.getExecutor().execute(new DsfRunnable() { public void run() {
|
fSession.getExecutor().execute(new DsfRunnable() { @Override public void run() {
|
||||||
try {
|
try {
|
||||||
post(bufString);
|
post(bufString);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -445,7 +450,7 @@ public abstract class AbstractCLIProcess extends Process
|
||||||
cmd = new ProcessCLICommand(getCommandControlService().getContext(), str);
|
cmd = new ProcessCLICommand(getCommandControlService().getContext(), str);
|
||||||
}
|
}
|
||||||
final ICommand<MIInfo> finalCmd = cmd;
|
final ICommand<MIInfo> finalCmd = cmd;
|
||||||
fSession.getExecutor().execute(new DsfRunnable() { public void run() {
|
fSession.getExecutor().execute(new DsfRunnable() { @Override public void run() {
|
||||||
if (isDisposed()) return;
|
if (isDisposed()) return;
|
||||||
// Do not wait around for the answer.
|
// Do not wait around for the answer.
|
||||||
getCommandControlService().queueCommand(finalCmd, null);
|
getCommandControlService().queueCommand(finalCmd, null);
|
||||||
|
|
|
@ -199,6 +199,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public CommandFactory getCommandFactory() {
|
public CommandFactory getCommandFactory() {
|
||||||
return fCommandFactory;
|
return fCommandFactory;
|
||||||
}
|
}
|
||||||
|
@ -291,6 +292,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
* @see org.eclipse.cdt.dsf.debug.service.command.ICommandControl#addCommand(org.eclipse.cdt.dsf.debug.service.command.ICommand, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
* @see org.eclipse.cdt.dsf.debug.service.command.ICommandControl#addCommand(org.eclipse.cdt.dsf.debug.service.command.ICommand, org.eclipse.cdt.dsf.concurrent.RequestMonitor)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public <V extends ICommandResult> ICommandToken queueCommand(final ICommand<V> command, DataRequestMonitor<V> rm) {
|
public <V extends ICommandResult> ICommandToken queueCommand(final ICommand<V> command, DataRequestMonitor<V> rm) {
|
||||||
|
|
||||||
// Cast the command to MI Command type. This will cause a cast exception to be
|
// Cast the command to MI Command type. This will cause a cast exception to be
|
||||||
|
@ -323,6 +325,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
// In a separate dispatch cycle. This allows command listeners
|
// In a separate dispatch cycle. This allows command listeners
|
||||||
// to respond to the command queued event.
|
// to respond to the command queued event.
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
processNextQueuedCommand();
|
processNextQueuedCommand();
|
||||||
}
|
}
|
||||||
|
@ -396,6 +399,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#removeCommand(org.eclipse.cdt.dsf.mi.service.command.commands.ICommand)
|
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#removeCommand(org.eclipse.cdt.dsf.mi.service.command.commands.ICommand)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeCommand(ICommandToken token) {
|
public void removeCommand(ICommandToken token) {
|
||||||
|
|
||||||
synchronized(fCommandQueue) {
|
synchronized(fCommandQueue) {
|
||||||
|
@ -406,6 +410,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
|
|
||||||
final CommandHandle finalHandle = handle;
|
final CommandHandle finalHandle = handle;
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
processCommandRemoved(finalHandle);
|
processCommandRemoved(finalHandle);
|
||||||
}
|
}
|
||||||
|
@ -423,6 +428,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#addCommandListener(org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl.ICommandListener)
|
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#addCommandListener(org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl.ICommandListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addCommandListener(ICommandListener processor) { fCommandProcessors.add(processor); }
|
public void addCommandListener(ICommandListener processor) { fCommandProcessors.add(processor); }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -430,6 +436,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#removeCommandListener(org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl.ICommandListener)
|
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#removeCommandListener(org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl.ICommandListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeCommandListener(ICommandListener processor) { fCommandProcessors.remove(processor); }
|
public void removeCommandListener(ICommandListener processor) { fCommandProcessors.remove(processor); }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -438,6 +445,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#addEventListener(org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl.IEventListener)
|
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#addEventListener(org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl.IEventListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addEventListener(IEventListener processor) { fEventProcessors.add(processor); }
|
public void addEventListener(IEventListener processor) { fEventProcessors.add(processor); }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -446,6 +454,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#removeEventListener(org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl.IEventListener)
|
* @see org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl#removeEventListener(org.eclipse.cdt.dsf.mi.service.command.IDebuggerControl.IEventListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeEventListener(IEventListener processor) { fEventProcessors.remove(processor); }
|
public void removeEventListener(IEventListener processor) { fEventProcessors.remove(processor); }
|
||||||
|
|
||||||
abstract public MIControlDMContext getControlDMContext();
|
abstract public MIControlDMContext getControlDMContext();
|
||||||
|
@ -453,6 +462,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
/**
|
/**
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isActive() {
|
public boolean isActive() {
|
||||||
return !fStoppedCommandProcessing;
|
return !fStoppedCommandProcessing;
|
||||||
}
|
}
|
||||||
|
@ -525,6 +535,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
fTokenId = -1; // Only initialize to a real value when needed
|
fTokenId = -1; // Only initialize to a real value when needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public MICommand<MIInfo> getCommand() { return fCommand; }
|
public MICommand<MIInfo> getCommand() { return fCommand; }
|
||||||
public DataRequestMonitor<MIInfo> getRequestMonitor() { return fRequestMonitor; }
|
public DataRequestMonitor<MIInfo> getRequestMonitor() { return fRequestMonitor; }
|
||||||
// This method allows us to generate the token Id when we area actually going to use
|
// This method allows us to generate the token Id when we area actually going to use
|
||||||
|
@ -891,6 +902,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
*/
|
*/
|
||||||
final ICommandResult finalResult = result;
|
final ICommandResult finalResult = result;
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
/*
|
/*
|
||||||
* Complete the specific command.
|
* Complete the specific command.
|
||||||
|
@ -918,6 +930,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
*/
|
*/
|
||||||
final ICommandResult finalResult = result;
|
final ICommandResult finalResult = result;
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
processCommandDone(commandHandle, finalResult);
|
processCommandDone(commandHandle, finalResult);
|
||||||
}
|
}
|
||||||
|
@ -937,6 +950,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
final MIOutput response = new MIOutput(rr, new MIOOBRecord[0]);
|
final MIOutput response = new MIOutput(rr, new MIOOBRecord[0]);
|
||||||
|
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
processEvent(response);
|
processEvent(response);
|
||||||
}
|
}
|
||||||
|
@ -979,6 +993,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
* be done on the DSF thread for integrity.
|
* be done on the DSF thread for integrity.
|
||||||
*/
|
*/
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
processEvent(response);
|
processEvent(response);
|
||||||
}
|
}
|
||||||
|
@ -990,6 +1005,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
}
|
}
|
||||||
|
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
processNextQueuedCommand();
|
processNextQueuedCommand();
|
||||||
}
|
}
|
||||||
|
@ -1030,6 +1046,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
final MIOOBRecord oob = fMiParser.parseMIOOBRecord("&"+line+"\n"); //$NON-NLS-1$//$NON-NLS-2$
|
final MIOOBRecord oob = fMiParser.parseMIOOBRecord("&"+line+"\n"); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
final MIOutput response = new MIOutput(oob, new MIStreamRecord[0]);
|
final MIOutput response = new MIOutput(oob, new MIStreamRecord[0]);
|
||||||
getExecutor().execute(new DsfRunnable() {
|
getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
processEvent(response);
|
processEvent(response);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,7 @@ public class CLIEventProcessor
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandSent(ICommandToken token) {
|
public void commandSent(ICommandToken token) {
|
||||||
if (token.getCommand() instanceof CLICommand<?>) {
|
if (token.getCommand() instanceof CLICommand<?>) {
|
||||||
processStateChanges( (CLICommand<?>)token.getCommand() );
|
processStateChanges( (CLICommand<?>)token.getCommand() );
|
||||||
|
@ -90,6 +91,7 @@ public class CLIEventProcessor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandDone(ICommandToken token, ICommandResult result) {
|
public void commandDone(ICommandToken token, ICommandResult result) {
|
||||||
if (token.getCommand() instanceof CLICommand<?>) {
|
if (token.getCommand() instanceof CLICommand<?>) {
|
||||||
processSettingChanges( (CLICommand<?>)token.getCommand() );
|
processSettingChanges( (CLICommand<?>)token.getCommand() );
|
||||||
|
@ -99,14 +101,17 @@ public class CLIEventProcessor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandQueued(ICommandToken token) {
|
public void commandQueued(ICommandToken token) {
|
||||||
// No action
|
// No action
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandRemoved(ICommandToken token) {
|
public void commandRemoved(ICommandToken token) {
|
||||||
// No action
|
// No action
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void eventReceived(Object output) {
|
public void eventReceived(Object output) {
|
||||||
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
||||||
if (oobr instanceof MIConsoleStreamOutput) {
|
if (oobr instanceof MIConsoleStreamOutput) {
|
||||||
|
|
|
@ -44,13 +44,11 @@ public class CLIEventProcessor_7_0
|
||||||
implements ICommandListener, IEventListener
|
implements ICommandListener, IEventListener
|
||||||
{
|
{
|
||||||
private final ICommandControlService fCommandControl;
|
private final ICommandControlService fCommandControl;
|
||||||
private final ICommandControlDMContext fControlDmc;
|
|
||||||
|
|
||||||
private final DsfServicesTracker fServicesTracker;
|
private final DsfServicesTracker fServicesTracker;
|
||||||
|
|
||||||
public CLIEventProcessor_7_0(ICommandControlService connection, ICommandControlDMContext controlDmc) {
|
public CLIEventProcessor_7_0(ICommandControlService connection, ICommandControlDMContext controlDmc) {
|
||||||
fCommandControl = connection;
|
fCommandControl = connection;
|
||||||
fControlDmc = controlDmc;
|
|
||||||
fServicesTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), fCommandControl.getSession().getId());
|
fServicesTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), fCommandControl.getSession().getId());
|
||||||
fCommandControl.addCommandListener(this);
|
fCommandControl.addCommandListener(this);
|
||||||
fCommandControl.addEventListener(this);
|
fCommandControl.addEventListener(this);
|
||||||
|
@ -62,6 +60,7 @@ public class CLIEventProcessor_7_0
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandSent(ICommandToken token) {
|
public void commandSent(ICommandToken token) {
|
||||||
if (token.getCommand() instanceof CLICommand<?>) {
|
if (token.getCommand() instanceof CLICommand<?>) {
|
||||||
processStateChanges( (CLICommand<?>)token.getCommand() );
|
processStateChanges( (CLICommand<?>)token.getCommand() );
|
||||||
|
@ -71,6 +70,7 @@ public class CLIEventProcessor_7_0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandDone(ICommandToken token, ICommandResult result) {
|
public void commandDone(ICommandToken token, ICommandResult result) {
|
||||||
if (token.getCommand() instanceof CLICommand<?>) {
|
if (token.getCommand() instanceof CLICommand<?>) {
|
||||||
processSettingChanges( (CLICommand<?>)token.getCommand() );
|
processSettingChanges( (CLICommand<?>)token.getCommand() );
|
||||||
|
@ -80,14 +80,17 @@ public class CLIEventProcessor_7_0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandQueued(ICommandToken token) {
|
public void commandQueued(ICommandToken token) {
|
||||||
// No action
|
// No action
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandRemoved(ICommandToken token) {
|
public void commandRemoved(ICommandToken token) {
|
||||||
// No action
|
// No action
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void eventReceived(Object output) {
|
public void eventReceived(Object output) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,6 +132,7 @@ public class MIBackendCLIProcess extends AbstractCLIProcess {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().submit(new Callable<Object>() {
|
getSession().getExecutor().submit(new Callable<Object>() {
|
||||||
|
@Override
|
||||||
public Object call() throws Exception {
|
public Object call() throws Exception {
|
||||||
if (fMIBackend.getState() != IMIBackend.State.TERMINATED) {
|
if (fMIBackend.getState() != IMIBackend.State.TERMINATED) {
|
||||||
throw new IllegalThreadStateException("Backend Process has not exited"); //$NON-NLS-1$
|
throw new IllegalThreadStateException("Backend Process has not exited"); //$NON-NLS-1$
|
||||||
|
@ -153,7 +154,7 @@ public class MIBackendCLIProcess extends AbstractCLIProcess {
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
try {
|
try {
|
||||||
getSession().getExecutor().execute(new DsfRunnable() { public void run() {
|
getSession().getExecutor().execute(new DsfRunnable() { @Override public void run() {
|
||||||
if (!DsfSession.isSessionActive(getSession().getId())) return;
|
if (!DsfSession.isSessionActive(getSession().getId())) return;
|
||||||
if (isDisposed()) return;
|
if (isDisposed()) return;
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class MIControlDMContext extends AbstractDMContext
|
||||||
/**
|
/**
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getCommandControlId() {
|
public String getCommandControlId() {
|
||||||
return fCommandControlId;
|
return fCommandControlId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -315,6 +315,7 @@ public class MIInferiorProcess extends Process
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
try {
|
try {
|
||||||
fSession.getExecutor().execute(new DsfRunnable() {
|
fSession.getExecutor().execute(new DsfRunnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
doDestroy();
|
doDestroy();
|
||||||
}
|
}
|
||||||
|
@ -374,6 +375,7 @@ public class MIInferiorProcess extends Process
|
||||||
return fErrorStreamPiped;
|
return fErrorStreamPiped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void eventReceived(Object output) {
|
public void eventReceived(Object output) {
|
||||||
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
||||||
if (oobr instanceof MITargetStreamOutput) {
|
if (oobr instanceof MITargetStreamOutput) {
|
||||||
|
@ -390,20 +392,24 @@ public class MIInferiorProcess extends Process
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandQueued(ICommandToken token) {
|
public void commandQueued(ICommandToken token) {
|
||||||
// No action
|
// No action
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandSent(ICommandToken token) {
|
public void commandSent(ICommandToken token) {
|
||||||
if (token.getCommand() instanceof CLICommand<?>) {
|
if (token.getCommand() instanceof CLICommand<?>) {
|
||||||
fSuppressTargetOutputCounter++;
|
fSuppressTargetOutputCounter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandRemoved(ICommandToken token) {
|
public void commandRemoved(ICommandToken token) {
|
||||||
// No action
|
// No action
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandDone(ICommandToken token, ICommandResult result) {
|
public void commandDone(ICommandToken token, ICommandResult result) {
|
||||||
if (token.getCommand() instanceof CLICommand<?>) {
|
if (token.getCommand() instanceof CLICommand<?>) {
|
||||||
fSuppressTargetOutputCounter--;
|
fSuppressTargetOutputCounter--;
|
||||||
|
|
|
@ -113,6 +113,7 @@ public class MIRunControlEventProcessor
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void eventReceived(Object output) {
|
public void eventReceived(Object output) {
|
||||||
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
||||||
List<MIEvent<?>> events = new LinkedList<MIEvent<?>>();
|
List<MIEvent<?>> events = new LinkedList<MIEvent<?>>();
|
||||||
|
@ -294,18 +295,22 @@ public class MIRunControlEventProcessor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandQueued(ICommandToken token) {
|
public void commandQueued(ICommandToken token) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandSent(ICommandToken token) {
|
public void commandSent(ICommandToken token) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandRemoved(ICommandToken token) {
|
public void commandRemoved(ICommandToken token) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandDone(ICommandToken token, ICommandResult result) {
|
public void commandDone(ICommandToken token, ICommandResult result) {
|
||||||
ICommand<?> cmd = token.getCommand();
|
ICommand<?> cmd = token.getCommand();
|
||||||
MIInfo cmdResult = (MIInfo) result ;
|
MIInfo cmdResult = (MIInfo) result ;
|
||||||
|
|
|
@ -113,6 +113,7 @@ public class MIRunControlEventProcessor_7_0
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void eventReceived(Object output) {
|
public void eventReceived(Object output) {
|
||||||
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
for (MIOOBRecord oobr : ((MIOutput)output).getMIOOBRecords()) {
|
||||||
List<MIEvent<?>> events = new LinkedList<MIEvent<?>>();
|
List<MIEvent<?>> events = new LinkedList<MIEvent<?>>();
|
||||||
|
@ -366,18 +367,22 @@ public class MIRunControlEventProcessor_7_0
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandQueued(ICommandToken token) {
|
public void commandQueued(ICommandToken token) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandSent(ICommandToken token) {
|
public void commandSent(ICommandToken token) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandRemoved(ICommandToken token) {
|
public void commandRemoved(ICommandToken token) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void commandDone(ICommandToken token, ICommandResult result) {
|
public void commandDone(ICommandToken token, ICommandResult result) {
|
||||||
ICommand<?> cmd = token.getCommand();
|
ICommand<?> cmd = token.getCommand();
|
||||||
MIInfo cmdResult = (MIInfo) result ;
|
MIInfo cmdResult = (MIInfo) result ;
|
||||||
|
|
|
@ -29,10 +29,12 @@ public class ExprMetaCommand<V extends ICommandResult> implements ICommand<V> {
|
||||||
* The result is a new third command which represent the two
|
* The result is a new third command which represent the two
|
||||||
* original command.
|
* original command.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICommand<? extends ICommandResult> coalesceWith( ICommand<? extends ICommandResult> command ) {
|
public ICommand<? extends ICommandResult> coalesceWith( ICommand<? extends ICommandResult> command ) {
|
||||||
return null ;
|
return null ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IDMContext getContext(){
|
public IDMContext getContext(){
|
||||||
return fCtx;
|
return fCtx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class MIBreakCondition extends MICommand<MIInfo>
|
||||||
super(param);
|
super(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getAdjustedValue() {
|
public String getAdjustedValue() {
|
||||||
return getValue();
|
return getValue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,11 +190,13 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
|
||||||
* The result is a new third command which represent the two
|
* The result is a new third command which represent the two
|
||||||
* original command.
|
* original command.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICommand<? extends ICommandResult> coalesceWith( ICommand<? extends ICommandResult> command ) {
|
public ICommand<? extends ICommandResult> coalesceWith( ICommand<? extends ICommandResult> command ) {
|
||||||
return null ;
|
return null ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public IDMContext getContext(){
|
public IDMContext getContext(){
|
||||||
return fCtx;
|
return fCtx;
|
||||||
}
|
}
|
||||||
|
@ -289,6 +291,7 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
|
||||||
super(option);
|
super(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getAdjustedValue() {
|
public String getAdjustedValue() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
String option = value;
|
String option = value;
|
||||||
|
@ -322,6 +325,7 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getAdjustedValue() {
|
public String getAdjustedValue() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
for (int j = 0; j < value.length(); j++) {
|
for (int j = 0; j < value.length(); j++) {
|
||||||
|
@ -361,6 +365,7 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class ExprMetaGetAttributesInfo implements ICommandResult {
|
||||||
|
|
||||||
public boolean getEditable() { return editable; }
|
public boolean getEditable() { return editable; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class ExprMetaGetChildCountInfo implements ICommandResult {
|
||||||
|
|
||||||
public int getChildNum() { return childNum; }
|
public int getChildNum() { return childNum; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ public class ExprMetaGetChildrenInfo implements ICommandResult {
|
||||||
|
|
||||||
public ExpressionInfo[] getChildrenExpressions() { return childrenExpressions; }
|
public ExpressionInfo[] getChildrenExpressions() { return childrenExpressions; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class ExprMetaGetValueInfo implements ICommandResult {
|
||||||
|
|
||||||
public String getValue() { return value; }
|
public String getValue() { return value; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,7 @@ public class ExprMetaGetVarInfo implements ICommandResult {
|
||||||
return isCollectionHint;
|
return isCollectionHint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,7 @@ public class MIInfo implements ICommandResult {
|
||||||
* result canot be calculated for the given command. Deriving classes should
|
* result canot be calculated for the given command. Deriving classes should
|
||||||
* override this method as needed.
|
* override this method as needed.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,26 +29,32 @@ public class MIInstruction extends AbstractInstruction {
|
||||||
parse(tuple);
|
parse(tuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public BigInteger getAdress() {
|
public BigInteger getAdress() {
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFuntionName() {
|
public String getFuntionName() {
|
||||||
return function;
|
return function;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getOffset() {
|
public long getOffset() {
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getInstruction() {
|
public String getInstruction() {
|
||||||
return opcode + " " + args; //$NON-NLS-1$;
|
return opcode + " " + args; //$NON-NLS-1$;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getOpcode() {
|
public String getOpcode() {
|
||||||
return opcode;
|
return opcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getArgs() {
|
public String getArgs() {
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,18 +239,27 @@ public class MIListThreadGroupsInfo extends MIInfo {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getGroupId() { return fGroupId; }
|
public String getGroupId() { return fGroupId; }
|
||||||
|
@Override
|
||||||
public String getPid() { return fPid; }
|
public String getPid() { return fPid; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName() { return fName; }
|
public String getName() { return fName; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getDesciption() { return fDescription; }
|
public String getDesciption() { return fDescription; }
|
||||||
|
@Override
|
||||||
public String[] getCores() { return fCores; }
|
public String[] getCores() { return fCores; }
|
||||||
|
@Override
|
||||||
public String getUser() { return fUser; }
|
public String getUser() { return fUser; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getType() { return fType; }
|
public String getType() { return fType; }
|
||||||
|
@Override
|
||||||
public String getExecutable() { return fExecutable; }
|
public String getExecutable() { return fExecutable; }
|
||||||
|
|
||||||
|
@Override
|
||||||
public MIThread[] getThreads() { return fThreadList; }
|
public MIThread[] getThreads() { return fThreadList; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,14 +29,17 @@ public class MIMixedInstruction implements IMixedInstruction {
|
||||||
parse(tuple);
|
parse(tuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFileName() {
|
public String getFileName() {
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getLineNumber() {
|
public int getLineNumber() {
|
||||||
return lineNumber;
|
return lineNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IInstruction[] getInstructions() {
|
public IInstruction[] getInstructions() {
|
||||||
return assemblyCode;
|
return assemblyCode;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class MIThreadListIdsInfo extends MIInfo {
|
||||||
// We need our own comparator to treat these strings as integers.
|
// We need our own comparator to treat these strings as integers.
|
||||||
Arrays.sort(strThreadIds,
|
Arrays.sort(strThreadIds,
|
||||||
new Comparator<String>() {
|
new Comparator<String>() {
|
||||||
|
@Override
|
||||||
public int compare(String o1, String o2) {
|
public int compare(String o1, String o2) {
|
||||||
int threadInt1;
|
int threadInt1;
|
||||||
int threadInt2;
|
int threadInt2;
|
||||||
|
|
Loading…
Add table
Reference in a new issue