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