• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26JDWP "Java(tm) Debug Wire Protocol"
27(CommandSet VirtualMachine=1
28    (Command Version=1
29        "Returns the JDWP version implemented by the target VM. "
30        "The version string format is implementation dependent. "
31        (Out
32        )
33        (Reply
34            (string description "Text information on the VM version")
35            (int    jdwpMajor   "Major JDWP Version number")
36            (int    jdwpMinor   "Minor JDWP Version number")
37            (string vmVersion   "Target VM JRE version, as in the java.version property")
38            (string vmName      "Target VM name, as in the java.vm.name property")
39        )
40        (ErrorSet
41            (Error VM_DEAD)
42        )
43    )
44    (Command ClassesBySignature=2
45        "Returns reference types for all the classes loaded by the target VM "
46        "which match the given signature. "
47        "Multple reference types will be returned if two or more class "
48        "loaders have loaded a class of the same name. "
49        "The search is confined to loaded classes only; no attempt is made "
50        "to load a class of the given signature. "
51        (Out
52            (string signature "JNI signature of the class to find "
53                              "(for example, \"Ljava/lang/String;\"). "
54            )
55        )
56        (Reply
57            (Repeat classes "Number of reference types that follow."
58                (Group ClassInfo
59                    (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
60                                      "of following reference type. ")
61                    (referenceTypeID typeID "Matching loaded reference type")
62                    (int status "The current class "
63                                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
64                )
65            )
66        )
67        (ErrorSet
68            (Error VM_DEAD)
69        )
70    )
71    (Command AllClasses=3
72        "Returns reference types for all classes currently loaded by the "
73        "target VM."
74        (Out
75        )
76        (Reply
77            (Repeat classes "Number of reference types that follow."
78                (Group ClassInfo
79                    (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
80                                      "of following reference type. ")
81                    (referenceTypeID typeID "Loaded reference type")
82                    (string signature
83                                "The JNI signature of the loaded reference type")
84                    (int status "The current class "
85                                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
86                )
87            )
88        )
89        (ErrorSet
90            (Error VM_DEAD)
91        )
92    )
93    (Command AllThreads=4
94        "Returns all threads currently running in the target VM . "
95        "The returned list contains threads created through "
96        "java.lang.Thread, all native threads attached to "
97        "the target VM through JNI, and system threads created "
98        "by the target VM. Threads that have not yet been started "
99        "and threads that have completed their execution are not "
100        "included in the returned list. "
101        (Out
102        )
103        (Reply
104            (Repeat threads "Number of threads that follow."
105                (threadObject thread "A running thread")
106            )
107        )
108        (ErrorSet
109            (Error VM_DEAD)
110        )
111    )
112    (Command TopLevelThreadGroups=5
113        "Returns all thread groups that do not have a parent. This command "
114        "may be used as the first step in building a tree (or trees) of the "
115        "existing thread groups."
116        (Out
117        )
118        (Reply
119            (Repeat groups "Number of thread groups that follow."
120                (threadGroupObject group "A top level thread group")
121            )
122        )
123        (ErrorSet
124            (Error VM_DEAD)
125        )
126    )
127    (Command Dispose=6
128        "Invalidates this virtual machine mirror. "
129        "The communication channel to the target VM is closed, and "
130        "the target VM prepares to accept another subsequent connection "
131        "from this debugger or another debugger, including the "
132        "following tasks: "
133        "<ul>"
134        "<li>All event requests are cancelled. "
135        "<li>All threads suspended by the thread-level "
136        "<a href=\"#JDWP_ThreadReference_Resume\">resume</a> command "
137        "or the VM-level "
138        "<a href=\"#JDWP_VirtualMachine_Resume\">resume</a> command "
139        "are resumed as many times as necessary for them to run. "
140        "<li>Garbage collection is re-enabled in all cases where it was "
141        "<a href=\"#JDWP_ObjectReference_DisableCollection\">disabled</a> "
142        "</ul>"
143        "Any current method invocations executing in the target VM "
144        "are continued after the disconnection. Upon completion of any such "
145        "method invocation, the invoking thread continues from the "
146        "location where it was originally stopped. "
147        "<p>"
148        "Resources originating in  "
149        "this VirtualMachine (ObjectReferences, ReferenceTypes, etc.) "
150        "will become invalid. "
151        (Out
152        )
153        (Reply
154        )
155        (ErrorSet
156        )
157    )
158    (Command IDSizes=7
159        "Returns the sizes of variably-sized data types in the target VM."
160        "The returned values indicate the number of bytes used by the "
161        "identifiers in command and reply packets."
162        (Out
163        )
164        (Reply
165            (int fieldIDSize "fieldID size in bytes ")
166            (int methodIDSize "methodID size in bytes ")
167            (int objectIDSize "objectID size in bytes ")
168            (int referenceTypeIDSize "referenceTypeID size in bytes ")
169            (int frameIDSize "frameID size in bytes ")
170        )
171        (ErrorSet
172            (Error VM_DEAD)
173        )
174    )
175    (Command Suspend=8
176        "Suspends the execution of the application running in the target "
177        "VM. All Java threads currently running will be suspended. "
178        "<p>"
179        "Unlike java.lang.Thread.suspend, "
180        "suspends of both the virtual machine and individual threads are "
181        "counted. Before a thread will run again, it must be resumed through "
182        "the <a href=\"#JDWP_VirtualMachine_Resume\">VM-level resume</a> command "
183        "or the <a href=\"#JDWP_ThreadReference_Resume\">thread-level resume</a> command "
184        "the same number of times it has been suspended. "
185        (Out
186        )
187        (Reply
188        )
189        (ErrorSet
190            (Error VM_DEAD)
191        )
192    )
193    (Command Resume=9
194        "Resumes execution of the application after the suspend "
195        "command or an event has stopped it. "
196        "Suspensions of the Virtual Machine and individual threads are "
197        "counted. If a particular thread is suspended n times, it must "
198        "resumed n times before it will continue. "
199        (Out
200        )
201        (Reply
202        )
203        (ErrorSet
204        )
205    )
206    (Command Exit=10
207        "Terminates the target VM with the given exit code. "
208        "On some platforms, the exit code might be truncated, for "
209        "example, to the low order 8 bits. "
210        "All ids previously returned from the target VM become invalid. "
211        "Threads running in the VM are abruptly terminated. "
212        "A thread death exception is not thrown and "
213        "finally blocks are not run."
214        (Out
215            (int exitCode "the exit code")
216        )
217        (Reply
218        )
219        (ErrorSet
220        )
221    )
222    (Command CreateString=11
223        "Creates a new string object in the target VM and returns "
224        "its id. "
225        (Out
226            (string utf "UTF-8 characters to use in the created string. ")
227        )
228        (Reply
229            (stringObject stringObject
230                "Created string (instance of java.lang.String) ")
231        )
232        (ErrorSet
233            (Error VM_DEAD)
234        )
235    )
236    (Command Capabilities=12
237        "Retrieve this VM's capabilities. The capabilities are returned "
238        "as booleans, each indicating the presence or absence of a "
239        "capability. The commands associated with each capability will "
240        "return the NOT_IMPLEMENTED error if the cabability is not "
241        "available."
242        (Out
243        )
244        (Reply
245            (boolean canWatchFieldModification
246                     "Can the VM watch field modification, and therefore "
247                     "can it send the Modification Watchpoint Event?")
248            (boolean canWatchFieldAccess
249                     "Can the VM watch field access, and therefore "
250                     "can it send the Access Watchpoint Event?")
251            (boolean canGetBytecodes
252                     "Can the VM get the bytecodes of a given method? ")
253            (boolean canGetSyntheticAttribute
254                     "Can the VM determine whether a field or method is "
255                     "synthetic? (that is, can the VM determine if the "
256                     "method or the field was invented by the compiler?) ")
257            (boolean canGetOwnedMonitorInfo
258                     "Can the VM get the owned monitors infornation for "
259                     "a thread?")
260            (boolean canGetCurrentContendedMonitor
261                     "Can the VM get the current contended monitor of a thread?")
262            (boolean canGetMonitorInfo
263                     "Can the VM get the monitor information for a given object? ")
264        )
265        (ErrorSet
266            (Error VM_DEAD)
267        )
268    )
269    (Command ClassPaths=13
270        "Retrieve the classpath and bootclasspath of the target VM. "
271        "If the classpath is not defined, returns an empty list. If the "
272        "bootclasspath is not defined returns an empty list."
273        (Out
274        )
275        (Reply
276            (string baseDir "Base directory used to resolve relative "
277                            "paths in either of the following lists.")
278            (Repeat classpaths "Number of paths in classpath."
279                (string path "One component of classpath") )
280            (Repeat bootclasspaths "Number of paths in bootclasspath."
281                (string path "One component of bootclasspath") )
282        )
283        (ErrorSet
284            (Error VM_DEAD)
285        )
286    )
287    (Command DisposeObjects=14
288        "Releases a list of object IDs. For each object in the list, the "
289        "following applies. "
290        "The count of references held by the back-end (the reference "
291        "count) will be decremented by refCnt. "
292        "If thereafter the reference count is less than "
293        "or equal to zero, the ID is freed. "
294        "Any back-end resources associated with the freed ID may "
295        "be freed, and if garbage collection was "
296        "disabled for the object, it will be re-enabled. "
297        "The sender of this command "
298        "promises that no further commands will be sent "
299        "referencing a freed ID.
300        "<p>"
301        "Use of this command is not required. If it is not sent, "
302        "resources associated with each ID will be freed by the back-end "
303        "at some time after the corresponding object is garbage collected. "
304        "It is most useful to use this command to reduce the load on the "
305        "back-end if a very large number of "
306        "objects has been retrieved from the back-end (a large array, "
307        "for example) but may not be garbage collected any time soon. "
308        "<p>"
309        "IDs may be re-used by the back-end after they "
310        "have been freed with this command."
311        "This description assumes reference counting, "
312        "a back-end may use any implementation which operates "
313        "equivalently. "
314        (Out
315            (Repeat requests "Number of object dispose requests that follow"
316                (Group Request
317                    (object object "The object ID")
318                    (int refCnt "The number of times this object ID has been "
319                                "part of a packet received from the back-end. "
320                                "An accurate count prevents the object ID "
321                                "from being freed on the back-end if "
322                                "it is part of an incoming packet, not yet "
323                                "handled by the front-end.")
324                )
325            )
326        )
327        (Reply
328        )
329        (ErrorSet
330        )
331    )
332    (Command HoldEvents=15
333        "Tells the target VM to stop sending events. Events are not discarded; "
334        "they are held until a subsequent ReleaseEvents command is sent. "
335        "This command is useful to control the number of events sent "
336        "to the debugger VM in situations where very large numbers of events "
337        "are generated. "
338        "While events are held by the debugger back-end, application "
339        "execution may be frozen by the debugger back-end to prevent "
340        "buffer overflows on the back end.
341        "Responses to commands are never held and are not affected by this
342        "command. If events are already being held, this command is "
343        "ignored."
344        (Out
345        )
346        (Reply
347        )
348        (ErrorSet
349        )
350    )
351    (Command ReleaseEvents=16
352        "Tells the target VM to continue sending events. This command is "
353        "used to restore normal activity after a HoldEvents command. If "
354        "there is no current HoldEvents command in effect, this command is "
355        "ignored."
356        (Out
357        )
358        (Reply
359        )
360        (ErrorSet
361        )
362    )
363    (Command CapabilitiesNew=17
364        "Retrieve all of this VM's capabilities. The capabilities are returned "
365        "as booleans, each indicating the presence or absence of a "
366        "capability. The commands associated with each capability will "
367        "return the NOT_IMPLEMENTED error if the cabability is not "
368        "available."
369        "Since JDWP version 1.4."
370        (Out
371        )
372        (Reply
373            (boolean canWatchFieldModification
374                     "Can the VM watch field modification, and therefore "
375                     "can it send the Modification Watchpoint Event?")
376            (boolean canWatchFieldAccess
377                     "Can the VM watch field access, and therefore "
378                     "can it send the Access Watchpoint Event?")
379            (boolean canGetBytecodes
380                     "Can the VM get the bytecodes of a given method? ")
381            (boolean canGetSyntheticAttribute
382                     "Can the VM determine whether a field or method is "
383                     "synthetic? (that is, can the VM determine if the "
384                     "method or the field was invented by the compiler?) ")
385            (boolean canGetOwnedMonitorInfo
386                     "Can the VM get the owned monitors infornation for "
387                     "a thread?")
388            (boolean canGetCurrentContendedMonitor
389                     "Can the VM get the current contended monitor of a thread?")
390            (boolean canGetMonitorInfo
391                     "Can the VM get the monitor information for a given object? ")
392            (boolean canRedefineClasses
393                     "Can the VM redefine classes?")
394            (boolean canAddMethod
395                     "Can the VM add methods when redefining "
396                     "classes?")
397            (boolean canUnrestrictedlyRedefineClasses
398                     "Can the VM redefine classes"
399                     "in arbitrary ways?")
400            (boolean canPopFrames
401                     "Can the VM pop stack frames?")
402            (boolean canUseInstanceFilters
403                     "Can the VM filter events by specific object?")
404            (boolean canGetSourceDebugExtension
405                     "Can the VM get the source debug extension?")
406            (boolean canRequestVMDeathEvent
407                     "Can the VM request VM death events?")
408            (boolean canSetDefaultStratum
409                     "Can the VM set a default stratum?")
410            (boolean canGetInstanceInfo
411                     "Can the VM return instances, counts of instances of classes "
412                     "and referring objects?")
413            (boolean canRequestMonitorEvents
414                     "Can the VM request monitor events?")
415            (boolean canGetMonitorFrameInfo
416                     "Can the VM get monitors with frame depth info?")
417            (boolean canUseSourceNameFilters
418                     "Can the VM filter class prepare events by source name?")
419            (boolean canGetConstantPool
420                     "Can the VM return the constant pool information?")
421            (boolean canForceEarlyReturn
422                     "Can the VM force early return from a method?")
423            (boolean reserved22
424                     "Reserved for future capability")
425            (boolean reserved23
426                     "Reserved for future capability")
427            (boolean reserved24
428                     "Reserved for future capability")
429            (boolean reserved25
430                     "Reserved for future capability")
431            (boolean reserved26
432                     "Reserved for future capability")
433            (boolean reserved27
434                     "Reserved for future capability")
435            (boolean reserved28
436                     "Reserved for future capability")
437            (boolean reserved29
438                     "Reserved for future capability")
439            (boolean reserved30
440                     "Reserved for future capability")
441            (boolean reserved31
442                     "Reserved for future capability")
443            (boolean reserved32
444                     "Reserved for future capability")
445        )
446        (ErrorSet
447            (Error VM_DEAD)
448        )
449    )
450    (Command RedefineClasses=18
451        "Installs new class definitions. "
452        "If there are active stack frames in methods of the redefined classes in the "
453        "target VM then those active frames continue to run the bytecodes of the "
454        "original method. These methods are considered obsolete - see "
455        "<a href=\"#JDWP_Method_IsObsolete\">IsObsolete</a>. The methods in the "
456        "redefined classes will be used for new invokes in the target VM. "
457        "The original method ID refers to the redefined method. "
458        "All breakpoints in the redefined classes are cleared."
459        "If resetting of stack frames is desired, the "
460        "<a href=\"#JDWP_StackFrame_PopFrames\">PopFrames</a> command can be used "
461        "to pop frames with obsolete methods."
462        "<p>"
463        "Requires canRedefineClasses capability - see "
464        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
465        "In addition to the canRedefineClasses capability, the target VM must "
466        "have the canAddMethod capability to add methods when redefining classes, "
467        "or the canUnrestrictedlyRedefineClasses to redefine classes in arbitrary "
468        "ways."
469        (Out
470            (Repeat classes "Number of reference types that follow."
471                (Group ClassDef
472                    (referenceType refType "The reference type.")
473                    (Repeat classfile "Number of bytes defining class (below)"
474                         (byte classbyte "byte in JVM class file "
475                                         "format.")
476                    )
477                )
478            )
479        )
480        (Reply
481        )
482        (ErrorSet
483            (Error INVALID_CLASS    "One of the refTypes is not the ID of a reference "
484                                    "type.")
485            (Error INVALID_OBJECT   "One of the refTypes is not a known ID.")
486            (Error UNSUPPORTED_VERSION)
487            (Error INVALID_CLASS_FORMAT)
488            (Error CIRCULAR_CLASS_DEFINITION)
489            (Error FAILS_VERIFICATION)
490            (Error NAMES_DONT_MATCH)
491            (Error NOT_IMPLEMENTED  "No aspect of this functionality is implemented "
492                                    "(CapabilitiesNew.canRedefineClasses is false)")
493            (Error ADD_METHOD_NOT_IMPLEMENTED)
494            (Error SCHEMA_CHANGE_NOT_IMPLEMENTED)
495            (Error HIERARCHY_CHANGE_NOT_IMPLEMENTED)
496            (Error DELETE_METHOD_NOT_IMPLEMENTED)
497            (Error CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED)
498            (Error METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED)
499            (Error VM_DEAD)
500        )
501    )
502    (Command SetDefaultStratum=19
503        "Set the default stratum. Requires canSetDefaultStratum capability - see "
504        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
505        (Out
506            (string stratumID "default stratum, or empty string to use "
507                              "reference type default.")
508        )
509        (Reply
510        )
511        (ErrorSet
512            (Error NOT_IMPLEMENTED)
513            (Error VM_DEAD)
514        )
515    )
516    (Command AllClassesWithGeneric=20
517        "Returns reference types for all classes currently loaded by the "
518        "target VM.  "
519        "Both the JNI signature and the generic signature are "
520        "returned for each class.  "
521        "Generic signatures are described in the signature attribute "
522        "section in "
523        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
524        "Since JDWP version 1.5."
525        (Out
526        )
527        (Reply
528            (Repeat classes "Number of reference types that follow."
529                (Group ClassInfo
530                    (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
531                                      "of following reference type. ")
532                    (referenceTypeID typeID "Loaded reference type")
533                    (string signature
534                                "The JNI signature of the loaded reference type.")
535                    (string genericSignature
536                                "The generic signature of the loaded reference type "
537                                "or an empty string if there is none.")
538                    (int status "The current class "
539                                "<a href=\"#JDWP_ClassStatus\">status.</a> ")
540                )
541            )
542        )
543        (ErrorSet
544            (Error VM_DEAD)
545        )
546    )
547
548    (Command InstanceCounts=21
549        "Returns the number of instances of each reference type in the input list. "
550        "Only instances that are reachable for the purposes of "
551        "garbage collection are counted.  If a reference type is invalid, "
552        "eg. it has been unloaded, zero is returned for its instance count."
553        "<p>Since JDWP version 1.6. Requires canGetInstanceInfo capability - see "
554        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
555        (Out
556            (Repeat refTypesCount "Number of reference types that follow.    Must be non-negative."
557                (referenceType refType "A reference type ID.")
558            )
559          )
560        (Reply
561            (Repeat counts "The number of counts that follow."
562              (long instanceCount "The number of instances for the corresponding reference type "
563                                  "in 'Out Data'.")
564            )
565        )
566        (ErrorSet
567            (Error ILLEGAL_ARGUMENT   "refTypesCount is less than zero.")
568            (Error NOT_IMPLEMENTED)
569            (Error VM_DEAD)
570        )
571    )
572)
573
574(CommandSet ReferenceType=2
575    (Command Signature=1
576        "Returns the JNI signature of a reference type. "
577        "JNI signature formats are described in the "
578        "<a href=\"http://java.sun.com/products/jdk/1.2/docs/guide/jni/index.html\">Java Native Inteface Specification</a>"
579        "<p>
580        "For primitive classes "
581        "the returned signature is the signature of the corresponding primitive "
582        "type; for example, \"I\" is returned as the signature of the class "
583        "represented by java.lang.Integer.TYPE."
584        (Out
585            (referenceType refType "The reference type ID.")
586        )
587        (Reply
588            (string signature
589                "The JNI signature for the reference type.")
590        )
591        (ErrorSet
592            (Error INVALID_CLASS     "refType is not the ID of a reference "
593                                     "type.")
594            (Error INVALID_OBJECT    "refType is not a known ID.")
595            (Error VM_DEAD)
596        )
597    )
598    (Command ClassLoader=2
599        "Returns the instance of java.lang.ClassLoader which loaded "
600        "a given reference type. If the reference type was loaded by the "
601        "system class loader, the returned object ID is null."
602        (Out
603            (referenceType refType "The reference type ID.")
604        )
605        (Reply
606            (classLoaderObject classLoader "The class loader for the reference type. ")
607        )
608        (ErrorSet
609            (Error INVALID_CLASS     "refType is not the ID of a reference "
610                                     "type.")
611            (Error INVALID_OBJECT    "refType is not a known ID.")
612            (Error VM_DEAD)
613        )
614    )
615    (Command Modifiers=3
616        "Returns the modifiers (also known as access flags) for a reference type. "
617        "The returned bit mask contains information on the declaration "
618        "of the reference type. If the reference type is an array or "
619        "a primitive class (for example, java.lang.Integer.TYPE), the "
620        "value of the returned bit mask is undefined."
621        (Out
622            (referenceType refType "The reference type ID.")
623        )
624        (Reply
625            (int modBits "Modifier bits as defined in Chapter 4 of "
626                         "<cite>The Java&trade; Virtual Machine Specification</cite>")
627        )
628        (ErrorSet
629            (Error INVALID_CLASS     "refType is not the ID of a reference "
630                                     "type.")
631            (Error INVALID_OBJECT    "refType is not a known ID.")
632            (Error VM_DEAD)
633        )
634    )
635    (Command Fields=4
636        "Returns information for each field in a reference type. "
637        "Inherited fields are not included. "
638        "The field list will include any synthetic fields created "
639        "by the compiler. "
640        "Fields are returned in the order they occur in the class file."
641        (Out
642            (referenceType refType "The reference type ID.")
643        )
644        (Reply
645            (Repeat declared "Number of declared fields."
646                (Group FieldInfo
647                    (field fieldID "Field ID.")
648                    (string name "Name of field.")
649                    (string signature "JNI Signature of field.")
650                    (int modBits "The modifier bit flags (also known as access flags) "
651                                 "which provide additional information on the  "
652                                 "field declaration. Individual flag values are "
653                                 "defined in Chapter 4 of "
654                                 "<cite>The Java&trade; Virtual Machine Specification</cite>. "
655                                 "In addition, The <code>0xf0000000</code> bit identifies "
656                                 "the field as synthetic, if the synthetic attribute "
657                                 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
658                )
659            )
660        )
661        (ErrorSet
662            (Error CLASS_NOT_PREPARED)
663            (Error INVALID_CLASS     "refType is not the ID of a reference "
664                                     "type.")
665            (Error INVALID_OBJECT    "refType is not a known ID.")
666            (Error VM_DEAD)
667        )
668    )
669    (Command Methods=5
670        "Returns information for each method in a reference type. "
671        "Inherited methods are not included. The list of methods will "
672        "include constructors (identified with the name \"&lt;init&gt;\"), "
673        "the initialization method (identified with the name \"&lt;clinit&gt;\") "
674        "if present, and any synthetic methods created by the compiler. "
675        "Methods are returned in the order they occur in the class file."
676        (Out
677            (referenceType refType "The reference type ID.")
678        )
679        (Reply
680            (Repeat declared "Number of declared methods."
681                (Group MethodInfo
682                    (method methodID "Method ID.")
683                    (string name "Name of method.")
684                    (string signature "JNI signature of method.")
685                    (int modBits "The modifier bit flags (also known as access flags) "
686                                 "which provide additional information on the  "
687                                 "method declaration. Individual flag values are "
688                                 "defined in Chapter 4 of "
689                                 "<cite>The Java&trade; Virtual Machine Specification</cite>. "
690                                 "In addition, The <code>0xf0000000</code> bit identifies "
691                                 "the method as synthetic, if the synthetic attribute "
692                                 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
693                )
694            )
695        )
696        (ErrorSet
697            (Error CLASS_NOT_PREPARED)
698            (Error INVALID_CLASS     "refType is not the ID of a reference "
699                                     "type.")
700            (Error INVALID_OBJECT    "refType is not a known ID.")
701            (Error VM_DEAD)
702        )
703    )
704    (Command GetValues=6
705        "Returns the value of one or more static fields of the "
706        "reference type. Each field must be member of the reference type "
707        "or one of its superclasses, superinterfaces, or implemented interfaces. "
708        "Access control is not enforced; for example, the values of private "
709        "fields can be obtained."
710        (Out
711            (referenceType refType "The reference type ID.")
712            (Repeat fields "The number of values to get"
713                (Group Field
714                    (field fieldID "A field to get")
715                )
716            )
717        )
718        (Reply
719            (Repeat values "The number of values returned, always equal to fields, "
720                           "the number of values to get."
721                (value value "The field value")
722            )
723        )
724        (ErrorSet
725            (Error INVALID_CLASS     "refType is not the ID of a reference "
726                                     "type.")
727            (Error INVALID_OBJECT    "refType is not a known ID.")
728            (Error INVALID_FIELDID)
729            (Error VM_DEAD)
730        )
731    )
732    (Command SourceFile=7
733        "Returns the name of source file in which a reference type was "
734        "declared. "
735        (Out
736            (referenceType refType "The reference type ID.")
737        )
738        (Reply
739            (string sourceFile "The source file name. No path information "
740                               "for the file is included")
741        )
742        (ErrorSet
743            (Error INVALID_CLASS     "refType is not the ID of a reference "
744                                     "type.")
745            (Error INVALID_OBJECT    "refType is not a known ID.")
746            (Error ABSENT_INFORMATION "The source file attribute is absent.")
747            (Error VM_DEAD)
748        )
749    )
750    (Command NestedTypes=8
751        "Returns the classes and interfaces directly nested within this type."
752        "Types further nested within those types are not included. "
753        (Out
754            (referenceType refType "The reference type ID.")
755        )
756        (Reply
757            (Repeat classes "The number of nested classes and interfaces"
758                (Group TypeInfo
759                    (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
760                                      "of following reference type. ")
761                    (referenceTypeID typeID "The nested class or interface ID.")
762                )
763            )
764        )
765        (ErrorSet
766            (Error INVALID_CLASS     "refType is not the ID of a reference "
767                                     "type.")
768            (Error INVALID_OBJECT    "refType is not a known ID.")
769            (Error VM_DEAD)
770        )
771    )
772    (Command Status=9
773        "Returns the current status of the reference type. The status "
774        "indicates the extent to which the reference type has been "
775        "initialized, as described in section 2.1.6 of "
776        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
777        "If the class is linked the PREPARED and VERIFIED bits in the returned status bits "
778        "will be set. If the class is initialized the INITIALIZED bit in the returned "
779        "status bits will be set. If an error occured during initialization then the "
780        "ERROR bit in the returned status bits will be set. "
781        "The returned status bits are undefined for array types and for "
782        "primitive classes (such as java.lang.Integer.TYPE). "
783        (Out
784            (referenceType refType "The reference type ID.")
785        )
786        (Reply
787            (int status "<a href=\"#JDWP_ClassStatus\">Status</a> bits:"
788                        "See <a href=\"#JDWP_ClassStatus\">JDWP.ClassStatus</a>")
789        )
790        (ErrorSet
791            (Error INVALID_CLASS     "refType is not the ID of a reference "
792                                     "type.")
793            (Error INVALID_OBJECT    "refType is not a known ID.")
794            (Error VM_DEAD)
795        )
796    )
797    (Command Interfaces=10
798        "Returns the interfaces declared as implemented by this class. "
799        "Interfaces indirectly implemented (extended by the implemented "
800        "interface or implemented by a superclass) are not included."
801        (Out
802            (referenceType refType "The reference type ID.")
803        )
804        (Reply
805            (Repeat interfaces "The number of implemented interfaces"
806                (interfaceType interfaceType "implemented interface.")
807            )
808        )
809        (ErrorSet
810            (Error INVALID_CLASS     "refType is not the ID of a reference "
811                                     "type.")
812            (Error INVALID_OBJECT    "refType is not a known ID.")
813            (Error VM_DEAD)
814        )
815    )
816    (Command ClassObject=11
817        "Returns the class object corresponding to this type. "
818        (Out
819            (referenceType refType "The reference type ID.")
820        )
821        (Reply
822            (classObject classObject "class object.")
823        )
824        (ErrorSet
825            (Error INVALID_CLASS     "refType is not the ID of a reference "
826                                     "type.")
827            (Error INVALID_OBJECT    "refType is not a known ID.")
828            (Error VM_DEAD)
829        )
830    )
831    (Command SourceDebugExtension=12
832        "Returns the value of the SourceDebugExtension attribute. "
833        "Since JDWP version 1.4. Requires canGetSourceDebugExtension capability - see "
834        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
835        (Out
836            (referenceType refType "The reference type ID.")
837        )
838        (Reply
839            (string extension "extension attribute")
840        )
841        (ErrorSet
842            (Error INVALID_CLASS      "refType is not the ID of a reference "
843                                      "type.")
844            (Error INVALID_OBJECT     "refType is not a known ID.")
845            (Error ABSENT_INFORMATION "If the extension is not specified.")
846            (Error NOT_IMPLEMENTED)
847            (Error VM_DEAD)
848        )
849    )
850    (Command SignatureWithGeneric=13
851        "Returns the JNI signature of a reference type along with the "
852        "generic signature if there is one.  "
853        "Generic signatures are described in the signature attribute "
854        "section in "
855        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
856        "Since JDWP version 1.5."
857        "<p>
858        (Out
859            (referenceType refType "The reference type ID.")
860        )
861        (Reply
862            (string signature
863                "The JNI signature for the reference type.")
864            (string genericSignature
865                "The generic signature for the reference type or an empty "
866                "string if there is none.")
867        )
868        (ErrorSet
869            (Error INVALID_CLASS     "refType is not the ID of a reference "
870                                     "type.")
871            (Error INVALID_OBJECT    "refType is not a known ID.")
872            (Error VM_DEAD)
873        )
874    )
875    (Command FieldsWithGeneric=14
876        "Returns information, including the generic signature if any, "
877        "for each field in a reference type. "
878        "Inherited fields are not included. "
879        "The field list will include any synthetic fields created "
880        "by the compiler. "
881        "Fields are returned in the order they occur in the class file.  "
882        "Generic signatures are described in the signature attribute "
883        "section in "
884        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
885        "Since JDWP version 1.5."
886        (Out
887            (referenceType refType "The reference type ID.")
888        )
889        (Reply
890            (Repeat declared "Number of declared fields."
891                (Group FieldInfo
892                    (field fieldID "Field ID.")
893                    (string name "The name of the field.")
894                    (string signature "The JNI signature of the field.")
895                    (string genericSignature "The generic signature of the "
896                                             "field, or an empty string if there is none.")
897                    (int modBits "The modifier bit flags (also known as access flags) "
898                                 "which provide additional information on the  "
899                                 "field declaration. Individual flag values are "
900                                 "defined in Chapter 4 of "
901                                 "<cite>The Java&trade; Virtual Machine Specification</cite>. "
902                                 "In addition, The <code>0xf0000000</code> bit identifies "
903                                 "the field as synthetic, if the synthetic attribute "
904                                 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
905                )
906            )
907        )
908        (ErrorSet
909            (Error CLASS_NOT_PREPARED)
910            (Error INVALID_CLASS     "refType is not the ID of a reference "
911                                     "type.")
912            (Error INVALID_OBJECT    "refType is not a known ID.")
913            (Error VM_DEAD)
914        )
915    )
916    (Command MethodsWithGeneric=15
917        "Returns information, including the generic signature if any, "
918        "for each method in a reference type. "
919        "Inherited methodss are not included. The list of methods will "
920        "include constructors (identified with the name \"&lt;init&gt;\"), "
921        "the initialization method (identified with the name \"&lt;clinit&gt;\") "
922        "if present, and any synthetic methods created by the compiler. "
923        "Methods are returned in the order they occur in the class file.  "
924        "Generic signatures are described in the signature attribute "
925        "section in "
926        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
927        "Since JDWP version 1.5."
928        (Out
929            (referenceType refType "The reference type ID.")
930        )
931        (Reply
932            (Repeat declared "Number of declared methods."
933                (Group MethodInfo
934                    (method methodID "Method ID.")
935                    (string name "The name of the method.")
936                    (string signature "The JNI signature of the method.")
937                    (string genericSignature "The generic signature of the method, or "
938                                             "an empty string if there is none.")
939                    (int modBits "The modifier bit flags (also known as access flags) "
940                                 "which provide additional information on the  "
941                                 "method declaration. Individual flag values are "
942                                 "defined in Chapter 4 of "
943                                 "<cite>The Java&trade; Virtual Machine Specification</cite>. "
944                                 "In addition, The <code>0xf0000000</code> bit identifies "
945                                 "the method as synthetic, if the synthetic attribute "
946                                 "<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
947                )
948            )
949        )
950        (ErrorSet
951            (Error CLASS_NOT_PREPARED)
952            (Error INVALID_CLASS     "refType is not the ID of a reference "
953                                     "type.")
954            (Error INVALID_OBJECT    "refType is not a known ID.")
955            (Error VM_DEAD)
956        )
957    )
958    (Command Instances=16
959        "Returns instances of this reference type. "
960        "Only instances that are reachable for the purposes of "
961        "garbage collection are returned. "
962        "<p>Since JDWP version 1.6. Requires canGetInstanceInfo capability - see "
963        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
964        (Out
965            (referenceType refType "The reference type ID.")
966            (int maxInstances "Maximum number of instances to return.  Must be non-negative. "
967                              "If zero, all instances are returned.")
968        )
969        (Reply
970            (Repeat instances "The number of instances that follow."
971                 (tagged-object instance "An instance of this reference type.")
972             )
973        )
974        (ErrorSet
975            (Error INVALID_CLASS     "refType is not the ID of a reference "
976                                     "type.")
977            (Error INVALID_OBJECT    "refType is not a known ID.")
978            (Error ILLEGAL_ARGUMENT  "maxInstances is less than zero.")
979            (Error NOT_IMPLEMENTED)
980            (Error VM_DEAD)
981        )
982    )
983    (Command ClassFileVersion=17
984        "Returns the class file major and minor version numbers, as defined in the class "
985        "file format of the Java Virtual Machine specification. "
986         "<p>Since JDWP version 1.6. "
987        (Out
988            (referenceType refType "The class.")
989        )
990        (Reply
991            (int majorVersion "Major version number")
992            (int minorVersion "Minor version number")
993        )
994        (ErrorSet
995            (Error INVALID_CLASS     "refType is not the ID of a reference "
996                                     "type.")
997            (Error INVALID_OBJECT    "refType is not a known ID.")
998            (Error ABSENT_INFORMATION "The class file version information is "
999                                      "absent for primitive and array types.")
1000            (Error VM_DEAD)
1001        )
1002    )
1003    (Command ConstantPool=18
1004        "Return the raw bytes of the constant pool in the format of the "
1005        "constant_pool item of the Class File Format in "
1006        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
1007        "<p>Since JDWP version 1.6. Requires canGetConstantPool capability - see "
1008        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>.""
1009        (Out
1010            (referenceType refType "The class.")
1011        )
1012        (Reply
1013            (int count "Total number of constant pool entries plus one. This "
1014                       "corresponds to the constant_pool_count item of the "
1015                       "Class File Format in "
1016                       "<cite>The Java&trade; Virtual Machine Specification</cite>. ")
1017            (Repeat bytes
1018                (byte cpbytes "Raw bytes of constant pool")
1019            )
1020        )
1021        (ErrorSet
1022            (Error INVALID_CLASS     "refType is not the ID of a reference "
1023                                     "type.")
1024            (Error INVALID_OBJECT    "refType is not a known ID.")
1025            (Error NOT_IMPLEMENTED   "If the target virtual machine does not "
1026                                     "support the retrieval of constant pool information.")
1027            (Error ABSENT_INFORMATION "The Constant Pool information is "
1028                                      "absent for primitive and array types.")
1029            (Error VM_DEAD)
1030        )
1031    )
1032)
1033(CommandSet ClassType=3
1034    (Command Superclass=1
1035        "Returns the immediate superclass of a class."
1036        (Out
1037            (classType clazz "The class type ID.")
1038        )
1039        (Reply
1040            (classType superclass
1041                "The superclass (null if the class ID for java.lang.Object is specified).")
1042        )
1043        (ErrorSet
1044            (Error INVALID_CLASS     "clazz is not the ID of a class.")
1045            (Error INVALID_OBJECT    "clazz is not a known ID.")
1046            (Error VM_DEAD)
1047        )
1048    )
1049    (Command SetValues=2
1050        "Sets the value of one or more static fields. "
1051        "Each field must be member of the class type "
1052        "or one of its superclasses, superinterfaces, or implemented interfaces. "
1053        "Access control is not enforced; for example, the values of private "
1054        "fields can be set. Final fields cannot be set."
1055        "For primitive values, the value's type must match the "
1056        "field's type exactly. For object values, there must exist a "
1057        "widening reference conversion from the value's type to the
1058        "field's type and the field's type must be loaded. "
1059        (Out
1060            (classType clazz "The class type ID.")
1061            (Repeat values "The number of fields to set."
1062                (Group FieldValue "A Field/Value pair."
1063                    (field fieldID "Field to set.")
1064                    (untagged-value value "Value to put in the field.")
1065                )
1066            )
1067        )
1068        (Reply "none"
1069        )
1070        (ErrorSet
1071            (Error INVALID_CLASS     "clazz is not the ID of a class.")
1072            (Error CLASS_NOT_PREPARED)
1073            (Error INVALID_OBJECT    "clazz is not a known ID or a value of an "
1074                                     "object field is not a known ID.")
1075            (Error INVALID_FIELDID)
1076            (Error VM_DEAD)
1077        )
1078    )
1079    (Command InvokeMethod=3
1080        "Invokes a static method. "
1081        "The method must be member of the class type "
1082        "or one of its superclasses, superinterfaces, or implemented interfaces. "
1083        "Access control is not enforced; for example, private "
1084        "methods can be invoked."
1085        "<p>"
1086        "The method invocation will occur in the specified thread. "
1087        "Method invocation can occur only if the specified thread "
1088        "has been suspended by an event. "
1089        "Method invocation is not supported "
1090        "when the target VM has been suspended by the front-end. "
1091        "<p>"
1092        "The specified method is invoked with the arguments in the specified "
1093        "argument list. "
1094        "The method invocation is synchronous; the reply packet is not "
1095        "sent until the invoked method returns in the target VM. "
1096        "The return value (possibly the void value) is "
1097        "included in the reply packet. "
1098        "If the invoked method throws an exception, the "
1099        "exception object ID is set in the reply packet; otherwise, the "
1100        "exception object ID is null. "
1101        "<p>"
1102        "For primitive arguments, the argument value's type must match the "
1103        "argument's type exactly. For object arguments, there must exist a "
1104        "widening reference conversion from the argument value's type to the "
1105        "argument's type and the argument's type must be loaded. "
1106        "<p>"
1107        "By default, all threads in the target VM are resumed while "
1108        "the method is being invoked if they were previously "
1109        "suspended by an event or by command. "
1110        "This is done to prevent the deadlocks "
1111        "that will occur if any of the threads own monitors "
1112        "that will be needed by the invoked method. It is possible that "
1113        "breakpoints or other events might occur during the invocation. "
1114        "Note, however, that this implicit resume acts exactly like "
1115        "the ThreadReference resume command, so if the thread's suspend "
1116        "count is greater than 1, it will remain in a suspended state "
1117        "during the invocation. By default, when the invocation completes, "
1118        "all threads in the target VM are suspended, regardless their state "
1119        "before the invocation. "
1120        "<p>"
1121        "The resumption of other threads during the invoke can be prevented "
1122        "by specifying the INVOKE_SINGLE_THREADED "
1123        "bit flag in the <code>options</code> field; however, "
1124        "there is no protection against or recovery from the deadlocks "
1125        "described above, so this option should be used with great caution. "
1126        "Only the specified thread will be resumed (as described for all "
1127        "threads above). Upon completion of a single threaded invoke, the invoking thread "
1128        "will be suspended once again. Note that any threads started during "
1129        "the single threaded invocation will not be suspended when the "
1130        "invocation completes. "
1131        "<p>"
1132        "If the target VM is disconnected during the invoke (for example, through "
1133        "the VirtualMachine dispose command) the method invocation continues. "
1134        (Out
1135            (classType clazz "The class type ID.")
1136            (threadObject thread "The thread in which to invoke.")
1137            (method methodID "The method to invoke.")
1138            (Repeat arguments
1139                (value arg "The argument value.")
1140            )
1141            (int options "Invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
1142        )
1143        (Reply
1144            (value returnValue "The returned value.")
1145            (tagged-object exception "The thrown exception.")
1146        )
1147        (ErrorSet
1148            (Error INVALID_CLASS     "clazz is not the ID of a class.")
1149            (Error INVALID_OBJECT    "clazz is not a known ID.")
1150            (Error INVALID_METHODID  "methodID is not the ID of a static method in "
1151                                     "this class type or one of its superclasses.")
1152            (Error INVALID_THREAD)
1153            (Error THREAD_NOT_SUSPENDED)
1154            (Error VM_DEAD)
1155        )
1156    )
1157    (Command NewInstance=4
1158        "Creates a new object of this type, invoking the specified "
1159        "constructor. The constructor method ID must be a member of "
1160        "the class type."
1161        "<p>"
1162        "Instance creation will occur in the specified thread. "
1163        "Instance creation can occur only if the specified thread "
1164        "has been suspended by an event. "
1165        "Method invocation is not supported "
1166        "when the target VM has been suspended by the front-end. "
1167        "<p>"
1168        "The specified constructor is invoked with the arguments in the specified "
1169        "argument list. "
1170        "The constructor invocation is synchronous; the reply packet is not "
1171        "sent until the invoked method returns in the target VM. "
1172        "The return value (possibly the void value) is "
1173        "included in the reply packet. "
1174        "If the constructor throws an exception, the "
1175        "exception object ID is set in the reply packet; otherwise, the "
1176        "exception object ID is null. "
1177        "<p>"
1178        "For primitive arguments, the argument value's type must match the "
1179        "argument's type exactly. For object arguments, there must exist a "
1180        "widening reference conversion from the argument value's type to the "
1181        "argument's type and the argument's type must be loaded. "
1182        "<p>"
1183        "By default, all threads in the target VM are resumed while "
1184        "the method is being invoked if they were previously "
1185        "suspended by an event or by command. "
1186        "This is done to prevent the deadlocks "
1187        "that will occur if any of the threads own monitors "
1188        "that will be needed by the invoked method. It is possible that "
1189        "breakpoints or other events might occur during the invocation. "
1190        "Note, however, that this implicit resume acts exactly like "
1191        "the ThreadReference resume command, so if the thread's suspend "
1192        "count is greater than 1, it will remain in a suspended state "
1193        "during the invocation. By default, when the invocation completes, "
1194        "all threads in the target VM are suspended, regardless their state "
1195        "before the invocation. "
1196        "<p>"
1197        "The resumption of other threads during the invoke can be prevented "
1198        "by specifying the INVOKE_SINGLE_THREADED "
1199        "bit flag in the <code>options</code> field; however, "
1200        "there is no protection against or recovery from the deadlocks "
1201        "described above, so this option should be used with great caution. "
1202        "Only the specified thread will be resumed (as described for all "
1203        "threads above). Upon completion of a single threaded invoke, the invoking thread "
1204        "will be suspended once again. Note that any threads started during "
1205        "the single threaded invocation will not be suspended when the "
1206        "invocation completes. "
1207        "<p>"
1208        "If the target VM is disconnected during the invoke (for example, through "
1209        "the VirtualMachine dispose command) the method invocation continues. "
1210        (Out
1211            (classType clazz "The class type ID.")
1212            (threadObject thread "The thread in which to invoke the constructor.")
1213            (method methodID "The constructor to invoke.")
1214            (Repeat arguments
1215                (value arg "The argument value.")
1216            )
1217            (int options "Constructor invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
1218        )
1219        (Reply
1220            (tagged-object newObject "The newly created object, or null "
1221                                     "if the constructor threw an exception.")
1222            (tagged-object exception "The thrown exception, if any; otherwise, null.")
1223        )
1224        (ErrorSet
1225            (Error INVALID_CLASS     "clazz is not the ID of a class.")
1226            (Error INVALID_OBJECT    "clazz is not a known ID or a value of an "
1227                                     "object parameter is not a known ID..")
1228            (Error INVALID_METHODID  "methodID is not the ID of a method.")
1229            (Error INVALID_OBJECT)
1230            (Error INVALID_THREAD)
1231            (Error THREAD_NOT_SUSPENDED)
1232            (Error VM_DEAD)
1233        )
1234    )
1235)
1236(CommandSet ArrayType=4
1237    (Command NewInstance=1
1238        "Creates a new array object of this type with a given length."
1239        (Out
1240            (arrayType arrType "The array type of the new instance.")
1241            (int length "The length of the array.")
1242        )
1243        (Reply
1244            (tagged-object newArray "The newly created array object. ")
1245        )
1246        (ErrorSet
1247            (Error INVALID_ARRAY)
1248            (Error INVALID_OBJECT)
1249            (Error VM_DEAD)
1250        )
1251    )
1252)
1253(CommandSet InterfaceType=5
1254    (Command InvokeMethod=1
1255        "Invokes a static method. "
1256        "The method must not be a static initializer. "
1257        "The method must be a member of the interface type. "
1258        "<p>Since JDWP version 1.8 "
1259        "<p>"
1260        "The method invocation will occur in the specified thread. "
1261        "Method invocation can occur only if the specified thread "
1262        "has been suspended by an event. "
1263        "Method invocation is not supported "
1264        "when the target VM has been suspended by the front-end. "
1265        "<p>"
1266        "The specified method is invoked with the arguments in the specified "
1267        "argument list. "
1268        "The method invocation is synchronous; the reply packet is not "
1269        "sent until the invoked method returns in the target VM. "
1270        "The return value (possibly the void value) is "
1271        "included in the reply packet. "
1272        "If the invoked method throws an exception, the "
1273        "exception object ID is set in the reply packet; otherwise, the "
1274        "exception object ID is null. "
1275        "<p>"
1276        "For primitive arguments, the argument value's type must match the "
1277        "argument's type exactly. For object arguments, there must exist a "
1278        "widening reference conversion from the argument value's type to the "
1279        "argument's type and the argument's type must be loaded. "
1280        "<p>"
1281        "By default, all threads in the target VM are resumed while "
1282        "the method is being invoked if they were previously "
1283        "suspended by an event or by a command. "
1284        "This is done to prevent the deadlocks "
1285        "that will occur if any of the threads own monitors "
1286        "that will be needed by the invoked method. It is possible that "
1287        "breakpoints or other events might occur during the invocation. "
1288        "Note, however, that this implicit resume acts exactly like "
1289        "the ThreadReference resume command, so if the thread's suspend "
1290        "count is greater than 1, it will remain in a suspended state "
1291        "during the invocation. By default, when the invocation completes, "
1292        "all threads in the target VM are suspended, regardless their state "
1293        "before the invocation. "
1294        "<p>"
1295        "The resumption of other threads during the invoke can be prevented "
1296        "by specifying the INVOKE_SINGLE_THREADED "
1297        "bit flag in the <code>options</code> field; however, "
1298        "there is no protection against or recovery from the deadlocks "
1299        "described above, so this option should be used with great caution. "
1300        "Only the specified thread will be resumed (as described for all "
1301        "threads above). Upon completion of a single threaded invoke, the invoking thread "
1302        "will be suspended once again. Note that any threads started during "
1303        "the single threaded invocation will not be suspended when the "
1304        "invocation completes. "
1305        "<p>"
1306        "If the target VM is disconnected during the invoke (for example, through "
1307        "the VirtualMachine dispose command) the method invocation continues. "
1308        (Out
1309            (interfaceType clazz "The interface type ID.")
1310            (threadObject thread "The thread in which to invoke.")
1311            (method methodID "The method to invoke.")
1312            (Repeat arguments
1313                (value arg "The argument value.")
1314            )
1315            (int options "Invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
1316        )
1317        (Reply
1318            (value returnValue "The returned value.")
1319            (tagged-object exception "The thrown exception.")
1320        )
1321        (ErrorSet
1322            (Error INVALID_CLASS     "clazz is not the ID of an interface.")
1323            (Error INVALID_OBJECT    "clazz is not a known ID.")
1324            (Error INVALID_METHODID  "methodID is not the ID of a static method in this "
1325                                     "interface type or is the ID of a static initializer.")
1326            (Error INVALID_THREAD)
1327            (Error THREAD_NOT_SUSPENDED)
1328            (Error VM_DEAD)
1329        )
1330    )
1331)
1332(CommandSet Method=6
1333    (Command LineTable=1
1334        "Returns line number information for the method, if present. "
1335        "The line table maps source line numbers to the initial code index "
1336        "of the line. The line table "
1337        "is ordered by code index (from lowest to highest). The line number "
1338        "information is constant unless a new class definition is installed "
1339        "using <a href=\"#JDWP_VirtualMachine_RedefineClasses\">RedefineClasses</a>."
1340        (Out
1341            (referenceType refType "The class.")
1342            (method methodID "The method.")
1343        )
1344        (Reply
1345            (long start "Lowest valid code index for the method, >=0, or -1 if the method is native ")
1346            (long end "Highest valid code index for the method, >=0, or -1 if the method is native")
1347            (Repeat lines "The number of entries in the line table for this method."
1348                (Group LineInfo
1349                    (long lineCodeIndex "Initial code index of the line, "
1350                                        "start <= lineCodeIndex < end")
1351                    (int lineNumber "Line number.")
1352                )
1353            )
1354        )
1355        (ErrorSet
1356            (Error INVALID_CLASS     "refType is not the ID of a reference "
1357                                     "type.")
1358            (Error INVALID_OBJECT    "refType is not a known ID.")
1359            (Error INVALID_METHODID  "methodID is not the ID of a method.")
1360            (Error VM_DEAD)
1361        )
1362    )
1363    (Command VariableTable=2
1364        "Returns variable information for the method. The variable table "
1365        "includes arguments and locals declared within the method. For "
1366        "instance methods, the \"this\" reference is included in the "
1367        "table. Also, synthetic variables may be present. "
1368        (Out
1369            (referenceType refType "The class.")
1370            (method methodID "The method.")
1371        )
1372        (Reply
1373            (int argCnt "The number of words in the frame used by arguments. "
1374                        "Eight-byte arguments use two words; all others use one. ")
1375            (Repeat slots "The number of variables."
1376                (Group SlotInfo "Information about the variable."
1377                    (long codeIndex
1378                        "First code index at which the variable is visible (unsigned). "
1379                        "Used in conjunction with <code>length</code>. "
1380                        "The variable can be get or set only when the current "
1381                        "<code>codeIndex</code> <= current frame code index < <code>codeIndex + length</code> ")
1382                    (string name "The variable's name.")
1383                    (string signature "The variable type's JNI signature.")
1384                    (int length
1385                        "Unsigned value used in conjunction with <code>codeIndex</code>. "
1386                        "The variable can be get or set only when the current "
1387                        "<code>codeIndex</code> <= current frame code index < <code>code index + length</code> ")
1388                    (int slot "The local variable's index in its frame")
1389                )
1390            )
1391        )
1392        (ErrorSet
1393            (Error INVALID_CLASS     "refType is not the ID of a reference "
1394                                     "type.")
1395            (Error INVALID_OBJECT    "refType is not a known ID.")
1396            (Error INVALID_METHODID  "methodID is not the ID of a method.")
1397            (Error ABSENT_INFORMATION "there is no variable information for the method.")
1398            (Error VM_DEAD)
1399        )
1400    )
1401    (Command Bytecodes=3
1402        "Retrieve the method's bytecodes as defined in "
1403        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
1404        "Requires canGetBytecodes capability - see "
1405        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
1406        (Out
1407            (referenceType refType "The class.")
1408            (method methodID "The method.")
1409        )
1410        (Reply
1411            (Repeat bytes
1412                (byte bytecode "A Java bytecode.")
1413            )
1414        )
1415        (ErrorSet
1416            (Error INVALID_CLASS     "refType is not the ID of a reference "
1417                                     "type.")
1418            (Error INVALID_OBJECT    "refType is not a known ID.")
1419            (Error INVALID_METHODID  "methodID is not the ID of a method.")
1420            (Error NOT_IMPLEMENTED   "If the target virtual machine does not "
1421                                     "support the retrieval of bytecodes.")
1422            (Error VM_DEAD)
1423        )
1424    )
1425    (Command IsObsolete=4
1426        "Determine if this method is obsolete. A method is obsolete if it has been replaced "
1427        "by a non-equivalent method using the "
1428        "<a href=\"#JDWP_VirtualMachine_RedefineClasses\">RedefineClasses</a> command. "
1429        "The original and redefined methods are considered equivalent if their bytecodes are "
1430        "the same except for indices into the constant pool and the referenced constants are "
1431        "equal."
1432        (Out
1433            (referenceType refType "The class.")
1434            (method methodID "The method.")
1435        )
1436        (Reply
1437            (boolean isObsolete    "true if this method has been replaced"
1438                                   "by a non-equivalent method using"
1439                                   "the RedefineClasses command.")
1440        )
1441        (ErrorSet
1442            (Error INVALID_CLASS     "refType is not the ID of a reference "
1443                                     "type.")
1444            (Error INVALID_OBJECT    "refType is not a known ID.")
1445            (Error INVALID_METHODID  "methodID is not the ID of a method.")
1446            (Error NOT_IMPLEMENTED   "If the target virtual machine does "
1447                                     "not support this query.")
1448            (Error VM_DEAD)
1449        )
1450    )
1451    (Command VariableTableWithGeneric=5
1452        "Returns variable information for the method, including "
1453        "generic signatures for the variables. The variable table "
1454        "includes arguments and locals declared within the method. For "
1455        "instance methods, the \"this\" reference is included in the "
1456        "table. Also, synthetic variables may be present. "
1457        "Generic signatures are described in the signature attribute "
1458        "section in "
1459        "<cite>The Java&trade; Virtual Machine Specification</cite>. "
1460        "Since JDWP version 1.5."
1461        (Out
1462            (referenceType refType "The class.")
1463            (method methodID "The method.")
1464        )
1465        (Reply
1466            (int argCnt "The number of words in the frame used by arguments. "
1467                        "Eight-byte arguments use two words; all others use one. ")
1468            (Repeat slots "The number of variables."
1469                (Group SlotInfo "Information about the variable."
1470                    (long codeIndex
1471                        "First code index at which the variable is visible (unsigned). "
1472                        "Used in conjunction with <code>length</code>. "
1473                        "The variable can be get or set only when the current "
1474                        "<code>codeIndex</code> <= current frame code index < <code>codeIndex + length</code> ")
1475                    (string name "The variable's name.")
1476                    (string signature "The variable type's JNI signature.")
1477                    (string genericSignature "The variable type's generic "
1478                         "signature or an empty string if there is none.")
1479                    (int length
1480                        "Unsigned value used in conjunction with <code>codeIndex</code>. "
1481                        "The variable can be get or set only when the current "
1482                        "<code>codeIndex</code> <= current frame code index < <code>code index + length</code> ")
1483                    (int slot "The local variable's index in its frame")
1484                )
1485            )
1486        )
1487        (ErrorSet
1488            (Error INVALID_CLASS     "refType is not the ID of a reference "
1489                                     "type.")
1490            (Error INVALID_OBJECT    "refType is not a known ID.")
1491            (Error INVALID_METHODID  "methodID is not the ID of a method.")
1492            (Error ABSENT_INFORMATION "there is no variable information for the method.")
1493            (Error VM_DEAD)
1494        )
1495    )
1496
1497)
1498(CommandSet Field=8
1499)
1500(CommandSet ObjectReference=9
1501    (Command ReferenceType=1
1502        "Returns the runtime type of the object. "
1503        "The runtime type will be a class or an array. "
1504        (Out
1505            (object object "The object ID")
1506        )
1507        (Reply
1508            (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
1509                              "of following reference type. ")
1510            (referenceTypeID typeID "The runtime reference type.")
1511        )
1512        (ErrorSet
1513            (Error INVALID_OBJECT)
1514            (Error VM_DEAD)
1515        )
1516    )
1517    (Command GetValues=2
1518        "Returns the value of one or more instance fields. "
1519        "Each field must be member of the object's type "
1520        "or one of its superclasses, superinterfaces, or implemented interfaces. "
1521        "Access control is not enforced; for example, the values of private "
1522        "fields can be obtained."
1523        (Out
1524            (object object "The object ID")
1525            (Repeat fields "The number of values to get"
1526                (Group Field
1527                    (field fieldID "Field to get.")
1528                )
1529            )
1530        )
1531        (Reply
1532            (Repeat values "The number of values returned, always equal to 'fields', "
1533                           "the number of values to get. Field values are ordered "
1534                           "in the reply in the same order as corresponding fieldIDs "
1535                           "in the command."
1536                (value value "The field value")
1537            )
1538        )
1539        (ErrorSet
1540            (Error INVALID_OBJECT)
1541            (Error INVALID_FIELDID)
1542            (Error VM_DEAD)
1543        )
1544    )
1545    (Command SetValues=3
1546        "Sets the value of one or more instance fields. "
1547        "Each field must be member of the object's type "
1548        "or one of its superclasses, superinterfaces, or implemented interfaces. "
1549        "Access control is not enforced; for example, the values of private "
1550        "fields can be set. "
1551        "For primitive values, the value's type must match the "
1552        "field's type exactly. For object values, there must be a "
1553        "widening reference conversion from the value's type to the
1554        "field's type and the field's type must be loaded. "
1555        (Out
1556            (object object "The object ID")
1557            (Repeat values "The number of fields to set."
1558                (Group FieldValue "A Field/Value pair."
1559                    (field fieldID "Field to set.")
1560                    (untagged-value value "Value to put in the field.")
1561                )
1562            )
1563        )
1564        (Reply "none"
1565        )
1566        (ErrorSet
1567            (Error INVALID_OBJECT)
1568            (Error INVALID_FIELDID)
1569            (Error VM_DEAD)
1570        )
1571    )
1572    (Command MonitorInfo=5
1573        "Returns monitor information for an object. All threads int the VM must "
1574        "be suspended."
1575        "Requires canGetMonitorInfo capability - see "
1576        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
1577        (Out
1578            (object object "The object ID")
1579        )
1580        (Reply
1581            (threadObject owner "The monitor owner, or null if it is not currently owned.")
1582            (int entryCount "The number of times the monitor has been entered.")
1583            (Repeat waiters "The number of threads that are waiting for the monitor "
1584                            "0 if there is no current owner"
1585                (threadObject thread "A thread waiting for this monitor.")
1586            )
1587        )
1588        (ErrorSet
1589            (Error INVALID_OBJECT)
1590            (Error NOT_IMPLEMENTED)
1591            (Error VM_DEAD)
1592        )
1593    )
1594    (Command InvokeMethod=6
1595        "Invokes a instance method. "
1596        "The method must be member of the object's type "
1597        "or one of its superclasses, superinterfaces, or implemented interfaces. "
1598        "Access control is not enforced; for example, private "
1599        "methods can be invoked."
1600        "<p>"
1601        "The method invocation will occur in the specified thread. "
1602        "Method invocation can occur only if the specified thread "
1603        "has been suspended by an event. "
1604        "Method invocation is not supported "
1605        "when the target VM has been suspended by the front-end. "
1606        "<p>"
1607        "The specified method is invoked with the arguments in the specified "
1608        "argument list. "
1609        "The method invocation is synchronous; the reply packet is not "
1610        "sent until the invoked method returns in the target VM. "
1611        "The return value (possibly the void value) is "
1612        "included in the reply packet. "
1613        "If the invoked method throws an exception, the "
1614        "exception object ID is set in the reply packet; otherwise, the "
1615        "exception object ID is null. "
1616        "<p>"
1617        "For primitive arguments, the argument value's type must match the "
1618        "argument's type exactly. For object arguments, there must be a "
1619        "widening reference conversion from the argument value's type to the "
1620        "argument's type and the argument's type must be loaded. "
1621        "<p>"
1622        "By default, all threads in the target VM are resumed while "
1623        "the method is being invoked if they were previously "
1624        "suspended by an event or by a command. "
1625        "This is done to prevent the deadlocks "
1626        "that will occur if any of the threads own monitors "
1627        "that will be needed by the invoked method. It is possible that "
1628        "breakpoints or other events might occur during the invocation. "
1629        "Note, however, that this implicit resume acts exactly like "
1630        "the ThreadReference resume command, so if the thread's suspend "
1631        "count is greater than 1, it will remain in a suspended state "
1632        "during the invocation. By default, when the invocation completes, "
1633        "all threads in the target VM are suspended, regardless their state "
1634        "before the invocation. "
1635        "<p>"
1636        "The resumption of other threads during the invoke can be prevented "
1637        "by specifying the INVOKE_SINGLE_THREADED "
1638        "bit flag in the <code>options</code> field; however, "
1639        "there is no protection against or recovery from the deadlocks "
1640        "described above, so this option should be used with great caution. "
1641        "Only the specified thread will be resumed (as described for all "
1642        "threads above). Upon completion of a single threaded invoke, the invoking thread "
1643        "will be suspended once again. Note that any threads started during "
1644        "the single threaded invocation will not be suspended when the "
1645        "invocation completes. "
1646        "<p>"
1647        "If the target VM is disconnected during the invoke (for example, through "
1648        "the VirtualMachine dispose command) the method invocation continues. "
1649        (Out
1650            (object object "The object ID")
1651            (threadObject thread "The thread in which to invoke.")
1652            (classType clazz "The class type.")
1653            (method methodID "The method to invoke.")
1654            (Repeat arguments "The number of arguments."
1655                (value arg "The argument value.")
1656            )
1657            (int options "Invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
1658        )
1659        (Reply
1660            (value returnValue "The returned value, or null if an exception is thrown.")
1661            (tagged-object exception "The thrown exception, if any.")
1662        )
1663        (ErrorSet
1664            (Error INVALID_OBJECT)
1665            (Error INVALID_CLASS     "clazz is not the ID of a reference "
1666                                     "type.")
1667            (Error INVALID_METHODID  "methodID is not the ID of an instance method "
1668                                     "in this object's type or one of its superclasses, "
1669                                     "superinterfaces, or implemented interfaces.")
1670            (Error INVALID_THREAD)
1671            (Error THREAD_NOT_SUSPENDED)
1672            (Error VM_DEAD)
1673        )
1674    )
1675    (Command DisableCollection=7
1676        "Prevents garbage collection for the given object. By "
1677        "default all objects in back-end replies may be "
1678        "collected at any time the target VM is running. A call to "
1679        "this command guarantees that the object will not be "
1680        "collected. The "
1681        "<a href=\"#JDWP_ObjectReference_EnableCollection\">EnableCollection</a> "
1682        "command can be used to "
1683        "allow collection once again. "
1684        "<p>"
1685        "Note that while the target VM is suspended, no garbage "
1686        "collection will occur because all threads are suspended. "
1687        "The typical examination of variables, fields, and arrays "
1688        "during the suspension is safe without explicitly disabling "
1689        "garbage collection. "
1690        "<p>"
1691        "This method should be used sparingly, as it alters the "
1692        "pattern of garbage collection in the target VM and, "
1693        "consequently, may result in application behavior under the "
1694        "debugger that differs from its non-debugged behavior. "
1695        (Out
1696            (object object "The object ID")
1697        )
1698        (Reply "none"
1699        )
1700        (ErrorSet
1701            (Error INVALID_OBJECT)
1702            (Error VM_DEAD)
1703        )
1704    )
1705    (Command EnableCollection=8
1706        "Permits garbage collection for this object. By default all "
1707        "objects returned by JDWP may become unreachable in the target VM, "
1708        "and hence may be garbage collected. A call to this command is "
1709        "necessary only if garbage collection was previously disabled with "
1710        "the <a href=\"#JDWP_ObjectReference_DisableCollection\">DisableCollection</a> "
1711        "command."
1712        (Out
1713            (object object "The object ID")
1714        )
1715        (Reply "none"
1716        )
1717        (ErrorSet
1718            (Error VM_DEAD)
1719        )
1720    )
1721    (Command IsCollected=9
1722        "Determines whether an object has been garbage collected in the "
1723        "target VM. "
1724        (Out
1725            (object object "The object ID")
1726        )
1727        (Reply
1728            (boolean isCollected "true if the object has been collected; false otherwise")
1729        )
1730        (ErrorSet
1731            (Error INVALID_OBJECT)
1732            (Error VM_DEAD)
1733        )
1734    )
1735    (Command ReferringObjects=10
1736        "Returns objects that directly reference this object.  "
1737        "Only objects that are reachable for the purposes "
1738        "of garbage collection are returned. "
1739        "Note that an object can also be referenced in other ways, "
1740        "such as from a local variable in a stack frame, or from a JNI global "
1741        "reference.  Such non-object referrers are not returned by this command. "
1742        "<p>Since JDWP version 1.6. Requires canGetInstanceInfo capability - see "
1743        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
1744        (Out
1745            (object object "The object ID")
1746            (int maxReferrers "Maximum number of referring objects to return. "
1747                              "Must be non-negative. If zero, all referring "
1748                              "objects are returned.")
1749        )
1750        (Reply
1751            (Repeat referringObjects "The number of objects that follow."
1752                (tagged-object instance "An object that references this object.")
1753             )
1754        )
1755        (ErrorSet
1756            (Error INVALID_OBJECT    "object is not a known ID.")
1757            (Error ILLEGAL_ARGUMENT  "maxReferrers is less than zero.")
1758            (Error NOT_IMPLEMENTED)
1759            (Error VM_DEAD)
1760        )
1761    )
1762)
1763
1764(CommandSet StringReference=10
1765    (Command Value=1
1766        "Returns the characters contained in the string. "
1767        (Out
1768            (object stringObject "The String object ID. ")
1769        )
1770        (Reply
1771            (string stringValue "UTF-8 representation of the string value.")
1772       )
1773        (ErrorSet
1774            (Error INVALID_STRING)
1775            (Error INVALID_OBJECT)
1776            (Error VM_DEAD)
1777        )
1778    )
1779)
1780(CommandSet ThreadReference=11
1781    (Command Name=1
1782        "Returns the thread name. "
1783        (Out
1784            (threadObject thread "The thread object ID. ")
1785        )
1786        (Reply
1787            (string threadName "The thread name.")
1788        )
1789        (ErrorSet
1790            (Error INVALID_THREAD)
1791            (Error INVALID_OBJECT    "thread is not a known ID.")
1792            (Error VM_DEAD)
1793        )
1794    )
1795    (Command Suspend=2
1796        "Suspends the thread. "
1797        "<p>"
1798        "Unlike java.lang.Thread.suspend(), suspends of both "
1799        "the virtual machine and individual threads are counted. Before "
1800        "a thread will run again, it must be resumed the same number "
1801        "of times it has been suspended. "
1802        "<p>"
1803        "Suspending single threads with command has the same "
1804        "dangers java.lang.Thread.suspend(). If the suspended "
1805        "thread holds a monitor needed by another running thread, "
1806        "deadlock is possible in the target VM (at least until the "
1807        "suspended thread is resumed again). "
1808        "<p>"
1809        "The suspended thread is guaranteed to remain suspended until "
1810        "resumed through one of the JDI resume methods mentioned above; "
1811        "the application in the target VM cannot resume the suspended thread "
1812        "through {@link java.lang.Thread#resume}. "
1813        "<p>"
1814        "Note that this doesn't change the status of the thread (see the "
1815        "<a href=\"#JDWP_ThreadReference_Status\">ThreadStatus</a> command.) "
1816        "For example, if it was "
1817        "Running, it will still appear running to other threads. "
1818        (Out
1819            (threadObject thread "The thread object ID. ")
1820        )
1821        (Reply "none"
1822        )
1823        (ErrorSet
1824            (Error INVALID_THREAD)
1825            (Error INVALID_OBJECT    "thread is not a known ID.")
1826            (Error VM_DEAD)
1827        )
1828    )
1829    (Command Resume=3
1830        "Resumes the execution of a given thread. If this thread was "
1831        "not previously suspended by the front-end, "
1832        "calling this command has no effect. "
1833        "Otherwise, the count of pending suspends on this thread is "
1834        "decremented. If it is decremented to 0, the thread will "
1835        "continue to execute. "
1836        (Out
1837            (threadObject thread "The thread object ID. ")
1838        )
1839        (Reply "none"
1840        )
1841        (ErrorSet
1842            (Error INVALID_THREAD)
1843            (Error INVALID_OBJECT    "thread is not a known ID.")
1844            (Error VM_DEAD)
1845        )
1846    )
1847    (Command Status=4
1848        "Returns the current status of a thread. The thread status "
1849        "reply indicates the thread status the last time it was running. "
1850        "the suspend status provides information on the thread's "
1851        "suspension, if any."
1852        (Out
1853            (threadObject thread "The thread object ID. ")
1854        )
1855        (Reply
1856            (int threadStatus "One of the thread status codes "
1857                    "See <a href=\"#JDWP_ThreadStatus\">JDWP.ThreadStatus</a>")
1858            (int suspendStatus "One of the suspend status codes "
1859                    "See <a href=\"#JDWP_SuspendStatus\">JDWP.SuspendStatus</a>")
1860        )
1861        (ErrorSet
1862            (Error INVALID_THREAD)
1863            (Error INVALID_OBJECT    "thread is not a known ID.")
1864            (Error VM_DEAD)
1865        )
1866    )
1867    (Command ThreadGroup=5
1868        "Returns the thread group that contains a given thread. "
1869        (Out
1870            (threadObject thread "The thread object ID. ")
1871        )
1872        (Reply
1873            (threadGroupObject group "The thread group of this thread. ")
1874        )
1875        (ErrorSet
1876            (Error INVALID_THREAD)
1877            (Error INVALID_OBJECT    "thread is not a known ID.")
1878            (Error VM_DEAD)
1879        )
1880    )
1881    (Command Frames=6
1882        "Returns the current call stack of a suspended thread. "
1883        "The sequence of frames starts with "
1884        "the currently executing frame, followed by its caller, "
1885        "and so on. The thread must be suspended, and the returned "
1886        "frameID is valid only while the thread is suspended. "
1887        (Out
1888            (threadObject thread "The thread object ID. ")
1889            (int startFrame "The index of the first frame to retrieve.")
1890            (int length
1891                        "The count of frames to retrieve "
1892                        "(-1 means all remaining). ")
1893        )
1894        (Reply
1895            (Repeat frames "The number of frames retreived"
1896                (Group Frame
1897                    (frame frameID "The ID of this frame. ")
1898                    (location location "The current location of this frame")
1899                )
1900            )
1901        )
1902        (ErrorSet
1903            (Error INVALID_THREAD)
1904            (Error INVALID_OBJECT    "thread is not a known ID.")
1905            (Error VM_DEAD)
1906        )
1907    )
1908    (Command FrameCount=7
1909        "Returns the count of frames on this thread's stack. "
1910        "The thread must be suspended, and the returned "
1911        "count is valid only while the thread is suspended. "
1912        "Returns JDWP.Error.errorThreadNotSuspended if not suspended. "
1913        (Out
1914            (threadObject thread "The thread object ID. ")
1915        )
1916        (Reply
1917            (int frameCount "The count of frames on this thread's stack. ")
1918        )
1919        (ErrorSet
1920            (Error INVALID_THREAD)
1921            (Error INVALID_OBJECT    "thread is not a known ID.")
1922            (Error VM_DEAD)
1923        )
1924    )
1925    (Command OwnedMonitors=8
1926        "Returns the objects whose monitors have been entered by this thread. "
1927        "The thread must be suspended, and the returned information is "
1928        "relevant only while the thread is suspended. "
1929        "Requires canGetOwnedMonitorInfo capability - see "
1930        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
1931        (Out
1932            (threadObject thread "The thread object ID. ")
1933        )
1934        (Reply
1935            (Repeat owned "The number of owned monitors"
1936                (tagged-object monitor "An owned monitor")
1937            )
1938        )
1939        (ErrorSet
1940            (Error INVALID_THREAD)
1941            (Error INVALID_OBJECT    "thread is not a known ID.")
1942            (Error NOT_IMPLEMENTED)
1943            (Error VM_DEAD)
1944        )
1945    )
1946    (Command CurrentContendedMonitor=9
1947        "Returns the object, if any, for which this thread is waiting. The "
1948        "thread may be waiting to enter a monitor, or it may be waiting, via "
1949        "the java.lang.Object.wait method, for another thread to invoke the "
1950        "notify method. "
1951        "The thread must be suspended, and the returned information is "
1952        "relevant only while the thread is suspended. "
1953        "Requires canGetCurrentContendedMonitor capability - see "
1954        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
1955        (Out
1956            (threadObject thread "The thread object ID. ")
1957        )
1958        (Reply
1959            (tagged-object monitor "The contended monitor, or null if "
1960                                   "there is no current contended monitor. ")
1961        )
1962        (ErrorSet
1963            (Error INVALID_THREAD)
1964            (Error INVALID_OBJECT    "thread is not a known ID.")
1965            (Error NOT_IMPLEMENTED)
1966            (Error VM_DEAD)
1967        )
1968    )
1969    (Command Stop=10
1970        "Stops the thread with an asynchronous exception, as if done by "
1971        "java.lang.Thread.stop "
1972        (Out
1973            (threadObject thread "The thread object ID. ")
1974            (object throwable "Asynchronous exception. This object must "
1975                              "be an instance of java.lang.Throwable or a subclass")
1976        )
1977        (Reply "none"
1978        )
1979        (ErrorSet
1980            (Error INVALID_THREAD)
1981            (Error INVALID_OBJECT "If thread is not a known ID or the asynchronous "
1982                                  "exception has been garbage collected.")
1983            (Error VM_DEAD)
1984        )
1985    )
1986    (Command Interrupt=11
1987        "Interrupt the thread, as if done by java.lang.Thread.interrupt "
1988        (Out
1989            (threadObject thread "The thread object ID. ")
1990        )
1991        (Reply "none"
1992        )
1993        (ErrorSet
1994            (Error INVALID_THREAD)
1995            (Error INVALID_OBJECT    "thread is not a known ID.")
1996            (Error VM_DEAD)
1997        )
1998    )
1999    (Command SuspendCount=12
2000        "Get the suspend count for this thread. The suspend count is the  "
2001        "number of times the thread has been suspended through the "
2002        "thread-level or VM-level suspend commands without a corresponding resume "
2003        (Out
2004            (threadObject thread "The thread object ID. ")
2005        )
2006        (Reply
2007            (int suspendCount "The number of outstanding suspends of this thread. ")
2008        )
2009        (ErrorSet
2010            (Error INVALID_THREAD)
2011            (Error INVALID_OBJECT    "thread is not a known ID.")
2012            (Error VM_DEAD)
2013        )
2014    )
2015    (Command OwnedMonitorsStackDepthInfo=13
2016        "Returns monitor objects owned by the thread, along with stack depth at which "
2017        "the monitor was acquired. Returns stack depth of -1  if "
2018        "the implementation cannot determine the stack depth "
2019        "(e.g., for monitors acquired by JNI MonitorEnter)."
2020        "The thread must be suspended, and the returned information is "
2021        "relevant only while the thread is suspended. "
2022        "Requires canGetMonitorFrameInfo capability - see "
2023        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
2024        "<p>Since JDWP version 1.6. "
2025
2026        (Out
2027            (threadObject thread "The thread object ID. ")
2028        )
2029        (Reply
2030            (Repeat owned "The number of owned monitors"
2031               (Group monitor
2032                  (tagged-object monitor "An owned monitor")
2033                  (int stack_depth "Stack depth location where monitor was acquired")
2034               )
2035            )
2036        )
2037        (ErrorSet
2038            (Error INVALID_THREAD)
2039            (Error INVALID_OBJECT    "thread is not a known ID.")
2040            (Error NOT_IMPLEMENTED)
2041            (Error VM_DEAD)
2042        )
2043    )
2044    (Command ForceEarlyReturn=14
2045        "Force a method to return before it reaches a return "
2046        "statement.  "
2047        "<p>"
2048        "The method which will return early is referred to as the "
2049        "called method. The called method is the current method (as "
2050        "defined by the Frames section in "
2051        "<cite>The Java&trade; Virtual Machine Specification</cite>) "
2052        "for the specified thread at the time this command "
2053        "is received. "
2054        "<p>"
2055        "The specified thread must be suspended. "
2056        "The return occurs when execution of Java programming "
2057        "language code is resumed on this thread. Between sending this "
2058        "command and resumption of thread execution, the "
2059        "state of the stack is undefined. "
2060        "<p>"
2061        "No further instructions are executed in the called "
2062        "method. Specifically, finally blocks are not executed. Note: "
2063        "this can cause inconsistent states in the application. "
2064        "<p>"
2065        "A lock acquired by calling the called method (if it is a "
2066        "synchronized method) and locks acquired by entering "
2067        "synchronized blocks within the called method are "
2068        "released. Note: this does not apply to JNI locks or "
2069        "java.util.concurrent.locks locks. "
2070        "<p>"
2071        "Events, such as MethodExit, are generated as they would be in "
2072        "a normal return. "
2073        "<p>"
2074        "The called method must be a non-native Java programming "
2075        "language method. Forcing return on a thread with only one "
2076        "frame on the stack causes the thread to exit when resumed. "
2077        "<p>"
2078        "For void methods, the value must be a void value. "
2079        "For methods that return primitive values, the value's type must "
2080        "match the return type exactly.  For object values, there must be a "
2081        "widening reference conversion from the value's type to the "
2082        "return type type and the return type must be loaded. "
2083        "<p>"
2084        "Since JDWP version 1.6. Requires canForceEarlyReturn capability - see "
2085        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
2086        (Out
2087            (threadObject thread "The thread object ID. ")
2088            (value value "The value to return. ")
2089        )
2090        (Reply "none"
2091        )
2092        (ErrorSet
2093            (Error INVALID_THREAD)
2094            (Error INVALID_OBJECT    "Thread or value is not a known ID.")
2095            (Error THREAD_NOT_SUSPENDED)
2096            (Error THREAD_NOT_ALIVE)
2097            (Error OPAQUE_FRAME      "Attempted to return early from "
2098                                     "a frame corresponding to a native "
2099                                     "method. Or the implementation is "
2100                                     "unable to provide this functionality "
2101                                     "on this frame.")
2102            (Error NO_MORE_FRAMES)
2103            (Error NOT_IMPLEMENTED)
2104            (Error TYPE_MISMATCH   "Value is not an appropriate type for the "
2105                                   "return value of the method.")
2106            (Error VM_DEAD)
2107        )
2108    )
2109
2110)
2111(CommandSet ThreadGroupReference=12
2112    (Command Name=1
2113        "Returns the thread group name. "
2114        (Out
2115            (threadGroupObject group "The thread group object ID. ")
2116        )
2117        (Reply
2118            (string groupName "The thread group's name.")
2119        )
2120        (ErrorSet
2121            (Error INVALID_THREAD_GROUP)
2122            (Error INVALID_OBJECT    "group is not a known ID.")
2123            (Error VM_DEAD)
2124        )
2125    )
2126    (Command Parent=2
2127        "Returns the thread group, if any, which contains a given thread group. "
2128        (Out
2129            (threadGroupObject group "The thread group object ID. ")
2130        )
2131        (Reply
2132            (threadGroupObject parentGroup "The parent thread group object, or "
2133                                           "null if the given thread group "
2134                                           "is a top-level thread group")
2135        )
2136        (ErrorSet
2137            (Error INVALID_THREAD_GROUP)
2138            (Error INVALID_OBJECT    "group is not a known ID.")
2139            (Error VM_DEAD)
2140        )
2141    )
2142    (Command Children=3
2143        "Returns the live threads and active thread groups directly contained "
2144        "in this thread group. Threads and thread groups in child "
2145        "thread groups are not included. "
2146        "A thread is alive if it has been started and has not yet been stopped. "
2147        "See <a href=../../../api/java/lang/ThreadGroup.html>java.lang.ThreadGroup </a>
2148        "for information about active ThreadGroups.
2149        (Out
2150            (threadGroupObject group "The thread group object ID. ")
2151        )
2152        (Reply
2153            (Repeat childThreads "The number of live child threads. "
2154                (threadObject childThread "A direct child thread ID. ")
2155            )
2156            (Repeat childGroups "The number of active child thread groups. "
2157                (threadGroupObject childGroup "A direct child thread group ID. ")
2158            )
2159        )
2160        (ErrorSet
2161            (Error INVALID_THREAD_GROUP)
2162            (Error INVALID_OBJECT    "group is not a known ID.")
2163            (Error VM_DEAD)
2164        )
2165    )
2166)
2167(CommandSet ArrayReference=13
2168    (Command Length=1
2169        "Returns the number of components in a given array. "
2170        (Out
2171            (arrayObject arrayObject "The array object ID. ")
2172        )
2173        (Reply
2174            (int arrayLength "The length of the array.")
2175        )
2176        (ErrorSet
2177            (Error INVALID_OBJECT    "arrayObject is not a known ID.")
2178            (Error INVALID_ARRAY)
2179            (Error VM_DEAD)
2180        )
2181    )
2182    (Command GetValues=2
2183        "Returns a range of array components. The specified range must "
2184        "be within the bounds of the array. "
2185        (Out
2186            (arrayObject arrayObject "The array object ID. ")
2187            (int firstIndex "The first index to retrieve.")
2188            (int length "The number of components to retrieve.")
2189        )
2190        (Reply
2191            (typed-sequence values "The retrieved values. If the values "
2192                                   "are objects, they are tagged-values; "
2193                                   "otherwise, they are untagged-values")
2194        )
2195        (ErrorSet
2196            (Error INVALID_LENGTH "If index is beyond the end of this array.")
2197            (Error INVALID_OBJECT    "arrayObject is not a known ID.")
2198            (Error INVALID_ARRAY)
2199            (Error VM_DEAD)
2200        )
2201    )
2202    (Command SetValues=3
2203        "Sets a range of array components. The specified range must "
2204        "be within the bounds of the array. "
2205        "For primitive values, each value's type must match the "
2206        "array component type exactly. For object values, there must be a "
2207        "widening reference conversion from the value's type to the
2208        "array component type and the array component type must be loaded. "
2209        (Out
2210            (arrayObject arrayObject "The array object ID. ")
2211            (int firstIndex "The first index to set.")
2212            (Repeat values "The number of values to set. "
2213                (untagged-value value "A value to set. ")
2214            )
2215        )
2216        (Reply "none"
2217        )
2218        (ErrorSet
2219            (Error INVALID_LENGTH "If index is beyond the end of this array.")
2220            (Error INVALID_OBJECT    "arrayObject is not a known ID.")
2221            (Error INVALID_ARRAY)
2222            (Error VM_DEAD)
2223        )
2224    )
2225)
2226(CommandSet ClassLoaderReference=14
2227    (Command VisibleClasses=1
2228        "Returns a list of all classes which this class loader has "
2229        "been requested to load. This class loader is considered to be "
2230        "an <i>initiating</i> class loader for each class in the returned "
2231        "list. The list contains each "
2232        "reference type defined by this loader and any types for which "
2233        "loading was delegated by this class loader to another class loader. "
2234        "<p>"
2235        "The visible class list has useful properties with respect to "
2236        "the type namespace. A particular type name will occur at most "
2237        "once in the list. Each field or variable declared with that "
2238        "type name in a class defined by "
2239        "this class loader must be resolved to that single type. "
2240        "<p>"
2241        "No ordering of the returned list is guaranteed. "
2242        (Out
2243            (classLoaderObject classLoaderObject "The class loader object ID. ")
2244        )
2245        (Reply
2246            (Repeat classes "The number of visible classes. "
2247                (Group ClassInfo
2248                    (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
2249                                      "of following reference type. ")
2250                    (referenceTypeID typeID
2251                        "A class visible to this class loader.")
2252                )
2253            )
2254        )
2255        (ErrorSet
2256            (Error INVALID_OBJECT)
2257            (Error INVALID_CLASS_LOADER)
2258            (Error VM_DEAD)
2259        )
2260    )
2261)
2262(CommandSet EventRequest=15
2263    (Command Set=1
2264        "Set an event request. When the event described by this request "
2265        "occurs, an <a href=\"#JDWP_Event\">event</a> is sent from the "
2266        "target VM. If an event occurs that has not been requested then it is not sent "
2267        "from the target VM. The two exceptions to this are the VM Start Event and "
2268        "the VM Death Event which are automatically generated events - see "
2269        "<a href=\"#JDWP_Event_Composite\">Composite Command</a> for further details."
2270        (Out
2271            (byte eventKind "Event kind to request. "
2272                      "See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> "
2273                      "for a complete list of events that can be requested; "
2274                      "some events may require a capability in order to be requested. "
2275                      )
2276            (byte suspendPolicy
2277                      "What threads are suspended when this event occurs? "
2278                      "Note that the order of events and command replies "
2279                      "accurately reflects the order in which threads are "
2280                      "suspended and resumed. For example, if a "
2281                      "<a href=\"#JDWP_VirtualMachine_Resume\">VM-wide resume</a> "
2282                      "is processed before an event occurs which suspends the "
2283                      "VM, the reply to the resume command will be written to "
2284                      "the transport before the suspending event.")
2285            (Repeat modifiers "Constraints used to control the number "
2286                              "of generated events."
2287                              "Modifiers specify additional tests that "
2288                              "an event must satisfy before it is placed "
2289                              "in the event queue. Events are filtered by "
2290                              "applying each modifier to an event in the "
2291                              "order they are specified in this collection "
2292                              "Only events that satisfy all modifiers "
2293                              "are reported. A value of 0 means there are no "
2294                              "modifiers in the request."
2295                              "<p>"
2296                              "Filtering can improve "
2297                              "debugger performance dramatically by
2298                              "reducing the "
2299                              "amount of event traffic sent from the "
2300                              "target VM to the debugger VM. "
2301                (Select Modifier
2302                    (byte modKind "Modifier kind")
2303                    (Alt Count=1
2304                        "Limit the requested event to be reported at most once after a "
2305                        "given number of occurrences.  The event is not reported "
2306                        "the first <code>count - 1</code> times this filter is reached. "
2307                        "To request a one-off event, call this method with a count of 1. "
2308                        "<p>"
2309                        "Once the count reaches 0, any subsequent filters in this request "
2310                        "are applied. If none of those filters cause the event to be "
2311                        "suppressed, the event is reported. Otherwise, the event is not "
2312                        "reported. In either case subsequent events are never reported for "
2313                        "this request. "
2314                        "This modifier can be used with any event kind."
2315
2316                        (int count "Count before event. One for one-off.")
2317                    )
2318                    (Alt Conditional=2 "Conditional on expression"
2319                        (int exprID "For the future")
2320                    )
2321                    (Alt ThreadOnly=3
2322                        "Restricts reported events to "
2323                        "those in the given thread. "
2324                        "This modifier can be used with any event kind "
2325                        "except for class unload. "
2326
2327                        (threadObject thread "Required thread")
2328                    )
2329                    (Alt ClassOnly=4
2330                        "For class prepare events, restricts the events "
2331                        "generated by this request to be the "
2332                        "preparation of the given reference type and any subtypes. "
2333                        "For monitor wait and waited events, restricts the events "
2334                        "generated by this request to those whose monitor object "
2335                        "is of the given reference type or any of its subtypes. "
2336                        "For other events, restricts the events generated "
2337                        "by this request to those "
2338                        "whose location is in the given reference type or any of its subtypes. "
2339                        "An event will be generated for any location in a reference type that can "
2340                        "be safely cast to the given reference type. "
2341                        "This modifier can be used with any event kind except "
2342                        "class unload, thread start, and thread end. "
2343
2344                        (referenceType clazz "Required class")
2345                    )
2346                    (Alt ClassMatch=5
2347                        "Restricts reported events to those for classes whose name "
2348                        "matches the given restricted regular expression. "
2349                        "For class prepare events, the prepared class name "
2350                        "is matched. For class unload events, the "
2351                        "unloaded class name is matched. For monitor wait "
2352                        "and waited events, the name of the class of the "
2353                        "monitor object is matched. For other events, "
2354                        "the class name of the event's location is matched. "
2355                        "This modifier can be used with any event kind except "
2356                        "thread start and thread end. "
2357
2358                        (string classPattern "Required class pattern. "
2359                                "Matches are limited to exact matches of the "
2360                                "given class pattern and matches of patterns that "
2361                                "begin or end with '*'; for example, "
2362                                "\"*.Foo\" or \"java.*\". "
2363                        )
2364
2365                    )
2366                    (Alt ClassExclude=6
2367                        "Restricts reported events to those for classes whose name "
2368                        "does not match the given restricted regular expression. "
2369                        "For class prepare events, the prepared class name "
2370                        "is matched. For class unload events, the "
2371                        "unloaded class name is matched. For monitor wait and "
2372                        "waited events, the name of the class of the monitor "
2373                        "object is matched. For other events, "
2374                        "the class name of the event's location is matched. "
2375                        "This modifier can be used with any event kind except "
2376                        "thread start and thread end. "
2377
2378                        (string classPattern "Disallowed class pattern. "
2379                                "Matches are limited to exact matches of the "
2380                                "given class pattern and matches of patterns that "
2381                                "begin or end with '*'; for example, "
2382                                "\"*.Foo\" or \"java.*\". "
2383                        )
2384                    )
2385                    (Alt LocationOnly=7
2386                        "Restricts reported events to those that occur at "
2387                        "the given location. "
2388                        "This modifier can be used with "
2389                        "breakpoint, field access, field modification, "
2390                        "step, and exception event kinds. "
2391
2392                        (location loc "Required location")
2393                    )
2394                    (Alt ExceptionOnly=8
2395                        "Restricts reported exceptions by their class and "
2396                        "whether they are caught or uncaught. "
2397                        "This modifier can be used with "
2398                        "exception event kinds only. "
2399
2400                        (referenceType exceptionOrNull
2401                                "Exception to report. Null (0) means report "
2402                                "exceptions of all types. "
2403                                "A non-null type restricts the reported exception "
2404                                "events to exceptions of the given type or "
2405                                "any of its subtypes. "
2406                        )
2407                        (boolean caught "Report caught exceptions")
2408                        (boolean uncaught "Report uncaught exceptions. "
2409                                "Note that it "
2410                                "is not always possible to determine whether an "
2411                                "exception is caught or uncaught at the time it is "
2412                                "thrown. See the exception event catch location under "
2413                                "<a href=\"#JDWP_Event_Composite\">composite events</a> "
2414                                "for more information. "
2415                        )
2416
2417                    )
2418                    (Alt FieldOnly=9
2419                        "Restricts reported events to those that occur for "
2420                        "a given field. "
2421                        "This modifier can be used with "
2422                        "field access and field modification event kinds only. "
2423
2424                        (referenceType declaring "Type in which field is declared.")
2425                        (field fieldID "Required field")
2426                    )
2427                    (Alt Step=10
2428                        "Restricts reported step events "
2429                        "to those which satisfy "
2430                        "depth and size constraints. "
2431                        "This modifier can be used with "
2432                        "step event kinds only. "
2433
2434                        (threadObject thread "Thread in which to step")
2435                        (int size "size of each step. "
2436                           "See <a href=\"#JDWP_StepSize\">JDWP.StepSize</a>")
2437                        (int depth "relative call stack limit. "
2438                           "See <a href=\"#JDWP_StepDepth\">JDWP.StepDepth</a>")
2439                    )
2440                    (Alt InstanceOnly=11
2441                        "Restricts reported events to those whose "
2442                        "active 'this' object is the given object. "
2443                        "Match value is the null object for static methods. "
2444                        "This modifier can be used with any event kind "
2445                        "except class prepare, class unload, thread start, "
2446                        "and thread end. Introduced in JDWP version 1.4."
2447
2448                        (object instance "Required 'this' object")
2449                    )
2450                    (Alt SourceNameMatch=12
2451                        "Restricts reported class prepare events to those "
2452                        "for reference types which have a source name "
2453                        "which matches the given restricted regular expression. "
2454                        "The source names are determined by the reference type's "
2455                        "<a href=\"#JDWP_ReferenceType_SourceDebugExtension\"> "
2456                        "SourceDebugExtension</a>. "
2457                        "This modifier can only be used with class prepare "
2458                        "events. "
2459                        "Since JDWP version 1.6. Requires the canUseSourceNameFilters "
2460                        "capability - see "
2461                        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
2462
2463                        (string sourceNamePattern "Required source name pattern. "
2464                                "Matches are limited to exact matches of the "
2465                                "given pattern and matches of patterns that "
2466                                "begin or end with '*'; for example, "
2467                                "\"*.Foo\" or \"java.*\". "
2468                        )
2469                    )
2470
2471                )
2472            )
2473        )
2474        (Reply
2475            (int requestID "ID of created request")
2476        )
2477        (ErrorSet
2478            (Error INVALID_THREAD)
2479            (Error INVALID_CLASS)
2480            (Error INVALID_STRING)
2481            (Error INVALID_OBJECT)
2482            (Error INVALID_COUNT)
2483            (Error INVALID_FIELDID)
2484            (Error INVALID_METHODID)
2485            (Error INVALID_LOCATION)
2486            (Error INVALID_EVENT_TYPE)
2487            (Error NOT_IMPLEMENTED)
2488            (Error VM_DEAD)
2489        )
2490    )
2491    (Command Clear=2
2492        "Clear an event request. See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> "
2493        "for a complete list of events that can be cleared. Only the event request matching "
2494        "the specified event kind and requestID is cleared. If there isn't a matching event "
2495        "request the command is a no-op and does not result in an error. Automatically "
2496        "generated events do not have a corresponding event request and may not be cleared "
2497        "using this command."
2498        (Out
2499            (byte eventKind "Event kind to clear")
2500            (int requestID "ID of request to clear")
2501        )
2502        (Reply "none"
2503        )
2504        (ErrorSet
2505            (Error VM_DEAD)
2506            (Error INVALID_EVENT_TYPE)
2507        )
2508    )
2509    (Command ClearAllBreakpoints=3
2510        "Removes all set breakpoints, a no-op if there are no breakpoints set."
2511        (Out "none"
2512        )
2513        (Reply "none"
2514        )
2515        (ErrorSet
2516            (Error VM_DEAD)
2517        )
2518    )
2519)
2520(CommandSet StackFrame=16
2521    (Command GetValues=1
2522        "Returns the value of one or more local variables in a "
2523        "given frame. Each variable must be visible at the frame's code index. "
2524        "Even if local variable information is not available, values can "
2525        "be retrieved if the front-end is able to "
2526        "determine the correct local variable index. (Typically, this "
2527        "index can be determined for method arguments from the method "
2528        "signature without access to the local variable table information.) "
2529        (Out
2530            (threadObject thread "The frame's thread. ")
2531            (frame frame "The frame ID. ")
2532            (Repeat slots "The number of values to get. "
2533                (Group SlotInfo
2534                    (int slot "The local variable's index in the frame. ")
2535                    (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
2536                                  "identifying the type of the variable ")
2537                )
2538            )
2539        )
2540        (Reply
2541            (Repeat values "The number of values retrieved, always equal to slots, "
2542                           "the number of values to get."
2543                (value slotValue "The value of the local variable. ")
2544            )
2545        )
2546        (ErrorSet
2547            (Error INVALID_THREAD)
2548            (Error INVALID_OBJECT)
2549            (Error INVALID_FRAMEID)
2550            (Error INVALID_SLOT)
2551            (Error VM_DEAD)
2552        )
2553    )
2554    (Command SetValues=2
2555        "Sets the value of one or more local variables. "
2556        "Each variable must be visible at the current frame code index. "
2557        "For primitive values, the value's type must match the "
2558        "variable's type exactly. For object values, there must be a "
2559        "widening reference conversion from the value's type to the
2560        "variable's type and the variable's type must be loaded. "
2561        "<p>"
2562        "Even if local variable information is not available, values can "
2563        "be set, if the front-end is able to "
2564        "determine the correct local variable index. (Typically, this
2565        "index can be determined for method arguments from the method "
2566        "signature without access to the local variable table information.) "
2567        (Out
2568            (threadObject thread "The frame's thread. ")
2569            (frame frame "The frame ID. ")
2570            (Repeat slotValues "The number of values to set. "
2571                (Group SlotInfo
2572                    (int slot "The slot ID. ")
2573                    (value slotValue "The value to set. ")
2574                )
2575            )
2576        )
2577        (Reply "none"
2578        )
2579        (ErrorSet
2580            (Error INVALID_THREAD)
2581            (Error INVALID_OBJECT)
2582            (Error INVALID_FRAMEID)
2583            (Error VM_DEAD)
2584        )
2585    )
2586    (Command ThisObject=3
2587        "Returns the value of the 'this' reference for this frame. "
2588        "If the frame's method is static or native, the reply "
2589        "will contain the null object reference. "
2590        (Out
2591            (threadObject thread "The frame's thread. ")
2592            (frame frame "The frame ID. ")
2593        )
2594        (Reply
2595            (tagged-object objectThis "The 'this' object for this frame. ")
2596        )
2597        (ErrorSet
2598            (Error INVALID_THREAD)
2599            (Error INVALID_OBJECT)
2600            (Error INVALID_FRAMEID)
2601            (Error VM_DEAD)
2602        )
2603    )
2604    (Command PopFrames=4
2605        "Pop the top-most stack frames of the thread stack, up to, and including 'frame'. "
2606        "The thread must be suspended to perform this command. "
2607        "The top-most stack frames are discarded and the stack frame previous to 'frame' "
2608        "becomes the current frame. The operand stack is restored -- the argument values "
2609        "are added back and if the invoke was not <code>invokestatic</code>, "
2610        "<code>objectref</code> is added back as well. The Java virtual machine "
2611        "program counter is restored to the opcode of the invoke instruction."
2612        "<p>"
2613        "Since JDWP version 1.4. Requires canPopFrames capability - see "
2614        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
2615        (Out
2616            (threadObject thread "The thread object ID. ")
2617            (frame frame "The frame ID. ")
2618        )
2619        (Reply "none"
2620        )
2621        (ErrorSet
2622            (Error INVALID_THREAD)
2623            (Error INVALID_OBJECT    "thread is not a known ID.")
2624            (Error INVALID_FRAMEID)
2625            (Error THREAD_NOT_SUSPENDED)
2626            (Error NO_MORE_FRAMES)
2627            (Error INVALID_FRAMEID)
2628            (Error NOT_IMPLEMENTED)
2629            (Error VM_DEAD)
2630        )
2631    )
2632)
2633(CommandSet ClassObjectReference=17
2634    (Command ReflectedType = 1
2635        "Returns the reference type reflected by this class object."
2636        (Out
2637            (classObject classObject "The class object. ")
2638        )
2639        (Reply
2640            (byte refTypeTag  "<a href=\"#JDWP_TypeTag\">Kind</a> "
2641                              "of following reference type. ")
2642            (referenceTypeID typeID "reflected reference type")
2643        )
2644        (ErrorSet
2645            (Error INVALID_OBJECT)
2646            (Error VM_DEAD)
2647        )
2648    )
2649)
2650(CommandSet Event=64
2651    (Command Composite=100
2652        "Several events may occur at a given time in the target VM. "
2653        "For example, there may be more than one breakpoint request "
2654        "for a given location "
2655        "or you might single step to the same location as a "
2656        "breakpoint request.  These events are delivered "
2657        "together as a composite event.  For uniformity, a "
2658        "composite event is always used "
2659        "to deliver events, even if there is only one event to report. "
2660        "<P>"
2661        "The events that are grouped in a composite event are restricted in the "
2662        "following ways: "
2663        "<P>"
2664        "<UL>"
2665        "<LI>Only with other thread start events for the same thread:"
2666        "    <UL>"
2667        "    <LI>Thread Start Event"
2668        "    </UL>"
2669        "<LI>Only with other thread death events for the same thread:"
2670        "    <UL>"
2671        "    <LI>Thread Death Event"
2672        "    </UL>"
2673        "<LI>Only with other class prepare events for the same class:"
2674        "    <UL>"
2675        "    <LI>Class Prepare Event"
2676        "    </UL>"
2677        "<LI>Only with other class unload events for the same class:"
2678        "    <UL>"
2679        "    <LI>Class Unload Event"
2680        "    </UL>"
2681        "<LI>Only with other access watchpoint events for the same field access:"
2682        "    <UL>"
2683        "    <LI>Access Watchpoint Event"
2684        "    </UL>"
2685        "<LI>Only with other modification watchpoint events for the same field "
2686        "modification:"
2687        "    <UL>"
2688        "    <LI>Modification Watchpoint Event"
2689        "    </UL>"
2690        "<LI>Only with other Monitor contended enter events for the same monitor object: "
2691        "    <UL>"
2692        "    <LI>Monitor Contended Enter Event"
2693        "    </UL>"
2694        "<LI>Only with other Monitor contended entered events for the same monitor object: "
2695        "    <UL>"
2696        "    <LI>Monitor Contended Entered Event"
2697        "    </UL>"
2698        "<LI>Only with other Monitor wait events for the same monitor object: "
2699        "    <UL>"
2700        "    <LI>Monitor Wait Event"
2701        "    </UL>"
2702        "<LI>Only with other Monitor waited events for the same monitor object: "
2703        "    <UL>"
2704        "    <LI>Monitor Waited Event"
2705        "    </UL>"
2706        "<LI>Only with other ExceptionEvents for the same exception occurrance:"
2707        "    <UL>"
2708        "    <LI>ExceptionEvent"
2709        "    </UL>"
2710        "<LI>Only with other members of this group, at the same location "
2711        "and in the same thread: "
2712        "    <UL>"
2713        "    <LI>Breakpoint Event"
2714        "    <LI>Step Event"
2715        "    <LI>Method Entry Event"
2716        "    <LI>Method Exit Event"
2717        "    </UL>"
2718        "</UL>"
2719        "<P>"
2720        "The VM Start Event and VM Death Event are automatically generated events. "
2721        "This means they do not need to be requested using the "
2722        "<a href=\"#JDWP_EventRequest_Set\">EventRequest.Set</a> command. "
2723        "The VM Start event signals the completion of VM initialization. The VM Death "
2724        "event signals the termination of the VM."
2725        "If there is a debugger connected at the time when an automatically generated "
2726        "event occurs it is sent from the target VM. Automatically generated events may "
2727        "also be requested using the EventRequest.Set command and thus multiple events "
2728        "of the same event kind will be sent from the target VM when an event occurs."
2729        "Automatically generated events are sent with the requestID field "
2730        "in the Event Data set to 0. The value of the suspendPolicy field in the "
2731        "Event Data depends on the event. For the automatically generated VM Start "
2732        "Event the value of suspendPolicy is not defined and is therefore implementation "
2733        "or configuration specific. In the Sun implementation, for example, the "
2734        "suspendPolicy is specified as an option to the JDWP agent at launch-time."
2735        "The automatically generated VM Death Event will have the suspendPolicy set to "
2736        "NONE."
2737
2738       (Event "Generated event"
2739            (byte suspendPolicy
2740                "Which threads where suspended by this composite event?")
2741            (Repeat events "Events in set."
2742                (Select Events
2743                    (byte eventKind "Event kind selector")
2744                    (Alt VMStart=JDWP.EventKind.VM_START
2745                        "Notification of initialization of a target VM.  This event is "
2746                        "received before the main thread is started and before any "
2747                        "application code has been executed. Before this event occurs "
2748                        "a significant amount of system code has executed and a number "
2749                        "of system classes have been loaded. "
2750                        "This event is always generated by the target VM, even "
2751                        "if not explicitly requested."
2752
2753                     (int requestID
2754                             "Request that generated event (or 0 if this "
2755                             "event is automatically generated.")
2756                        (threadObject thread "Initial thread")
2757                    )
2758                    (Alt SingleStep=JDWP.EventKind.SINGLE_STEP
2759                        "Notification of step completion in the target VM. The step event "
2760                        "is generated before the code at its location is executed. "
2761
2762                        (int requestID "Request that generated event")
2763                        (threadObject thread "Stepped thread")
2764                        (location location "Location stepped to")
2765                    )
2766                    (Alt Breakpoint=JDWP.EventKind.BREAKPOINT
2767                        "Notification of a breakpoint in the target VM. The breakpoint event "
2768                        "is generated before the code at its location is executed. "
2769
2770                        (int requestID "Request that generated event")
2771                        (threadObject thread "Thread which hit breakpoint")
2772                        (location location "Location hit")
2773                    )
2774                    (Alt MethodEntry=JDWP.EventKind.METHOD_ENTRY
2775                         "Notification of a method invocation in the target VM. This event "
2776                         "is generated before any code in the invoked method has executed. "
2777                         "Method entry events are generated for both native and non-native "
2778                         "methods. "
2779                         "<P>"
2780                         "In some VMs method entry events can occur for a particular thread "
2781                         "before its thread start event occurs if methods are called "
2782                         "as part of the thread's initialization. "
2783
2784                        (int requestID "Request that generated event")
2785                        (threadObject thread "Thread which entered method")
2786                        (location location "The initial executable location in the method.")
2787                    )
2788                    (Alt MethodExit=JDWP.EventKind.METHOD_EXIT
2789                         "Notification of a method return in the target VM. This event "
2790                         "is generated after all code in the method has executed, but the "
2791                         "location of this event is the last executed location in the method. "
2792                         "Method exit events are generated for both native and non-native "
2793                         "methods. Method exit events are not generated if the method terminates "
2794                         "with a thrown exception. "
2795
2796                        (int requestID "Request that generated event")
2797                        (threadObject thread "Thread which exited method")
2798                        (location location "Location of exit")
2799                    )
2800                    (Alt MethodExitWithReturnValue=JDWP.EventKind.METHOD_EXIT_WITH_RETURN_VALUE
2801                         "Notification of a method return in the target VM. This event "
2802                         "is generated after all code in the method has executed, but the "
2803                         "location of this event is the last executed location in the method. "
2804                         "Method exit events are generated for both native and non-native "
2805                         "methods. Method exit events are not generated if the method terminates "
2806                         "with a thrown exception. <p>Since JDWP version 1.6. "
2807
2808                        (int requestID "Request that generated event")
2809                        (threadObject thread "Thread which exited method")
2810                        (location location "Location of exit")
2811                        (value value "Value that will be returned by the method")
2812                    )
2813                    (Alt MonitorContendedEnter=JDWP.EventKind.MONITOR_CONTENDED_ENTER
2814                         "Notification that a thread in the target VM is attempting "
2815                         "to enter a monitor that is already acquired by another thread. "
2816                         "Requires canRequestMonitorEvents capability - see "
2817                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
2818                         "<p>Since JDWP version 1.6. "
2819
2820                        (int requestID
2821                                "Request that generated event")
2822                        (threadObject thread "Thread which is trying to enter the monitor")
2823                        (tagged-object object "Monitor object reference")
2824                        (location location "Location of contended monitor enter")
2825                    )
2826                    (Alt MonitorContendedEntered=JDWP.EventKind.MONITOR_CONTENDED_ENTERED
2827                         "Notification of a thread in the target VM is entering a monitor "
2828                         "after waiting for it to be released by another thread. "
2829                         "Requires canRequestMonitorEvents capability - see "
2830                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
2831                         "<p>Since JDWP version 1.6. "
2832
2833                        (int requestID
2834                                "Request that generated event")
2835                        (threadObject thread "Thread which entered monitor")
2836                        (tagged-object object "Monitor object reference")
2837                        (location location "Location of contended monitor enter")
2838                    )
2839                    (Alt MonitorWait=JDWP.EventKind.MONITOR_WAIT
2840                         "Notification of a thread about to wait on a monitor object. "
2841                         "Requires canRequestMonitorEvents capability - see "
2842                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
2843                         "<p>Since JDWP version 1.6. "
2844
2845                        (int requestID
2846                                "Request that generated event")
2847                        (threadObject thread "Thread which is about to wait")
2848                        (tagged-object object "Monitor object reference")
2849                        (location location "Location at which the wait will occur")
2850                        (long     timeout  "Thread wait time in milliseconds")
2851                    )
2852                    (Alt MonitorWaited=JDWP.EventKind.MONITOR_WAITED
2853                         "Notification that a thread in the target VM has finished waiting on "
2854                         "Requires canRequestMonitorEvents capability - see "
2855                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
2856                         "a monitor object. "
2857                         "<p>Since JDWP version 1.6. "
2858
2859                        (int requestID
2860                                "Request that generated event")
2861                        (threadObject thread "Thread which waited")
2862                        (tagged-object object "Monitor object reference")
2863                        (location location "Location at which the wait occured")
2864                        (boolean  timed_out "True if timed out")
2865                    )
2866                    (Alt Exception=JDWP.EventKind.EXCEPTION
2867                         "Notification of an exception in the target VM. "
2868                         "If the exception is thrown from a non-native method, "
2869                         "the exception event is generated at the location where the "
2870                         "exception is thrown. "
2871                         "If the exception is thrown from a native method, the exception event "
2872                         "is generated at the first non-native location reached after the exception "
2873                         "is thrown. "
2874
2875                        (int requestID "Request that generated event")
2876                        (threadObject thread "Thread with exception")
2877                        (location location "Location of exception throw "
2878                        "(or first non-native location after throw if thrown from a native method)")
2879                        (tagged-object exception "Thrown exception")
2880                        (location catchLocation
2881                            "Location of catch, or 0 if not caught. An exception "
2882                            "is considered to be caught if, at the point of the throw, the "
2883                            "current location is dynamically enclosed in a try statement that "
2884                            "handles the exception. (See the JVM specification for details). "
2885                            "If there is such a try statement, the catch location is the "
2886                            "first location in the appropriate catch clause. "
2887                            "<p>"
2888                            "If there are native methods in the call stack at the time of the "
2889                            "exception, there are important restrictions to note about the "
2890                            "returned catch location. In such cases, "
2891                            "it is not possible to predict whether an exception will be handled "
2892                            "by some native method on the call stack. "
2893                            "Thus, it is possible that exceptions considered uncaught "
2894                            "here will, in fact, be handled by a native method and not cause "
2895                            "termination of the target VM. Furthermore, it cannot be assumed that the "
2896                            "catch location returned here will ever be reached by the throwing "
2897                            "thread. If there is "
2898                            "a native frame between the current location and the catch location, "
2899                            "the exception might be handled and cleared in that native method "
2900                            "instead. "
2901                            "<p>"
2902                            "Note that compilers can generate try-catch blocks in some cases "
2903                            "where they are not explicit in the source code; for example, "
2904                            "the code generated for <code>synchronized</code> and "
2905                            "<code>finally</code> blocks can contain implicit try-catch blocks. "
2906                            "If such an implicitly generated try-catch is "
2907                            "present on the call stack at the time of the throw, the exception "
2908                            "will be considered caught even though it appears to be uncaught from "
2909                            "examination of the source code. "
2910                        )
2911                    )
2912                    (Alt ThreadStart=JDWP.EventKind.THREAD_START
2913                        "Notification of a new running thread in the target VM. "
2914                        "The new thread can be the result of a call to "
2915                        "<code>java.lang.Thread.start</code> or the result of "
2916                        "attaching a new thread to the VM though JNI. The "
2917                        "notification is generated by the new thread some time before "
2918                        "its execution starts. "
2919                        "Because of this timing, it is possible to receive other events "
2920                        "for the thread before this event is received. (Notably, "
2921                        "Method Entry Events and Method Exit Events might occur "
2922                        "during thread initialization. "
2923                        "It is also possible for the "
2924                        "<a href=\"#JDWP_VirtualMachine_AllThreads\">VirtualMachine AllThreads</a> "
2925                        "command to return "
2926                        "a thread before its thread start event is received. "
2927                        "<p>"
2928                        "Note that this event gives no information "
2929                        "about the creation of the thread object which may have happened "
2930                        "much earlier, depending on the VM being debugged. "
2931
2932                        (int requestID "Request that generated event")
2933                        (threadObject thread "Started thread")
2934                    )
2935                    (Alt ThreadDeath=JDWP.EventKind.THREAD_DEATH
2936                        "Notification of a completed thread in the target VM. The "
2937                        "notification is generated by the dying thread before it terminates. "
2938                        "Because of this timing, it is possible "
2939                        "for {@link VirtualMachine#allThreads} to return this thread "
2940                        "after this event is received. "
2941                        "<p>"
2942                        "Note that this event gives no information "
2943                        "about the lifetime of the thread object. It may or may not be collected "
2944                        "soon depending on what references exist in the target VM. "
2945
2946                        (int requestID "Request that generated event")
2947                        (threadObject thread "Ending thread")
2948                    )
2949                    (Alt ClassPrepare=JDWP.EventKind.CLASS_PREPARE
2950                        "Notification of a class prepare in the target VM. See the JVM "
2951                        "specification for a definition of class preparation. Class prepare "
2952                        "events are not generated for primtiive classes (for example, "
2953                        "java.lang.Integer.TYPE). "
2954
2955                        (int requestID "Request that generated event")
2956                        (threadObject thread "Preparing thread. "
2957                             "In rare cases, this event may occur in a debugger system "
2958                             "thread within the target VM. Debugger threads take precautions "
2959                             "to prevent these events, but they cannot be avoided under some "
2960                             "conditions, especially for some subclasses of "
2961                             "java.lang.Error. "
2962                             "If the event was generated by a debugger system thread, the "
2963                             "value returned by this method is null, and if the requested  "
2964                             "<a href=\"#JDWP_SuspendPolicy\">suspend policy</a> "
2965                             "for the event was EVENT_THREAD "
2966                             "all threads will be suspended instead, and the "
2967                             "composite event's suspend policy will reflect this change. "
2968                             "<p>"
2969                             "Note that the discussion above does not apply to system threads "
2970                             "created by the target VM during its normal (non-debug) operation. "
2971                        )
2972                        (byte refTypeTag  "Kind of reference type. "
2973                           "See <a href=\"#JDWP_TypeTag\">JDWP.TypeTag</a>")
2974                        (referenceTypeID typeID "Type being prepared")
2975                        (string signature "Type signature")
2976                        (int status "Status of type. "
2977                         "See <a href=\"#JDWP_ClassStatus\">JDWP.ClassStatus</a>")
2978                    )
2979                    (Alt ClassUnload=JDWP.EventKind.CLASS_UNLOAD
2980                         "Notification of a class unload in the target VM. "
2981                         "<p>"
2982                         "There are severe constraints on the debugger back-end during "
2983                         "garbage collection, so unload information is greatly limited. "
2984
2985                        (int requestID "Request that generated event")
2986                        (string signature "Type signature")
2987                    )
2988                    (Alt FieldAccess=JDWP.EventKind.FIELD_ACCESS
2989                        "Notification of a field access in the target VM. "
2990                        "Field modifications "
2991                        "are not considered field accesses. "
2992                        "Requires canWatchFieldAccess capability - see "
2993                        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
2994
2995                      (int requestID "Request that generated event")
2996                        (threadObject thread "Accessing thread")
2997                        (location location "Location of access")
2998                        (byte refTypeTag  "Kind of reference type. "
2999                           "See <a href=\"#JDWP_TypeTag\">JDWP.TypeTag</a>")
3000                        (referenceTypeID typeID "Type of field")
3001                        (field fieldID "Field being accessed")
3002                        (tagged-object object
3003                                "Object being accessed (null=0 for statics")
3004                    )
3005                    (Alt FieldModification=JDWP.EventKind.FIELD_MODIFICATION
3006                        "Notification of a field modification in the target VM. "
3007                        "Requires canWatchFieldModification capability - see "
3008                        "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
3009
3010                        (int requestID "Request that generated event")
3011                        (threadObject thread "Modifying thread")
3012                        (location location "Location of modify")
3013                        (byte refTypeTag  "Kind of reference type. "
3014                           "See <a href=\"#JDWP_TypeTag\">JDWP.TypeTag</a>")
3015                        (referenceTypeID typeID "Type of field")
3016                        (field fieldID "Field being modified")
3017                        (tagged-object object
3018                                "Object being modified (null=0 for statics")
3019                        (value valueToBe "Value to be assigned")
3020                    )
3021                    (Alt VMDeath=JDWP.EventKind.VM_DEATH
3022                        (int requestID
3023                                "Request that generated event")
3024                    )
3025                )
3026            )
3027        )
3028    )
3029)
3030(CommandSet DDM=-57
3031    "The extension commands for ddms. Note that this is equivalent to the uint8_t value '199'."
3032    (Command Chunk = 1
3033        "Returns the output of processing a DDMS chunk with any registered handlers. Note: When an error occurs or no data is returned no error code will be set and the reply will be empty.  This is for backwards compatibility."
3034        (Out
3035            (int ddms_type "The ddms type of the data that follows")
3036            (Repeat ddms_data_length
3037                (byte ddms_data "DDMS data to be processed by the handler registered for the given input_type.")
3038            )
3039        )
3040        (Reply
3041            (int ddms_type "The ddms type of the data that follows")
3042            (Repeat ddms_data_length
3043                (byte ddms_data "DDMS data returned from the handler")
3044            )
3045        )
3046        (ErrorSet
3047            (Error NOT_IMPLEMENTED "DDMS is not supported or set up.")
3048            (Error VM_DEAD)
3049        )
3050    )
3051)
3052(ConstantSet Error
3053    (Constant NONE                   =0   "No error has occurred.")
3054    (Constant INVALID_THREAD         =10  "Passed thread is null, is not a valid thread or has exited.")
3055    (Constant INVALID_THREAD_GROUP   =11  "Thread group invalid.")
3056    (Constant INVALID_PRIORITY       =12  "Invalid priority.")
3057    (Constant THREAD_NOT_SUSPENDED   =13  "If the specified thread has not been "
3058                                          "suspended by an event.")
3059    (Constant THREAD_SUSPENDED       =14  "Thread already suspended.")
3060    (Constant THREAD_NOT_ALIVE       =15  "Thread has not been started or is now dead.")
3061
3062    (Constant INVALID_OBJECT         =20  "If this reference type has been unloaded "
3063                                          "and garbage collected.")
3064    (Constant INVALID_CLASS          =21  "Invalid class.")
3065    (Constant CLASS_NOT_PREPARED     =22  "Class has been loaded but not yet prepared.")
3066    (Constant INVALID_METHODID       =23  "Invalid method.")
3067    (Constant INVALID_LOCATION       =24  "Invalid location.")
3068    (Constant INVALID_FIELDID        =25  "Invalid field.")
3069    (Constant INVALID_FRAMEID        =30  "Invalid jframeID.")
3070    (Constant NO_MORE_FRAMES         =31  "There are no more Java or JNI frames on the "
3071                                          "call stack.")
3072    (Constant OPAQUE_FRAME           =32  "Information about the frame is not available.")
3073    (Constant NOT_CURRENT_FRAME      =33  "Operation can only be performed on current frame.")
3074    (Constant TYPE_MISMATCH          =34  "The variable is not an appropriate type for "
3075                                          "the function used.")
3076    (Constant INVALID_SLOT           =35  "Invalid slot.")
3077    (Constant DUPLICATE              =40  "Item already set.")
3078    (Constant NOT_FOUND              =41  "Desired element not found.")
3079    (Constant INVALID_MONITOR        =50  "Invalid monitor.")
3080    (Constant NOT_MONITOR_OWNER      =51  "This thread doesn't own the monitor.")
3081    (Constant INTERRUPT              =52  "The call has been interrupted before completion.")
3082    (Constant INVALID_CLASS_FORMAT   =60  "The virtual machine attempted to read a class "
3083                                          "file and determined that the file is malformed "
3084                                          "or otherwise cannot be interpreted as a class file.")
3085    (Constant CIRCULAR_CLASS_DEFINITION
3086                                     =61  "A circularity has been detected while "
3087                                          "initializing a class.")
3088    (Constant FAILS_VERIFICATION     =62  "The verifier detected that a class file, "
3089                                          "though well formed, contained some sort of "
3090                                          "internal inconsistency or security problem.")
3091    (Constant ADD_METHOD_NOT_IMPLEMENTED
3092                                     =63  "Adding methods has not been implemented.")
3093    (Constant SCHEMA_CHANGE_NOT_IMPLEMENTED
3094                                     =64  "Schema change has not been implemented.")
3095    (Constant INVALID_TYPESTATE      =65  "The state of the thread has been modified, "
3096                                          "and is now inconsistent.")
3097    (Constant HIERARCHY_CHANGE_NOT_IMPLEMENTED
3098                                     =66  "A direct superclass is different for the new class "
3099                                          "version, or the set of directly implemented "
3100                                          "interfaces is different "
3101                                          "and canUnrestrictedlyRedefineClasses is false.")
3102    (Constant DELETE_METHOD_NOT_IMPLEMENTED
3103                                     =67  "The new class version does not declare a method "
3104                                          "declared in the old class version "
3105                                          "and canUnrestrictedlyRedefineClasses is false.")
3106    (Constant UNSUPPORTED_VERSION    =68  "A class file has a version number not supported "
3107                                          "by this VM.")
3108    (Constant NAMES_DONT_MATCH       =69  "The class name defined in the new class file is "
3109                                          "different from the name in the old class object.")
3110    (Constant CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED
3111                                     =70  "The new class version has different modifiers and "
3112                                          "and canUnrestrictedlyRedefineClasses is false.")
3113    (Constant METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED
3114                                     =71  "A method in the new class version has "
3115                                          "different modifiers "
3116                                          "than its counterpart in the old class version and "
3117                                          "and canUnrestrictedlyRedefineClasses is false.")
3118    (Constant NOT_IMPLEMENTED        =99  "The functionality is not implemented in "
3119                                          "this virtual machine.")
3120    (Constant NULL_POINTER           =100 "Invalid pointer.")
3121    (Constant ABSENT_INFORMATION     =101 "Desired information is not available.")
3122    (Constant INVALID_EVENT_TYPE     =102 "The specified event type id is not recognized.")
3123    (Constant ILLEGAL_ARGUMENT       =103 "Illegal argument.")
3124    (Constant OUT_OF_MEMORY          =110 "The function needed to allocate memory and "
3125                                          "no more memory was available for allocation.")
3126    (Constant ACCESS_DENIED          =111 "Debugging has not been enabled in this "
3127                                          "virtual machine. JVMTI cannot be used.")
3128    (Constant VM_DEAD                =112 "The virtual machine is not running.")
3129    (Constant INTERNAL               =113 "An unexpected internal error has occurred.")
3130    (Constant UNATTACHED_THREAD      =115 "The thread being used to call this function "
3131                                          "is not attached to the virtual machine. "
3132                                          "Calls must be made from attached threads.")
3133    (Constant INVALID_TAG            =500 "object type id or class tag.")
3134    (Constant ALREADY_INVOKING       =502 "Previous invoke not complete.")
3135    (Constant INVALID_INDEX          =503 "Index is invalid.")
3136    (Constant INVALID_LENGTH         =504 "The length is invalid.")
3137    (Constant INVALID_STRING         =506 "The string is invalid.")
3138    (Constant INVALID_CLASS_LOADER   =507 "The class loader is invalid.")
3139    (Constant INVALID_ARRAY          =508 "The array is invalid.")
3140    (Constant TRANSPORT_LOAD         =509 "Unable to load the transport.")
3141    (Constant TRANSPORT_INIT         =510 "Unable to initialize the transport.")
3142    (Constant NATIVE_METHOD          =511  )
3143    (Constant INVALID_COUNT          =512 "The count is invalid.")
3144)
3145(ConstantSet EventKind
3146    (Constant SINGLE_STEP            =1   )
3147    (Constant BREAKPOINT             =2   )
3148    (Constant FRAME_POP              =3   )
3149    (Constant EXCEPTION              =4   )
3150    (Constant USER_DEFINED           =5   )
3151    (Constant THREAD_START           =6   )
3152    (Constant THREAD_DEATH           =7   )
3153    (Constant THREAD_END             =7   "obsolete - was used in jvmdi")
3154    (Constant CLASS_PREPARE          =8   )
3155    (Constant CLASS_UNLOAD           =9   )
3156    (Constant CLASS_LOAD             =10  )
3157    (Constant FIELD_ACCESS           =20  )
3158    (Constant FIELD_MODIFICATION     =21  )
3159    (Constant EXCEPTION_CATCH        =30  )
3160    (Constant METHOD_ENTRY           =40  )
3161    (Constant METHOD_EXIT            =41  )
3162    (Constant METHOD_EXIT_WITH_RETURN_VALUE =42  )
3163    (Constant MONITOR_CONTENDED_ENTER          =43  )
3164    (Constant MONITOR_CONTENDED_ENTERED        =44 )
3165    (Constant MONITOR_WAIT           =45 )
3166    (Constant MONITOR_WAITED         =46 )
3167    (Constant VM_START               =90  )
3168    (Constant VM_INIT                =90  "obsolete - was used in jvmdi")
3169    (Constant VM_DEATH               =99  )
3170    (Constant VM_DISCONNECTED        =100 "Never sent across JDWP")
3171)
3172
3173(ConstantSet ThreadStatus
3174    (Constant ZOMBIE                 =0  )
3175    (Constant RUNNING                =1  )
3176    (Constant SLEEPING               =2  )
3177    (Constant MONITOR                =3  )
3178    (Constant WAIT                   =4  )
3179)
3180
3181(ConstantSet SuspendStatus
3182    (Constant SUSPEND_STATUS_SUSPENDED = 0x1 )
3183)
3184(ConstantSet ClassStatus
3185    (Constant VERIFIED               =1  )
3186    (Constant PREPARED               =2  )
3187    (Constant INITIALIZED            =4  )
3188    (Constant ERROR                  =8  )
3189)
3190(ConstantSet TypeTag
3191    (Constant CLASS=1 "ReferenceType is a class. ")
3192    (Constant INTERFACE=2 "ReferenceType is an interface. ")
3193    (Constant ARRAY=3 "ReferenceType is an array. ")
3194)
3195(ConstantSet Tag
3196    (Constant ARRAY = '[' "'[' - an array object (objectID size). ")
3197    (Constant BYTE = 'B' "'B' - a byte value (1 byte).")
3198    (Constant CHAR = 'C' "'C' - a character value (2 bytes).")
3199    (Constant OBJECT = 'L' "'L' - an object (objectID size).")
3200    (Constant FLOAT = 'F' "'F' - a float value (4 bytes).")
3201    (Constant DOUBLE = 'D' "'D' - a double value (8 bytes).")
3202    (Constant INT = 'I' "'I' - an int value (4 bytes).")
3203    (Constant LONG = 'J' "'J' - a long value (8 bytes).")
3204    (Constant SHORT = 'S' "'S' - a short value (2 bytes).")
3205    (Constant VOID = 'V' "'V' - a void value (no bytes).")
3206    (Constant BOOLEAN = 'Z' "'Z' - a boolean value (1 byte).")
3207    (Constant STRING = 's' "'s' - a String object (objectID size). ")
3208    (Constant THREAD = 't' "'t' - a Thread object (objectID size). ")
3209    (Constant THREAD_GROUP = 'g'
3210        "'g' - a ThreadGroup object (objectID size). ")
3211    (Constant CLASS_LOADER = 'l'
3212        "'l' - a ClassLoader object (objectID size). ")
3213    (Constant CLASS_OBJECT = 'c'
3214        "'c' - a class object object (objectID size). ")
3215)
3216
3217(ConstantSet StepDepth
3218    (Constant INTO = 0
3219        "Step into any method calls that occur before the end of the step. ")
3220    (Constant OVER = 1
3221        "Step over any method calls that occur before the end of the step. ")
3222    (Constant OUT = 2
3223        "Step out of the current method. ")
3224)
3225
3226(ConstantSet StepSize
3227    (Constant MIN = 0
3228        "Step by the minimum possible amount (often a bytecode instruction). ")
3229    (Constant LINE = 1
3230        "Step to the next source line unless there is no line number information in which case a MIN step is done instead.")
3231)
3232
3233(ConstantSet SuspendPolicy
3234    (Constant NONE = 0
3235        "Suspend no threads when this event is encountered. ")
3236    (Constant EVENT_THREAD = 1
3237        "Suspend the event thread when this event is encountered. ")
3238    (Constant ALL = 2
3239        "Suspend all threads when this event is encountered. ")
3240)
3241
3242(ConstantSet InvokeOptions
3243    "The invoke options are a combination of zero or more of the following bit flags:"
3244    (Constant INVOKE_SINGLE_THREADED = 0x01
3245        "otherwise, all threads started. ")
3246    (Constant INVOKE_NONVIRTUAL = 0x02
3247        "otherwise, normal virtual invoke (instance methods only)")
3248)
3249