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 \"<init>\"), " 697 "the initialization method (identified with the name \"<clinit>\") " 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 \"<init>\"), " 944 "the initialization method (identified with the name \"<clinit>\") " 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 <= lineCodeIndex < 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> <= current frame code index < <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> <= current frame code index < <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> <= current frame code index < <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> <= current frame code index < <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 "<b>IsVirtual is a preview API of the Java platform.</b> " 2160 "<em>Preview features may be removed in a future release, or upgraded to " 2161 "permanent features of the Java platform.</em> Since JDWP version 19." 2162 "<p>" 2163 "Determine if a thread is a " 2164 "<a href=../../api/java.base/java/lang/Thread.html#virtual-threads>virtual thread</a>." 2165 (Out 2166 (threadObject thread "The thread object ID.") 2167 ) 2168 (Reply 2169 (boolean isVirtual "true if the thread is a virtual thread.") 2170 ) 2171 (ErrorSet 2172 (Error INVALID_THREAD) 2173 (Error INVALID_OBJECT "thread is not a known ID.") 2174 (Error VM_DEAD) 2175 ) 2176 ) 2177 ) 2178 (CommandSet ThreadGroupReference=12 2179 "See <a href=../../api/java.base/java/lang/ThreadGroup.html>java.lang.ThreadGroup</a>." 2180 (Command Name=1 2181 "Returns the thread group name. " 2182 (Out 2183 (threadGroupObject group "The thread group object ID. ") 2184 ) 2185 (Reply 2186 (string groupName "The thread group's name.") 2187 ) 2188 (ErrorSet 2189 (Error INVALID_THREAD_GROUP) 2190 (Error INVALID_OBJECT "group is not a known ID.") 2191 (Error VM_DEAD) 2192 ) 2193 ) 2194 (Command Parent=2 2195 "Returns the thread group, if any, which contains a given thread group. " 2196 (Out 2197 (threadGroupObject group "The thread group object ID. ") 2198 ) 2199 (Reply 2200 (threadGroupObject parentGroup "The parent thread group object, or " 2201 "null if the given thread group " 2202 "is a top-level thread group") 2203 ) 2204 (ErrorSet 2205 (Error INVALID_THREAD_GROUP) 2206 (Error INVALID_OBJECT "group is not a known ID.") 2207 (Error VM_DEAD) 2208 ) 2209 ) 2210 (Command Children=3 2211 "Returns the live platform threads and the thread groups directly " 2212 "contained in this thread group. Virtual threads are not included. " 2213 "Threads and thread groups in child thread groups are not included. " 2214 "A thread is alive if it has been started and has not yet terminated." 2215 (Out 2216 (threadGroupObject group "The thread group object ID. ") 2217 ) 2218 (Reply 2219 (Repeat childThreads "The number of live child threads. " 2220 (threadObject childThread "A direct child thread ID. ") 2221 ) 2222 (Repeat childGroups "The number of active child thread groups. " 2223 (threadGroupObject childGroup "A direct child thread group ID. ") 2224 ) 2225 ) 2226 (ErrorSet 2227 (Error INVALID_THREAD_GROUP) 2228 (Error INVALID_OBJECT "group is not a known ID.") 2229 (Error VM_DEAD) 2230 ) 2231 ) 2232 ) 2233 (CommandSet ArrayReference=13 2234 (Command Length=1 2235 "Returns the number of components in a given array. " 2236 (Out 2237 (arrayObject arrayObject "The array object ID. ") 2238 ) 2239 (Reply 2240 (int arrayLength "The length of the array.") 2241 ) 2242 (ErrorSet 2243 (Error INVALID_OBJECT "arrayObject is not a known ID.") 2244 (Error INVALID_ARRAY) 2245 (Error VM_DEAD) 2246 ) 2247 ) 2248 (Command GetValues=2 2249 "Returns a range of array components. The specified range must " 2250 "be within the bounds of the array. " 2251 (Out 2252 (arrayObject arrayObject "The array object ID. ") 2253 (int firstIndex "The first index to retrieve.") 2254 (int length "The number of components to retrieve.") 2255 ) 2256 (Reply 2257 (typed-sequence values "The retrieved values. If the values " 2258 "are objects, they are tagged-values; " 2259 "otherwise, they are untagged-values") 2260 ) 2261 (ErrorSet 2262 (Error INVALID_LENGTH "If index is beyond the end of this array.") 2263 (Error INVALID_OBJECT "arrayObject is not a known ID.") 2264 (Error INVALID_ARRAY) 2265 (Error VM_DEAD) 2266 ) 2267 ) 2268 (Command SetValues=3 2269 "Sets a range of array components. The specified range must " 2270 "be within the bounds of the array. " 2271 "For primitive values, each value's type must match the " 2272 "array component type exactly. For object values, there must be a " 2273 "widening reference conversion from the value's type to the 2274 "array component type and the array component type must be loaded. " 2275 (Out 2276 (arrayObject arrayObject "The array object ID. ") 2277 (int firstIndex "The first index to set.") 2278 (Repeat values "The number of values to set. " 2279 (untagged-value value "A value to set. ") 2280 ) 2281 ) 2282 (Reply "none" 2283 ) 2284 (ErrorSet 2285 (Error INVALID_LENGTH "If index is beyond the end of this array.") 2286 (Error INVALID_OBJECT "arrayObject is not a known ID.") 2287 (Error INVALID_ARRAY) 2288 (Error VM_DEAD) 2289 ) 2290 ) 2291 ) 2292 (CommandSet ClassLoaderReference=14 2293 (Command VisibleClasses=1 2294 "Returns a list of all classes which this class loader can find " 2295 "by name via <code>ClassLoader::loadClass</code>, " 2296 "<code>Class::forName</code> and bytecode linkage. That is, " 2297 "all classes for which this class loader has been recorded as an " 2298 "<i>initiating</i> loader. The list contains each " 2299 "reference type created by this loader and any types for which " 2300 "loading was delegated by this class loader to another class loader. " 2301 "<p>" 2302 "The visible class list has useful properties with respect to " 2303 "the type namespace. A particular type name will occur at most " 2304 "once in the list. Each field or variable declared with that " 2305 "type name in a class defined by " 2306 "this class loader must be resolved to that single type. " 2307 "<p>" 2308 "No ordering of the returned list is guaranteed. " 2309 "<p>" 2310 "See <a href=\"../jvmti.html#GetClassLoaderClasses\">JVM TI GetClassLoaderClasses</a>. " 2311 (Out 2312 (classLoaderObject classLoaderObject "The class loader object ID. ") 2313 ) 2314 (Reply 2315 (Repeat classes "The number of visible classes. " 2316 (Group ClassInfo 2317 (byte refTypeTag "<a href=\"#JDWP_TypeTag\">Kind</a> " 2318 "of following reference type. ") 2319 (referenceTypeID typeID 2320 "A class visible to this class loader.") 2321 ) 2322 ) 2323 ) 2324 (ErrorSet 2325 (Error INVALID_OBJECT) 2326 (Error INVALID_CLASS_LOADER) 2327 (Error VM_DEAD) 2328 ) 2329 ) 2330 ) 2331 (CommandSet EventRequest=15 2332 (Command Set=1 2333 "Set an event request. When the event described by this request " 2334 "occurs, an <a href=\"#JDWP_Event\">event</a> is sent from the " 2335 "target VM. If an event occurs that has not been requested then it is not sent " 2336 "from the target VM. The two exceptions to this are the VM Start Event and " 2337 "the VM Death Event which are automatically generated events - see " 2338 "<a href=\"#JDWP_Event_Composite\">Composite Command</a> for further details." 2339 (Out 2340 (byte eventKind "Event kind to request. " 2341 "See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> " 2342 "for a complete list of events that can be requested; " 2343 "some events may require a capability in order to be requested. " 2344 ) 2345 (byte suspendPolicy 2346 "What threads are suspended when this event occurs? " 2347 "Note that the order of events and command replies " 2348 "accurately reflects the order in which threads are " 2349 "suspended and resumed. For example, if a " 2350 "<a href=\"#JDWP_VirtualMachine_Resume\">VM-wide resume</a> " 2351 "is processed before an event occurs which suspends the " 2352 "VM, the reply to the resume command will be written to " 2353 "the transport before the suspending event.") 2354 (Repeat modifiers "Constraints used to control the number " 2355 "of generated events." 2356 "Modifiers specify additional tests that " 2357 "an event must satisfy before it is placed " 2358 "in the event queue. Events are filtered by " 2359 "applying each modifier to an event in the " 2360 "order they are specified in this collection " 2361 "Only events that satisfy all modifiers " 2362 "are reported. A value of 0 means there are no " 2363 "modifiers in the request." 2364 "<p>" 2365 "Filtering can improve " 2366 "debugger performance dramatically by 2367 "reducing the " 2368 "amount of event traffic sent from the " 2369 "target VM to the debugger VM. " 2370 (Select Modifier 2371 (byte modKind "Modifier kind") 2372 (Alt Count=1 2373 "Limit the requested event to be reported at most once after a " 2374 "given number of occurrences. The event is not reported " 2375 "the first <code>count - 1</code> times this filter is reached. " 2376 "To request a one-off event, call this method with a count of 1. " 2377 "<p>" 2378 "Once the count reaches 0, any subsequent filters in this request " 2379 "are applied. If none of those filters cause the event to be " 2380 "suppressed, the event is reported. Otherwise, the event is not " 2381 "reported. In either case subsequent events are never reported for " 2382 "this request. " 2383 "This modifier can be used with any event kind." 2384 2385 (int count "Count before event. One for one-off.") 2386 ) 2387 (Alt Conditional=2 "Conditional on expression" 2388 (int exprID "For the future") 2389 ) 2390 (Alt ThreadOnly=3 2391 "Restricts reported events to " 2392 "those in the given thread. " 2393 "This modifier can be used with any event kind " 2394 "except for class unload. " 2395 2396 (threadObject thread "Required thread") 2397 ) 2398 (Alt ClassOnly=4 2399 "For class prepare events, restricts the events " 2400 "generated by this request to be the " 2401 "preparation of the given reference type and any subtypes. " 2402 "For monitor wait and waited events, restricts the events " 2403 "generated by this request to those whose monitor object " 2404 "is of the given reference type or any of its subtypes. " 2405 "For other events, restricts the events generated " 2406 "by this request to those " 2407 "whose location is in the given reference type or any of its subtypes. " 2408 "An event will be generated for any location in a reference type that can " 2409 "be safely cast to the given reference type. " 2410 "This modifier can be used with any event kind except " 2411 "class unload, thread start, and thread end. " 2412 2413 (referenceType clazz "Required class") 2414 ) 2415 (Alt ClassMatch=5 2416 "Restricts reported events to those for classes whose name " 2417 "matches the given restricted regular expression. " 2418 "For class prepare events, the prepared class name " 2419 "is matched. For class unload events, the " 2420 "unloaded class name is matched. For monitor wait " 2421 "and waited events, the name of the class of the " 2422 "monitor object is matched. For other events, " 2423 "the class name of the event's location is matched. " 2424 "This modifier can be used with any event kind except " 2425 "thread start and thread end. " 2426 2427 (string classPattern "Required class pattern. " 2428 "Matches are limited to exact matches of the " 2429 "given class pattern and matches of patterns that " 2430 "begin or end with '*'; for example, " 2431 "\"*.Foo\" or \"java.*\". " 2432 ) 2433 2434 ) 2435 (Alt ClassExclude=6 2436 "Restricts reported events to those for classes whose name " 2437 "does not match the given restricted regular expression. " 2438 "For class prepare events, the prepared class name " 2439 "is matched. For class unload events, the " 2440 "unloaded class name is matched. For monitor wait and " 2441 "waited events, the name of the class of the monitor " 2442 "object is matched. For other events, " 2443 "the class name of the event's location is matched. " 2444 "This modifier can be used with any event kind except " 2445 "thread start and thread end. " 2446 2447 (string classPattern "Disallowed class pattern. " 2448 "Matches are limited to exact matches of the " 2449 "given class pattern and matches of patterns that " 2450 "begin or end with '*'; for example, " 2451 "\"*.Foo\" or \"java.*\". " 2452 ) 2453 ) 2454 (Alt LocationOnly=7 2455 "Restricts reported events to those that occur at " 2456 "the given location. " 2457 "This modifier can be used with " 2458 "breakpoint, field access, field modification, " 2459 "step, and exception event kinds. " 2460 2461 (location loc "Required location") 2462 ) 2463 (Alt ExceptionOnly=8 2464 "Restricts reported exceptions by their class and " 2465 "whether they are caught or uncaught. " 2466 "This modifier can be used with " 2467 "exception event kinds only. " 2468 2469 (referenceType exceptionOrNull 2470 "Exception to report. Null (0) means report " 2471 "exceptions of all types. " 2472 "A non-null type restricts the reported exception " 2473 "events to exceptions of the given type or " 2474 "any of its subtypes. " 2475 ) 2476 (boolean caught "Report caught exceptions") 2477 (boolean uncaught "Report uncaught exceptions. " 2478 "Note that it " 2479 "is not always possible to determine whether an " 2480 "exception is caught or uncaught at the time it is " 2481 "thrown. See the exception event catch location under " 2482 "<a href=\"#JDWP_Event_Composite\">composite events</a> " 2483 "for more information. " 2484 ) 2485 2486 ) 2487 (Alt FieldOnly=9 2488 "Restricts reported events to those that occur for " 2489 "a given field. " 2490 "This modifier can be used with " 2491 "field access and field modification event kinds only. " 2492 2493 (referenceType declaring "Type in which field is declared.") 2494 (field fieldID "Required field") 2495 ) 2496 (Alt Step=10 2497 "Restricts reported step events " 2498 "to those which satisfy " 2499 "depth and size constraints. " 2500 "This modifier can be used with " 2501 "step event kinds only. " 2502 2503 (threadObject thread "Thread in which to step") 2504 (int size "size of each step. " 2505 "See <a href=\"#JDWP_StepSize\">JDWP.StepSize</a>") 2506 (int depth "relative call stack limit. " 2507 "See <a href=\"#JDWP_StepDepth\">JDWP.StepDepth</a>") 2508 ) 2509 (Alt InstanceOnly=11 2510 "Restricts reported events to those whose " 2511 "active 'this' object is the given object. " 2512 "Match value is the null object for static methods. " 2513 "This modifier can be used with any event kind " 2514 "except class prepare, class unload, thread start, " 2515 "and thread end. Introduced in JDWP version 1.4." 2516 2517 (object instance "Required 'this' object") 2518 ) 2519 (Alt SourceNameMatch=12 2520 "Restricts reported class prepare events to those " 2521 "for reference types which have a source name " 2522 "which matches the given restricted regular expression. " 2523 "The source names are determined by the reference type's " 2524 "<a href=\"#JDWP_ReferenceType_SourceDebugExtension\"> " 2525 "SourceDebugExtension</a>. " 2526 "This modifier can only be used with class prepare " 2527 "events. " 2528 "Since JDWP version 1.6. Requires the canUseSourceNameFilters " 2529 "capability - see " 2530 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>." 2531 2532 (string sourceNamePattern "Required source name pattern. " 2533 "Matches are limited to exact matches of the " 2534 "given pattern and matches of patterns that " 2535 "begin or end with '*'; for example, " 2536 "\"*.Foo\" or \"java.*\". " 2537 ) 2538 ) 2539 (Alt PlatformThreadsOnly=13 2540 "<b>PlatformThreadsOnly is a preview API of the Java platform.</b> " 2541 "<em>Preview features may be removed in a future release, or upgraded to " 2542 "permanent features of the Java platform.</em> Since JDWP version 19." 2543 "<p>" 2544 "For thread start and thread end events, restrict the " 2545 "events so they are only sent for platform threads." 2546 ) 2547 2548 ) 2549 ) 2550 ) 2551 (Reply 2552 (int requestID "ID of created request") 2553 ) 2554 (ErrorSet 2555 (Error INVALID_THREAD) 2556 (Error INVALID_CLASS) 2557 (Error INVALID_STRING) 2558 (Error INVALID_OBJECT) 2559 (Error INVALID_COUNT) 2560 (Error INVALID_FIELDID) 2561 (Error INVALID_METHODID) 2562 (Error INVALID_LOCATION) 2563 (Error INVALID_EVENT_TYPE) 2564 (Error NOT_IMPLEMENTED) 2565 (Error VM_DEAD) 2566 ) 2567 ) 2568 (Command Clear=2 2569 "Clear an event request. See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> " 2570 "for a complete list of events that can be cleared. Only the event request matching " 2571 "the specified event kind and requestID is cleared. If there isn't a matching event " 2572 "request the command is a no-op and does not result in an error. Automatically " 2573 "generated events do not have a corresponding event request and may not be cleared " 2574 "using this command." 2575 (Out 2576 (byte eventKind "Event kind to clear") 2577 (int requestID "ID of request to clear") 2578 ) 2579 (Reply "none" 2580 ) 2581 (ErrorSet 2582 (Error VM_DEAD) 2583 (Error INVALID_EVENT_TYPE) 2584 ) 2585 ) 2586 (Command ClearAllBreakpoints=3 2587 "Removes all set breakpoints, a no-op if there are no breakpoints set." 2588 (Out "none" 2589 ) 2590 (Reply "none" 2591 ) 2592 (ErrorSet 2593 (Error VM_DEAD) 2594 ) 2595 ) 2596 ) 2597 (CommandSet StackFrame=16 2598 (Command GetValues=1 2599 "Returns the value of one or more local variables in a " 2600 "given frame. Each variable must be visible at the frame's code index. " 2601 "Even if local variable information is not available, values can " 2602 "be retrieved if the front-end is able to " 2603 "determine the correct local variable index. (Typically, this " 2604 "index can be determined for method arguments from the method " 2605 "signature without access to the local variable table information.) " 2606 (Out 2607 (threadObject thread "The frame's thread. ") 2608 (frame frame "The frame ID. ") 2609 (Repeat slots "The number of values to get. " 2610 (Group SlotInfo 2611 (int slot "The local variable's index in the frame. ") 2612 (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> " 2613 "identifying the type of the variable ") 2614 ) 2615 ) 2616 ) 2617 (Reply 2618 (Repeat values "The number of values retrieved, always equal to slots, " 2619 "the number of values to get." 2620 (value slotValue "The value of the local variable. ") 2621 ) 2622 ) 2623 (ErrorSet 2624 (Error INVALID_THREAD) 2625 (Error INVALID_OBJECT) 2626 (Error INVALID_FRAMEID) 2627 (Error INVALID_SLOT) 2628 (Error VM_DEAD) 2629 ) 2630 ) 2631 (Command SetValues=2 2632 "Sets the value of one or more local variables. " 2633 "Each variable must be visible at the current frame code index. " 2634 "For primitive values, the value's type must match the " 2635 "variable's type exactly. For object values, there must be a " 2636 "widening reference conversion from the value's type to the 2637 "variable's type and the variable's type must be loaded. " 2638 "<p>" 2639 "Even if local variable information is not available, values can " 2640 "be set, if the front-end is able to " 2641 "determine the correct local variable index. (Typically, this 2642 "index can be determined for method arguments from the method " 2643 "signature without access to the local variable table information.) " 2644 "<p>" 2645 "If the thread is a virtual thread then this command can be used to set " 2646 "the value of local variables in the top-most frame when the thread is " 2647 "suspended at a breakpoint or single step event. The target VM may support " 2648 "setting local variables in other cases." 2649 (Out 2650 (threadObject thread "The frame's thread. ") 2651 (frame frame "The frame ID. ") 2652 (Repeat slotValues "The number of values to set. " 2653 (Group SlotInfo 2654 (int slot "The slot ID. ") 2655 (value slotValue "The value to set. ") 2656 ) 2657 ) 2658 ) 2659 (Reply "none" 2660 ) 2661 (ErrorSet 2662 (Error INVALID_THREAD) 2663 (Error INVALID_OBJECT) 2664 (Error INVALID_FRAMEID) 2665 (Error OPAQUE_FRAME "The thread is a virtual thread and the target VM " 2666 "does not support setting the value of local " 2667 "variables in the frame.") 2668 (Error VM_DEAD) 2669 ) 2670 ) 2671 (Command ThisObject=3 2672 "Returns the value of the 'this' reference for this frame. " 2673 "If the frame's method is static or native, the reply " 2674 "will contain the null object reference. " 2675 (Out 2676 (threadObject thread "The frame's thread. ") 2677 (frame frame "The frame ID. ") 2678 ) 2679 (Reply 2680 (tagged-object objectThis "The 'this' object for this frame. ") 2681 ) 2682 (ErrorSet 2683 (Error INVALID_THREAD) 2684 (Error INVALID_OBJECT) 2685 (Error INVALID_FRAMEID) 2686 (Error VM_DEAD) 2687 ) 2688 ) 2689 (Command PopFrames=4 2690 "Pop the top-most stack frames of the thread stack, up to, and including 'frame'. " 2691 "The thread must be suspended to perform this command. " 2692 "The top-most stack frames are discarded and the stack frame previous to 'frame' " 2693 "becomes the current frame. The operand stack is restored -- the argument values " 2694 "are added back and if the invoke was not <code>invokestatic</code>, " 2695 "<code>objectref</code> is added back as well. The Java virtual machine " 2696 "program counter is restored to the opcode of the invoke instruction." 2697 "<p>" 2698 "The target VM may not support, or may only provide limited support, for this " 2699 "command when the thread is a virtual thread. It may, for example, only support " 2700 "this command when the virtual thread is suspended at a breakpoint or singlestep " 2701 "event." 2702 "<p>" 2703 "Since JDWP version 1.4. Requires canPopFrames capability - see " 2704 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>." 2705 (Out 2706 (threadObject thread "The thread object ID. ") 2707 (frame frame "The frame ID. ") 2708 ) 2709 (Reply "none" 2710 ) 2711 (ErrorSet 2712 (Error INVALID_THREAD) 2713 (Error INVALID_OBJECT "thread is not a known ID.") 2714 (Error INVALID_FRAMEID) 2715 (Error THREAD_NOT_SUSPENDED) 2716 (Error NO_MORE_FRAMES) 2717 (Error OPAQUE_FRAME "If one or more of the frames to pop is a native " 2718 "method or its caller is a native method, or the " 2719 "thread is a virtual thread and the implementation " 2720 "is unable to pop the frames.") 2721 (Error NOT_IMPLEMENTED) 2722 (Error VM_DEAD) 2723 ) 2724 ) 2725 ) 2726 (CommandSet ClassObjectReference=17 2727 (Command ReflectedType = 1 2728 "Returns the reference type reflected by this class object." 2729 (Out 2730 (classObject classObject "The class object. ") 2731 ) 2732 (Reply 2733 (byte refTypeTag "<a href=\"#JDWP_TypeTag\">Kind</a> " 2734 "of following reference type. ") 2735 (referenceTypeID typeID "reflected reference type") 2736 ) 2737 (ErrorSet 2738 (Error INVALID_OBJECT) 2739 (Error VM_DEAD) 2740 ) 2741 ) 2742 ) 2743 (CommandSet ModuleReference=18 2744 (Command Name=1 2745 "Returns the name of this module." 2746 "<p>Since JDWP version 9." 2747 (Out 2748 (moduleID module "This module.") 2749 ) 2750 (Reply 2751 (string name "The module's name.") 2752 ) 2753 (ErrorSet 2754 (Error INVALID_MODULE) 2755 (Error NOT_IMPLEMENTED) 2756 (Error VM_DEAD) 2757 ) 2758 ) 2759 (Command ClassLoader=2 2760 "Returns the class loader of this module." 2761 "<p>Since JDWP version 9." 2762 (Out 2763 (moduleID module "This module.") 2764 ) 2765 (Reply 2766 (classLoaderObject classLoader "The module's class loader.") 2767 ) 2768 (ErrorSet 2769 (Error INVALID_MODULE) 2770 (Error NOT_IMPLEMENTED) 2771 (Error VM_DEAD) 2772 ) 2773 ) 2774 ) 2775 (CommandSet Event=64 2776 (Command Composite=100 2777 "Several events may occur at a given time in the target VM. " 2778 "For example, there may be more than one breakpoint request " 2779 "for a given location " 2780 "or you might single step to the same location as a " 2781 "breakpoint request. These events are delivered " 2782 "together as a composite event. For uniformity, a " 2783 "composite event is always used " 2784 "to deliver events, even if there is only one event to report. " 2785 "<P>" 2786 "The events that are grouped in a composite event are restricted in the " 2787 "following ways: " 2788 "<UL>" 2789 "<LI>Only with other thread start events for the same thread:" 2790 " <UL>" 2791 " <LI>Thread Start Event" 2792 " </UL>" 2793 "<LI>Only with other thread death events for the same thread:" 2794 " <UL>" 2795 " <LI>Thread Death Event" 2796 " </UL>" 2797 "<LI>Only with other class prepare events for the same class:" 2798 " <UL>" 2799 " <LI>Class Prepare Event" 2800 " </UL>" 2801 "<LI>Only with other class unload events for the same class:" 2802 " <UL>" 2803 " <LI>Class Unload Event" 2804 " </UL>" 2805 "<LI>Only with other access watchpoint events for the same field access:" 2806 " <UL>" 2807 " <LI>Access Watchpoint Event" 2808 " </UL>" 2809 "<LI>Only with other modification watchpoint events for the same field " 2810 "modification:" 2811 " <UL>" 2812 " <LI>Modification Watchpoint Event" 2813 " </UL>" 2814 "<LI>Only with other Monitor contended enter events for the same monitor object: " 2815 " <UL>" 2816 " <LI>Monitor Contended Enter Event" 2817 " </UL>" 2818 "<LI>Only with other Monitor contended entered events for the same monitor object: " 2819 " <UL>" 2820 " <LI>Monitor Contended Entered Event" 2821 " </UL>" 2822 "<LI>Only with other Monitor wait events for the same monitor object: " 2823 " <UL>" 2824 " <LI>Monitor Wait Event" 2825 " </UL>" 2826 "<LI>Only with other Monitor waited events for the same monitor object: " 2827 " <UL>" 2828 " <LI>Monitor Waited Event" 2829 " </UL>" 2830 "<LI>Only with other ExceptionEvents for the same exception occurrance:" 2831 " <UL>" 2832 " <LI>ExceptionEvent" 2833 " </UL>" 2834 "<LI>Only with other members of this group, at the same location " 2835 "and in the same thread: " 2836 " <UL>" 2837 " <LI>Breakpoint Event" 2838 " <LI>Step Event" 2839 " <LI>Method Entry Event" 2840 " <LI>Method Exit Event" 2841 " </UL>" 2842 "</UL>" 2843 "<P>" 2844 "The VM Start Event and VM Death Event are automatically generated events. " 2845 "This means they do not need to be requested using the " 2846 "<a href=\"#JDWP_EventRequest_Set\">EventRequest.Set</a> command. " 2847 "The VM Start event signals the completion of VM initialization. The VM Death " 2848 "event signals the termination of the VM." 2849 "If there is a debugger connected at the time when an automatically generated " 2850 "event occurs it is sent from the target VM. Automatically generated events may " 2851 "also be requested using the EventRequest.Set command and thus multiple events " 2852 "of the same event kind will be sent from the target VM when an event occurs." 2853 "Automatically generated events are sent with the requestID field " 2854 "in the Event Data set to 0. The value of the suspendPolicy field in the " 2855 "Event Data depends on the event. For the automatically generated VM Start " 2856 "Event the value of suspendPolicy is not defined and is therefore implementation " 2857 "or configuration specific. In the Sun implementation, for example, the " 2858 "suspendPolicy is specified as an option to the JDWP agent at launch-time." 2859 "The automatically generated VM Death Event will have the suspendPolicy set to " 2860 "NONE." 2861 2862 (Event "Generated event" 2863 (byte suspendPolicy 2864 "Which threads where suspended by this composite event?") 2865 (Repeat events "Events in set." 2866 (Select Events 2867 (byte eventKind "Event kind selector") 2868 (Alt VMStart=JDWP.EventKind.VM_START 2869 "Notification of initialization of a target VM. This event is " 2870 "received before the main thread is started and before any " 2871 "application code has been executed. Before this event occurs " 2872 "a significant amount of system code has executed and a number " 2873 "of system classes have been loaded. " 2874 "This event is always generated by the target VM, even " 2875 "if not explicitly requested." 2876 2877 (int requestID 2878 "Request that generated event (or 0 if this " 2879 "event is automatically generated.") 2880 (threadObject thread "Initial thread") 2881 ) 2882 (Alt SingleStep=JDWP.EventKind.SINGLE_STEP 2883 "Notification of step completion in the target VM. The step event " 2884 "is generated before the code at its location is executed. " 2885 2886 (int requestID "Request that generated event") 2887 (threadObject thread "Stepped thread") 2888 (location location "Location stepped to") 2889 ) 2890 (Alt Breakpoint=JDWP.EventKind.BREAKPOINT 2891 "Notification of a breakpoint in the target VM. The breakpoint event " 2892 "is generated before the code at its location is executed. " 2893 2894 (int requestID "Request that generated event") 2895 (threadObject thread "Thread which hit breakpoint") 2896 (location location "Location hit") 2897 ) 2898 (Alt MethodEntry=JDWP.EventKind.METHOD_ENTRY 2899 "Notification of a method invocation in the target VM. This event " 2900 "is generated before any code in the invoked method has executed. " 2901 "Method entry events are generated for both native and non-native " 2902 "methods. " 2903 "<P>" 2904 "In some VMs method entry events can occur for a particular thread " 2905 "before its thread start event occurs if methods are called " 2906 "as part of the thread's initialization. " 2907 2908 (int requestID "Request that generated event") 2909 (threadObject thread "Thread which entered method") 2910 (location location "The initial executable location in the method.") 2911 ) 2912 (Alt MethodExit=JDWP.EventKind.METHOD_EXIT 2913 "Notification of a method return in the target VM. This event " 2914 "is generated after all code in the method has executed, but the " 2915 "location of this event is the last executed location in the method. " 2916 "Method exit events are generated for both native and non-native " 2917 "methods. Method exit events are not generated if the method terminates " 2918 "with a thrown exception. " 2919 2920 (int requestID "Request that generated event") 2921 (threadObject thread "Thread which exited method") 2922 (location location "Location of exit") 2923 ) 2924 (Alt MethodExitWithReturnValue=JDWP.EventKind.METHOD_EXIT_WITH_RETURN_VALUE 2925 "Notification of a method return in the target VM. This event " 2926 "is generated after all code in the method has executed, but the " 2927 "location of this event is the last executed location in the method. " 2928 "Method exit events are generated for both native and non-native " 2929 "methods. Method exit events are not generated if the method terminates " 2930 "with a thrown exception. <p>Since JDWP version 1.6. " 2931 2932 (int requestID "Request that generated event") 2933 (threadObject thread "Thread which exited method") 2934 (location location "Location of exit") 2935 (value value "Value that will be returned by the method") 2936 ) 2937 (Alt MonitorContendedEnter=JDWP.EventKind.MONITOR_CONTENDED_ENTER 2938 "Notification that a thread in the target VM is attempting " 2939 "to enter a monitor that is already acquired by another thread. " 2940 "Requires canRequestMonitorEvents capability - see " 2941 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. " 2942 "<p>Since JDWP version 1.6. " 2943 2944 (int requestID 2945 "Request that generated event") 2946 (threadObject thread "Thread which is trying to enter the monitor") 2947 (tagged-object object "Monitor object reference") 2948 (location location "Location of contended monitor enter") 2949 ) 2950 (Alt MonitorContendedEntered=JDWP.EventKind.MONITOR_CONTENDED_ENTERED 2951 "Notification of a thread in the target VM is entering a monitor " 2952 "after waiting for it to be released by another thread. " 2953 "Requires canRequestMonitorEvents capability - see " 2954 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. " 2955 "<p>Since JDWP version 1.6. " 2956 2957 (int requestID 2958 "Request that generated event") 2959 (threadObject thread "Thread which entered monitor") 2960 (tagged-object object "Monitor object reference") 2961 (location location "Location of contended monitor enter") 2962 ) 2963 (Alt MonitorWait=JDWP.EventKind.MONITOR_WAIT 2964 "Notification of a thread about to wait on a monitor object. " 2965 "Requires canRequestMonitorEvents capability - see " 2966 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. " 2967 "<p>Since JDWP version 1.6. " 2968 2969 (int requestID 2970 "Request that generated event") 2971 (threadObject thread "Thread which is about to wait") 2972 (tagged-object object "Monitor object reference") 2973 (location location "Location at which the wait will occur") 2974 (long timeout "Thread wait time in milliseconds") 2975 ) 2976 (Alt MonitorWaited=JDWP.EventKind.MONITOR_WAITED 2977 "Notification that a thread in the target VM has finished waiting on " 2978 "Requires canRequestMonitorEvents capability - see " 2979 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. " 2980 "a monitor object. " 2981 "<p>Since JDWP version 1.6. " 2982 2983 (int requestID 2984 "Request that generated event") 2985 (threadObject thread "Thread which waited") 2986 (tagged-object object "Monitor object reference") 2987 (location location "Location at which the wait occured") 2988 (boolean timed_out "True if timed out") 2989 ) 2990 (Alt Exception=JDWP.EventKind.EXCEPTION 2991 "Notification of an exception in the target VM. " 2992 "If the exception is thrown from a non-native method, " 2993 "the exception event is generated at the location where the " 2994 "exception is thrown. " 2995 "If the exception is thrown from a native method, the exception event " 2996 "is generated at the first non-native location reached after the exception " 2997 "is thrown. " 2998 2999 (int requestID "Request that generated event") 3000 (threadObject thread "Thread with exception") 3001 (location location "Location of exception throw " 3002 "(or first non-native location after throw if thrown from a native method)") 3003 (tagged-object exception "Thrown exception") 3004 (location catchLocation 3005 "Location of catch, or 0 if not caught. An exception " 3006 "is considered to be caught if, at the point of the throw, the " 3007 "current location is dynamically enclosed in a try statement that " 3008 "handles the exception. (See the JVM specification for details). " 3009 "If there is such a try statement, the catch location is the " 3010 "first location in the appropriate catch clause. " 3011 "<p>" 3012 "If there are native methods in the call stack at the time of the " 3013 "exception, there are important restrictions to note about the " 3014 "returned catch location. In such cases, " 3015 "it is not possible to predict whether an exception will be handled " 3016 "by some native method on the call stack. " 3017 "Thus, it is possible that exceptions considered uncaught " 3018 "here will, in fact, be handled by a native method and not cause " 3019 "termination of the target VM. Furthermore, it cannot be assumed that the " 3020 "catch location returned here will ever be reached by the throwing " 3021 "thread. If there is " 3022 "a native frame between the current location and the catch location, " 3023 "the exception might be handled and cleared in that native method " 3024 "instead. " 3025 "<p>" 3026 "Note that compilers can generate try-catch blocks in some cases " 3027 "where they are not explicit in the source code; for example, " 3028 "the code generated for <code>synchronized</code> and " 3029 "<code>finally</code> blocks can contain implicit try-catch blocks. " 3030 "If such an implicitly generated try-catch is " 3031 "present on the call stack at the time of the throw, the exception " 3032 "will be considered caught even though it appears to be uncaught from " 3033 "examination of the source code. " 3034 ) 3035 ) 3036 (Alt ThreadStart=JDWP.EventKind.THREAD_START 3037 "Notification of a new running thread in the target VM. " 3038 "The new thread can be the result of a call to " 3039 "<code>java.lang.Thread.start</code> or the result of " 3040 "attaching a new thread to the VM though JNI. The " 3041 "notification is generated by the new thread some time before " 3042 "its execution starts. " 3043 "Because of this timing, it is possible to receive other events " 3044 "for the thread before this event is received. (Notably, " 3045 "Method Entry Events and Method Exit Events might occur " 3046 "during thread initialization. " 3047 "It is also possible for the " 3048 "<a href=\"#JDWP_VirtualMachine_AllThreads\">VirtualMachine AllThreads</a> " 3049 "command to return " 3050 "a thread before its thread start event is received. " 3051 "<p>" 3052 "Note that this event gives no information " 3053 "about the creation of the thread object which may have happened " 3054 "much earlier, depending on the VM being debugged. " 3055 3056 (int requestID "Request that generated event") 3057 (threadObject thread "Started thread") 3058 ) 3059 (Alt ThreadDeath=JDWP.EventKind.THREAD_DEATH 3060 "Notification of a completed thread in the target VM. The " 3061 "notification is generated by the dying thread before it terminates. " 3062 "Because of this timing, it is possible " 3063 "for {@link VirtualMachine#allThreads} to return this thread " 3064 "after this event is received. " 3065 "<p>" 3066 "Note that this event gives no information " 3067 "about the lifetime of the thread object. It may or may not be collected " 3068 "soon depending on what references exist in the target VM. " 3069 3070 (int requestID "Request that generated event") 3071 (threadObject thread "Ending thread") 3072 ) 3073 (Alt ClassPrepare=JDWP.EventKind.CLASS_PREPARE 3074 "Notification of a class prepare in the target VM. See the JVM " 3075 "specification for a definition of class preparation. Class prepare " 3076 "events are not generated for primtiive classes (for example, " 3077 "java.lang.Integer.TYPE). " 3078 3079 (int requestID "Request that generated event") 3080 (threadObject thread "Preparing thread. " 3081 "In rare cases, this event may occur in a debugger system " 3082 "thread within the target VM. Debugger threads take precautions " 3083 "to prevent these events, but they cannot be avoided under some " 3084 "conditions, especially for some subclasses of " 3085 "java.lang.Error. " 3086 "If the event was generated by a debugger system thread, the " 3087 "value returned by this method is null, and if the requested " 3088 "<a href=\"#JDWP_SuspendPolicy\">suspend policy</a> " 3089 "for the event was EVENT_THREAD " 3090 "all threads will be suspended instead, and the " 3091 "composite event's suspend policy will reflect this change. " 3092 "<p>" 3093 "Note that the discussion above does not apply to system threads " 3094 "created by the target VM during its normal (non-debug) operation. " 3095 ) 3096 (byte refTypeTag "Kind of reference type. " 3097 "See <a href=\"#JDWP_TypeTag\">JDWP.TypeTag</a>") 3098 (referenceTypeID typeID "Type being prepared") 3099 (string signature "Type signature") 3100 (int status "Status of type. " 3101 "See <a href=\"#JDWP_ClassStatus\">JDWP.ClassStatus</a>") 3102 ) 3103 (Alt ClassUnload=JDWP.EventKind.CLASS_UNLOAD 3104 "Notification of a class unload in the target VM. " 3105 "<p>" 3106 "There are severe constraints on the debugger back-end during " 3107 "garbage collection, so unload information is greatly limited. " 3108 3109 (int requestID "Request that generated event") 3110 (string signature "Type signature") 3111 ) 3112 (Alt FieldAccess=JDWP.EventKind.FIELD_ACCESS 3113 "Notification of a field access in the target VM. " 3114 "Field modifications " 3115 "are not considered field accesses. " 3116 "Requires canWatchFieldAccess capability - see " 3117 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>." 3118 3119 (int requestID "Request that generated event") 3120 (threadObject thread "Accessing thread") 3121 (location location "Location of access") 3122 (byte refTypeTag "Kind of reference type. " 3123 "See <a href=\"#JDWP_TypeTag\">JDWP.TypeTag</a>") 3124 (referenceTypeID typeID "Type of field") 3125 (field fieldID "Field being accessed") 3126 (tagged-object object 3127 "Object being accessed (null=0 for statics") 3128 ) 3129 (Alt FieldModification=JDWP.EventKind.FIELD_MODIFICATION 3130 "Notification of a field modification in the target VM. " 3131 "Requires canWatchFieldModification capability - see " 3132 "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>." 3133 3134 (int requestID "Request that generated event") 3135 (threadObject thread "Modifying thread") 3136 (location location "Location of modify") 3137 (byte refTypeTag "Kind of reference type. " 3138 "See <a href=\"#JDWP_TypeTag\">JDWP.TypeTag</a>") 3139 (referenceTypeID typeID "Type of field") 3140 (field fieldID "Field being modified") 3141 (tagged-object object 3142 "Object being modified (null=0 for statics") 3143 (value valueToBe "Value to be assigned") 3144 ) 3145 (Alt VMDeath=JDWP.EventKind.VM_DEATH 3146 (int requestID 3147 "Request that generated event") 3148 ) 3149 ) 3150 ) 3151 ) 3152 ) 3153 ) 3154 (ConstantSet Error 3155 (Constant NONE =0 "No error has occurred.") 3156 (Constant INVALID_THREAD =10 "The thread is null or not a valid thread.") 3157 (Constant INVALID_THREAD_GROUP =11 "Thread group invalid.") 3158 (Constant INVALID_PRIORITY =12 "Invalid priority.") 3159 (Constant THREAD_NOT_SUSPENDED =13 "If the specified thread has not been " 3160 "suspended by an event.") 3161 (Constant THREAD_SUSPENDED =14 "Thread already suspended.") 3162 (Constant THREAD_NOT_ALIVE =15 "Not used.") 3163 (Constant INVALID_OBJECT =20 "If this reference type has been unloaded " 3164 "and garbage collected.") 3165 (Constant INVALID_CLASS =21 "Invalid class.") 3166 (Constant CLASS_NOT_PREPARED =22 "Class has been loaded but not yet prepared.") 3167 (Constant INVALID_METHODID =23 "Invalid method.") 3168 (Constant INVALID_LOCATION =24 "Invalid location.") 3169 (Constant INVALID_FIELDID =25 "Invalid field.") 3170 (Constant INVALID_FRAMEID =30 "Invalid jframeID.") 3171 (Constant NO_MORE_FRAMES =31 "There are no more Java or JNI frames on the " 3172 "call stack.") 3173 (Constant OPAQUE_FRAME =32 "Information about the frame is not available " 3174 "(e.g. native frame) or the target VM is unable " 3175 "to perform an operation on the frame.") 3176 (Constant NOT_CURRENT_FRAME =33 "Operation can only be performed on current frame.") 3177 (Constant TYPE_MISMATCH =34 "The variable is not an appropriate type for " 3178 "the function used.") 3179 (Constant INVALID_SLOT =35 "Invalid slot.") 3180 (Constant DUPLICATE =40 "Item already set.") 3181 (Constant NOT_FOUND =41 "Desired element not found.") 3182 (Constant INVALID_MODULE =42 "Invalid module.") 3183 (Constant INVALID_MONITOR =50 "Invalid monitor.") 3184 (Constant NOT_MONITOR_OWNER =51 "This thread doesn't own the monitor.") 3185 (Constant INTERRUPT =52 "The call has been interrupted before completion.") 3186 (Constant INVALID_CLASS_FORMAT =60 "The virtual machine attempted to read a class " 3187 "file and determined that the file is malformed " 3188 "or otherwise cannot be interpreted as a class file.") 3189 (Constant CIRCULAR_CLASS_DEFINITION 3190 =61 "A circularity has been detected while " 3191 "initializing a class.") 3192 (Constant FAILS_VERIFICATION =62 "The verifier detected that a class file, " 3193 "though well formed, contained some sort of " 3194 "internal inconsistency or security problem.") 3195 (Constant ADD_METHOD_NOT_IMPLEMENTED 3196 =63 "Adding methods has not been implemented.") 3197 (Constant SCHEMA_CHANGE_NOT_IMPLEMENTED 3198 =64 "Schema change has not been implemented.") 3199 (Constant INVALID_TYPESTATE =65 "The state of the thread has been modified, " 3200 "and is now inconsistent.") 3201 (Constant HIERARCHY_CHANGE_NOT_IMPLEMENTED 3202 =66 "A direct superclass is different for the new class " 3203 "version, or the set of directly implemented " 3204 "interfaces is different " 3205 "and canUnrestrictedlyRedefineClasses is false.") 3206 (Constant DELETE_METHOD_NOT_IMPLEMENTED 3207 =67 "The new class version does not declare a method " 3208 "declared in the old class version " 3209 "and canUnrestrictedlyRedefineClasses is false.") 3210 (Constant UNSUPPORTED_VERSION =68 "A class file has a version number not supported " 3211 "by this VM.") 3212 (Constant NAMES_DONT_MATCH =69 "The class name defined in the new class file is " 3213 "different from the name in the old class object.") 3214 (Constant CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED 3215 =70 "The new class version has different modifiers and " 3216 "canUnrestrictedlyRedefineClasses is false.") 3217 (Constant METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED 3218 =71 "A method in the new class version has " 3219 "different modifiers " 3220 "than its counterpart in the old class version and " 3221 "canUnrestrictedlyRedefineClasses is false.") 3222 (Constant CLASS_ATTRIBUTE_CHANGE_NOT_IMPLEMENTED 3223 =72 "The new class version has a different NestHost, " 3224 "NestMembers, PermittedSubclasses, or Record class attribute " 3225 "and canUnrestrictedlyRedefineClasses is false.") 3226 (Constant NOT_IMPLEMENTED =99 "The functionality is not implemented in " 3227 "this virtual machine.") 3228 (Constant NULL_POINTER =100 "Invalid pointer.") 3229 (Constant ABSENT_INFORMATION =101 "Desired information is not available.") 3230 (Constant INVALID_EVENT_TYPE =102 "The specified event type id is not recognized.") 3231 (Constant ILLEGAL_ARGUMENT =103 "Illegal argument.") 3232 (Constant OUT_OF_MEMORY =110 "The function needed to allocate memory and " 3233 "no more memory was available for allocation.") 3234 (Constant ACCESS_DENIED =111 "Debugging has not been enabled in this " 3235 "virtual machine. JVMTI cannot be used.") 3236 (Constant VM_DEAD =112 "The virtual machine is not running.") 3237 (Constant INTERNAL =113 "An unexpected internal error has occurred.") 3238 (Constant UNATTACHED_THREAD =115 "The thread being used to call this function " 3239 "is not attached to the virtual machine. " 3240 "Calls must be made from attached threads.") 3241 (Constant INVALID_TAG =500 "object type id or class tag.") 3242 (Constant ALREADY_INVOKING =502 "Previous invoke not complete.") 3243 (Constant INVALID_INDEX =503 "Index is invalid.") 3244 (Constant INVALID_LENGTH =504 "The length is invalid.") 3245 (Constant INVALID_STRING =506 "The string is invalid.") 3246 (Constant INVALID_CLASS_LOADER =507 "The class loader is invalid.") 3247 (Constant INVALID_ARRAY =508 "The array is invalid.") 3248 (Constant TRANSPORT_LOAD =509 "Unable to load the transport.") 3249 (Constant TRANSPORT_INIT =510 "Unable to initialize the transport.") 3250 (Constant NATIVE_METHOD =511 ) 3251 (Constant INVALID_COUNT =512 "The count is invalid.") 3252 ) 3253 (ConstantSet EventKind 3254 (Constant SINGLE_STEP =1 ) 3255 (Constant BREAKPOINT =2 ) 3256 (Constant FRAME_POP =3 ) 3257 (Constant EXCEPTION =4 ) 3258 (Constant USER_DEFINED =5 ) 3259 (Constant THREAD_START =6 ) 3260 (Constant THREAD_DEATH =7 ) 3261 (Constant THREAD_END =7 "obsolete - was used in jvmdi") 3262 (Constant CLASS_PREPARE =8 ) 3263 (Constant CLASS_UNLOAD =9 ) 3264 (Constant CLASS_LOAD =10 ) 3265 (Constant FIELD_ACCESS =20 ) 3266 (Constant FIELD_MODIFICATION =21 ) 3267 (Constant EXCEPTION_CATCH =30 ) 3268 (Constant METHOD_ENTRY =40 ) 3269 (Constant METHOD_EXIT =41 ) 3270 (Constant METHOD_EXIT_WITH_RETURN_VALUE =42 ) 3271 (Constant MONITOR_CONTENDED_ENTER =43 ) 3272 (Constant MONITOR_CONTENDED_ENTERED =44 ) 3273 (Constant MONITOR_WAIT =45 ) 3274 (Constant MONITOR_WAITED =46 ) 3275 (Constant VM_START =90 ) 3276 (Constant VM_INIT =90 "obsolete - was used in jvmdi") 3277 (Constant VM_DEATH =99 ) 3278 (Constant VM_DISCONNECTED =100 "Never sent across JDWP") 3279 ) 3280 3281 (ConstantSet ThreadStatus 3282 (Constant ZOMBIE =0 "Thread has terminated.") 3283 (Constant RUNNING =1 "Thread is runnable.") 3284 (Constant SLEEPING =2 "Thread is sleeping, in Thread.sleep.") 3285 (Constant MONITOR =3 "Thread is waiting to enter a synchronized block/method " 3286 "or, after an Object.wait, waiting to re-enter a " 3287 "synchronized block/method.") 3288 (Constant WAIT =4 "Thread is waiting, in Object.wait or LockSupport.park. " 3289 "A virtual thread that is sleeping in Thread.sleep may " 3290 "have this thread status instead of SLEEPING.") 3291 ) 3292 3293 (ConstantSet SuspendStatus 3294 (Constant SUSPEND_STATUS_SUSPENDED = 0x1 ) 3295 ) 3296 (ConstantSet ClassStatus 3297 (Constant VERIFIED =1 ) 3298 (Constant PREPARED =2 ) 3299 (Constant INITIALIZED =4 ) 3300 (Constant ERROR =8 ) 3301 ) 3302 (ConstantSet TypeTag 3303 (Constant CLASS=1 "ReferenceType is a class. ") 3304 (Constant INTERFACE=2 "ReferenceType is an interface. ") 3305 (Constant ARRAY=3 "ReferenceType is an array. ") 3306 ) 3307 (ConstantSet Tag 3308 (Constant ARRAY = '[' "'[' - an array object (objectID size). ") 3309 (Constant BYTE = 'B' "'B' - a byte value (1 byte).") 3310 (Constant CHAR = 'C' "'C' - a character value (2 bytes).") 3311 (Constant OBJECT = 'L' "'L' - an object (objectID size).") 3312 (Constant FLOAT = 'F' "'F' - a float value (4 bytes).") 3313 (Constant DOUBLE = 'D' "'D' - a double value (8 bytes).") 3314 (Constant INT = 'I' "'I' - an int value (4 bytes).") 3315 (Constant LONG = 'J' "'J' - a long value (8 bytes).") 3316 (Constant SHORT = 'S' "'S' - a short value (2 bytes).") 3317 (Constant VOID = 'V' "'V' - a void value (no bytes).") 3318 (Constant BOOLEAN = 'Z' "'Z' - a boolean value (1 byte).") 3319 (Constant STRING = 's' "'s' - a String object (objectID size). ") 3320 (Constant THREAD = 't' "'t' - a Thread object (objectID size). ") 3321 (Constant THREAD_GROUP = 'g' 3322 "'g' - a ThreadGroup object (objectID size). ") 3323 (Constant CLASS_LOADER = 'l' 3324 "'l' - a ClassLoader object (objectID size). ") 3325 (Constant CLASS_OBJECT = 'c' 3326 "'c' - a class object object (objectID size). ") 3327 ) 3328 3329 (ConstantSet StepDepth 3330 (Constant INTO = 0 3331 "Step into any method calls that occur before the end of the step. ") 3332 (Constant OVER = 1 3333 "Step over any method calls that occur before the end of the step. ") 3334 (Constant OUT = 2 3335 "Step out of the current method. ") 3336 ) 3337 3338 (ConstantSet StepSize 3339 (Constant MIN = 0 3340 "Step by the minimum possible amount (often a bytecode instruction). ") 3341 (Constant LINE = 1 3342 "Step to the next source line unless there is no line number information in which case a MIN step is done instead.") 3343 ) 3344 3345 (ConstantSet SuspendPolicy 3346 (Constant NONE = 0 3347 "Suspend no threads when this event is encountered. ") 3348 (Constant EVENT_THREAD = 1 3349 "Suspend the event thread when this event is encountered. ") 3350 (Constant ALL = 2 3351 "Suspend all threads when this event is encountered. ") 3352 ) 3353 3354 (ConstantSet InvokeOptions 3355 "The invoke options are a combination of zero or more of the following bit flags:" 3356 (Constant INVOKE_SINGLE_THREADED = 0x01 3357 "otherwise, all threads started. ") 3358 (Constant INVOKE_NONVIRTUAL = 0x02 3359 "otherwise, normal virtual invoke (instance methods only)") 3360 )