[Soot-list] call graph

Eric Bodden eric.bodden at mail.mcgill.ca
Thu Jul 30 18:11:19 EDT 2009


Hi James.

Have you enabled whole-program mode with the -w flag?

Eric

2009/7/29 James Hamilton <jameshamilton at whoyouknow.co.uk>:
> 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
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
Eric Bodden
Software Technology Group
Technical University Darmstadt, Germany


More information about the Soot-list mailing list