Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 92667 invoked from network); 18 Sep 2007 19:49:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2007 19:49:37 -0000 Received: (qmail 10883 invoked by uid 500); 18 Sep 2007 19:49:29 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 10869 invoked by uid 500); 18 Sep 2007 19:49:29 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 10860 invoked by uid 99); 18 Sep 2007 19:49:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 12:49:29 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 19:51:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 735111A9832; Tue, 18 Sep 2007 12:49:14 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r577032 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp Date: Tue, 18 Sep 2007 19:49:13 -0000 To: commits@harmony.apache.org From: gshimansky@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070918194914.735111A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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;