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