[Soot-list] How to get trimmed Callgraph?

Richard L. Halpert richhal22 at gmail.com
Thu Jul 8 16:45:40 EDT 2010


>From a SceneTransformer, you could do this:
*
ReachableMethods rm = Scene.v().getReachableMethods();
Iterator appClassesIt = Scene.v().getApplicationClasses().iterator();
for(SootClass appClass : Scene.v().getApplicationClasses()) {
  for(Method m : **appClass**.getMethods())
    System.out.println(m + (rm.contains(m) ? " is" : " isn't") + "
reachable.");
}
*
-Richard

On Tue, Jul 6, 2010 at 2:21 AM, Kishen Das <kishen.das at gmail.com> wrote:

> Dear All,
>
> I am trying to get a trimmed version of the callgraph.
> Right now its giving huge bunch of reachable nodes.
> How can I restrict it to what is there in the current class?
>
> Suppose, I have this class Helloworld.java and I just want to know the
> reachable code, like the methods of this class that are called from the main
> method of this class.
>
> Is there any standard way of doing this?
>
> Thanks and Regards,
> Kishen Das
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100708/b0383fd1/attachment.html 


More information about the Soot-list mailing list