More debugging outputs.

git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1339 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 23 years ago
parent a018796a04
commit 15e7ec9dc0
  1. 12
      jode/jode/bytecode/BytecodeInfo.java.in
  2. 2
      jode/jode/flow/FlowBlock.java.in

@ -920,11 +920,6 @@ public class BytecodeInfo extends BinaryInfo implements Opcodes {
private void calculateMaxStack() { private void calculateMaxStack() {
maxStack = 0; maxStack = 0;
if (instructions.getCodeLength() == 0)
/* This is an empty method; the code below would crash */
return;
int[] stackHeights = new int[instructions.getCodeLength()]; int[] stackHeights = new int[instructions.getCodeLength()];
int[] poppush = new int[2]; int[] poppush = new int[2];
Stack todo = new Stack(); Stack todo = new Stack();
@ -1200,7 +1195,12 @@ public class BytecodeInfo extends BinaryInfo implements Opcodes {
addr += length; addr += length;
} }
instructions.setLastAddr(addr); instructions.setLastAddr(addr);
calculateMaxStack(); try {
calculateMaxStack();
} catch (RuntimeException ex) {
ex.printStackTrace();
dumpCode(GlobalOptions.err);
}
for (int i=0; i< exceptionHandlers.length; i++) for (int i=0; i< exceptionHandlers.length; i++)
if (exceptionHandlers[i].type != null) if (exceptionHandlers[i].type != null)
gcp.putClassName(exceptionHandlers[i].type); gcp.putClassName(exceptionHandlers[i].type);

@ -1729,6 +1729,8 @@ public class FlowBlock {
} }
} }
return strw.toString(); return strw.toString();
} catch (RuntimeException ex) {
return super.toString() + ": (RUNTIME EXCEPTION)";
} catch (java.io.IOException ex) { } catch (java.io.IOException ex) {
return super.toString(); return super.toString();
} }

Loading…
Cancel
Save