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