PTP
Release 5.0

org.eclipse.ptp.debug.core.pdi.model
Interface IPDITarget

All Superinterfaces:
IPDISessionObject, IPDISet, IPDISharedLibraryManagement, IPDISourceManagement

public interface IPDITarget
extends IPDISourceManagement, IPDISharedLibraryManagement, IPDISessionObject

Represents a debuggable process. This is a root object of the PDI model.


Method Summary
 IPDIGlobalVariable createGlobalVariable(IPDIGlobalVariableDescriptor varDesc)
          Create a variable from the descriptor for evaluation.
 IPDIRegister createRegister(IPDIRegisterDescriptor varDesc)
          Create a variable from the descriptor for evaluation.
 String evaluateExpressionToString(IPDIStackFrame context, String expressionText)
          Evaluates the expression specified by the given string.
 IPDIThread getCurrentThread()
          Returns the currently selected thread.
 IPDIGlobalVariableDescriptor getGlobalVariableDescriptors(String filename, String function, String name)
          A static/global variable in a particular function or file, filename or/and function is the context for the static IPDIVariableDescriptor.
 IPDIRegisterGroup[] getRegisterGroups()
          Return the register groups.
 IPDIRuntimeOptions getRuntimeOptions()
          Returns the Runtime options for this target debug session.
 IPDIThread[] getThreads()
          Returns the threads contained in this target.
 void lockTarget()
           
 void releaseTarget()
           
 void setCurrentThread(IPDIThread pthread, boolean doUpdate)
           
 void setSupended(boolean state)
           
 void updateState(int newThreadId)
           
 
Methods inherited from interface org.eclipse.ptp.debug.core.pdi.model.IPDISourceManagement
getInstructions, getInstructions, getInstructions, getMixedInstructions, getMixedInstructions, getMixedInstructions, getSourcePaths, setSourcePaths
 
Methods inherited from interface org.eclipse.ptp.debug.core.pdi.model.IPDISharedLibraryManagement
getSharedLibraries
 
Methods inherited from interface org.eclipse.ptp.debug.core.pdi.IPDISessionObject
getSession
 
Methods inherited from interface org.eclipse.ptp.debug.core.pdi.IPDISet
getTasks
 

Method Detail

createGlobalVariable

IPDIGlobalVariable createGlobalVariable(IPDIGlobalVariableDescriptor varDesc)
                                        throws PDIException
Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and ChangedEvent will also be trigger when the variable is assign a new value. DestroyedEvent is fired when the variable is out of scope and automatically removed from the manager list.

Parameters:
varDesc - IPDIGlobalVariableDescriptor
Returns:
IPDIGlobalVariable
Throws:
PDIException - on failure

createRegister

IPDIRegister createRegister(IPDIRegisterDescriptor varDesc)
                            throws PDIException
Create a variable from the descriptor for evaluation. A CreatedEvent will be trigger and ChangedEvent will also be trigger when the variable is assign a new value. DestroyedEvent is fired when the variable is out of scope and automatically removed from the manager list.

Parameters:
varDesc - IPDThreadStorageDesc
Returns:
IPDIRegister
Throws:
PDIException - on failure

evaluateExpressionToString

String evaluateExpressionToString(IPDIStackFrame context,
                                  String expressionText)
                                  throws PDIException
Evaluates the expression specified by the given string. Returns the evaluation result as a String.

Parameters:
- - expression string to be evaluated
Returns:
the result of the evaluation
Throws:
PDIException - on failure

getCurrentThread

IPDIThread getCurrentThread()
                            throws PDIException
Returns the currently selected thread.

Returns:
the currently selected thread
Throws:
PDIException

getGlobalVariableDescriptors

IPDIGlobalVariableDescriptor getGlobalVariableDescriptors(String filename,
                                                          String function,
                                                          String name)
                                                          throws PDIException
A static/global variable in a particular function or file, filename or/and function is the context for the static IPDIVariableDescriptor.
 hello.c:
   int bar;
   int main() {
        static int bar;
   }
 file.c:
   int foo() {
        static int bar;
   }
 getVariableObject(null, null, "bar");
 getVariableObject(null, "main", "bar");
 getVariableObject("file.c", "foo", "bar");
 

Parameters:
filename -
function -
name -
Returns:
IPDIGlobalVariableDescriptor
Throws:
PDIException - on failure

getRegisterGroups

IPDIRegisterGroup[] getRegisterGroups()
                                      throws PDIException
Return the register groups.

Returns:
IPDIRegisterGroup[]
Throws:
PDIException - on failure

getRuntimeOptions

IPDIRuntimeOptions getRuntimeOptions()
Returns the Runtime options for this target debug session.

Returns:
the configuration description

getThreads

IPDIThread[] getThreads()
                        throws PDIException
Returns the threads contained in this target. An empty collection is returned if this target contains no threads.

Returns:
a collection of threads
Throws:
PDIException - on failure

lockTarget

void lockTarget()

releaseTarget

void releaseTarget()

setCurrentThread

void setCurrentThread(IPDIThread pthread,
                      boolean doUpdate)
                      throws PDIException
Parameters:
pthread -
doUpdate -
Throws:
PDIException

setSupended

void setSupended(boolean state)
Parameters:
state -

updateState

void updateState(int newThreadId)
Parameters:
newThreadId -

PTP
Release 5.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.