From 27bfb72a258330cac286098e7fb715b6c8490f19 Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Tue, 15 Jul 2025 15:47:40 -0700 Subject: [PATCH 1/2] Update spec w.r.t. OPAQUE_FRAME errors --- src/java.se/share/data/jdwp/jdwp.spec | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/java.se/share/data/jdwp/jdwp.spec b/src/java.se/share/data/jdwp/jdwp.spec index 5206a0c6ae95d..77a0b24069180 100644 --- a/src/java.se/share/data/jdwp/jdwp.spec +++ b/src/java.se/share/data/jdwp/jdwp.spec @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, 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 @@ -2150,8 +2150,6 @@ JDWP "Java(tm) Debug Wire Protocol" (Error THREAD_NOT_SUSPENDED) (Error OPAQUE_FRAME "Attempted to return early from a frame " "corresponding to a native method, " - "the thread is a suspended virtual thread and the target " - "VM is unable to force its current frame to return, " "or the implementation is unable to provide this " "functionality on this frame.") (Error NO_MORE_FRAMES) @@ -2625,6 +2623,10 @@ JDWP "Java(tm) Debug Wire Protocol" (Error INVALID_OBJECT) (Error INVALID_FRAMEID) (Error INVALID_SLOT) + (Error OPAQUE_FRAME "Attempted to get the value of local variables in a frame " + "corresponding to a native method, " + "or the implementation is unable to provide this " + "functionality on this frame.") (Error VM_DEAD) ) ) @@ -2662,9 +2664,11 @@ JDWP "Java(tm) Debug Wire Protocol" (Error INVALID_THREAD) (Error INVALID_OBJECT) (Error INVALID_FRAMEID) - (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 INVALID_SLOT) + (Error OPAQUE_FRAME "Attempted to set the value of local variables in a frame " + "corresponding to a native method, " + "or the implementation is unable to provide this " + "functionality on this frame.") (Error VM_DEAD) ) ) @@ -2714,9 +2718,9 @@ JDWP "Java(tm) Debug Wire Protocol" (Error THREAD_NOT_SUSPENDED) (Error NO_MORE_FRAMES) (Error OPAQUE_FRAME "If one or more of the frames to pop is a native " - "method or its caller is a native method, or the " - "thread is a suspended virtual thread and the implementation " - "was unable to pop the frames.") + "method or its caller is a native method, " + "or the implementation is unable to provide this " + "functionality on this frame.") (Error NOT_IMPLEMENTED) (Error VM_DEAD) ) From b99935a021b4e19604be043c62978692f7f8a662 Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Mon, 21 Jul 2025 23:06:31 -0700 Subject: [PATCH 2/2] make workding more like JVMTI spec --- src/java.se/share/data/jdwp/jdwp.spec | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/java.se/share/data/jdwp/jdwp.spec b/src/java.se/share/data/jdwp/jdwp.spec index 77a0b24069180..11e3160ec9740 100644 --- a/src/java.se/share/data/jdwp/jdwp.spec +++ b/src/java.se/share/data/jdwp/jdwp.spec @@ -2148,10 +2148,8 @@ JDWP "Java(tm) Debug Wire Protocol" "the thread is not alive.") (Error INVALID_OBJECT "Thread or value is not a known ID.") (Error THREAD_NOT_SUSPENDED) - (Error OPAQUE_FRAME "Attempted to return early from a frame " - "corresponding to a native method, " - "or the implementation is unable to provide this " - "functionality on this frame.") + (Error OPAQUE_FRAME "Unable to force the current frame to return " + "(e.g. the current frame is executing a native method).") (Error NO_MORE_FRAMES) (Error NOT_IMPLEMENTED) (Error TYPE_MISMATCH "Value is not an appropriate type for the " @@ -2623,10 +2621,8 @@ JDWP "Java(tm) Debug Wire Protocol" (Error INVALID_OBJECT) (Error INVALID_FRAMEID) (Error INVALID_SLOT) - (Error OPAQUE_FRAME "Attempted to get the value of local variables in a frame " - "corresponding to a native method, " - "or the implementation is unable to provide this " - "functionality on this frame.") + (Error OPAQUE_FRAME "Unable to get the value of local variables in the frame " + "(e.g. the frame is executing a native method).") (Error VM_DEAD) ) ) @@ -2665,10 +2661,8 @@ JDWP "Java(tm) Debug Wire Protocol" (Error INVALID_OBJECT) (Error INVALID_FRAMEID) (Error INVALID_SLOT) - (Error OPAQUE_FRAME "Attempted to set the value of local variables in a frame " - "corresponding to a native method, " - "or the implementation is unable to provide this " - "functionality on this frame.") + (Error OPAQUE_FRAME "Unable to set the value of local variables in the frame " + "(e.g. the frame is executing a native method).") (Error VM_DEAD) ) ) @@ -2717,10 +2711,9 @@ JDWP "Java(tm) Debug Wire Protocol" (Error INVALID_FRAMEID) (Error THREAD_NOT_SUSPENDED) (Error NO_MORE_FRAMES) - (Error OPAQUE_FRAME "If one or more of the frames to pop is a native " - "method or its caller is a native method, " - "or the implementation is unable to provide this " - "functionality on this frame.") + (Error OPAQUE_FRAME "Unable to pop one or more of the frames " + "(e.g. one or more of the frames to pop is a native " + "method or its caller is a native method).") (Error NOT_IMPLEMENTED) (Error VM_DEAD) )