changeset 3739:0251d217257f

7162726: Wrong filter predicate of visible locals in SA JSJavaFrame Reviewed-by: sla, dcubed Contributed-by: Krystal Mok <rednaxelafx@gmail.com>
author sla
date Tue, 08 May 2012 20:28:35 +0200
parents d6c393b0164b
children d506b2cf2ad0
files agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFrame.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaFrame.java	Wed Apr 25 15:06:51 2012 -0700
+++ b/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);
                 }
             }