7162726: Wrong filter predicate of visible locals in SA JSJavaFrame
authorsla
Tue, 08 May 2012 20:28:35 +0200
changeset 12725 523b70f45c0e
parent 12504 7729f0766700
child 12727 fa7c9d0884e6
7162726: Wrong filter predicate of visible locals in SA JSJavaFrame Reviewed-by: sla, dcubed Contributed-by: Krystal Mok <rednaxelafx@gmail.com>
hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFrame.java
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFrame.java	Wed Apr 25 15:06:51 2012 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFrame.java	Tue May 08 20:28:35 2012 +0200
@@ -153,7 +153,8 @@
             List visibleVars = new ArrayList(0);
             for (int i = 0; i < localVars.length; i++) {
                 LocalVariableTableElement cur = localVars[i];
-                if (cur.getStartBCI() >= bci && cur.getLength() > 0) {
+                int startBCI = cur.getStartBCI();
+                if (startBCI <= bci && bci < startBCI + cur.getLength()) {
                     visibleVars.add(cur);
                 }
             }