[Soot-list] Adding classes to soot
irem
irem at nada.kth.se
Wed Mar 12 12:52:02 EDT 2008
Hello everyone!
I am sure this has been asked. But I have been reading the command line
options and so on without coming up with an answer.
My question is extremely simple. I have been using soot to extract the
call graph for a single class without problem. Now I want to use
packages, that is multiple classes.
I have a package called Stack in the
directory /home/irem/workspace/Analyzer/Test/ which I want to analyze.
I add this both to the class path and the --process-dir option.
The way I run my program is through calling the following main with
the following arguments: Stack.FixedStack Stack.StackException
Stack.StackTest.
Here is how I call soot:
---------------------------------------------------------------------------------------------
public static void main(String[] args) {
List<String> sootArgs = new LinkedList(Arrays.asList(args));
//enable whole program mode
sootArgs.add("-W");
sootArgs.add("--throw-analysis");
sootArgs.add("unit");
sootArgs.add("-p");
sootArgs.add("wjop");
sootArgs.add("enabled:true");
sootArgs.add("-p");
sootArgs.add("wjop.si");
sootArgs.add("enabled:false");
sootArgs.add("-cp");
sootArgs.add(".:/usr/lib/jvm/java-6-sun/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun/jre/lib/jce.jar:
/usr/lib/jvm/java-6-sun/jre/lib/rt.jar:/home/irem/workspace/Analyzer/Test/");
sootArgs.add("--process-dir");
sootArgs.add("/home/irem/workspace/Test/");
String[] argsArray = sootArgs.toArray(new String[0]);
PackManager.v().getPack("wjop").
add(new Transform("wjop.mytrans",new MyTransformer(args)));
soot.Main.main(argsArray);
}
--------------------------------------------------------------------------------------
The problem is no call graph is produced for any of the application
classes, which works if a single class is given as an argument.
Thanks for the help,
Irem Aktug
More information about the Soot-list
mailing list