From eb61b458b146499d93fd78cc18a2f6001da1ae80 Mon Sep 17 00:00:00 2001 From: Pawel Piech Date: Fri, 11 May 2007 19:07:18 +0000 Subject: [PATCH] Cleanup ahead of M7: (bugs 185874, 185876, 186267). --- .../META-INF/MANIFEST.MF | 3 +- .../register/RegisterGroupLayoutNode.java | 2 +- .../variable/VariableLocalsLayoutNode.java | 6 +- .../VariableSubExpressionsLayoutNode.java | 2 + .../dd/dsf/debug/service/IAddress.java | 20 ------ .../dd/dsf/debug/service/IBreakpoints.java | 9 ++- .../dd/dsf/debug/service/IExpressions.java | 62 ++++--------------- .../eclipse/dd/dsf/debug/service/IMemory.java | 23 ++----- .../dd/dsf/debug/service/IModules.java | 8 +-- .../dsf/debug/service/INativeProcesses.java | 16 ++--- .../org/eclipse/dd/dsf/debug/service/IOS.java | 7 +-- .../dd/dsf/debug/service/IRegisters.java | 30 ++++----- .../dd/dsf/debug/service/IRunControl.java | 20 +++--- .../dd/dsf/debug/service/ISourceLookup.java | 15 ++--- .../eclipse/dd/dsf/debug/service/IStack.java | 12 ++-- .../dsf/debug/service/IStepQueueManager.java | 13 ++-- 16 files changed, 83 insertions(+), 165 deletions(-) delete mode 100644 plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IAddress.java diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.dd.dsf.debug.ui/META-INF/MANIFEST.MF index 015e3211a95..682b83b2ecd 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.dd.dsf.debug.ui/META-INF/MANIFEST.MF @@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.ui.ide, org.eclipse.dd.dsf, org.eclipse.dd.dsf.ui, - org.eclipse.dd.dsf.debug + org.eclipse.dd.dsf.debug, + org.eclipse.cdt.core Eclipse-LazyStart: true Export-Package: org.eclipse.dd.dsf.debug.ui, diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterGroupLayoutNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterGroupLayoutNode.java index 5ae69def30d..c74619750e2 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterGroupLayoutNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterGroupLayoutNode.java @@ -158,7 +158,7 @@ public class RegisterGroupLayoutNode extends AbstractExpressionLayoutNode(getSession().getExecutor(), null) { @Override public void handleCompleted() { diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableLocalsLayoutNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableLocalsLayoutNode.java index 8e26c2754f8..6fc3aa05055 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableLocalsLayoutNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableLocalsLayoutNode.java @@ -40,7 +40,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; -@SuppressWarnings("restriction") +@SuppressWarnings({"restriction", "nls"}) public class VariableLocalsLayoutNode extends AbstractDMVMLayoutNode { public VariableLocalsLayoutNode(AbstractVMProvider provider, DsfSession session) { @@ -91,10 +91,12 @@ public class VariableLocalsLayoutNode extends AbstractDMVMLayoutNode rm); - public void getBreakpoints(IExecutionDMContext execDmc, IBreakpoint platformBp, DataRequestMonitor rm); + public void getAllBreakpoints(IDMContext execDmc, DataRequestMonitor rm); + public void getBreakpoints(IDMContext execDmc, IBreakpoint platformBp, DataRequestMonitor rm); } diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IExpressions.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IExpressions.java index ec01bf9e7d1..6b76e046870 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IExpressions.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IExpressions.java @@ -14,6 +14,7 @@ import java.util.Map; import org.eclipse.cdt.core.IAddress; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.datamodel.IDMService; @@ -23,6 +24,7 @@ import org.eclipse.dd.dsf.datamodel.IDMService; * dependencies on the Modules service, RunControl service, and Stack service, as all may be used to * provide context for an expression to be evaluated. */ +@SuppressWarnings("nls") public interface IExpressions extends IDMService, IFormattedValues { /** @@ -40,12 +42,12 @@ public interface IExpressions extends IDMService, IFormattedValues { // These static fields define the possible return values of method getTypeId(). QUESTION: Why can't // these have type int? - final static String TYPEID_UNKNOWN = "TYPEID_UNKNOWN"; //$NON-NLS-1$ - final static String TYPEID_INTEGER = "TYPEID_INTEGER"; //$NON-NLS-1$ - final static String TYPEID_CHAR = "TYPEID_CHAR"; //$NON-NLS-1$ - final static String TYPEID_FLOAT = "TYPEID_FLOAT"; //$NON-NLS-1$ - final static String TYPEID_DOUBLE = "TYPEID_DOUBLE"; //$NON-NLS-1$ - final static String TYPEID_OPAQUE = "TYPEID_OPAQUE"; //$NON-NLS-1$ + final static String TYPEID_UNKNOWN = "TYPEID_UNKNOWN"; + final static String TYPEID_INTEGER = "TYPEID_INTEGER"; + final static String TYPEID_CHAR = "TYPEID_CHAR"; + final static String TYPEID_FLOAT = "TYPEID_FLOAT"; + final static String TYPEID_DOUBLE = "TYPEID_DOUBLE"; + final static String TYPEID_OPAQUE = "TYPEID_OPAQUE"; /** * This enumerates the possible basic types that an expression can have. @@ -98,14 +100,6 @@ public interface IExpressions extends IDMService, IFormattedValues { */ int getBitCount(); - /** - * @return A string containing the value of the expression in a format that is natural for its type. - * For example, type "char" is shown as a single-quoted character, type "int" (and its cousins) - * is shown in decimal, type "unsigned int" (and its cousins) and pointers are shown in hex, - * floating point values are shown in non-scientific notation. - */ - String getNaturalValue(); - /** * @return A string containing the value of the expression as returned by the debugger backend. */ @@ -140,48 +134,18 @@ public interface IExpressions extends IDMService, IFormattedValues { interface IExpressionChangedDMEvent extends IDMEvent {} /** - * Returns the data model context object for the specified expression in the context of the symbols - * specified by symbolsDmc. + * Returns the data model context object for the specified expression in the context of + * specified by ctx. * - * @param symbolsDmc: Symbol context in which to evaluate the expression. This parameter can be null if - * there is no symbol context available. + * @param symbolsDmc: Context in which to evaluate the expression. This context could include the + * PC location, stack frame, thread, or just a symbol context. * * @param expression: The expression to evaluate. * * @return An expression data model context object that must be passed to getModelData() to obtain the * value of the expression. */ - IExpressionDMContext createExpression(IModules.ISymbolDMContext symbolsDmc, String expression); - - /** - * Returns the data model context object for the specified expression in the context of the thread - * specified by execDmc. - * - * @param execDmc: Optional execution context for the evaluation. This parameter cannot be null. If - * there is no execution context available, the client should instead call - * createExpression(ISymbolDMContext, String). - * - * @param expression: The expression to evaluate. - * - * @return An expression data model context object that must be passed to getModelData() to obtain the - * value of the expression. - */ - IExpressionDMContext createExpression(IRunControl.IExecutionDMContext execDmc, String expression); - - /** - * Returns the data model context object for the specified expression in the context of the stack frame - * specified by frameDmc. - * - * @param frameDmc: Optional stack frame context for the evaluation. This parameter cannot be null. If - * there is no stack frame context available, the client should instead call - * createExpression(ISymbolDMContext, String) or createExpression(IExecutionDMContext, String). - * - * @param expression: The expression to evaluate. - * - * @return An expression data model context object that must be passed to getModelData() to obtain the - * value of the expression. - */ - IExpressionDMContext createExpression(IStack.IFrameDMContext frameDmc, String expression); + IExpressionDMContext createExpression(IDMContext ctx, String expression); /** * Retrieves the sub-expressions of the given expression. Sub-expressions are fields of a struct, union, diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IMemory.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IMemory.java index 936df52ee78..df3ccbcbb4b 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IMemory.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IMemory.java @@ -10,7 +10,9 @@ *******************************************************************************/ package org.eclipse.dd.dsf.debug.service; +import org.eclipse.cdt.core.IAddress; import org.eclipse.dd.dsf.concurrent.RequestMonitor; +import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.service.IDsfService; /** @@ -20,27 +22,12 @@ import org.eclipse.dd.dsf.service.IDsfService; */ public interface IMemory extends IDsfService { - /** - * A context for memory is still needed, for debuggers that can debug - * multiple processes/targets at the same time. - */ - public interface IMemoryContext {} - - /** - * I was told that BigInteger is also too restrictive to represent an - * address, but I'm not really sure what is appropriate for this interface. - */ - public interface IAddress { - /** Returns the memory context that this address belongs to. */ - public IMemoryContext getContext(); - } - /** Writes the given value to the given memory location. */ - public void setMemory(IMemoryContext memCtx, IAddress addr, + public void setMemory(IDMContext ctx, IAddress addr, int word_size, byte[] buf, int offs, int size, int mode, RequestMonitor requestMonitor); /** Reads memory at the given location */ - public void getMemory(IMemoryContext memCtx, IAddress addr, + public void getMemory(IDMContext ctx, IAddress addr, int word_size, byte[] buf, int offs, int size, int mode, RequestMonitor requestMonitor); /** @@ -49,7 +36,7 @@ public interface IMemory extends IDsfService { * Parameter 0 of sequent 'done' is assigned with Throwable if * there was an error. */ - public void fillMemory(IMemoryContext memCtx, IAddress addr, + public void fillMemory(IDMContext ctx, IAddress addr, int word_size, byte[] value, int size, int mode, RequestMonitor requestMonitor); } diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IModules.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IModules.java index 1885eafcfac..6625ffcf9d2 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IModules.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IModules.java @@ -12,12 +12,12 @@ package org.eclipse.dd.dsf.debug.service; import java.math.BigInteger; +import org.eclipse.cdt.core.IAddress; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.datamodel.IDMService; -import org.eclipse.dd.dsf.debug.service.IMemory.IAddress; /** * Debugger service representing module handling logic of a debugger. @@ -134,16 +134,16 @@ public interface IModules extends IDMService { /** * Retreives the list of modules loaded in given symbol context. */ - void getModules(ISymbolDMContext symCtx, DataRequestMonitor rm); + void getModules(IDMContext symCtx, DataRequestMonitor rm); /** * Calculates the line numbers corresponding to the given address. */ - void calcLineInfo(ISymbolDMContext symCtx, IAddress address, DataRequestMonitor rm); + void calcLineInfo(IDMContext symCtx, IAddress address, DataRequestMonitor rm); /** * Calculates the addresses corresponding to the given source file location. */ - void calcAddressInfo(ISymbolDMContext symCtx, String file, int line, int col, DataRequestMonitor rm); + void calcAddressInfo(IDMContext symCtx, String file, int line, int col, DataRequestMonitor rm); } diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/INativeProcesses.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/INativeProcesses.java index 8dcb2349e21..7f7c5a52ee4 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/INativeProcesses.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/INativeProcesses.java @@ -10,12 +10,13 @@ *******************************************************************************/ package org.eclipse.dd.dsf.debug.service; -import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.datamodel.IDMService; +import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext; /** * This interface provides access to the native OS's process @@ -38,9 +39,7 @@ public interface INativeProcesses extends IDMService { String getName(); String getId(); boolean isDebuggerAttached(); - IRunControl.IExecutionDMContext getExecutionContext(); - IMemory.IMemoryContext getMemoryContext(); - IModules.ISymbolDMContext getSymbolContext(); + IDMContext getDebuggingContext(); } /** @@ -48,6 +47,8 @@ public interface INativeProcesses extends IDMService { */ public interface ProcessChangedDMEvent extends IDMEvent {} + public IThreadDMContext getThreadForExecutionContext(IExecutionDMContext execCtx); + /** * Retrieves the current list of processes running on target. * @param rm Request completion monitor, to be filled in with array of process contexts. @@ -80,13 +81,6 @@ public interface INativeProcesses extends IDMService { */ void getProcessesBeingDebugged(DataRequestMonitor rm); - /** - * Returns a thread context for given run control execution context. - * @param execCtx Execution context to return thread for. - * @return Corresponding thread context. - */ - IThreadDMContext getThreadForExecutionContext(IRunControl.IExecutionDMContext execCtx); - /** * Checks whether the given process or thread can be terminated. * @param thread Thread or process to terminate. diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IOS.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IOS.java index 9c3150597bb..165719a2ebd 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IOS.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IOS.java @@ -54,9 +54,6 @@ public interface IOS extends IDMService { String getDescription(); String getSingularName(); String getPluralName(); - boolean hasExecutionContext(); - boolean hasModulesContext(); - boolean hasMemoryContext(); } /** @@ -72,9 +69,7 @@ public interface IOS extends IDMService { String getID(); boolean canAttachDebugger(); boolean isDebuggerAttached(); - IRunControl.IExecutionDMContext getExecutionDMC(); - IModules.ISymbolDMContext getSymbolDMC(); - IMemory.IMemoryContext getMemoryContext(); + IDMContext getDebuggingContext(); } /** diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IRegisters.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IRegisters.java index 7725b253332..5993ac7842e 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IRegisters.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IRegisters.java @@ -12,6 +12,7 @@ package org.eclipse.dd.dsf.debug.service; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.RequestMonitor; +import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMEvent; @@ -96,56 +97,55 @@ public interface IRegisters extends IFormattedValues { /** * Retrieves the list of register groups. - * @param execCtx Execution DMC, this is required. - * @param frameCtx Stack frame DMC, this is optional and may be null. + * @param ctx Context for the returned data. * @param rm Request completion monitor. */ - void getRegisterGroups(IRunControl.IExecutionDMContext execCtx, IStack.IFrameDMContext frameCtx, DataRequestMonitor rm); + void getRegisterGroups(IDMContext ctx, DataRequestMonitor rm); /** * Retrieves list of sub-groups of given register group. - * @param groupCtx Group DMC, this is required. + * @param ctx Context for the returned data. * @param rm Request completion monitor. */ - void getRegisterSubGroups(IRegisterGroupDMContext groupCtx, DataRequestMonitor rm); + void getRegisterSubGroups(IDMContext ctx, DataRequestMonitor rm); /** * Retrieves registers in given register group. - * @param groupCtx Group DMC, this is required. + * @param ctx Context for the returned data. * @param rm Request completion monitor. */ - void getRegisters(IRegisterGroupDMContext groupCtx, DataRequestMonitor rm); + void getRegisters(IDMContext ctx, DataRequestMonitor rm); /** * Retrieves bit fields for given register - * @param regCtx Register DMC, this is required. + * @param ctx Context for the returned data. * @param rm Request completion monitor. */ - void getBitFields(IRegisterDMContext regCtx, DataRequestMonitor rm); + void getBitFields(IDMContext ctx, DataRequestMonitor rm); /** * Writes a register value for a given register to the target - * @param regCtx Register DMC, this is required. + * @param regCtx Context containing the register. * @param regValue Value of the register to be written. * @param formatId Format of the value to be written. * @param rm Request completion monitor. */ - void writeRegister(IRegisterDMContext regCtx, String regValue, String formatId, RequestMonitor rm); + void writeRegister(IDMContext regCtx, String regValue, String formatId, RequestMonitor rm); /** * Writes a bit field value for a given bit field to the target - * @param bitFieldCtx Bit field DMC, this is required. + * @param bitFieldCtx Context containing the bit field. * @param bitFieldValue Value of the bit field to be written. * @param formatId Format of the value to be written. * @param rm Request completion monitor. */ - void writeBitField(IBitFieldDMContext bitFieldCtx, String bitFieldValue, String formatId, RequestMonitor rm); + void writeBitField(IDMContext bitFieldCtx, String bitFieldValue, String formatId, RequestMonitor rm); /** * Writes a bit field value for a given bit field to the target - * @param bitFieldCtx Bit field DMC, this is required. + * @param bitFieldCtx Context containing the bit field. * @param mnemonic Mnemonic which represents the value to be written. * @param rm Request completion monitor. */ - void writeBitField(IBitFieldDMContext bitFieldCtx, IMnemonic mnemonic, RequestMonitor rm); + void writeBitField(IDMContext bitFieldCtx, IMnemonic mnemonic, RequestMonitor rm); } diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IRunControl.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IRunControl.java index 0d89a134f10..4d23e119a8c 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IRunControl.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IRunControl.java @@ -92,15 +92,15 @@ public interface IRunControl extends IDMService * Run control commands. They all require the IExecutionContext object on * which they perform the operations. */ - boolean canResume(IExecutionDMContext context); - boolean canSuspend(IExecutionDMContext context); - boolean isSuspended(IExecutionDMContext context); - void resume(IExecutionDMContext context, RequestMonitor requestMonitor); - void suspend(IExecutionDMContext context, RequestMonitor requestMonitor); + boolean canResume(IDMContext context); + boolean canSuspend(IDMContext context); + boolean isSuspended(IDMContext context); + void resume(IDMContext context, RequestMonitor requestMonitor); + void suspend(IDMContext context, RequestMonitor requestMonitor); public enum StepType { STEP_OVER, STEP_INTO, STEP_RETURN }; - boolean isStepping(IExecutionDMContext context); - boolean canStep(IExecutionDMContext context); - void step(IExecutionDMContext context, StepType stepType, RequestMonitor requestMonitor); - boolean canInstructionStep(IExecutionDMContext context); - void instructionStep(IExecutionDMContext context, StepType stepType, RequestMonitor requestMonitor); + boolean isStepping(IDMContext context); + boolean canStep(IDMContext context); + void step(IDMContext context, StepType stepType, RequestMonitor requestMonitor); + boolean canInstructionStep(IDMContext context); + void instructionStep(IDMContext context, StepType stepType, RequestMonitor requestMonitor); } diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/ISourceLookup.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/ISourceLookup.java index de58864f456..9f48bd058c3 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/ISourceLookup.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/ISourceLookup.java @@ -11,6 +11,7 @@ package org.eclipse.dd.dsf.debug.service; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.debug.core.sourcelookup.ISourceContainer; @@ -22,11 +23,6 @@ import org.eclipse.debug.core.sourcelookup.ISourceContainer; */ public interface ISourceLookup extends IDsfService { - /** - * Context needed for debuggers that debug multiple processes. - */ - public interface ISourceLookupContext {} - public interface ISourceLookupResult { Object getSourceObject(); ISourceContainer getMatchingContainer(); @@ -37,22 +33,19 @@ public interface ISourceLookup extends IDsfService { ISourceContainer getMatchingContainer(); } - /** Returns the source lookup context for the given modules context. */ - ISourceLookupContext getContextForSymbolContext(IModules.ISymbolDMContext symCtx); - /** * Initializes the given context with the given list of source lookup * containers. */ - void initializeSourceContainers(ISourceLookupContext ctx, ISourceContainer[] containers); + void initializeSourceContainers(IDMContext ctx, ISourceContainer[] containers); /** * Retrieves the host source object for given debugger path string. */ - void getSource(ISourceLookupContext srcCtx, String debuggerPath, boolean searchDuplicates, DataRequestMonitor rm); + void getSource(IDMContext ctx, String debuggerPath, boolean searchDuplicates, DataRequestMonitor rm); /** * Retrieves the debugger path string(s) for given host source object. */ - void getDebuggerPath(ISourceLookupContext srcCtx, Object source, boolean searchDuplicates, DataRequestMonitor rm); + void getDebuggerPath(IDMContext ctx, Object source, boolean searchDuplicates, DataRequestMonitor rm); } diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IStack.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IStack.java index e938f165046..a0c2364f036 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IStack.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IStack.java @@ -10,11 +10,11 @@ *******************************************************************************/ package org.eclipse.dd.dsf.debug.service; +import org.eclipse.cdt.core.IAddress; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMService; -import org.eclipse.dd.dsf.debug.service.IMemory.IAddress; /** * Stack service provides access to stack information for a @@ -59,13 +59,13 @@ public interface IStack extends IDMService { /** * Returns whether the stack frames can be retrieved for given thread. */ - boolean isStackAvailable(IRunControl.IExecutionDMContext execContext); + boolean isStackAvailable(IDMContext execContext); /** * Retrieves list of stack frames for the given execution context. Request * will fail if the stack frame data is not available. */ - void getFrames(IRunControl.IExecutionDMContext execContext, DataRequestMonitor rm); + void getFrames(IDMContext execContext, DataRequestMonitor rm); /** * Retrieves the top stack frame for the given execution context. @@ -76,15 +76,15 @@ public interface IStack extends IDMService { * @param execContext * @param rm */ - void getTopFrame(IRunControl.IExecutionDMContext execContext, DataRequestMonitor rm); + void getTopFrame(IDMContext execContext, DataRequestMonitor rm); /** * Retrieves variables which were arguments to the stack frame's function. */ - void getArguments(IFrameDMContext frameCtx, DataRequestMonitor rm); + void getArguments(IDMContext frameCtx, DataRequestMonitor rm); /** * Retrieves variables local to the stack frame. */ - void getLocals(IFrameDMContext frameCtx, DataRequestMonitor rm); + void getLocals(IDMContext frameCtx, DataRequestMonitor rm); } diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IStepQueueManager.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IStepQueueManager.java index 45d3cb45d08..a37a143b328 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IStepQueueManager.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IStepQueueManager.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.dd.dsf.debug.service; +import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext; import org.eclipse.dd.dsf.service.IDsfService; @@ -45,21 +46,21 @@ public interface IStepQueueManager extends IDsfService { * Returns the number of step commands that are queued for given execution * context. */ - int getPendingStepCount(IRunControl.IExecutionDMContext execCtx); + int getPendingStepCount(IDMContext ctx); /** * Checks whether a step command can be queued up for given context. */ - boolean canEnqueueStep(IRunControl.IExecutionDMContext execCtx); + boolean canEnqueueStep(IDMContext execCtx); - boolean canEnqueueInstructionStep(IRunControl.IExecutionDMContext execCtx); + boolean canEnqueueInstructionStep(IDMContext ctx); /** * Adds a step command to the execution queue for given context. * @param execCtx Execution context that should perform the step. * @param stepType Type of step to execute. */ - void enqueueStep(IRunControl.IExecutionDMContext execCtx, IRunControl.StepType stepType); + void enqueueStep(IDMContext ctx, IRunControl.StepType stepType); /** * Adds an instruction step command to the execution queue for given @@ -67,7 +68,7 @@ public interface IStepQueueManager extends IDsfService { * @param execCtx Execution context that should perform the step. * @param stepType Type of step to execute. */ - void enqueueInstructionStep(IRunControl.IExecutionDMContext execCtx, IRunControl.StepType stepType); + void enqueueInstructionStep(IDMContext ctx, IRunControl.StepType stepType); - boolean isSteppingTimedOut(IExecutionDMContext context); + boolean isSteppingTimedOut(IDMContext context); }