[Soot-list] Trying to get all reachable methods

Eric Bodden eric.bodden at mail.mcgill.ca
Fri Aug 15 09:22:40 EDT 2008


Hi Manjiri.

You have to call update() on ReachableMethods:

    /** Causes the QueueReader objects to be filled up with any methods
     * that have become reachable since the last call. */
    public void update() {
    ...


Eric

2008/8/14 Manjiri Namjoshi <manjiri.namjoshi at googlemail.com>:
> Hello,
>
> I am new to call graph and soot.
> I am interested to get all Reachable Methods from methodA:
>
> void methodA() {
>        methodB();
> }
>
> void methodB() {
>        methodC();
> }
>
> void methodC() {
> }
>
>         Iterator edgesListIt = cg.edgesOutOf(sootMethod);
>         Targets targets = new Targets(edgesListIt);
>
>         ReachableMethods reachableMethods = new ReachableMethods(cg,
> targets);
>         QueueReader queueReader = reachableMethods.listener();
>
> sootMethod is methodA and cg is the call graph.
>
> The queueReader is only containing methodB. But, i am interested to get
> methodC as well.
>
> Thank You.
>
> Sincerely,
> Manjiri
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list