[Soot-list] is this a bug?
Peng Li
lipeng360 at gmail.com
Mon Jan 29 21:58:59 EST 2007
Hi sootmates
For my previous email, I am wondering if it is a bug. Because no
matter what new transforms which I put into the the phase Jimple Body
Creation (jb), they did not work and also no error messages presented.
Furthermore, I have also tried to put new subphase into the beginning
of phase cg(before Class Hierarchy Analysis (cg.cha) ) using
"insertBefore" . It also did not work and no error message show up.
Could anyone tell me if this is a bug of some options which I did not switch on?
Looking forward to hearing from your reply!!
Cheers
peng
PS, The code which i used to test,
import soot.PackManager;
import soot.PhaseOptions;
import soot.Scene;
import soot.Transform;
public class test {
public static void main(String[] args) throws Exception {
Scene.v().setSootClassPath("D:/WorkSpace_SOOT/test;C:/j2sdk1.4.2_12/jre/lib/rt.jar");
String[] a={"test"};
PackManager.v().getPack("jb").add(new Transform("jb.iter", iter.v()));
PhaseOptions.v().setPhaseOption("jb.iter", "enabled:true");
soot.Main.main(a);
}
}
import soot.*;
import soot.jimple.*;
import java.util.*;
public class iter extends BodyTransformer{
private static iter instance = new iter();
public static iter v() { return instance; }
protected void internalTransform(Body body, String phase, Map options) {
Iterator ui = body.getUnits().iterator();
while (ui.hasNext()) {
Stmt s = (Stmt)ui.next();
System.out.println(s);
}
}
}
More information about the Soot-list
mailing list