[abc-users] Getting the body of a method using soot

From: Meisam Fathi <meisam.fathi_at_gmail.com>
Date: Fri, 01 May 2009 13:35:28 +0430

Hi there,

I wanna use soot to analyze aspectj code. I need the control flow graph
of each method and advice body for my analysis. All aspects, classes,
methods and advice bodies are present in Scene.v() after I compile a
piece of code using abc. I compile the code in my program using some
lines of code that invokes abc.main.Main.main() method after which the
code that retreives method bodies is located . I can easily get bodies
of library methods, e.g. methods defined in java.lang.String, by
invoking SootMethod.retrieveActiveBody(). But the problem is that
retrieveActiveBody() throws an exception for methods that are compiled
with abc, and I cannot retrieve the active body of methods and advice
bodies that I have compiled.
Here is the exception that is thrown:

java.lang.RuntimeException: no active body present for method
<mfs.UserManager: java.lang.String getManagerName()>
    at soot.SootMethod.getActiveBody(SootMethod.java:304)
    at mfs.Main.main(Main.java:76)

Does anybody know what the problem is?

Thanks in advance
Meisam Fathi
Received on Fri May 01 2009 - 10:06:28 BST

This archive was generated by hypermail 2.2.0 : Fri May 01 2009 - 13:40:12 BST