> As perhaps another option, I'm performing a stage of the analysis
> pre-weave (extending OncePass and adding in after JIMPLIFY_DONE) in
> order to get the Jimple code of the advices before they're woven. Is
> it possible to automatically obtain advice shadows at this stage? I
> strongly suspect it isn't, but it's worth a shot :)
No the easier way to do this is to perform the main analysis after
weaving, i.e. as a ReweavingAnalysis and just refer to the older,
unwoven, method bodies, which are stored in the Unweaver.
You can access the Unweaver using:
abc.main.Main.v().getAbcExtension().getWeaver().getUnweaver()
Unfortunately I just saw that the Unweaver used to store all this
information but it did not expose it to the user/extender. Therefore I
have just added the following methods to the SVN version of Unweaver:
getOldApplicationClasses()
getOldBodyForMethod(SootMethod)
getOldFieldsForClass(SootClass)
getOldInterfacesOfClass(SootClass)
getOldMethodsForClass(SootClass)
getOldParameterListForMethod(SootMethod)
Our SVN version can be obtained by checking out this URL (just in case
you are not using it already):
http://abc.comlab.ox.ac.uk/products/trunk/abc-full
Note that you can map between individual Units(Stmts), Traps or Locals
from before and after weaving using:
abc.weaving.weaver.Weaver.rebind(Object)
abc.weaving.weaver.Weaver.reverseRebind(Object)
(see documentation there)
Hoe that helps.
Eric
-- Eric Bodden Sable Research Group McGill University, Montréal, CanadaReceived on Thu Apr 24 2008 - 15:44:57 BST
This archive was generated by hypermail 2.2.0 : Thu Apr 24 2008 - 15:50:11 BST