[Soot-list] Scene.v().getClasses = empty. How cand I load classes in the Scene without exceptions?
Cristina Ilie
crysgirlro at yahoo.com
Mon Apr 19 17:00:43 EDT 2010
Hello,
I extend soot in a project. I introduced a jtp phase:
Pack jtp = PackManager.v().getPack("jtp");
jtp.add(new Transform("jtp.ad", new ADiJaCForwardBodyInstrumenter()));
and in ADiJaCForwardBodyInstrumenter I load java.lang.Math:
static {
mathClass = Scene.v().loadClassAndSupport("java.lang.Math");
absFltMethodHandler = mathClass.getMethod("float abs(float)");
acosMethodHandler = mathClass.getMethod("double acos(double)");
.......................................................................................................
// other methods
}
The problem is that at this point in Scene no class is loaded. G.v().out.println(Scene.v().getClasses()) returns []. I see loadClassAndSupport iterates on a worklist which contains necessary classes and the classes given in the command line. But Scene is empty and SootResolver throws an exception (line 174). I tried also with loadBasicClass in my Main and Scene.v().getClass("java.lang.Math") in "static { ...}" but it doesn't work.
In internalTransform Scene.v().getClasses() returns all the needed classes, including my test class (AppSource). I guess this code performs after the code "static {..}". How can I load the classes in the Scene without exceptions?
Thanks,
Cristina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100419/1298cac1/attachment.html
More information about the Soot-list
mailing list