PTP
Release 5.0

org.eclipse.ptp.debug.core.pdi
Class Session

java.lang.Object
  extended by org.eclipse.ptp.debug.core.pdi.Session
All Implemented Interfaces:
IPDIExecuteManagement, IPDISession, IPDISessionObject, IPDISet

public class Session
extends java.lang.Object
implements IPDISession

Since:
5.0

Field Summary
 
Fields inherited from interface org.eclipse.ptp.debug.core.pdi.IPDISession
CONNECTED, CONNECTING, DISCONNECTED, EXITED, EXITING, STARTED
 
Constructor Summary
Session(IPDIManagerFactory managerFactory, IPDIRequestFactory requestFactory, IPDIEventFactory eventFactory, IPDIModelFactory modelFactory, org.eclipse.debug.core.ILaunchConfiguration config, long timeout, IPDIDebugger debugger, java.lang.String job_id, int total_tasks)
           
 
Method Summary
protected  void checkStatus()
           
 void connectToDebugger(org.eclipse.core.runtime.IProgressMonitor monitor, java.lang.String app, java.lang.String path, java.lang.String dir, java.lang.String[] args)
           
 void exit()
          Causes this session to exit
 IPDITarget findTarget(TaskSet qTasks)
          Returns debug target on given task id or null if target is not registered
 IPDIBreakpointManager getBreakpointManager()
          Returns the breakpoint manager for this session
 org.eclipse.debug.core.ILaunchConfiguration getConfiguration()
           
 IPDIDebugger getDebugger()
          IPDISession
 IPDIEventFactory getEventFactory()
          Get the factory to create events for this session
 IPDIEventManager getEventManager()
          Returns the event manager for this session
 IPDIEventRequestManager getEventRequestManager()
          Returns the event request manager for this session
 IPDIExpressionManager getExpressionManager()
          Returns the expression manager for this session
 java.lang.String getJobID()
          Returns job id associated with this session
 IPDIMemoryManager getMemoryManager()
          Returns the memory manager for this session
 IPDIModelFactory getModelFactory()
          Get the factory to create model elements for this session
 IPDIRegisterManager getRegisterManager()
          Returns the register manager for this session
 IPDIRequestFactory getRequestFactory()
          Returns request factory
 IPDISession getSession()
          Returns debug session
 IPDISignalManager getSignalManager()
          Returns the signal manager for this session
 IPDISourceManager getSourceManager()
           
 int getStatus()
          Returns current status of this session
 IPDITargetManager getTargetManager()
          Returns the target manager for this session
 IPDITaskManager getTaskManager()
          Returns the task manager for this session
 TaskSet getTasks()
          Returns all tasks of this session
 IPDIThreadManager getThreadManager()
          Returns the thread manager for this session
 long getTimeout()
           
 int getTotalTasks()
          Returns total tasks in this session
 IPDIVariableManager getVariableManager()
          Returns the variable manager for this session
 boolean isSuspended(TaskSet tasks)
          Returns whether this target/thread is currently suspended.
 boolean isTerminated(TaskSet tasks)
          Returns whether this target/thread is currently terminated.
 void processRunningEvent(TaskSet tasks)
           
 void processSupsendedEvent(TaskSet tasks, int thread_id, java.lang.String[] vars)
           
 void queueRunnable(java.lang.Runnable runnable)
          Notify Job
 void restart(TaskSet tasks)
          TODO not implemented yet in 2.0 Requests to restart of debugging
 void resume(TaskSet tasks, boolean passSignal)
          Causes this target to resume its execution. if passSignal is false and the target was suspended by a signal when resuming the signal will be discarded Has no effect on a target that is not suspended.
 void resume(TaskSet tasks, IPDILocation location)
          Resume execution at location.
 void resume(TaskSet tasks, IPDISignal signal)
          Resume execution where the program stopped but immediately give the signal.
 void setRequestTimeout(long timeout)
          Sets a timeout for request
 void setStatus(int status)
          Set status for session
 void shutdown(boolean force)
          Shutdown this session
 void start(TaskSet tasks)
          Starts specify process
 void stepInto(TaskSet tasks, int count)
          Steps into the current source line.
 void stepIntoInstruction(TaskSet tasks, int count)
          Steps into the current machine instruction.
 void stepOver(TaskSet tasks, int count)
          Steps over the current source line. if count <= 0 it is a loop.
 void stepOverInstruction(TaskSet tasks, int count)
          Steps over the current machine instruction.
 void stepReturn(TaskSet tasks, IAIF aif)
          Cancel execution of the frame and return with value. value can be null, if no return value is needed.
 void stepReturn(TaskSet tasks, int count)
          Continue execution until the frame return.
 void stepUntil(TaskSet tasks, IPDILocation location)
          Continues running until location is reached.
 void suspend(TaskSet tasks)
          Causes this target/thread to suspend its execution.
 void terminate(TaskSet tasks)
          Requests to terminate of specify process
 void validateStepReturn(TaskSet tasks)
          Checks whether request tasks can do step return
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Session

public Session(IPDIManagerFactory managerFactory,
               IPDIRequestFactory requestFactory,
               IPDIEventFactory eventFactory,
               IPDIModelFactory modelFactory,
               org.eclipse.debug.core.ILaunchConfiguration config,
               long timeout,
               IPDIDebugger debugger,
               java.lang.String job_id,
               int total_tasks)
        throws PDIException
Throws:
PDIException
Method Detail

connectToDebugger

public void connectToDebugger(org.eclipse.core.runtime.IProgressMonitor monitor,
                              java.lang.String app,
                              java.lang.String path,
                              java.lang.String dir,
                              java.lang.String[] args)
                       throws PDIException
Specified by:
connectToDebugger in interface IPDISession
Throws:
PDIException - on failure

exit

public void exit()
          throws PDIException
Description copied from interface: IPDISession
Causes this session to exit

Specified by:
exit in interface IPDISession
Throws:
PDIException - on failure

findTarget

public IPDITarget findTarget(TaskSet qTasks)
                      throws PDIException
Description copied from interface: IPDISession
Returns debug target on given task id or null if target is not registered

Specified by:
findTarget in interface IPDISession
Returns:
debug target
Throws:
PDIException - on failure
Since:
4.0

getBreakpointManager

public IPDIBreakpointManager getBreakpointManager()
Description copied from interface: IPDISession
Returns the breakpoint manager for this session

Specified by:
getBreakpointManager in interface IPDISession
Returns:
IPDIBreakpointManager the breakpoint manager for this session

getConfiguration

public org.eclipse.debug.core.ILaunchConfiguration getConfiguration()
Returns:

getDebugger

public IPDIDebugger getDebugger()
IPDISession

Specified by:
getDebugger in interface IPDISession
Returns:
a debugger for this session

getEventFactory

public IPDIEventFactory getEventFactory()
Description copied from interface: IPDISession
Get the factory to create events for this session

Specified by:
getEventFactory in interface IPDISession
Returns:

getEventManager

public IPDIEventManager getEventManager()
Description copied from interface: IPDISession
Returns the event manager for this session

Specified by:
getEventManager in interface IPDISession
Returns:
IPDIEventManager the event request manager for this session

getEventRequestManager

public IPDIEventRequestManager getEventRequestManager()
Description copied from interface: IPDISession
Returns the event request manager for this session

Specified by:
getEventRequestManager in interface IPDISession
Returns:
IPDIEventRequestManager the event request manager for this session

getExpressionManager

public IPDIExpressionManager getExpressionManager()
Description copied from interface: IPDISession
Returns the expression manager for this session

Specified by:
getExpressionManager in interface IPDISession
Returns:
IPDIExpressionManager the expression manager for this session

getJobID

public java.lang.String getJobID()
Description copied from interface: IPDISession
Returns job id associated with this session

Specified by:
getJobID in interface IPDISession
Returns:
job id

getMemoryManager

public IPDIMemoryManager getMemoryManager()
Description copied from interface: IPDISession
Returns the memory manager for this session

Specified by:
getMemoryManager in interface IPDISession
Returns:
IPDIMemoryManager the memory manager for this session

getModelFactory

public IPDIModelFactory getModelFactory()
Description copied from interface: IPDISession
Get the factory to create model elements for this session

Specified by:
getModelFactory in interface IPDISession
Returns:

getRegisterManager

public IPDIRegisterManager getRegisterManager()
Description copied from interface: IPDISession
Returns the register manager for this session

Specified by:
getRegisterManager in interface IPDISession
Returns:
IPDIRegisterManager the register manager for this session

getRequestFactory

public IPDIRequestFactory getRequestFactory()
Description copied from interface: IPDISession
Returns request factory

Specified by:
getRequestFactory in interface IPDISession
Returns:
request factory

getSession

public IPDISession getSession()
Description copied from interface: IPDISessionObject
Returns debug session

Specified by:
getSession in interface IPDISessionObject
Returns:
the debug session

getSignalManager

public IPDISignalManager getSignalManager()
Description copied from interface: IPDISession
Returns the signal manager for this session

Specified by:
getSignalManager in interface IPDISession
Returns:
IPDISignalManager the signal manager for this session

getSourceManager

public IPDISourceManager getSourceManager()
Specified by:
getSourceManager in interface IPDISession
Returns:

getStatus

public int getStatus()
Description copied from interface: IPDISession
Returns current status of this session

Specified by:
getStatus in interface IPDISession
Returns:
current status of this session

getTargetManager

public IPDITargetManager getTargetManager()
Description copied from interface: IPDISession
Returns the target manager for this session

Specified by:
getTargetManager in interface IPDISession
Returns:
IPDITargetManager the target manager for this session

getTaskManager

public IPDITaskManager getTaskManager()
Description copied from interface: IPDISession
Returns the task manager for this session

Specified by:
getTaskManager in interface IPDISession
Returns:
IPDITaskManager the task manager for this session

getTasks

public TaskSet getTasks()
Description copied from interface: IPDISession
Returns all tasks of this session

Specified by:
getTasks in interface IPDISession
Specified by:
getTasks in interface IPDISet
Returns:
all tasks of this session
Since:
4.0

getThreadManager

public IPDIThreadManager getThreadManager()
Description copied from interface: IPDISession
Returns the thread manager for this session

Specified by:
getThreadManager in interface IPDISession
Returns:
IPDIThreadManager the thread manager for this session

getTimeout

public long getTimeout()
Specified by:
getTimeout in interface IPDISession
Returns:

getTotalTasks

public int getTotalTasks()
Description copied from interface: IPDISession
Returns total tasks in this session

Specified by:
getTotalTasks in interface IPDISession
Returns:
total tasks in this session

getVariableManager

public IPDIVariableManager getVariableManager()
Description copied from interface: IPDISession
Returns the variable manager for this session

Specified by:
getVariableManager in interface IPDISession
Returns:
IPDIVariableManager the variable manager for this session

isSuspended

public boolean isSuspended(TaskSet tasks)
Description copied from interface: IPDISession
Returns whether this target/thread is currently suspended.

Specified by:
isSuspended in interface IPDISession
Parameters:
tasks - target process
Returns:
whether this target/thread is currently suspended
Since:
4.0

isTerminated

public boolean isTerminated(TaskSet tasks)
Description copied from interface: IPDISession
Returns whether this target/thread is currently terminated.

Specified by:
isTerminated in interface IPDISession
Parameters:
tasks - target process
Returns:
whether this target/thread is currently terminated
Since:
4.0

processRunningEvent

public void processRunningEvent(TaskSet tasks)
Specified by:
processRunningEvent in interface IPDISession
Since:
4.0

processSupsendedEvent

public void processSupsendedEvent(TaskSet tasks,
                                  int thread_id,
                                  java.lang.String[] vars)
Specified by:
processSupsendedEvent in interface IPDISession
Since:
4.0

queueRunnable

public void queueRunnable(java.lang.Runnable runnable)
Notify Job

Specified by:
queueRunnable in interface IPDISession

restart

public void restart(TaskSet tasks)
             throws PDIException
Description copied from interface: IPDIExecuteManagement
TODO not implemented yet in 2.0 Requests to restart of debugging

Specified by:
restart in interface IPDIExecuteManagement
Throws:
PDIException - on failure
Since:
4.0

resume

public void resume(TaskSet tasks,
                   boolean passSignal)
            throws PDIException
Description copied from interface: IPDIExecuteManagement
Causes this target to resume its execution. if passSignal is false and the target was suspended by a signal when resuming the signal will be discarded Has no effect on a target that is not suspended.

Specified by:
resume in interface IPDIExecuteManagement
Parameters:
tasks - target process
passSignal - whether to discard the signal
Throws:
PDIException - on failure
Since:
4.0

resume

public void resume(TaskSet tasks,
                   IPDILocation location)
            throws PDIException
Description copied from interface: IPDIExecuteManagement
Resume execution at location. Note the method does not change stackframe. The result is undefined if it jumps outside of the stackframe. Can only be called when the associated target is suspended.

Specified by:
resume in interface IPDIExecuteManagement
Parameters:
tasks - target process
Throws:
PDIException - on failure
Since:
4.0

resume

public void resume(TaskSet tasks,
                   IPDISignal signal)
            throws PDIException
Description copied from interface: IPDIExecuteManagement
Resume execution where the program stopped but immediately give the signal.

Specified by:
resume in interface IPDIExecuteManagement
Parameters:
tasks - target process
Throws:
PDIException - on failure
Since:
4.0

setRequestTimeout

public void setRequestTimeout(long timeout)
Description copied from interface: IPDISession
Sets a timeout for request

Specified by:
setRequestTimeout in interface IPDISession

setStatus

public void setStatus(int status)
Description copied from interface: IPDISession
Set status for session

Specified by:
setStatus in interface IPDISession
Parameters:
status - status of current session

shutdown

public void shutdown(boolean force)
Description copied from interface: IPDISession
Shutdown this session

Specified by:
shutdown in interface IPDISession
Parameters:
force - whether force to terminate debugger

start

public void start(TaskSet tasks)
           throws PDIException
Description copied from interface: IPDIExecuteManagement
Starts specify process

Specified by:
start in interface IPDIExecuteManagement
Parameters:
tasks - target process
Throws:
PDIException - on failure
Since:
4.0

stepInto

public void stepInto(TaskSet tasks,
                     int count)
              throws PDIException
Description copied from interface: IPDIExecuteManagement
Steps into the current source line. Can only be called when the associated target/thread is suspended. if count <= 0 it is a loop.

Specified by:
stepInto in interface IPDIExecuteManagement
Parameters:
tasks - target process
count - as in `step', but do so count times.
Throws:
PDIException - on failure
Since:
4.0

stepIntoInstruction

public void stepIntoInstruction(TaskSet tasks,
                                int count)
                         throws PDIException
Description copied from interface: IPDIExecuteManagement
Steps into the current machine instruction. Can only be called when the associated target/thread is suspended. if count <= 0 it is a loop.

Specified by:
stepIntoInstruction in interface IPDIExecuteManagement
Parameters:
tasks - target process
Throws:
PDIException - on failure
Since:
4.0

stepOver

public void stepOver(TaskSet tasks,
                     int count)
              throws PDIException
Description copied from interface: IPDIExecuteManagement
Steps over the current source line. if count <= 0 it is a loop. Can only be called when the associated target/thread is suspended.

Specified by:
stepOver in interface IPDIExecuteManagement
Parameters:
tasks - target process
count - as in `step', but do so count times.
Throws:
PDIException - on failure
Since:
4.0

stepOverInstruction

public void stepOverInstruction(TaskSet tasks,
                                int count)
                         throws PDIException
Description copied from interface: IPDIExecuteManagement
Steps over the current machine instruction. Can only be called when the associated target/thread is suspended. if count <= 0 it is a loop.

Specified by:
stepOverInstruction in interface IPDIExecuteManagement
Parameters:
tasks - target process
count - as in `stepOverInstruction', but do so count times.
Throws:
PDIException - on failure
Since:
4.0

stepReturn

public void stepReturn(TaskSet tasks,
                       IAIF aif)
                throws PDIException
Description copied from interface: IPDIExecuteManagement
Cancel execution of the frame and return with value. value can be null, if no return value is needed. Can only be called when the associated target/thread is suspended.

Specified by:
stepReturn in interface IPDIExecuteManagement
Parameters:
tasks - target process
aif - value use as the returning value.
Throws:
PDIException - on failure
Since:
4.0

stepReturn

public void stepReturn(TaskSet tasks,
                       int count)
                throws PDIException
Description copied from interface: IPDIExecuteManagement
Continue execution until the frame return.

Specified by:
stepReturn in interface IPDIExecuteManagement
Parameters:
tasks - target process
count - as in `step', but do so count times.
Throws:
PDIException - on failure
Since:
4.0

stepUntil

public void stepUntil(TaskSet tasks,
                      IPDILocation location)
               throws PDIException
Description copied from interface: IPDIExecuteManagement
Continues running until location is reached. If the program will be suspended if attempt to exit the current frame. Can only be called when the associated target is suspended.

Specified by:
stepUntil in interface IPDIExecuteManagement
Parameters:
tasks - target process
location - location
Throws:
PDIException - on failure
Since:
4.0

suspend

public void suspend(TaskSet tasks)
             throws PDIException
Description copied from interface: IPDIExecuteManagement
Causes this target/thread to suspend its execution. Has no effect on an already suspended thread.

Specified by:
suspend in interface IPDIExecuteManagement
Parameters:
tasks - target process
Throws:
PDIException - on failure
Since:
4.0

terminate

public void terminate(TaskSet tasks)
               throws PDIException
Description copied from interface: IPDIExecuteManagement
Requests to terminate of specify process

Specified by:
terminate in interface IPDIExecuteManagement
Parameters:
tasks - target process
Throws:
PDIException - on failure
Since:
4.0

validateStepReturn

public void validateStepReturn(TaskSet tasks)
                        throws PDIException
Description copied from interface: IPDISession
Checks whether request tasks can do step return

Specified by:
validateStepReturn in interface IPDISession
Throws:
PDIException
Since:
4.0

checkStatus

protected void checkStatus()
                    throws PDIException
Throws:
PDIException

PTP
Release 5.0

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