[Soot-list] call graph
James Hamilton
jameshamilton at whoyouknow.co.uk
Wed Jul 29 16:00:23 EDT 2009
Hi,
How do get the call graph of a program?
I used the following code:
> CallGraph cg = Scene.v().getCallGraph();
>
> Iterator it = cg.listener();
> while( it.hasNext() ) {
> soot.jimple.toolkits.callgraph.Edge e =
> (soot.jimple.toolkits.callgraph.Edge) it.next();
> System.out.println(""+e.src()+e.srcStmt()+" -> "+e.tgt() +
> ";");//="+e.kind()+"=>
> }
It tells me to add code:
Scene.v().addBasicClass(java.lang.Integer,BODIES), etc
I run it and get another error, etc. Until I've added about 10 similar
lines.
Then it gives me a huge call graph. Is there a way I can easily get the
call graph of just my application classes and not the Java libraries?
Thanks,
James
More information about the Soot-list
mailing list