1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cleanup ahead of M7: (bugs 185874, 185876, 186267).

This commit is contained in:
Pawel Piech 2007-05-11 19:07:18 +00:00
parent ebaacc4b25
commit eb61b458b1
16 changed files with 83 additions and 165 deletions

View file

@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.ui.ide, org.eclipse.ui.ide,
org.eclipse.dd.dsf, org.eclipse.dd.dsf,
org.eclipse.dd.dsf.ui, org.eclipse.dd.dsf.ui,
org.eclipse.dd.dsf.debug org.eclipse.dd.dsf.debug,
org.eclipse.cdt.core
Eclipse-LazyStart: true Eclipse-LazyStart: true
Export-Package: Export-Package:
org.eclipse.dd.dsf.debug.ui, org.eclipse.dd.dsf.debug.ui,

View file

@ -158,7 +158,7 @@ public class RegisterGroupLayoutNode extends AbstractExpressionLayoutNode<IRegis
if (execDmc != null) { if (execDmc != null) {
getServicesTracker().getService(IRegisters.class).getRegisterGroups( getServicesTracker().getService(IRegisters.class).getRegisterGroups(
execDmc, null, execDmc,
new DataRequestMonitor<IRegisterGroupDMContext[]>(getSession().getExecutor(), null) { new DataRequestMonitor<IRegisterGroupDMContext[]>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {

View file

@ -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.ILabelUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
@SuppressWarnings("restriction") @SuppressWarnings({"restriction", "nls"})
public class VariableLocalsLayoutNode extends AbstractDMVMLayoutNode<IExpressionDMData> { public class VariableLocalsLayoutNode extends AbstractDMVMLayoutNode<IExpressionDMData> {
public VariableLocalsLayoutNode(AbstractVMProvider provider, DsfSession session) { public VariableLocalsLayoutNode(AbstractVMProvider provider, DsfSession session) {
@ -91,10 +91,12 @@ public class VariableLocalsLayoutNode extends AbstractDMVMLayoutNode<IExpression
for (int idx = 0; idx < localColumns.length; idx++) { for (int idx = 0; idx < localColumns.length; idx++) {
if (IDebugVMConstants.COLUMN_ID__NAME.equals(localColumns[idx])) { if (IDebugVMConstants.COLUMN_ID__NAME.equals(localColumns[idx])) {
update.setLabel(getData().getName(), idx); update.setLabel(getData().getName(), idx);
} else if (IDebugVMConstants.COLUMN_ID__TYPE.equals(localColumns[idx])) {
update.setLabel(getData().getTypeName(), idx);
} else if (IDebugVMConstants.COLUMN_ID__VALUE.equals(localColumns[idx])) { } else if (IDebugVMConstants.COLUMN_ID__VALUE.equals(localColumns[idx])) {
weAreExtractingFormattedData = true; weAreExtractingFormattedData = true;
} else if (IDebugVMConstants.COLUMN_ID__DESCRIPTION.equals(localColumns[idx])) { } else if (IDebugVMConstants.COLUMN_ID__DESCRIPTION.equals(localColumns[idx])) {
update.setLabel("", idx); //$NON-NLS-1$ update.setLabel("", idx);
} }
} }

View file

@ -101,6 +101,8 @@ public class VariableSubExpressionsLayoutNode extends AbstractDMVMLayoutNode<IEx
for (int idx = 0; idx < localColumns.length; idx++) { for (int idx = 0; idx < localColumns.length; idx++) {
if (IDebugVMConstants.COLUMN_ID__NAME.equals(localColumns[idx])) { if (IDebugVMConstants.COLUMN_ID__NAME.equals(localColumns[idx])) {
update.setLabel(getData().getName(), idx); update.setLabel(getData().getName(), idx);
} else if (IDebugVMConstants.COLUMN_ID__TYPE.equals(localColumns[idx])) {
update.setLabel(getData().getTypeName(), idx);
} else if (IDebugVMConstants.COLUMN_ID__VALUE.equals(localColumns[idx])) { } else if (IDebugVMConstants.COLUMN_ID__VALUE.equals(localColumns[idx])) {
weAreExtractingFormattedData = true; weAreExtractingFormattedData = true;
} else if (IDebugVMConstants.COLUMN_ID__DESCRIPTION.equals(localColumns[idx])) { } else if (IDebugVMConstants.COLUMN_ID__DESCRIPTION.equals(localColumns[idx])) {

View file

@ -1,20 +0,0 @@
/*******************************************************************************
* Copyright (c) 2006 Wind River Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.dd.dsf.debug.service;
/**
* I was told that BigInteger was not sufficient to represent an address, so
* I created this interface as a place holder for representing an address.
*/
public interface IAddress {
}

View file

@ -14,8 +14,7 @@ import org.eclipse.dd.dsf.concurrent.DataRequestMonitor;
import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMContext;
import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMData;
import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.datamodel.IDMEvent;
import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext; import org.eclipse.dd.dsf.datamodel.IDMService;
import org.eclipse.dd.dsf.service.IDsfService;
import org.eclipse.debug.core.model.IBreakpoint; import org.eclipse.debug.core.model.IBreakpoint;
/** /**
@ -25,7 +24,7 @@ import org.eclipse.debug.core.model.IBreakpoint;
* breakpoint status in more detail and more dynamically than it it possible with * breakpoint status in more detail and more dynamically than it it possible with
* just the marker-based breakpoint object. * just the marker-based breakpoint object.
*/ */
public interface IBreakpoints extends IDsfService { public interface IBreakpoints extends IDMService {
public enum BreakpointStatus { INSTALLED, FAILED_TO_INSTALL, FILTERED_OUT } public enum BreakpointStatus { INSTALLED, FAILED_TO_INSTALL, FILTERED_OUT }
@ -44,7 +43,7 @@ public interface IBreakpoints extends IDsfService {
public interface IBreakpointHitEvent extends IBreakpointDMEvent {} public interface IBreakpointHitEvent extends IBreakpointDMEvent {}
public void getAllBreakpoints(IExecutionDMContext execDmc, DataRequestMonitor<IBreakpointDMContext[]> rm); public void getAllBreakpoints(IDMContext<?> execDmc, DataRequestMonitor<IBreakpointDMContext[]> rm);
public void getBreakpoints(IExecutionDMContext execDmc, IBreakpoint platformBp, DataRequestMonitor<IBreakpointDMContext[]> rm); public void getBreakpoints(IDMContext<?> execDmc, IBreakpoint platformBp, DataRequestMonitor<IBreakpointDMContext[]> rm);
} }

View file

@ -14,6 +14,7 @@ import java.util.Map;
import org.eclipse.cdt.core.IAddress; import org.eclipse.cdt.core.IAddress;
import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; 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.IDMData;
import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.datamodel.IDMEvent;
import org.eclipse.dd.dsf.datamodel.IDMService; 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 * dependencies on the Modules service, RunControl service, and Stack service, as all may be used to
* provide context for an expression to be evaluated. * provide context for an expression to be evaluated.
*/ */
@SuppressWarnings("nls")
public interface IExpressions extends IDMService, IFormattedValues { 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 static fields define the possible return values of method getTypeId(). QUESTION: Why can't
// these have type int? // these have type int?
final static String TYPEID_UNKNOWN = "TYPEID_UNKNOWN"; //$NON-NLS-1$ final static String TYPEID_UNKNOWN = "TYPEID_UNKNOWN";
final static String TYPEID_INTEGER = "TYPEID_INTEGER"; //$NON-NLS-1$ final static String TYPEID_INTEGER = "TYPEID_INTEGER";
final static String TYPEID_CHAR = "TYPEID_CHAR"; //$NON-NLS-1$ final static String TYPEID_CHAR = "TYPEID_CHAR";
final static String TYPEID_FLOAT = "TYPEID_FLOAT"; //$NON-NLS-1$ final static String TYPEID_FLOAT = "TYPEID_FLOAT";
final static String TYPEID_DOUBLE = "TYPEID_DOUBLE"; //$NON-NLS-1$ final static String TYPEID_DOUBLE = "TYPEID_DOUBLE";
final static String TYPEID_OPAQUE = "TYPEID_OPAQUE"; //$NON-NLS-1$ final static String TYPEID_OPAQUE = "TYPEID_OPAQUE";
/** /**
* This enumerates the possible basic types that an expression can have. * This enumerates the possible basic types that an expression can have.
@ -98,14 +100,6 @@ public interface IExpressions extends IDMService, IFormattedValues {
*/ */
int getBitCount(); 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. * @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<IExpressionDMContext> {} interface IExpressionChangedDMEvent extends IDMEvent<IExpressionDMContext> {}
/** /**
* Returns the data model context object for the specified expression in the context of the symbols * Returns the data model context object for the specified expression in the context of
* specified by <b>symbolsDmc</b>. * specified by <b>ctx</b>.
* *
* @param symbolsDmc: Symbol context in which to evaluate the expression. This parameter can be null if * @param symbolsDmc: Context in which to evaluate the expression. This context could include the
* there is no symbol context available. * PC location, stack frame, thread, or just a symbol context.
* *
* @param expression: The expression to evaluate. * @param expression: The expression to evaluate.
* *
* @return An expression data model context object that must be passed to getModelData() to obtain the * @return An expression data model context object that must be passed to getModelData() to obtain the
* value of the expression. * value of the expression.
*/ */
IExpressionDMContext createExpression(IModules.ISymbolDMContext symbolsDmc, String expression); IExpressionDMContext createExpression(IDMContext<?> ctx, String expression);
/**
* Returns the data model context object for the specified expression in the context of the thread
* specified by <b>execDmc</b>.
*
* @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 <b>frameDmc</b>.
*
* @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);
/** /**
* Retrieves the sub-expressions of the given expression. Sub-expressions are fields of a struct, union, * Retrieves the sub-expressions of the given expression. Sub-expressions are fields of a struct, union,

View file

@ -10,7 +10,9 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.dd.dsf.debug.service; 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.concurrent.RequestMonitor;
import org.eclipse.dd.dsf.datamodel.IDMContext;
import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.service.IDsfService;
/** /**
@ -20,27 +22,12 @@ import org.eclipse.dd.dsf.service.IDsfService;
*/ */
public interface IMemory extends 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. */ /** 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); int word_size, byte[] buf, int offs, int size, int mode, RequestMonitor requestMonitor);
/** Reads memory at the given location */ /** 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); 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 * Parameter 0 of sequent 'done' is assigned with Throwable if
* there was an error. * 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); int word_size, byte[] value, int size, int mode, RequestMonitor requestMonitor);
} }

View file

@ -12,12 +12,12 @@ package org.eclipse.dd.dsf.debug.service;
import java.math.BigInteger; import java.math.BigInteger;
import org.eclipse.cdt.core.IAddress;
import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor;
import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMContext;
import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMData;
import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.datamodel.IDMEvent;
import org.eclipse.dd.dsf.datamodel.IDMService; 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. * 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. * Retreives the list of modules loaded in given symbol context.
*/ */
void getModules(ISymbolDMContext symCtx, DataRequestMonitor<IModuleDMContext[]> rm); void getModules(IDMContext<?> symCtx, DataRequestMonitor<IModuleDMContext[]> rm);
/** /**
* Calculates the line numbers corresponding to the given address. * Calculates the line numbers corresponding to the given address.
*/ */
void calcLineInfo(ISymbolDMContext symCtx, IAddress address, DataRequestMonitor<LineInfo[]> rm); void calcLineInfo(IDMContext<?> symCtx, IAddress address, DataRequestMonitor<LineInfo[]> rm);
/** /**
* Calculates the addresses corresponding to the given source file location. * Calculates the addresses corresponding to the given source file location.
*/ */
void calcAddressInfo(ISymbolDMContext symCtx, String file, int line, int col, DataRequestMonitor<AddressRange[]> rm); void calcAddressInfo(IDMContext<?> symCtx, String file, int line, int col, DataRequestMonitor<AddressRange[]> rm);
} }

View file

@ -10,12 +10,13 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.dd.dsf.debug.service; 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.DataRequestMonitor;
import org.eclipse.dd.dsf.concurrent.RequestMonitor;
import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMContext;
import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMData;
import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.datamodel.IDMEvent;
import org.eclipse.dd.dsf.datamodel.IDMService; 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 * This interface provides access to the native OS's process
@ -38,9 +39,7 @@ public interface INativeProcesses extends IDMService {
String getName(); String getName();
String getId(); String getId();
boolean isDebuggerAttached(); boolean isDebuggerAttached();
IRunControl.IExecutionDMContext getExecutionContext(); IDMContext<?> getDebuggingContext();
IMemory.IMemoryContext getMemoryContext();
IModules.ISymbolDMContext getSymbolContext();
} }
/** /**
@ -48,6 +47,8 @@ public interface INativeProcesses extends IDMService {
*/ */
public interface ProcessChangedDMEvent extends IDMEvent<IProcessDMContext> {} public interface ProcessChangedDMEvent extends IDMEvent<IProcessDMContext> {}
public IThreadDMContext getThreadForExecutionContext(IExecutionDMContext execCtx);
/** /**
* Retrieves the current list of processes running on target. * Retrieves the current list of processes running on target.
* @param rm Request completion monitor, to be filled in with array of process contexts. * @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<IProcessDMContext[]> rm); void getProcessesBeingDebugged(DataRequestMonitor<IProcessDMContext[]> 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. * Checks whether the given process or thread can be terminated.
* @param thread Thread or process to terminate. * @param thread Thread or process to terminate.

View file

@ -54,9 +54,6 @@ public interface IOS extends IDMService {
String getDescription(); String getDescription();
String getSingularName(); String getSingularName();
String getPluralName(); String getPluralName();
boolean hasExecutionContext();
boolean hasModulesContext();
boolean hasMemoryContext();
} }
/** /**
@ -72,9 +69,7 @@ public interface IOS extends IDMService {
String getID(); String getID();
boolean canAttachDebugger(); boolean canAttachDebugger();
boolean isDebuggerAttached(); boolean isDebuggerAttached();
IRunControl.IExecutionDMContext getExecutionDMC(); IDMContext<?> getDebuggingContext();
IModules.ISymbolDMContext getSymbolDMC();
IMemory.IMemoryContext getMemoryContext();
} }
/** /**

View file

@ -12,6 +12,7 @@ package org.eclipse.dd.dsf.debug.service;
import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor;
import org.eclipse.dd.dsf.concurrent.RequestMonitor; 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.IDMData;
import org.eclipse.dd.dsf.datamodel.IDMEvent; import org.eclipse.dd.dsf.datamodel.IDMEvent;
@ -96,56 +97,55 @@ public interface IRegisters extends IFormattedValues {
/** /**
* Retrieves the list of register groups. * Retrieves the list of register groups.
* @param execCtx Execution DMC, this is required. * @param ctx Context for the returned data.
* @param frameCtx Stack frame DMC, this is optional and may be null.
* @param rm Request completion monitor. * @param rm Request completion monitor.
*/ */
void getRegisterGroups(IRunControl.IExecutionDMContext execCtx, IStack.IFrameDMContext frameCtx, DataRequestMonitor<IRegisterGroupDMContext[]> rm); void getRegisterGroups(IDMContext<?> ctx, DataRequestMonitor<IRegisterGroupDMContext[]> rm);
/** /**
* Retrieves list of sub-groups of given register group. * 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. * @param rm Request completion monitor.
*/ */
void getRegisterSubGroups(IRegisterGroupDMContext groupCtx, DataRequestMonitor<IRegisterGroupDMContext[]> rm); void getRegisterSubGroups(IDMContext<?> ctx, DataRequestMonitor<IRegisterGroupDMContext[]> rm);
/** /**
* Retrieves registers in given register group. * 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. * @param rm Request completion monitor.
*/ */
void getRegisters(IRegisterGroupDMContext groupCtx, DataRequestMonitor<IRegisterDMContext[]> rm); void getRegisters(IDMContext<?> ctx, DataRequestMonitor<IRegisterDMContext[]> rm);
/** /**
* Retrieves bit fields for given register * 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. * @param rm Request completion monitor.
*/ */
void getBitFields(IRegisterDMContext regCtx, DataRequestMonitor<IBitFieldDMContext[]> rm); void getBitFields(IDMContext<?> ctx, DataRequestMonitor<IBitFieldDMContext[]> rm);
/** /**
* Writes a register value for a given register to the target * 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 regValue Value of the register to be written.
* @param formatId Format of the value to be written. * @param formatId Format of the value to be written.
* @param rm Request completion monitor. * @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 * 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 bitFieldValue Value of the bit field to be written.
* @param formatId Format of the value to be written. * @param formatId Format of the value to be written.
* @param rm Request completion monitor. * @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 * 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 mnemonic Mnemonic which represents the value to be written.
* @param rm Request completion monitor. * @param rm Request completion monitor.
*/ */
void writeBitField(IBitFieldDMContext bitFieldCtx, IMnemonic mnemonic, RequestMonitor rm); void writeBitField(IDMContext<?> bitFieldCtx, IMnemonic mnemonic, RequestMonitor rm);
} }

View file

@ -92,15 +92,15 @@ public interface IRunControl extends IDMService
* Run control commands. They all require the IExecutionContext object on * Run control commands. They all require the IExecutionContext object on
* which they perform the operations. * which they perform the operations.
*/ */
boolean canResume(IExecutionDMContext context); boolean canResume(IDMContext<?> context);
boolean canSuspend(IExecutionDMContext context); boolean canSuspend(IDMContext<?> context);
boolean isSuspended(IExecutionDMContext context); boolean isSuspended(IDMContext<?> context);
void resume(IExecutionDMContext context, RequestMonitor requestMonitor); void resume(IDMContext<?> context, RequestMonitor requestMonitor);
void suspend(IExecutionDMContext context, RequestMonitor requestMonitor); void suspend(IDMContext<?> context, RequestMonitor requestMonitor);
public enum StepType { STEP_OVER, STEP_INTO, STEP_RETURN }; public enum StepType { STEP_OVER, STEP_INTO, STEP_RETURN };
boolean isStepping(IExecutionDMContext context); boolean isStepping(IDMContext<?> context);
boolean canStep(IExecutionDMContext context); boolean canStep(IDMContext<?> context);
void step(IExecutionDMContext context, StepType stepType, RequestMonitor requestMonitor); void step(IDMContext<?> context, StepType stepType, RequestMonitor requestMonitor);
boolean canInstructionStep(IExecutionDMContext context); boolean canInstructionStep(IDMContext<?> context);
void instructionStep(IExecutionDMContext context, StepType stepType, RequestMonitor requestMonitor); void instructionStep(IDMContext<?> context, StepType stepType, RequestMonitor requestMonitor);
} }

View file

@ -11,6 +11,7 @@
package org.eclipse.dd.dsf.debug.service; package org.eclipse.dd.dsf.debug.service;
import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor;
import org.eclipse.dd.dsf.datamodel.IDMContext;
import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.service.IDsfService;
import org.eclipse.debug.core.sourcelookup.ISourceContainer; import org.eclipse.debug.core.sourcelookup.ISourceContainer;
@ -22,11 +23,6 @@ import org.eclipse.debug.core.sourcelookup.ISourceContainer;
*/ */
public interface ISourceLookup extends IDsfService { public interface ISourceLookup extends IDsfService {
/**
* Context needed for debuggers that debug multiple processes.
*/
public interface ISourceLookupContext {}
public interface ISourceLookupResult { public interface ISourceLookupResult {
Object getSourceObject(); Object getSourceObject();
ISourceContainer getMatchingContainer(); ISourceContainer getMatchingContainer();
@ -37,22 +33,19 @@ public interface ISourceLookup extends IDsfService {
ISourceContainer getMatchingContainer(); 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 * Initializes the given context with the given list of source lookup
* containers. * containers.
*/ */
void initializeSourceContainers(ISourceLookupContext ctx, ISourceContainer[] containers); void initializeSourceContainers(IDMContext<?> ctx, ISourceContainer[] containers);
/** /**
* Retrieves the host source object for given debugger path string. * Retrieves the host source object for given debugger path string.
*/ */
void getSource(ISourceLookupContext srcCtx, String debuggerPath, boolean searchDuplicates, DataRequestMonitor<ISourceLookupResult[]> rm); void getSource(IDMContext<?> ctx, String debuggerPath, boolean searchDuplicates, DataRequestMonitor<ISourceLookupResult[]> rm);
/** /**
* Retrieves the debugger path string(s) for given host source object. * Retrieves the debugger path string(s) for given host source object.
*/ */
void getDebuggerPath(ISourceLookupContext srcCtx, Object source, boolean searchDuplicates, DataRequestMonitor<IDebuggerPathLookupResult[]> rm); void getDebuggerPath(IDMContext<?> ctx, Object source, boolean searchDuplicates, DataRequestMonitor<IDebuggerPathLookupResult[]> rm);
} }

View file

@ -10,11 +10,11 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.dd.dsf.debug.service; 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.concurrent.DataRequestMonitor;
import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.datamodel.IDMContext;
import org.eclipse.dd.dsf.datamodel.IDMData; import org.eclipse.dd.dsf.datamodel.IDMData;
import org.eclipse.dd.dsf.datamodel.IDMService; 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 * 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. * 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 * Retrieves list of stack frames for the given execution context. Request
* will fail if the stack frame data is not available. * will fail if the stack frame data is not available.
*/ */
void getFrames(IRunControl.IExecutionDMContext execContext, DataRequestMonitor<IFrameDMContext[]> rm); void getFrames(IDMContext<?> execContext, DataRequestMonitor<IFrameDMContext[]> rm);
/** /**
* Retrieves the top stack frame for the given execution context. * Retrieves the top stack frame for the given execution context.
@ -76,15 +76,15 @@ public interface IStack extends IDMService {
* @param execContext * @param execContext
* @param rm * @param rm
*/ */
void getTopFrame(IRunControl.IExecutionDMContext execContext, DataRequestMonitor<IFrameDMContext> rm); void getTopFrame(IDMContext<?> execContext, DataRequestMonitor<IFrameDMContext> rm);
/** /**
* Retrieves variables which were arguments to the stack frame's function. * Retrieves variables which were arguments to the stack frame's function.
*/ */
void getArguments(IFrameDMContext frameCtx, DataRequestMonitor<IVariableDMContext[]> rm); void getArguments(IDMContext<?> frameCtx, DataRequestMonitor<IVariableDMContext[]> rm);
/** /**
* Retrieves variables local to the stack frame. * Retrieves variables local to the stack frame.
*/ */
void getLocals(IFrameDMContext frameCtx, DataRequestMonitor<IVariableDMContext[]> rm); void getLocals(IDMContext<?> frameCtx, DataRequestMonitor<IVariableDMContext[]> rm);
} }

View file

@ -10,6 +10,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.dd.dsf.debug.service; 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.datamodel.IDMEvent;
import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext; import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.dd.dsf.service.IDsfService; 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 * Returns the number of step commands that are queued for given execution
* context. * context.
*/ */
int getPendingStepCount(IRunControl.IExecutionDMContext execCtx); int getPendingStepCount(IDMContext<?> ctx);
/** /**
* Checks whether a step command can be queued up for given context. * 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. * Adds a step command to the execution queue for given context.
* @param execCtx Execution context that should perform the step. * @param execCtx Execution context that should perform the step.
* @param stepType Type of step to execute. * @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 * 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 execCtx Execution context that should perform the step.
* @param stepType Type of step to execute. * @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);
} }