Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.classpath.jdwp.VMVirtualMachine
public class VMVirtualMachine
extends Object
Field Summary | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean | |
static boolean |
Method Summary | |
static void |
|
static MethodResult | |
static VMMethod[] |
|
static Collection<E> |
|
static byte[] |
|
static VMMethod |
|
static int |
|
static Object |
|
static VMFrame | |
static int |
|
static ArrayList<E> | |
static ArrayList<E> |
|
static MonitorInfo |
|
static Object[] |
|
static String |
|
static String |
|
static int |
|
static int |
|
static void | |
static void | |
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
static void |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public static final boolean canGetCurrentContendedMonitor
- Field Value:
- false
public static final boolean canUnrestrictedlyRedefineClasses
- Field Value:
- false
public static void clearEvents(byte kind) throws JdwpException
Clear all events of the given kind
- Parameters:
kind
- the type of events to clear
public static MethodResult executeMethod(Object obj, Thread thread, Class<T> clazz, VMMethod method, Value[] values, int options) throws JdwpException
Executes a method in the virtual machine. The thread must already be suspended by a previous event. When the method invocation is complete, the thread (or all threads if INVOKE_SINGLE_THREADED is not set in options) must be suspended before this method returns.
- Parameters:
obj
- instance in which to invoke method (null for static)thread
- the thread in which to invoke the methodclazz
- the class in which the method is definedmethod
- the method to invokevalues
- arguments to pass to methodoptions
- invocation options
- Returns:
- a result object containing the results of the invocation
public static VMMethod[] getAllClassMethods(Class<T> klass) throws JdwpException
Returns all of the methods defined in the given class. This includes all methods, constructors, and class initializers.
- Parameters:
klass
- the class whose methods are desired
- Returns:
- an array of virtual machine methods
public static Collection<E> getAllLoadedClasses() throws JdwpException
Returns a Collection of all classes loaded in the VM
public static byte[] getBytecodes(VMMethod method) throws JdwpException
Returns the bytecode for the given method. VM must support the canGetBytecodes capability.
- Parameters:
method
- the method for which to get bytecodes
public static VMMethod getClassMethod(Class<T> klass, long id) throws JdwpException
A factory method for getting valid virtual machine methods which may be passed to/from the debugger.
- Parameters:
klass
- the class in which the method is definedid
- the ID of the desired method
- Returns:
- the desired internal representation of the method
- Throws:
JdwpException
- for any other error
public static int getClassStatus(Class<T> clazz) throws JdwpException
Returns the status of the given class
- Parameters:
clazz
- the class whose status is desired
- Returns:
- a flag containing the class's status
- See Also:
JdwpConstants.ClassStatus
public static Object getCurrentContendedMonitor(Thread thread) throws JdwpException
Returns the current contended monitor for a thread. VM must support canGetCurrentContendedMonitor capability.
- Parameters:
thread
- the thread
public static VMFrame getFrame(Thread thread, long frameID) throws JdwpException
Returns the frame for a given thread with the frame ID in the buffer I don't like this.
- Parameters:
thread
- the frame's thread
- Returns:
- the desired frame
public static int getFrameCount(Thread thread) throws JdwpException
Returns the number of frames in the thread's stack
- Parameters:
thread
- the thread for which to get a frame count
- Returns:
- the number of frames in the thread's stack
public static ArrayList<E> getFrames(Thread thread, int start, int length) throws JdwpException
Returns the thread's call stack
- Parameters:
thread
- thread for which to get call stackstart
- index of first frame to returnlength
- number of frames to return (-1 for all frames)
- Returns:
- a list of frames
public static ArrayList<E> getLoadRequests(ClassLoader cl) throws JdwpException
Returns a list of all classes which this class loader has been requested to load
- Parameters:
cl
- the class loader
- Returns:
- a list of all visible classes
public static MonitorInfo getMonitorInfo(Object obj) throws JdwpException
Returns monitor information about an object. VM must support the canGetMonitorInformation capability.
- Parameters:
obj
- the object
public static Object[] getOwnedMonitors(Thread thread) throws JdwpException
Returns a list of owned monitors. VM must support the canGetOwnedMonitorInfo capability.
- Parameters:
thread
- a thread
public static String getSourceDebugExtension(Class<T> klass) throws JdwpException
Returns the source debug extension. VM must support the canGetSourceDebugExtension capability.
- Parameters:
klass
- the class for which to return information
public static String getSourceFile(Class<T> clazz) throws JdwpException
"Returns the name of source file in which a reference type was declared"
- Parameters:
clazz
- the class for which to return a source file
- Returns:
- a string containing the source file name; "no path information for the file is included"
public static int getSuspendCount(Thread thread) throws JdwpException
Get the suspend count for a give thread
- Parameters:
thread
- the thread whose suspend count is desired
- Returns:
- the number of times the thread has been suspended
public static int getThreadStatus(Thread thread) throws JdwpException
Returns the status of a thread
- Parameters:
thread
- the thread for which to get status
- Returns:
- integer status of the thread
- See Also:
JdwpConstants.ThreadStatus
public static void popFrames(Thread thread, long frameId)
Pop all frames up to and including the given frame. VM must support canPopFrames capability. It is the responsibility of the VM to check if the thread is suspended. If it is not, the VM should throw ThreadNotSuspendedException.
- Parameters:
thread
- the thread
public static void redefineClasses(Class<T>[] types, byte[][] bytecodes) throws JdwpException
Redefines the given types. VM must support canRedefineClasses capability (may also require canAddMethod and/or canUnrestrictedlyRedefineClasses capabilities)
- Parameters:
types
- the classes to redefinebytecodes
- the new bytecode definitions for the classes
public static void registerEvent(EventRequest request) throws JdwpException
Register a request from the debugger Virtual machines have two options. Either do nothing and allow the event manager to take care of the request (useful for broadcast-type events like class prepare/load/unload, thread start/end, etc.) or do some internal work to set up the event notification (useful for execution-related events like breakpoints, single-stepping, etc.).
public static void resumeAllThreads() throws JdwpException
Resume all threads. This simply decrements the thread's suspend count. It can not be used to force the application to run.
public static void resumeThread(Thread thread) throws JdwpException
Resume a thread. A thread must be resumed as many times as it has been suspended.
- Parameters:
thread
- the thread to resume
public static void setDefaultStratum(String stratum) throws JdwpException
Sets the default stratum. VM must support the canSetDefaultStratum capability.
- Parameters:
stratum
- the new default stratum or empty string to use the reference default
public static void suspendThread(Thread thread) throws JdwpException
Suspend a thread
- Parameters:
thread
- the thread to suspend
public static void unregisterEvent(EventRequest request) throws JdwpException
Unregisters the given request
- Parameters:
request
- the request to unregister