Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6216027
Votes 0
Synopsis JVMTI Spec: Support early return from methods
Category hotspot:jvmti
Reported Against
Release Fixed mustang(b37)
State 10-Fix Delivered, request for enhancement
Priority: 3-Medium
Related Bugs 6253538 , 6261254 , 6175634
Submit Date 11-JAN-2005
Description
We need the following function to be implemented in JVM TI to support debugger:
      jvmtiError EarlyReturnInt(jvmtiEnv* env, jthread thr, jvalue value);
Please, see the corresponding Debugger CR:
   6175634: Allow early return from methods

Short description:
  - Simulate a return from the topmost stack frame of thread's stack,
    returning 'value' if needed.
  - 'value' must be assignment compatible with the return type of the method
     for the topmost frame.
  - Locks acquired by the topmost frame are released.
  - Finally blocks are not executed.
  - The specified thread must be the current thread or must be suspended.
  - The current method must be non-native Java programming language methods
  - JVM TI events like MethodExit are generated as in usual return.
  - This function may only be called during the live phase.
  - The set of the return codes is the same as for PopFrame plus this one:
      JVMTI_ERROR_TYPE_MISMATCH - If the top-frame function return type is not
                                  an appropriate type for the function used.

  xxxxx@xxxxx   2005-04-11 20:12:33 GMT
  xxxxx@xxxxx   2005-04-26 07:01:51 GMT
Work Around
N/A
Evaluation
Decided to add the following ForceEarlyReturn JVMTI functions:

jvmtiError ForceEarlyReturnObject(jvmtiEnv* env, jthread thread, jobject value);
jvmtiError ForceEarlyReturnInt(jvmtiEnv* env, jthread thread, jint value);
jvmtiError ForceEarlyReturnLong(jvmtiEnv* env, jthread thread, jlong value);
jvmtiError ForceEarlyReturnFloat(jvmtiEnv* env, jthread thread, jfloat value);
jvmtiError ForceEarlyReturnDouble(jvmtiEnv* env, jthread thread, jdouble value);
jvmtiError ForceEarlyReturnVoid(jvmtiEnv* env, jthread thread);

For details, please, see the description.


  xxxxx@xxxxx   2005-04-11 20:01:04 GMT
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang