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

From: Eric Bodden <>
Date: Fri, 1 May 2009 08:25:04 -0400

Hi Meisam.

It sounds like your analysis may be executing at the wrong time of the
weaving process. How are you executing your analysis? To do this
correctly, you should implement a ReweavingAnalysis and register it in
your AbcExtension.


2009/5/1 Meisam Fathi <>:
> 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(
>    ...
>    at mfs.Main.main(
> Does anybody know what the problem is?
> Thanks in advance
> Meisam Fathi

Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada
Received on Fri May 01 2009 - 13:31:11 BST

This archive was generated by hypermail 2.2.0 : Mon May 18 2009 - 19:10:11 BST