[Soot-list] Call graph strangeness
Ondrej Lhotak
olhotak at sable.mcgill.ca
Wed Sep 28 11:32:20 EDT 2005
On Tue, Sep 27, 2005 at 06:47:32PM -0700, Graham Hughes wrote:
> When I run the attached file through Soot with Spark enabled, I find
> that the call graph claims that foo is never called; that is, the foo
> method is not in Scene.v ().getCallGraph ().sourceMethods (). This is
The sourceMethods() method does not give the set of methods that may be
called, but as its javadoc says:
/** Returns an iterator over all methods that are the sources of at least
* one edge. */
That is, it returns the set of all methods that have at least one
outgoing call edge. In your example, the foo method has no call sites,
so it is not in this set.
It sounds like you're looking for the set of all methods reachable
through the call graph, which you can get by calling
Scene.v().getReachableMethods().listener(). This returns a QueueReader
which implements Iterator.
Hope that helps...
Ondrej
> obviously false. I am running Soot 2.2.2, which was the latest version
> available on the web site last I checked, with the following options:
>
> -w -p cg.spark enabled:true
>
> Do you have any suggestions?
>
> Graham
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
More information about the Soot-list
mailing list