< prev index next >

src/java.se/share/data/jdwp/jdwp.spec

Print this page

   1 /*
   2  * Copyright (c) 1998, 2025, 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

2490                         "field access and field modification event kinds only. "
2491 
2492                         (referenceType declaring "Type in which field is declared.")
2493                         (field fieldID "Required field")
2494                     )
2495                     (Alt Step=10
2496                         "Restricts reported step events "
2497                         "to those which satisfy "
2498                         "depth and size constraints. "
2499                         "This modifier can be used with "
2500                         "step event kinds only. "
2501 
2502                         (threadObject thread "Thread in which to step")
2503                         (int size "size of each step. "
2504                            "See <a href=\"#JDWP_StepSize\">JDWP.StepSize</a>")
2505                         (int depth "relative call stack limit. "
2506                            "See <a href=\"#JDWP_StepDepth\">JDWP.StepDepth</a>")
2507                     )
2508                     (Alt InstanceOnly=11
2509                         "Restricts reported events to those whose "
2510                         "active 'this' object is the given object. "

2511                         "Match value is the null object for static methods. "
2512                         "This modifier can be used with any event kind "
2513                         "except class prepare, class unload, thread start, "
2514                         "and thread end. Introduced in JDWP version 1.4."
2515 
2516                         (object instance "Required 'this' object")
2517                     )
2518                     (Alt SourceNameMatch=12
2519                         "Restricts reported class prepare events to those "
2520                         "for reference types which have a source name "
2521                         "which matches the given restricted regular expression. "
2522                         "The source names are determined by the reference type's "
2523                         "<a href=\"#JDWP_ReferenceType_SourceDebugExtension\"> "
2524                         "SourceDebugExtension</a>. "
2525                         "This modifier can only be used with class prepare "
2526                         "events. "
2527                         "Since JDWP version 1.6. Requires the canUseSourceNameFilters "
2528                         "capability - see "
2529                         "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
2530 

2582     (Command ClearAllBreakpoints=3
2583         "Removes all set breakpoints, a no-op if there are no breakpoints set."
2584         (Out "none"
2585         )
2586         (Reply "none"
2587         )
2588         (ErrorSet
2589             (Error VM_DEAD)
2590         )
2591     )
2592 )
2593 (CommandSet StackFrame=16
2594     (Command GetValues=1
2595         "Returns the value of one or more local variables in a "
2596         "given frame. Each variable must be visible at the frame's code index. "
2597         "Even if local variable information is not available, values can "
2598         "be retrieved if the front-end is able to "
2599         "determine the correct local variable index. (Typically, this "
2600         "index can be determined for method arguments from the method "
2601         "signature without access to the local variable table information.) "










2602         (Out
2603             (threadObject thread "The frame's thread. ")
2604             (frame frame "The frame ID. ")
2605             (Repeat slots "The number of values to get. "
2606                 (Group SlotInfo
2607                     (int slot "The local variable's index in the frame. ")
2608                     (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
2609                                   "identifying the type of the variable ")
2610                 )
2611             )
2612         )
2613         (Reply
2614             (Repeat values "The number of values retrieved, always equal to slots, "
2615                            "the number of values to get."
2616                 (value slotValue "The value of the local variable. ")
2617             )
2618         )
2619         (ErrorSet
2620             (Error INVALID_THREAD)
2621             (Error INVALID_OBJECT)

2653                     (value slotValue "The value to set. ")
2654                 )
2655             )
2656         )
2657         (Reply "none"
2658         )
2659         (ErrorSet
2660             (Error INVALID_THREAD)
2661             (Error INVALID_OBJECT)
2662             (Error INVALID_FRAMEID)
2663             (Error INVALID_SLOT)
2664             (Error OPAQUE_FRAME      "Unable to set the value of local variables in the frame "
2665                                      "(e.g. the frame is executing a native method).")
2666             (Error VM_DEAD)
2667         )
2668     )
2669     (Command ThisObject=3
2670         "Returns the value of the 'this' reference for this frame. "
2671         "If the frame's method is static or native, the reply "
2672         "will contain the null object reference. "








2673         (Out
2674             (threadObject thread "The frame's thread. ")
2675             (frame frame "The frame ID. ")
2676         )
2677         (Reply
2678             (tagged-object objectThis "The 'this' object for this frame. ")
2679         )
2680         (ErrorSet
2681             (Error INVALID_THREAD)
2682             (Error INVALID_OBJECT)
2683             (Error INVALID_FRAMEID)
2684             (Error VM_DEAD)
2685         )
2686     )
2687     (Command PopFrames=4
2688         "Pop the top-most stack frames of the thread stack, up to, and including 'frame'. "
2689         "The thread must be suspended to perform this command. "
2690         "The top-most stack frames are discarded and the stack frame previous to 'frame' "
2691         "becomes the current frame. The operand stack is restored -- the argument values "
2692         "are added back and if the invoke was not <code>invokestatic</code>, "

   1 /*
   2  * Copyright (c) 1998, 2026, 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

2490                         "field access and field modification event kinds only. "
2491 
2492                         (referenceType declaring "Type in which field is declared.")
2493                         (field fieldID "Required field")
2494                     )
2495                     (Alt Step=10
2496                         "Restricts reported step events "
2497                         "to those which satisfy "
2498                         "depth and size constraints. "
2499                         "This modifier can be used with "
2500                         "step event kinds only. "
2501 
2502                         (threadObject thread "Thread in which to step")
2503                         (int size "size of each step. "
2504                            "See <a href=\"#JDWP_StepSize\">JDWP.StepSize</a>")
2505                         (int depth "relative call stack limit. "
2506                            "See <a href=\"#JDWP_StepDepth\">JDWP.StepDepth</a>")
2507                     )
2508                     (Alt InstanceOnly=11
2509                         "Restricts reported events to those whose "
2510                         "active 'this' object is the given object "
2511                         "as determined by applying the Java == operator. "
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 

2583     (Command ClearAllBreakpoints=3
2584         "Removes all set breakpoints, a no-op if there are no breakpoints set."
2585         (Out "none"
2586         )
2587         (Reply "none"
2588         )
2589         (ErrorSet
2590             (Error VM_DEAD)
2591         )
2592     )
2593 )
2594 (CommandSet StackFrame=16
2595     (Command GetValues=1
2596         "Returns the value of one or more local variables in a "
2597         "given frame. Each variable must be visible at the frame's code index. "
2598         "Even if local variable information is not available, values can "
2599         "be retrieved if the front-end is able to "
2600         "determine the correct local variable index. (Typically, this "
2601         "index can be determined for method arguments from the method "
2602         "signature without access to the local variable table information.) "
2603         "<p>"
2604         "When preview features are enabled, "
2605         "if a local variable is the 'this' object and represents a "
2606         "value object under construction, the "
2607         "value returned will be for a snapshot of the "
2608         "value object, not a reference to the actual value object under "
2609         "construction. Therefore the value returned will not reflect "
2610         "changes to the value object that happen later on during "
2611         "construction."
2612         
2613         (Out
2614             (threadObject thread "The frame's thread. ")
2615             (frame frame "The frame ID. ")
2616             (Repeat slots "The number of values to get. "
2617                 (Group SlotInfo
2618                     (int slot "The local variable's index in the frame. ")
2619                     (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
2620                                   "identifying the type of the variable ")
2621                 )
2622             )
2623         )
2624         (Reply
2625             (Repeat values "The number of values retrieved, always equal to slots, "
2626                            "the number of values to get."
2627                 (value slotValue "The value of the local variable. ")
2628             )
2629         )
2630         (ErrorSet
2631             (Error INVALID_THREAD)
2632             (Error INVALID_OBJECT)

2664                     (value slotValue "The value to set. ")
2665                 )
2666             )
2667         )
2668         (Reply "none"
2669         )
2670         (ErrorSet
2671             (Error INVALID_THREAD)
2672             (Error INVALID_OBJECT)
2673             (Error INVALID_FRAMEID)
2674             (Error INVALID_SLOT)
2675             (Error OPAQUE_FRAME      "Unable to set the value of local variables in the frame "
2676                                      "(e.g. the frame is executing a native method).")
2677             (Error VM_DEAD)
2678         )
2679     )
2680     (Command ThisObject=3
2681         "Returns the value of the 'this' reference for this frame. "
2682         "If the frame's method is static or native, the reply "
2683         "will contain the null object reference. "
2684         "<p>"
2685         "When preview features are enabled, "
2686         "if 'this' represents a value object under construction, the "
2687         "value returned will be for a snapshot of the "
2688         "value object, not a reference to the actual value object under "
2689         "construction. Therefore the value returned will not reflect "
2690         "changes to the value object that happen later on during "
2691         "construction."
2692         (Out
2693             (threadObject thread "The frame's thread. ")
2694             (frame frame "The frame ID. ")
2695         )
2696         (Reply
2697             (tagged-object objectThis "The 'this' object for this frame. ")
2698         )
2699         (ErrorSet
2700             (Error INVALID_THREAD)
2701             (Error INVALID_OBJECT)
2702             (Error INVALID_FRAMEID)
2703             (Error VM_DEAD)
2704         )
2705     )
2706     (Command PopFrames=4
2707         "Pop the top-most stack frames of the thread stack, up to, and including 'frame'. "
2708         "The thread must be suspended to perform this command. "
2709         "The top-most stack frames are discarded and the stack frame previous to 'frame' "
2710         "becomes the current frame. The operand stack is restored -- the argument values "
2711         "are added back and if the invoke was not <code>invokestatic</code>, "
< prev index next >