[Soot-list] No Method Source Set for Method <{method signature here}>
Jason Ott
jott002 at ucr.edu
Thu Jul 23 20:21:47 EDT 2015
I have a thread that identifies a class to bring into the Soot Scene. I do
so through the following method:
protected synchronized SootClass bringClassToScene(String className) {
SootClass sootClass;
sootClass = Scene.v().forceResolve(className, SootClass.BODIES);
sootClass.setApplicationClass();
return sootClass;
}
Which is invoked by means of: SootClass sootClass = bringClassToScene(
className);
className is simply a string in the format: "path.to.package.ClassName".
I then try to get the active bodies of a method in the class by means of:
for(SootMethod m : sootClass.getMethods()) {
Body body = m.retrieveActiveBody();
// do other work here
}
At which point I get the following error:
java.lang.RuntimeException: No method source set for method
<com.android.server.power.PowerManagerService$BinderService:
void <init>(com.android.server.power.PowerManagerService)>
Error retrieving active body of:
<com.android.server.power.PowerManagerService$BinderService: void
<init>(com.android.server.power.PowerManagerService)>
I am using Soot with the following arguments:
-cp /path/to/classes/:/path/to/other/classes/:. -f J -w -allow-phantom-refs
I do not understand why Soot cannot fetch the active body of a given
method. This doesn't happen with every method, but I have not been able to
discern any pattern.
Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150723/d9dbedd8/attachment.html
More information about the Soot-list
mailing list