[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refreshing InvokeGraph, getting calling sites



The Static Method Binder updates the invoke graph after it changes
virtual calls to static calls of clones of the original methods. You
could look there for example code that updates the invoke graph.

The invoke graph and its interface were some of the more messy and poorly
understood parts of Soot 1.2.x, and this is why they have been replaced
in 2.0 with a (hopefully) cleaner and more complete representation:
the CallGraph, which unifies what was previously in InvokeGraph and
MethodCallGraph. There are a number of slides dealing with the new
CallGraph in the PLDI tutorial slides:
http://www.sable.mcgill.ca/soot/tutorial/index.html

Ondrej

On Mon, Jun 16, 2003 at 02:23:04PM +0200, Richard Stahl wrote:
> Hello,
> 
> I would like to ask you how to refresh the state of the invokeGraph 
> after adding a method to some class (Dummy.dummy() -> Dummy.x_dummy()). 
> I also add a method invokeStmt to some other method which invokes the 
> above one (x_dummy()).
> 
> As more callers can exists which call this method I would like to use 
> invokeGraph to getCallingSitesOf(method_x_dummy) yet it returns an empty 
> list!
> 
> I have tried to refreshReachableMethods() on InvokeGraph after adding 
> the cloned method (x_dummy()) yet it also does not work.
> 
> Could you, please let me know how to properly update the state of the 
> invokeGraph to get the callingSites.
> 
> The second question:
> Does the invokeGraph.getCallingSitesOf(method_x) return List of Stmts or 
> List of SootMethods? How can I get a List of calling SootMethods?
> 
> Thanks a lot.
> 
> Best regards,
> 
> Richard
> 
>