[Soot-list] Printing an ExceptionalUnitGraph

irem irem at nada.kth.se
Sat Nov 3 17:56:54 EDT 2007


Hello!

I may be mistaken here, but it seems to me that the toString of this
graph is wrong:

 public String toString() {
        Iterator it = unitChain.iterator();
        StringBuffer buf = new StringBuffer();
        while(it.hasNext()) {
            Unit u = (Unit) it.next();

            buf.append("// preds: "+getPredsOf(u)+"\n");
            buf.append("// unexceptional preds:
"+getUnexceptionalPredsOf(u)+"\n");
            buf.append("// exceptional preds:
"+getExceptionalPredsOf(u)+"\n");
            buf.append(u.toString() + '\n');
            buf.append("// exception destinations:
"+getExceptionDests(u)+"\n");
            buf.append("// unexceptional succs:
"+getUnexceptionalPredsOf(u)+"\n");
            buf.append("// exceptional succs:
"+getExceptionalPredsOf(u)+"\n");
            buf.append("// succs "+getSuccsOf(u)+"\n");
        }

        return buf.toString();
    }

As you see, it does not print the successors, rather again the
predecessors. 

Sorry for bothering the list if this has been noted before. 

irem



More information about the Soot-list mailing list