harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r577032 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp
Date Tue, 18 Sep 2007 19:49:13 GMT
Author: gshimansky
Date: Tue Sep 18 12:49:13 2007
New Revision: 577032

URL: http://svn.apache.org/viewvc?rev=577032&view=rev
Log:
Fixed the problem with lazy resolution for invokestatic and invokespecial
bytecodes when target method is not resolved yet. In this case no single
step breakpoint should be set until the method is resolved and compiled.
This is a 2nd fix for HARMONY-4724.


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp?rev=577032&r1=577031&r2=577032&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp Tue Sep 18 12:49:13 2007
@@ -308,8 +308,6 @@
                     (*next_step)->native_location = ip;
                     (*next_step)->no_event = true;
                 }
-                else
-                    *count = 0;
             }
             break;
 
@@ -335,16 +333,19 @@
             {
                 unsigned short index = jvmti_GetHalfWordValue( bytecode, location + 1 );
                 Class *klass = method_get_class( method );
-                assert(klass->get_constant_pool().is_entry_resolved(index));
 
-                if(!method_is_native(klass->get_constant_pool().get_ref_method(index)))
{
-                    *count = 1;
-                    error = _allocate( sizeof(jvmti_StepLocation), (unsigned char**)next_step
);
-                    assert( error == JVMTI_ERROR_NONE );
-                    (*next_step)->method = klass->get_constant_pool().get_ref_method(index);
-                    (*next_step)->location = 0;
-                    (*next_step)->native_location = NULL;
-                    (*next_step)->no_event = false;
+                if (klass->get_constant_pool().is_entry_resolved(index))
+                {
+                    Method *invoke_method = klass->get_constant_pool().get_ref_method(index);

+                    if(!method_is_native(invoke_method)) {
+                        *count = 1;
+                        error = _allocate( sizeof(jvmti_StepLocation), (unsigned char**)next_step
);
+                        assert( error == JVMTI_ERROR_NONE );
+                        (*next_step)->method = invoke_method;
+                        (*next_step)->location = 0;
+                        (*next_step)->native_location = NULL;
+                        (*next_step)->no_event = false;
+                    }
                 }
             }
             break;
@@ -366,8 +367,6 @@
                     (*next_step)->native_location = ip;
                     (*next_step)->no_event = true;
                 }
-                else
-                    *count = 0;
             }
             break;
 



Mime
View raw message