[Fb-contrib-commit] SF.net SVN: fb-contrib: [609] trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/de
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-08-12 02:33:31
|
Revision: 609 Author: dbrosius Date: 2006-08-11 19:33:27 -0700 (Fri, 11 Aug 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=609&view=rev Log Message: ----------- it is difficult to determine where a catch block ends, when the last instruction of the try is a return. As a start, if a store to the catch exception occurs, after the first one, assume the catch has stopped. Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java 2006-08-12 01:15:27 UTC (rev 608) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/LostExceptionStackTrace.java 2006-08-12 02:33:27 UTC (rev 609) @@ -223,7 +223,11 @@ } else if ((seen == ASTORE) || ((seen >= ASTORE_0) && (seen <= ASTORE_3))) { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); - exReg.put(Integer14.valueOf(RegisterUtils.getAStoreReg(this, seen)), (Boolean)itm.getUserValue()); + int reg = RegisterUtils.getAStoreReg(this, seen); + exReg.put(Integer14.valueOf(reg), (Boolean)itm.getUserValue()); + if ((reg == catchInfo.getRegister() && catchInfo.getFinish() == Integer.MAX_VALUE)) { + it.remove(); + } } } else if ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3))) { Boolean valid = exReg.get(Integer14.valueOf(RegisterUtils.getALoadReg(this, seen))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |