[Soot-list] This operation requires resolving level BODIES butjava.lang.Object is at resolving level SIGNATURES

Nicholas Irving exnirving at gmail.com
Tue Jul 25 16:24:36 EDT 2006


yes I have the code exactly as defined in
http://www.sable.mcgill.ca/listarchives/soot-list/msg01169.html

I have something working, but not sure if it is corect if I change the line

SootClass sootClass = Scene.v().loadClassAndSupport(strClass);

to


SootClass sootClass = Scene.v().tryLoadClass(strClass, 0);

I have no idea what the Int value should be for this, though.

Any ideas on why I cannot get the original code to work.

Nicholas

On 7/25/06, Eric Bodden <eric.bodden at mail.mcgill.ca> wrote:
> Hi.
>
> Do you have the whole program mode enabled on your commandline? What is your Soot commandline anyway? The problem is that Soot wants to analyze the code body of java.lang.Object but this body wasa not loaded (it's only on signatures level). You can load this class manually into the scene on the right level but it's usually easier to get the commandline right.
>
> Eric
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
>
>
>
> -----Original Message-----
> From: soot-list-bounces at sable.mcgill.ca on behalf of Nicholas Irving
> Sent: Tue 7/25/2006 03:28
> To: soot-list at sable.mcgill.ca
> Subject: [Soot-list] This operation requires resolving level BODIES butjava.lang.Object is at resolving level SIGNATURES
>
> Hi
> I am trying to get the example @
> http://www.sable.mcgill.ca/listarchives/soot-list/msg01169.html
> working but when I run it from the command line I am getting
>
> D:\java\workspaces\soot\CallGraph\bin>java com.darkedges.soot.SootTest
> Number of methods in HelloWorld: 2
> Set Application classes
> Set options to the static main class
> Soot started on Tue Jul 25 17:26:39 EST 2006
> [Call Graph] For information on where the call graph may be incomplete, use the
> verbose option to the cg phase.
> Exception in thread "main" java.lang.RuntimeException: This operation
> requires resolving level BODIES but java.lang.Object is at resolving
> level SIGNATURES
>        at soot.SootClass.checkLevel(SootClass.java:126)
>        at soot.SootMethod.retrieveActiveBody(SootMethod.java:310)
>        at soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod(OnFlyCallGraphBuilder.java:182)
>        at soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables(OnFlyCallGraphBuilder.java:81)
>        at soot.jimple.toolkits.callgraph.CallGraphBuilder.build(CallGraphBuilder.java:87)
>        at soot.jimple.toolkits.callgraph.CHATransformer.internalTransform(CHATransformer.java:43)
>        at soot.SceneTransformer.transform(SceneTransformer.java:39)
>        at soot.Transform.apply(Transform.java:89)
>        at soot.RadioScenePack.internalApply(RadioScenePack.java:60)
>        at soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPack.java:40)
>        at soot.Pack.apply(Pack.java:110)
>        at soot.PackManager.runWholeProgramPacks(PackManager.java:375)
>        at soot.PackManager.runPacks(PackManager.java:321)
>        at soot.Main.run(Main.java:203)
>        at soot.Main.main(Main.java:146)
>        at com.darkedges.soot.SootTest.main(SootTest.java:42)
>
> I am not sure what I am missing. Any ideas would be gratefully appreciated.
>
> Nicholas Irving
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
>


More information about the Soot-list mailing list