[Soot-list] how to generate call graph?

Mike Schneider mike4 at cmu.edu
Sat Dec 10 18:51:51 EST 2005


Hi,
I'm trying to run Soot from the command line to generate a call graph.
 Seems like this should be simple but I'm not getting it.

Below is the command I am running (which I took from one of the
tutorials, I must confess I don't understand it) and the error that I
get.

Can any one tell me the correct way to generate the call graph so it
goes into a text file that I can then analyse myself?   Thanks.

Mike Schneider


java -Xmx1500m soot.Main -W -app -f jimple -p jb
use-original-names:true -p cg.spark on -p cg.spark
simplify-offline:true -p jop.cse on -p wjop.smb on -p wjop.si off
SimulationRunner

Soot started on Sat Dec 10 18:50:36 GMT-05:00 2005
[Call Graph] For information on where the call graph may be
incomplete, use the verbose option to th
e cg phase.
[Spark] Pointer Assignment Graph in 5.3 seconds.
[Spark] Type masks in 0.5 seconds.
[Spark] Pointer Graph simplified in 0.0 seconds.
Exception in thread "main" java.lang.NullPointerException
        at soot.coffi.Util.getLocalForIndex(Util.java:840)
        at soot.coffi.CFG.generateJimple(CFG.java:3241)
        at soot.coffi.CFG.jimplify(CFG.java:1464)
        at soot.coffi.CFG.jimplify(CFG.java:1127)
        at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:98)
        at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:80)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:304)
        at soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod(OnFlyCallGraphBuild
er.java:182)
        at soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables(OnFlyCallGraphBuil
der.java:81)
        at soot.jimple.spark.solver.OnFlyCallGraph.build(OnFlyCallGraph.java:69)
        at soot.jimple.spark.solver.PropWorklist.handleVarNode(PropWorklist.java:126)
        at soot.jimple.spark.solver.PropWorklist.propagate(PropWorklist.java:55)
        at soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:121)
        at soot.SceneTransformer.transform(SceneTransformer.java:39)
        at soot.Transform.apply(Transform.java:89)
        at soot.RadioScenePack.internalApply(RadioScenePack.java:60)
        at soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPack.java:40)
        at soot.Pack.apply(Pack.java:110)
        at soot.PackManager.runWholeProgramPacks(PackManager.java:357)
        at soot.PackManager.runPacks(PackManager.java:304)
        at soot.Main.run(Main.java:179)
        at soot.Main.main(Main.java:153)


More information about the Soot-list mailing list