[Soot-list] Transform of call sites

Hal Hildebrand hal.hildebrand at gmail.com
Sun Jul 25 10:50:25 EDT 2010


I need to make a transform of method bodies for call sites to specific methods.  Basically, I need to provide a pre and post sequence of instructions around each of these targeted method calls.  For InvokeStatement units, I know how to do this.  For the general case, my current theory is that I'd have to iterate over the units and look at the value boxes of the unit to see if the implement the InstanceInvokeExpr interface.  Then, I'd have to replace this value with a new local, and insert the pre sequence, a new assignment unit to this new local using the invocation statement as the assigned value, then the post sequence.  All before the original unit that contained the method I'm interested in.

Does this sound sane, or is there a better way, or perhaps some examples of doing something similar somewhere?

Thanks,

-Hal


More information about the Soot-list mailing list