harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r479789 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_stack.cpp
Date Mon, 27 Nov 2006 22:33:00 GMT
Author: gshimansky
Date: Mon Nov 27 14:32:59 2006
New Revision: 479789

URL: http://svn.apache.org/viewvc?view=rev&rev=479789
Log:
Applied HARMONY-2324 [drlvm] Native stack contains wrong frame

Tests passed on windows xp, ubuntu and suse 10 x86_64


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_stack.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_stack.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_stack.cpp?view=diff&rev=479789&r1=479788&r2=479789
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_stack.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_stack.cpp Mon Nov 27 14:32:59 2006
@@ -229,14 +229,17 @@
         { // Native stub, previous frame is Java frame
             assert(si_is_native(si));
 
-            // Mark first frame (JNI stub) as Java frame
-            if (frame_array && frame_count == 1)
-                frame_array[frame_count - 1].java_depth = java_depth;
+            if (si_get_method(si)) // Frame represents JNI frame
+            {
+                // Mark first frame (JNI stub) as Java frame
+                if (frame_array && frame_count == 1)
+                    frame_array[frame_count - 1].java_depth = java_depth;
 
-            if (frame_array && frame_count > 1)
-                frame_array[frame_count - 2].java_depth = java_depth;
+                if (frame_array && frame_count > 1)
+                    frame_array[frame_count - 2].java_depth = java_depth;
 
-            ++java_depth;
+                ++java_depth;
+            }
 
             // Ge to previous stack frame from StackIterator
             si_goto_previous(si);



Mime
View raw message