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