[Soot-list] Error in retrieving callgraph: (No call graph present in Scene)

hesam ghafouri hsmghfr at yahoo.com
Mon Oct 10 15:36:06 EDT 2016


Hello everyone, 

I am trying to get the callgraph of a .java class but it returns the following error (I am able to get the Methods and ExceptionalBlockGraph and so on but not the callgraph):
Exception in thread "main" java.lang.RuntimeException: No call graph present in Scene. Maybe you want Whole Program mode (-w).
Here is my code:
Options.v().set_keep_line_number(true);
Options.v().set_whole_program(true);
Options.v().set_allow_phantom_refs(true);
Options.v().set_src_prec(Options.src_prec_java);
Options.v().set_output_format(Options.output_format_jimple);
Options.v().set_soot_classpath(classpath);
Options.v().set_prepend_classpath(true);
Options.v().setPhaseOption("cg.spark", "on");SootClass sootClass = Scene.v().loadClassAndSupport("Test1");sootClass.setApplicationClass();SootClass classForEdge = Scene.v().getSootClass("Test1");
CallGraph cg = Scene.v().getCallGraph();
Thank you in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20161010/7bfd1f0c/attachment.html 


More information about the Soot-list mailing list