jde.debugger
Class DebuggeeProcess

java.lang.Object
  |
  +--jde.debugger.DebuggeeProcess
All Implemented Interfaces:
Protocol

public class DebuggeeProcess
extends java.lang.Object
implements Protocol

Class of debuggee processes.

Since:
0.1
Author:
Amit Kumar, Paul Kinnucan

Fields inherited from interface jde.debugger.Protocol
APP_IO, ATTACH_SHMEM, ATTACH_SOCKET, BR, BREAK, CANCEL_TRACE_CLASSES, CANCEL_TRACE_METHODS, CANCEL_TRACE_THREADS, CLEAR, CMD_NOK, CMD_OK, COMMAND_ERROR, COMMAND_RESULT, COMMANDS, CONNECTED_TO_VM, DEBUG, ERROR, EVALUATE, EVENT_BREAKPOINT_HIT, EVENT_CLASS_PREPARE, EVENT_CLASS_UNLOAD, EVENT_EXCEPTION, EVENT_METHOD_ENTRY, EVENT_METHOD_EXIT, EVENT_OTHER, EVENT_STEP_COMPLETED, EVENT_THREAD_DEATH, EVENT_THREAD_START, EVENT_VM_DEATH, EVENT_VM_DISCONNECT, EVENT_VM_START, EVENT_WATCHPOINT_HIT, EVENTS, EVENTSET, EXCEPTION, EXIT, FINISH, FRAMEWORK, GET_ARRAY, GET_LOADED_CLASSES, GET_LOCALS, GET_OBJECT, GET_OBJECT_MONITORS, GET_PATH_INFORMATION, GET_STRING, GET_THREAD, GET_THREADS, GUI, INTERRUPT, INVALID, JDE_BUG, JDE_INIT_DEBUG_SESSION, JDE_PIPE, KILL_THREAD, LAUNCH, LISTEN_SHMEM, LISTEN_SOCKET, MESSAGE, NONE, NOQUOTE, QUIT, QUOTE, REPORT_IDS_IN_USE, RESUME, RUN, SPEC_RESOLVED, STEP, SUSPEND, TRACE_CLASSES, TRACE_EXCEPTIONS, TRACE_METHODS, TRACE_THREADS, WARNING, WATCH
 
Constructor Summary
DebuggeeProcess(java.lang.Integer procID, com.sun.jdi.VirtualMachine vm)
          Creates an instance of a process object.
 
Method Summary
 java.util.List findClassesMatchingPattern(java.lang.String pattern)
          Return a list of ReferenceType objects for all currently loaded classes and interfaces whose name matches the given pattern.
 java.lang.Long generateObjectID()
           
 LispForm getAllThreadsInformation()
          Returns a representation of all the threads and threadgroups in the VM.
 com.sun.jdi.event.EventQueue getEventQueue()
           
 EventRequestSpecList getEventRequestSpecs()
           
 java.lang.Integer getId()
           
 DebuggeeSIO getSIO()
           
 ObjectStore getStore()
           
 com.sun.jdi.ThreadReference getThread(java.lang.String name)
          Returns the thread corresponding to this name
 com.sun.jdi.VirtualMachine getVM()
          METHODS *
 void informJDEInstallSuccessful(EventRequestSpec spec)
          Inform jde on a successful spec resolution
 boolean isShuttingDown()
           
 void removeSpecAndInformJDE(EventRequestSpec spec, java.lang.String problem)
          Removes a Spec from the specList, and informs jde.
 void resolve(com.sun.jdi.ReferenceType ref)
          This method is executed whenever a new reference type is prepared.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebuggeeProcess

public DebuggeeProcess(java.lang.Integer procID,
                       com.sun.jdi.VirtualMachine vm)
Creates an instance of a process object.
Parameters:
jdebug - Jdebug class
procID - Identifier used to specify this app int commands.
vm - Virtual machine in which this process is running.
Method Detail

getVM

public final com.sun.jdi.VirtualMachine getVM()
METHODS *

getId

public final java.lang.Integer getId()

generateObjectID

public final java.lang.Long generateObjectID()

getStore

public final ObjectStore getStore()

getEventQueue

public final com.sun.jdi.event.EventQueue getEventQueue()

shutdown

public final void shutdown()

findClassesMatchingPattern

public java.util.List findClassesMatchingPattern(java.lang.String pattern)
                                          throws JDEException
Return a list of ReferenceType objects for all currently loaded classes and interfaces whose name matches the given pattern. The pattern syntax is open to some future revision, but currently consists of a fully-qualified class name in which the first component may optionally be a "*" character, designating an arbitrary prefix.

getThread

public com.sun.jdi.ThreadReference getThread(java.lang.String name)
Returns the thread corresponding to this name

getAllThreadsInformation

public LispForm getAllThreadsInformation()
Returns a representation of all the threads and threadgroups in the VM. For example:
              ThreadGroup-1
                  +- ThreadGroup-2
                  |        +- ThreadGroup-3
                  |        |        \- Thread-1
                  |        +- ThreadGroup-4
                  |        |        +- Thread-2
                  |        |        \- Thread-3
                  |        \- Thread-4
                  \- Thread-5
              ThreadGroup-5
                  +- Thread-6


          (list
            (list "ThreadGroup"  "ThreadGroup-1"
              (list 
                (list "Thread"  "Thread-5" ...))
              (list 
                (list "ThreadGroup"  "ThreadGroup-2"
                  (list 
                    (list "Thread"  "Thread-4"))
                  (list 
                    (list "ThreadGroup"  "ThreadGroup-3"
                      (list)
                      (list 
                        (list "Thread"  "Thread-1" ...)))
                    (list "ThreadGroup"  "ThreadGroup-4"
                      (list)
                        (list
                          (list "Thread"  "Thread-2" ...)
                          (list "Thread"  "Thread-3" ...)))))))
          (list "ThreadGroup"  "ThreadGroup-5"
            (list)
              (list
                (list "Thread"  "Thread-6" ...))))
 
Syntax:
 (list [top-level thread group]*)
 
Parameters:
vm - The virtual machine itself
store - The object store where you should keep references to the thread ids. For details, see ObjectStore

resolve

public void resolve(com.sun.jdi.ReferenceType ref)
This method is executed whenever a new reference type is prepared. If any outstanding specs match, they get resolved in the process
See Also:
EventRequestSpecList.resolve(ReferenceType)

informJDEInstallSuccessful

public void informJDEInstallSuccessful(EventRequestSpec spec)
Inform jde on a successful spec resolution

removeSpecAndInformJDE

public void removeSpecAndInformJDE(EventRequestSpec spec,
                                   java.lang.String problem)
Removes a Spec from the specList, and informs jde. If there is an error while resolving a spec, indicating that it cannot be resolved (ie even at a later time when more classes are prepared), this function is called to remove it from the list, and inform the jde about this error

getEventRequestSpecs

public EventRequestSpecList getEventRequestSpecs()

getSIO

public DebuggeeSIO getSIO()

isShuttingDown

public boolean isShuttingDown()