From e8271649e00771a8bbee240aa1bbbc27a672b22a Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Thu, 1 Jun 2023 15:33:20 +0000 Subject: [PATCH] 8309146: extend JDI StackFrame.setValue() and JDWP StackFrame.setValues minimal support for virtual threads Reviewed-by: sspitsyn, alanb --- src/java.se/share/data/jdwp/jdwp.spec | 4 ++-- src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/java.se/share/data/jdwp/jdwp.spec b/src/java.se/share/data/jdwp/jdwp.spec index 323a48e591e..6d431959652 100644 --- a/src/java.se/share/data/jdwp/jdwp.spec +++ b/src/java.se/share/data/jdwp/jdwp.spec @@ -2641,7 +2641,7 @@ JDWP "Java(tm) Debug Wire Protocol" "

" "If the thread is a virtual thread then this command can be used to set " "the value of local variables in the top-most frame when the thread is " - "suspended at a breakpoint or single step event. The target VM may support " + "suspended at an event. The target VM may support " "setting local variables in other cases." (Out (threadObject thread "The frame's thread. ") @@ -2659,7 +2659,7 @@ JDWP "Java(tm) Debug Wire Protocol" (Error INVALID_THREAD) (Error INVALID_OBJECT) (Error INVALID_FRAMEID) - (Error OPAQUE_FRAME "The thread is a virtual thread and the target VM " + (Error OPAQUE_FRAME "The thread is a suspended virtual thread and the target VM " "does not support setting the value of local " "variables in the frame.") (Error VM_DEAD) diff --git a/src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java b/src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java index 204760e006f..f00bc206f85 100644 --- a/src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java +++ b/src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -201,7 +201,7 @@ public interface StackFrame extends Mirror, Locatable { *

* In the case of virtual threads, the target VM supports setting values * of local variables when this frame is the topmost frame and the thread - * is suspended at a breakpoint or single step event. The target VM may + * is suspended at an event. The target VM may * support setting local variables in other cases. *

* Object values must be assignment compatible with the variable type @@ -224,7 +224,7 @@ public interface StackFrame extends Mirror, Locatable { * invalid. Once the frame's thread is resumed, the stack frame is * no longer valid. * @throws OpaqueFrameException if this frame is on the call stack of a - * virtual thread and the target VM does not support setting the value of + * suspended virtual thread, and the target VM does not support setting the value of * local variables in this frame. * @throws VMCannotBeModifiedException if the VirtualMachine is read-only. * @see VirtualMachine#canBeModified()