[Soot-list] Problem in Call graph construction
Asif Iqbal
iqbala24 at mcmaster.ca
Tue Nov 16 13:41:52 EST 2010
Hi Eric and others,
I am trying to generate call graph for a simple Java class. Below is my code snippet:
.....
Scene.v().setSootClassPath(Scene.v().getSootClassPath() + ":" +
".:" +
"/Developer/Projects/SootCallGraph");
System.out.println(Scene.v().getSootClassPath());
SootClass sootClass = Scene.v().loadClassAndSupport("InheritanceTest");
sootClass.setApplicationClass();
Scene.v().setMainClass(sootClass);
CHATransformer.v().transform();
String [] opts = {"-W", "InheritanceTest" };
String[] args = {"-f", "X", "InheritanceTest"};
Main.main(opts);
//Main.main(args);
.....
At the line Main.main(opts) I get the following exception:
Exception in thread "main" java.lang.RuntimeException: This operation requires resolving level BODIES but java.lang.Object is at resolving level SIGNATURES
If you are extending Soot, try to add the following call before calling soot.Main.main(..):
Scene.v().addBasicClass(java.lang.Object,BODIES);
Otherwise, try whole-program mode (-w).
Do you have any idea what is causing this ? Note that instead of Main.main(opts) if I use the commented line Main.main(args) then it works and successfully generates the xml. So is there any problem in the whole program mode ?
Sincerely,
Asif Iqbal
Graduate Student
Department of Computing and Software
McMaster University
Hamilton, ON
Canada L8S4K1
iqbala24 at mcmaster.ca
Cell: +1 905 746-7459
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20101116/b4c1cb40/attachment.html
More information about the Soot-list
mailing list