[Soot-list] Adding classes to soot

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Mar 12 13:07:15 EDT 2008


Hi.

 Soot produces the call graph for every method transitively reachable
 from the main(..) method in your main class. You can set the main
 class using the -main-class parameter. If your Stack classes are
 reachable from this main method than Soot should pick them up
 automatically.

 Eric


 On 12/03/2008, irem <irem at nada.kth.se> wrote:
 > 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
 >
 >  _______________________________________________
 >  Soot-list mailing list
 >  Soot-list at sable.mcgill.ca
 >  http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
 >



--
 Eric Bodden
 Sable Research Group
 McGill University, Montréal, Canada


More information about the Soot-list mailing list