[Soot-list] Soot as a rewriting tool - adding a method during body transformation

David Mohr dmohr at cs.unm.edu
Wed Oct 7 12:05:37 EDT 2009


On Wed, Oct 7, 2009 at 8:11 AM, Patrick Lam <plam at sable.mcgill.ca> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Eric Bodden wrote:
>> Hi David.
>>
>> I think the correct way to go about this is to:
>>
>> 1.) Enable whole-program mode (I know you don't like it).
>>
>> 2.) Disable all w* packs except the pack wjtp, which is empty by
>> default. (Set their phase option "enabled" to false.) Also disable the
>> cg pack. This should prevent Soot from running expensive whole-program
>> analyses.
>>
>> 3.) Add a SceneTransformer to the wjtp pack and add the methods in there.
>
> I'm surprised that Soot doesn't use a snapshotIterator for iterating on
> the methods. On the other hand, that would have overhead (it shouldn't,
> but it probably does).
>
> An alternative to Eric's suggestion might be to create your own
> (Scene)Pack and add the methods in that Pack.

Yes, that's what I ended up doing. It seems to work well. Thanks for
the suggestion!

~David


More information about the Soot-list mailing list