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