Commit e4d97a56 authored by ebruneton's avatar ebruneton

added column in verifier mode to show verifier errors; fixed bug with loading of array classes

parent 12813d2d
......@@ -56,7 +56,7 @@ public class DecompiledClass {
lines.add(mlines[j]);
}
} else {
lines.add(new String[]{"", "", o.toString()});
lines.add(new String[]{"", "", o.toString(), ""});
}
}
return (String[][]) lines.toArray(new String[lines.size()][]);
......
......@@ -85,12 +85,12 @@ public class DecompiledMethod {
protected Class getClass(final Type t) {
try {
if (t.getSort() == Type.ARRAY) {
return cl.loadClass(t.getDescriptor().replace(
'/', '.'));
return Class.forName(t.getDescriptor().replace(
'/', '.'), true, cl);
}
return cl.loadClass(t.getClassName());
} catch (ClassNotFoundException e) {
throw new RuntimeException(e.toString(), e);
throw new RuntimeException(e.toString()+" " +cl, e);
}
}
});
......@@ -223,12 +223,16 @@ public class DecompiledMethod {
public String[][] getTextTable() {
Frame frame = null;
String error = "";
List lines = new ArrayList();
for (int i = 0; i < text.size(); ++i) {
Object o = text.get(i);
if (o instanceof Index) {
if (frames != null) {
frame = frames[((Index) o).insn];
if (this.error != null && ((Index) o).insn == this.errorInsn) {
error = this.error;
}
}
} else {
String locals = " ";
......@@ -246,8 +250,9 @@ public class DecompiledMethod {
stack = " ";
}
}
lines.add(new String[]{locals, stack, o.toString()});
lines.add(new String[]{locals, stack, o.toString(), error});
frame = null;
error = "";
}
}
return (String[][]) lines.toArray(new String[lines.size()][]);
......
......@@ -408,6 +408,7 @@ public class BytecodeOutlineView extends ViewPart {
new TableColumn(tableControl, SWT.LEFT).setText( BytecodeOutlinePlugin.getResourceString(NLS_PREFIX + "lvt.header"));
new TableColumn(tableControl, SWT.LEFT).setText( BytecodeOutlinePlugin.getResourceString(NLS_PREFIX + "stack.header"));
new TableColumn(tableControl, SWT.LEFT);
new TableColumn(tableControl, SWT.LEFT);
tableControl.setLinesVisible(false);
tableControl.setHeaderVisible(true);
......@@ -1287,6 +1288,7 @@ public class BytecodeOutlineView extends ViewPart {
tableControl.getColumn(0).pack();
tableControl.getColumn(1).pack();
tableControl.getColumn(2).pack();
tableControl.getColumn(3).pack();
} catch (Exception e) {
// TODO fix for Eclipse bug 84609, should be fixed in M5 "final"
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment