[Soot-list] How to get signatures from a class that is at resolving level HIERARCHY

Hal Hildebrand hal.hildebrand at gmail.com
Tue Sep 28 00:17:25 EDT 2010


Sorry for the delay in testing this.  However, it works perfectly.  With this new resolution mechanism, everything is 5x5 and doing great.

Thanks!


On Sep 22, 2010, at 1:27 AM, Eric Bodden wrote:

>> I'm of course not sure of this statement, but isn't what I'm trying to do
>> perfectly reasonable?  In essence, I'm trying to load a class that hasn't
>> been loaded, and bring it up to signature level.  Clearly, other classes
>> have been loaded in the system via some mechanism which produces the same
>> result I need.  What's confusing to me is why my particular use case should
>> fail.  In particular, why Soot tries to load signature information when
>> bringing the class up to hierarchy.  Given this is the code path that other
>> classes are brought into the system, I don't quite understand what is
>> different about this particular case that causes it to fail.
> 
> I agree that this is harder than it should be. I just looked into
> this. Soot uses a flag "doneResolving" in the Scene that usually
> prevents you from resolving classes after the initial resolving cycle
> has finished. I am not quite sure why this restriction was introduced.
> I assume there once was a reason but it may have been forgotten.
> 
> Anyway, I have not introduced a method Scene.forceResolve, which you
> can call like this:
> 
> SootClass c = Scene.v().forceResolve("java.util.HashSet", SootClass.BODIES);
> 
> This method causes Soot to ignore the status of the flag. It appears
> to work for me.
> 
> Eric



More information about the Soot-list mailing list