[Soot-list] code example to create CFG from a jar file?

Gias Uddin gias98 at gmail.com
Mon Aug 26 15:52:20 EDT 2013


I need to do the following with soot:
 (1) create the CFG of a given method, and
 (2) print the list of fields (e.g., global) accessed by a given method.

The input to soot is a jar file, e.g., rt.jar or joda-time.jar, etc. I
found command line examples on how to process jar files  using soot.
However, I need to do this just by calling soot from my Java source
code, because I will do additional automated processing on the CFG or on
the fields. I am sure this can be done quite easily by soot (e.g., CFG
creation code can be found in the Soot survivor's guide), but I am not
sure how I can load a jar file and provide soot a method name from the
jar file as an input to process. Thanks very much for your helps.

- Gias


More information about the Soot-list mailing list