[Soot-list] Whole program analysis
Aditya Bhandari
aditya_bhandari at iitb.ac.in
Tue Feb 11 10:26:46 EST 2014
Hello,
I am very new to using Soot. I am using Eclipse to run a simple live
variables analysis using Soot on the following test program.
*public class Input {*
* private Lock lock = new ReentrantLock();*
* private int count = 0;*
* private class Thread1 extends Thread {*
* public void run() {*
* lock.lock();*
* count++;*
* lock.unlock();*
* }*
* }*
* public static void main(String[] args) {*
* Input ip = new Input();*
* Thread t1 = new Thread(ip.new Thread1());*
* t1.start();*
* }*
*}*
Even on using the -w option, the *run()* method is not reached during the
analysis. How can I enable Soot to enter the *run()* method when
*t1.start()* is called?
Also, how can I extract the call graph for the program?
I have tried the following for obtaining the call graph (read this in a
beginner's tutorial on using Soot). But, it produces a out of memory error.
*public class Livemain {*
* public static void main(String[] args) {*
* if(args.length == 0) System.exit(-1);*
* PackManager.v().getPack("wjtp").*
* add(new Transform("wjtp.liveVariables", new SceneTransformer() {*
* @Override*
* protected void internalTransform (String phaseName, Map options) {*
* CallGraph cg = Scene.v().getCallGraph();*
* System.out.println("call graph: " + cg);*
* }*
* }));*
* soot.Main.main(args);*
* }*
*}*
Thank you in advance!
Regards,
Aditya Bhandari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140211/8bb0b297/attachment.html
More information about the Soot-list
mailing list