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