Chapter 11
Event Command Set
This command set is numbered (64) to match the equivalent JDWP command set. Note that by default, KDWP supports only Breakpoint
, Class_Prepare
and Midlet_Death
events.
Composite Command (100)
Several events may occur at a given time in the target VM. For example, there might 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:
Class Prepare
Event
- Only with other members of this group, at the same location and in the same thread:
Breakpoint
Event
Event Data
TABLE 41 – Structure of Composite Event Data
byte
|
suspendPolicy
|
Which threads were suspended by this composite event?
|
int
|
events
|
Events in set.
|
Repeated events times:
|
byte
|
eventKind
|
Event kind selector
|
Case Breakpoint - if eventKind is KDWP.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 that hit breakpoint
|
location
|
location
|
Location hit
|
Case ClassPrepare - if eventKind is KDWP.EventKind.CLASS_PREPARE :
|
Notification of a class prepare in the target VM. See the Java™ Virtual Machine Specification for a definition of class preparation. Class prepare events are not generated for primitive classes (for example, java.lang.Integer.TYPE ).
|
int
|
requestID
|
Request that generated event
|
threadID
|
thread
|
Preparing thread. In rare cases, this event might 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 are suspended instead, and the composite event's suspend policy reflects this change. Note that this does not apply to system threads created by the target VM during its normal (non-debug) operation.
|
byte
|
refTypeTag
|
Kind of reference type. See KDWP.TypeTag
|
referenceTypeID
|
typeID
|
Type being prepared
|
string
|
signature
|
Type signature
|
int
|
status
|
Status of type. See KDWP.ClassStatus
|
Case Midlet Death – if eventKind is KDWP.EventKind.MIDLET_DEATH
|
Notification of a completed midlet in the target VM. The notification is generated by the dying midlet before it terminates.
|
Int
|
RequestID
|
Request that generated event.
|
String
|
MidletName
|
JNI signature of the dying Midlet.
|
|
Reply Data
For Breakpoint
type events, returns the byte opcode that was originally in the location that currently has the breakpoint.
TABLE 42 – Structure of Reply Data for Composite Command
Byte
|
Opcode
|
Original opcode that was at the breakpoint.
|
|
|
KDWP Specification KVM Debug Wire Protocol, 1.0
|
Copyright ©
2002 Sun Microsystems, Inc. All rights reserved. Use is
subject to license terms. Third-party software, including
font technology, is copyrighted and licensed from Sun
suppliers. Sun, Sun Microsystems, the Sun logo, Java and
Solaris are trademarks or registered trademarks of Sun
Microsystems, Inc. in the US and other countries. Federal
Acquisitions: Commercial Software - Government Users
Subject to Standard License Terms and Conditions.
Copyright © 2002
Sun Microsystems, Inc. Tous droits réservés.
Distribué par des licences qui en restreignent
l'utilisation. Le logiciel détenu par des tiers, et
qui comprend la technologie relative aux polices de
caractères, est protégé par un copyright et
licencié par des fournisseurs de Sun. Sun, Sun
Microsystems, le logo Sun, Java et Solaris sont des
marques de fabrique ou des marques déposées de
Sun Microsystems, Inc. aux Etats-Unis et dans d'autres
pays.