[Soot-list] Soot-list Digest, Vol 81, Issue 5
Tezcan Dilshener
tezcan at dilshener.de
Fri Jan 6 16:07:26 EST 2012
Hi Eric,
> Can you just delete the .java files?
I do not have .java files. Soot is demanding for source files when I run it with -process-dir option.
It is reading all the classes from the directory I specify on the call option and then looks for their source files hence fails with exception.
Exception in thread "main" java.lang.RuntimeException: couldn't find class: HelperCorrelation (is your soot-class-path set properly?)
at soot.SootResolver.bringToHierarchy(SootResolver.java:184)
The exception is misleading because in debug mode, I can see that it is looking for the source file and not for the class file.
It is coming form the SootResolver after the following line.
ClassSource is = SourceLocator.v().getClassSource(className);
When I specify the source directory on the class path as indicated by the exception message, then I get the following error;
Exception in thread "main" soot.CompilationDeathException: there were errors during parsing and/or type checking (JastAdd frontend)
at soot.JastAddInitialResolver.formAst(JastAddInitialResolver.java:63)
I have already written these two issues to you and to the user-list. So as you can see this is getting real frustrating.
I can always use the ASM library to get a call/invocation list form class files but I am still hoping to use a reputable framework like the Soot.
Has anyone out there actually used Soot to obtain a call graph from .class files for an application that does not have any main methods?
I would love to hear form you about how you achieved it?
Could you please provide me a working code example?
Cheers
Tezcan
On 06.01.2012, at 12:06, Eric Bodden wrote:
>> Looks like no matter what I do Soot is trying to look for the sources of the
>> classes that it reads.
>
> Can you just delete the .java files?
>
>> All I am trying to do is record a list of ClassA.method() calls
>> ClassB.metod().
>> How can I run Soot so that it only analyzes class files to give me a such a
>> list?
>
> Just create a BodyTransformer in the "jtp" pack that prints all invoke
> expressions in the respective body's unit chain.
>
> Best wishes,
> Eric
Tezcan Dilshener
"Subset of all things that we know and believe makes our knowledge."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120106/e3716b43/attachment.html
More information about the Soot-list
mailing list