Returns reference types for all the classes loaded by the target VM which match the given signature. Multple reference types will be returned if two or more class loaders have loaded a class of the same name. The search is confined to loaded classes only; no attempt is made to load a class of the given signature.
Out Data
string
signature
JNI signature of the class to find (for example, "Ljava/lang/String;").
Returns all threads currently running in the target VM . The returned list contains threads created through java.lang.Thread, all native threads attached to the target VM through JNI, and system threads created by the target VM. Threads that have not yet been started and threads that have completed their execution are not included in the returned list.
Returns all thread groups that do not have a parent. This command may be used as the first step in building a tree (or trees) of the existing thread groups.
Invalidates this virtual machine mirror. The communication channel to the target VM is closed, and the target VM prepares to accept another subsequent connection from this debugger or another debugger, including the following tasks:
All event requests are cancelled.
All threads suspended by the thread-level resume command or the VM-level resume command are resumed as many times as necessary for them to run.
Garbage collection is re-enabled in all cases where it was disabled
Any current method invocations executing in the target VM are continued after the disconnection. Upon completion of any such method invocation, the invoking thread continues from the location where it was originally stopped.
Resources originating in this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) will become invalid.
Returns the sizes of variably-sized data types in the target VM.The returned values indicate the number of bytes used by the identifiers in command and reply packets.
Suspends the execution of the application running in the target VM. All Java threads currently running will be suspended.
Unlike java.lang.Thread.suspend, suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed through the VM-level resume command or the thread-level resume command the same number of times it has been suspended.
Resumes execution of the application after the suspend command or an event has stopped it. Suspensions of the Virtual Machine and individual threads are counted. If a particular thread is suspended n times, it must resumed n times before it will continue.
Terminates the target VM with the given exit code. All ids previously returned from the target VM become invalid. Threads running in the VM are abruptly terminated. A thread death exception is not thrown and finally blocks are not run.
Retrieve this VM's capabilities. The capabilities are returned as booleans, each indicating the presence or absence of a capability. The commands associated with each capability will return the NOT_IMPLEMENTED error if the cabability is not available.
Out Data
(None)
Reply Data
boolean
canWatchFieldModification
Can the VM watch field modification, and therefore can it send the Modification Watchpoint Event?
boolean
canWatchFieldAccess
Can the VM watch field access, and therefore can it send the Access Watchpoint Event?
boolean
canGetBytecodes
Can the VM get the bytecodes of a given method?
boolean
canGetSyntheticAttribute
Can the VM determine whether a field or method is synthetic? (that is, can the VM determine if the method or the field was invented by the compiler?)
boolean
canGetOwnedMonitorInfo
Can the VM get the owned monitors infornation for a thread?
boolean
canGetCurrentContendedMonitor
Can the VM get the current contended monitor of a thread?
boolean
canGetMonitorInfo
Can the VM get the monitor information for a given object?
Retrieve the classpath and bootclasspath of the target VM. If the classpath is not defined, returns an empty list. If the bootclasspath is not defined returns an empty list.
Out Data
(None)
Reply Data
string
baseDir
Base directory used to resolve relative paths in either of the following lists.
Releases a list of object IDs. For each object in the list, the following applies. No further commands will be sent with the object's ID in the list. If the object has not yet been garbage collected, any back-end resources associated with the ID will be freed, and if garbage collection was disabled for the object, it will be re-enabled.
Use of this command is not required. If it is not sent, resources associated with each ID will be freed by the back-end at some time after the corresponding object is garbage collected. It is most useful to use this command to reduce the load on the back-end if a very large number of objects has been retrieved from the back-end (a large array, for example) but may not be garbage collected any time soon.
The object IDs may be re-used by the back end after they have been disposed with this command.
Out Data
int
requests
Number of object dispose requests that follow
Repeated requests times:
objectID
object
The object ID
int
refCnt
The number of times this object ID has been part of a packet received from the back-end. An accurate count prevents the object ID from being freed on the back-end if it is part of an incoming packet, not yet handled by the front-end.
Tells the target VM to stop sending events. Events are not discarded; they are held until a subsequent ReleaseEvents command is sent. This command is useful to control the number of events sent to the debugger VM in situations where very large numbers of events are generated. While events are held by the debugger back-end, application execution may be frozen by the debugger back-end to prevent buffer overflows on the back end. Responses to commands are never held and are not affected by this command. If events are already being held, this command is ignored.
Tells the target VM to continue sending events. This command is used to restore normal activity after a HoldEvents command. If there is no current HoldEvents command in effect, this command is ignored.
For primitive classes the returned signature is the signature of the corresponding primitive type; for example, "I" is returned as the signature of the class represented by java.lang.Integer.TYPE.
Returns the instance of java.lang.ClassLoader which loaded a given reference type. If the reference type was loaded by the system class loader, the returned object ID is null.
Returns the modifiers (also known as access flags) for a reference type. The returned bit mask contains information on the declaration of the reference type. If the reference type is an array or a primitive class (for example, java.lang.Integer.TYPE), the value of the returned bit mask is undefined.
Returns information for each field in a reference type. Inherited fields are not included. The field list will include any synthetic fields created by the compiler. Fields are returned in the order they occur in the class file.
Out Data
referenceTypeID
refType
The reference type ID.
Reply Data
int
declared
Number of declared fields.
Repeated declared times:
fieldID
fieldID
Field ID.
string
name
Name of field.
string
signature
JNI Signature of field.
int
modBits
The modifier bit flags (also known as access flags) which provide additional information on the field declaration. Individual flag values are defined in the VM Specification.In addition, The 0xf0000000 bit identifies the field as synthetic, if the synthetic attribute capability is available.
Returns information for each method in a reference type. Inherited methodss are not included. The list of methods will include constructors (identified with the name "<init>"), the initialization method (identified with the name "<clinit>") if present, and any synthetic methods created by the compiler. Methods are returned in the order they occur in the class file.
Out Data
referenceTypeID
refType
The reference type ID.
Reply Data
int
declared
Number of declared methods.
Repeated declared times:
methodID
methodID
Method ID.
string
name
Name of method.
string
signature
JNI signature of method.
int
modBits
The modifier bit flags (also known as access flags) which provide additional information on the method declaration. Individual flag values are defined in the VM Specification.In addition, The 0xf0000000 bit identifies the method as synthetic, if the synthetic attribute capability is available.
Returns the value of one or more static fields of the reference type. Each field must be member of the reference type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be obtained.
Returns the current status of the reference type. The status indicates the extent to which the reference type has been initialized, as described in the VM specification. The returned status bits are undefined for array types and for primitive classes (such as java.lang.Integer.TYPE).
Returns the interfaces declared as implemented by this class. Interfaces indirectly implemented (extended by the implemented interface or implemented by a superclass) are not included.
Sets the value of one or more static fields. Each field must be member of the class type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be set. Final fields cannot be set.For primitive values, the value's type must match the field's type exactly. For object values, there must exist a widening reference conversion from the value's type to the field's type and the field's type must be loaded.
Invokes a static method. The method must be member of the class type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, private methods can be invoked.
The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.
The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the invoked method throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.
For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must exist a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.
By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.
The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.
If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.
Creates a new object of this type, invoking the specified constructor. The constructor method ID must be a member of the class type.
Instance creation will occur in the specified thread. Instance creation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.
The specified constructor is invoked with the arguments in the specified argument list. The constructor invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the constructor throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.
For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must exist a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.
By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.
The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.
If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.
Returns line number information for the method. The line table maps source line numbers to the initial code index of the line. The line table is ordered by code index (from lowest to highest).
Returns variable information for the method. The variable table includes arguments and locals declared within the method. For instance methods, the "this" reference is included in the table. Also, synthetic variables may be present.
Out Data
referenceTypeID
classID
The class.
methodID
methodID
The method.
Reply Data
int
argCnt
The number of words in the frame used by arguments. Eight-byte arguments use two words; all others use one.
int
slots
The number of variables.
Repeated slots times:
long
codeIndex
First code index at which the variable is visible (unsigned). Used in conjunction with length. The variable can be get or set only when the current codeIndex <= current frame code index < codeIndex + length
string
name
The variable's name.
string
signature
The variable type's JNI signature.
int
length
Unsigned value used in conjunction with codeIndex. The variable can be get or set only when the current codeIndex <= current frame code index < code index + length
Returns the value of one or more instance fields. Each field must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be obtained.
Sets the value of one or more instance fields. Each field must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, the values of private fields can be set. For primitive values, the value's type must match the field's type exactly. For object values, there must be a widening reference conversion from the value's type to the field's type and the field's type must be loaded.
Invokes a instance method. The method must be member of the object's type or one of its superclasses, superinterfaces, or implemented interfaces. Access control is not enforced; for example, private methods can be invoked.
The method invocation will occur in the specified thread. Method invocation can occur only if the specified thread has been suspended by an event. Method invocation is not supported when the target VM has been suspended by the front-end.
The specified method is invoked with the arguments in the specified argument list. The method invocation is synchronous; the reply packet is not sent until the invoked method returns in the target VM. The return value (possibly the void value) is included in the reply packet. If the invoked method throws an exception, the exception object ID is set in the reply packet; otherwise, the exception object ID is null.
For primitive arguments, the argument value's type must match the argument's type exactly. For object arguments, there must be a widening reference conversion from the argument value's type to the argument's type and the argument's type must be loaded.
By default, all threads in the target VM are resumed while the method is being invoked if they were previously suspended by an event or by command. This is done to prevent the deadlocks that will occur if any of the threads own monitors that will be needed by the invoked method. It is possible that breakpoints or other events might occur during the invocation. Note, however, that this implicit resume acts exactly like the ThreadReference resume command, so if the thread's suspend count is greater than 1, it will remain in a suspended state during the invocation. By default, when the invocation completes, all threads in the target VM are suspended, regardless their state before the invocation.
The resumption of other threads during the invoke can be prevented by specifying the INVOKE_SINGLE_THREADED bit flag in the options field; however, there is no protection against or recovery from the deadlocks described above, so this option should be used with great caution. Only the specified thread will be resumed (as described for all threads above). Upon completion of a single threaded invoke, the invoking thread will be suspended once again. Note that any threads started during the single threaded invocation will not be suspended when the invocation completes.
If the target VM is disconnected during the invoke (for example, through the VirtualMachine dispose command) the method invocation continues.
Prevents garbage collection for the given object. By default all objects in back-end replies may be collected at any time the target VM is running. A call to this command guarantees that the object will not be collected. The EnableCollection command can be used to allow collection once again.
Note that while the target VM is suspended, no garbage collection will occur because all threads are suspended. The typical examination of variables, fields, and arrays during the suspension is safe without explicitly disabling garbage collection.
This method should be used sparingly, as it alters the pattern of garbage collection in the target VM and, consequently, may result in application behavior under the debugger that differs from its non-debugged behavior.
Permits garbage collection for this object. By default all objects returned by the JDWP may be collected at any time the target VM is running. A call to this command is necessary only if garbage collection was previously disabled with the DisableCollection command.
Unlike java.lang.Thread.suspend(), suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed the same number of times it has been suspended.
Suspending single threads with command has the same dangers java.lang.Thread.suspend(). If the suspended thread holds a monitor needed by another running thread, deadlock is possible in the target VM (at least until the suspended thread is resumed again).
The suspended thread is guaranteed to remain suspended until resumed through one of the JDI resume methods mentioned above; the application in the target VM cannot resume the suspended thread through {@link java.lang.Thread#resume}.
Note that this doesn't change the status of the thread (see the ThreadStatus command.) For example, if it was Running, it will still appear running to other threads.
Resumes the execution of a given thread. If this thread was not previously suspended by the front-end, calling this command has no effect. Otherwise, the count of pending suspends on this thread is decremented. If it is decremented to 0, the thread will continue to execute.
Returns the current status of a thread. The thread status reply indicates the thread status the last time it was running. the suspend status provides information on the thread's suspension, if any.
Returns the current call stack of a suspended thread. The sequence of frames starts with the currently executing frame, followed by its caller, and so on. The thread must be suspended, and the returned frameID is valid only while the thread is suspended.
Out Data
threadID
threadObject
The thread object ID.
int
startFrame
The index of the first frame to retrieve.
int
length
The count of frames to retrieve (-1 means all remaining).
Returns the count of frames on this thread's stack. The thread must be suspended, and the returned count is valid only while the thread is suspended. Returns JDWP.Error.errorThreadNotSuspended if not suspended.
Returns the objects whose monitors have been entered by this thread. The thread must be suspended, and the returned information is relevant only while the thread is suspended.
Returns the object, if any, for which this thread is waiting for monitor entry or with java.lang.Object.wait. The thread must be suspended, and the returned information is relevant only while the thread is suspended.
Out Data
threadID
threadObject
The thread object ID.
Reply Data
tagged-objectID
monitor
The contended monitor, or null if there is no current contended monitor.
Get the suspend count for this thread. The suspend count is the number of times the thread has been suspended through the thread-level or VM-level suspend commands without a corresponding resume
Out Data
threadID
threadObject
The thread object ID.
Reply Data
int
suspendCount
The number of outstanding suspends of this thread.
Sets a range of array components. The specified range must be within the bounds of the array. For primitive values, each value's type must match the array component type exactly. For object values, there must be a widening reference conversion from the value's type to the array component type and the array component type must be loaded.
Returns a list of all classes which this class loader has been requested to load. This class loader is considered to be an initiating class loader for each class in the returned list. The list contains each reference type defined by this loader and any types for which loading was delegated by this class loader to another class loader.
The visible class list has useful properties with respect to the type namespace. A particular type name will occur at most once in the list. Each field or variable declared with that type name in a class defined by this class loader must be resolved to that single type.
Set an event request. When the event described by this request occurs, an event is sent from the target VM.
Out Data
byte
eventKind
Event kind to request. See JDWP.EventKind for a complete list of events that can be requested.
byte
suspendPolicy
What threads are suspended when this event occurs? Note that the order of events and command replies accurately reflects the order in which threads are suspended and resumed. For example, if a VM-wide resume is processed before an event occurs which suspends the VM, the reply to the resume command will be written to the transport before the suspending event.
int
modifiers
Constraints used to control the number of generated events. Modifiers specify additional tests that an event must satisfy before it is placed in the event queue. Events are filtered by applying each modifier to an event in the order they are specified in this collection Only events that satisfy all modifiers are reported.
Filtering can improve debugger performance dramatically by reducing the amount of event traffic sent from the target VM to the debugger VM.
Repeated modifiers times:
byte
modKind
Modifier kind
Case Count - if modKind is 1:
Limit the requested event to be reported at most once after a given number of occurrences. The event is not reported the first count - 1 times this filter is reached. To request a one-off event, call this method with a count of 1.
Once the count reaches 0, any subsequent filters in this request are applied. If none of those filters cause the event to be suppressed, the event is reported. Otherwise, the event is not reported. In either case subsequent events are never reported for this request. This modifier can be used with any event kind.
int
count
Count before event. One for one-off.
Case Conditional - if modKind is 2:
Conditional on expression
int
exprID
For the future
Case ThreadOnly - if modKind is 3:
Restricts reported events to those in the given thread. This modifier can be used with any event kind except for class unload.
threadID
thread
Required thread
Case ClassOnly - if modKind is 4:
For class prepare events, restricts the events generated by this request to be the preparation of the given reference type and any subtypes. For other events, restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type. This modifier can be used with any event kind except class unload, thread start, and thread end.
referenceTypeID
clazz
Required class
Case ClassMatch - if modKind is 5:
Restricts reported events to those for classes whose name matches the given restricted regular expression. For class prepare events, the prepared class name is matched. For class unload events, the unloaded class name is matched. For other events, the class name of the event's location is matched. This modifier can be used with any event kind except thread start and thread end.
string
classPattern
Required class pattern. Matches are limited to exact matches of the given class pattern and matches of patterns that begin or end with '*'; for example, "*.Foo" or "java.*".
Case ClassExclude - if modKind is 6:
Restricts reported events to those for classes whose name does not match the given restricted regular expression. For class prepare events, the prepared class name is matched. For class unload events, the unloaded class name is matched. For other events, the class name of the event's location is matched. This modifier can be used with any event kind except thread start and thread end.
string
classPattern
Disallowed class pattern. Matches are limited to exact matches of the given class pattern and matches of patterns that begin or end with '*'; for example, "*.Foo" or "java.*".
Case LocationOnly - if modKind is 7:
Restricts reported events to those that occur at the given location. This modifier can be used with breakpoint, field access, field modification, step, and exception event kinds.
location
loc
Required location
Case ExceptionOnly - if modKind is 8:
Restricts reported exceptions by their class and whether they are caught or uncaught. This modifier can be used with exception event kinds only.
referenceTypeID
exceptionOrNull
Exception to report. Null (0) means report exceptions of all types. A non-null type restricts the reported exception events to exceptions of the given type or any of its subtypes.
boolean
caught
Report caught exceptions
boolean
uncaught
Report uncaught exceptions. Note that it is not always possible to determine whether an exception is caught or uncaught at the time it is thrown. See the exception event catch location under composite events for more information.
Case FieldOnly - if modKind is 9:
Restricts reported events to those that occur for a given field. This modifier can be used with field access and field modification event kinds only.
referenceTypeID
declaring
Type in which field is declared.
fieldID
fieldID
Required field
Case Step - if modKind is 10:
Restricts reported step events to those which satisfy depth and size constraints. This modifier can be used with step event kinds only.
Returns the value of one or more local variables in a given frame. Each variable must be visible at the frame's code index. Even if local variable information is not available, values can be retrieved if the front-end is able to determine the correct local variable index. (Typically, this index can be determined for method arguments from the method signature without access to the local variable table information.)
Sets the value of one or more local variables. Each variable must be visible at the current frame code index. For primitive values, the value's type must match the variable's type exactly. For object values, there must be a widening reference conversion from the value's type to the variable's type and the variable's type must be loaded.
Even if local variable information is not available, values can be set, if the front-end is able to determine the correct local variable index. (Typically, this index can be determined for method arguments from the method signature without access to the local variable table information.)
Several events may occur at a given time in the target VM. For example, there may be more than one breakpoint request for a given location or you might single step to the same location as a breakpoint request. These events are delivered together as a composite event. For uniformity, a composite event is always used to deliver events, even if there is only one event to report.
The events that are grouped in a composite event are restricted in the following ways:
Always singleton composite events:
VM Start Event
VM Death Event
Only with other thread start events for the same thread:
Thread Start Event
Only with other thread death events for the same thread:
Thread Death Event
Only with other class prepare events for the same class:
Class Prepare Event}
Only with other class unload events for the same class:
Class Unload Event
Only with other access watchpoint events for the same field access:
Access Watchpoint Event
Only with other modification watchpoint events for the same field modification:
Modification Watchpoint Event
Only with other ExceptionEvents for the same exception occurrance:
ExceptionEvent
Only with other members of this group, at the same location and in the same thread:
Breakpoint Event
Step Event
Method Entry Event
Method Exit Event
Event Data
byte
suspendPolicy
Which threads where suspended by this composite event?
int
events
Events in set.
Repeated events times:
byte
eventKind
Event kind selector
Case VMStart - if eventKind is JDWP.EventKind.VM_START:
Notification of initialization of a target VM. This event is received before the main thread is started and before any application code has been executed. Before this event occurs a significant amount of system code has executed and a number of system classes have been loaded. This event is always generated by the target VM, even if not explicitly requested.
int
requestID
Request that generated event (or 0 if this event is automatically generated.
threadID
thread
Initial thread
Case SingleStep - if eventKind is JDWP.EventKind.SINGLE_STEP:
Notification of step completion in the target VM. The step event is generated before the code at its location is executed.
int
requestID
Request that generated event
threadID
thread
Stepped thread
location
location
Location stepped to
Case Breakpoint - if eventKind is JDWP.EventKind.BREAKPOINT:
Notification of a breakpoint in the target VM. The breakpoint event is generated before the code at its location is executed.
int
requestID
Request that generated event
threadID
thread
thread which hit breakpoint
location
location
Location hit
Case MethodEntry - if eventKind is JDWP.EventKind.METHOD_ENTRY:
Notification of a method invocation in the target VM. This event is generated before any code in the invoked method has executed. Method entry events are generated for both native and non-native methods.
In some VMs method entry events can occur for a particular thread before its thread start event occurs if methods are called as part of the thread's initialization.
int
requestID
Request that generated event
threadID
thread
thread which entered method
location
location
Location of entry
Case MethodExit - if eventKind is JDWP.EventKind.METHOD_EXIT:
Notification of a method return in the target VM. This event is generated after all code in the method has executed, but the location of this event is the last executed location in the method. Method exit events are generated for both native and non-native methods. Method exit events are not generated if the method terminates with a thrown exception.
int
requestID
Request that generated event
threadID
thread
thread which exited method
location
location
Location of exit
Case Exception - if eventKind is JDWP.EventKind.EXCEPTION:
Notification of an exception in the target VM. If the exception is thrown from a non-native method, the exception event is generated at the location where the exception is thrown. If the exception is thrown from a native method, the exception event is generated at the first non-native location reached after the exception is thrown.
int
requestID
Request that generated event
threadID
thread
Thread with exception
location
location
Location of exception throw (or first non-native location after throw if thrown from a native method)
tagged-objectID
exception
Thrown exception
location
catchLocation
Location of catch, or 0 if not caught. An exception is considered to be caught if, at the point of the throw, the current location is dynamically enclosed in a try statement that handles the exception. (See the JVM specification for details). If there is such a try statement, the catch location is the first location in the appropriate catch clause.
If there are native methods in the call stack at the time of the exception, there are important restrictions to note about the returned catch location. In such cases, it is not possible to predict whether an exception will be handled by some native method on the call stack. Thus, it is possible that exceptions considered uncaught here will, in fact, be handled by a native method and not cause termination of the target VM. Furthermore, it cannot be assumed that the catch location returned here will ever be reached by the throwing thread. If there is a native frame between the current location and the catch location, the exception might be handled and cleared in that native method instead.
Note that compilers can generate try-catch blocks in some cases where they are not explicit in the source code; for example, the code generated for synchronized and finally blocks can contain implicit try-catch blocks. If such an implicitly generated try-catch is present on the call stack at the time of the throw, the exception will be considered caught even though it appears to be uncaught from examination of the source code.
Case ThreadStart - if eventKind is JDWP.EventKind.THREAD_START:
Notification of a new running thread in the target VM. The new thread can be the result of a call to java.lang.Thread.start or the result of attaching a new thread to the VM though JNI. The notification is generated by the new thread some time before its execution starts. Because of this timing, it is possible to receive other events for the thread before this event is received. (Notably, Method Entry Events and Method Exit Events might occur during thread initialization. It is also possible for the VirtualMachine AllThreads command to return a thread before its thread start event is received.
Note that this event gives no information about the creation of the thread object which may have happened much earlier, depending on the VM being debugged.
int
requestID
Request that generated event
threadID
thread
Started thread
Case ThreadDeath - if eventKind is JDWP.EventKind.THREAD_DEATH:
Notification of a completed thread in the target VM. The notification is generated by the dying thread before it terminates. Because of this timing, it is possible for {@link VirtualMachine#allThreads} to return this thread after this event is received.
Note that this event gives no information about the lifetime of the thread object. It may or may not be collected soon depending on what references exist in the target VM.
int
requestID
Request that generated event
threadID
thread
Ending thread
Case ClassPrepare - if eventKind is JDWP.EventKind.CLASS_PREPARE:
Notification of a class prepare in the target VM. See the JVM specification for a definition of class preparation. Class prepare events are not generated for primtiive classes (for example, java.lang.Integer.TYPE).
int
requestID
Request that generated event
threadID
thread
Preparing thread. In rare cases, this event may occur in a debugger system thread within the target VM. Debugger threads take precautions to prevent these events, but they cannot be avoided under some conditions, especially for some subclasses of java.lang.Error. If the event was generated by a debugger system thread, the value returned by this method is null, and if the requested suspend policy for the event was EVENT_THREAD all threads will be suspended instead, and the composite event's suspend policy will reflect this change.
Note that the discussion above does not apply to system threads created by the target VM during its normal (non-debug) operation.