[Soot-list] Howto generate a CallGraph?
li xin
li-xin at jaist.ac.jp
Fri Apr 18 03:27:00 EDT 2008
Hi,
The error message at least shows that you have to put jce.jar into your
soot-class-path.
Regards, LI
On Fri, Apr 18, 2008 at 3:52 PM, Marco Bakera <marco.bakera at uni-dortmund.de>
wrote:
> Hey everybody,
>
> I try to generate a call graph from a given class. I thought the following
> snippet would do but ran into troubles.
>
> public CallGraphCreator(String clazz) {
> G.reset();
>
>
> Scene.v().setSootClassPath("/home/bakera/tools/jdk1.5.0_15/jre/lib/rt.jar");
>
> // SootClass sootClass =
> Scene.v().loadClassAndSupport(clazz);
>
> String opts = "-w -keep-line-number -x javax " + clazz;
> // sootClass.setApplicationClass();
> // Scene.v().setMainClass(sootClass);
> Main.main(opts.split(" "));
>
> CallGraph callGraph = Scene.v().getCallGraph();
>
> }
>
> public static void main(String[] args) {
> new CallGraphCreator(CallGraphCreator.class.getName());
> }
>
>
>
> When starting the program I get the following stacktrace.
>
> Exception in thread "main" java.lang.RuntimeException: couldn't find
> class:
> javax.crypto.Cipher (is your soot-class-path set properly?)
> at soot.SootResolver.bringToHierarchy(SootResolver.java:139)
> at soot.SootResolver.bringToSignatures(SootResolver.java:172)
> at soot.SootResolver.bringToBodies(SootResolver.java:214)
> at soot.SootResolver.processResolveWorklist(SootResolver.java:100)
> at soot.SootResolver.resolveClass(SootResolver.java:89)
> at soot.Scene.tryLoadClass(Scene.java:305)
> at soot.Scene.loadBasicClasses(Scene.java:855)
> at soot.Scene.loadNecessaryClasses(Scene.java:881)
> at soot.Main.run(Main.java:170)
> at soot.Main.main(Main.java:146)
> at
>
> de.metaframe.plugin.soot2jabc.CallGraphCreator.<init>(CallGraphCreator.java:32)
> at
>
> de.metaframe.plugin.soot2jabc.CallGraphCreator.main(CallGraphCreator.java:39)
>
>
> What's the common way to create a simple call graph? Thanks for any
> hint/code
> snippet/pointer in documentation on this. :)
>
>
> Greetings from Germany,
> Marco.
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20080418/87c4bee4/attachment-0001.htm
More information about the Soot-list
mailing list