7162726: Wrong filter predicate of visible locals in SA JSJavaFrame
Reviewed-by: sla, dcubed
Contributed-by: Krystal Mok <rednaxelafx@gmail.com>
--- 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);
}
}