[Soot-list] Soot-list Digest, Vol 53, Issue 16

Richard L. Halpert richhal22 at gmail.com
Tue Nov 3 13:53:38 EST 2009


I'm not 100% sure that is true.  I believe sometimes the try could contain a
return instruction (on every path), in which case it would not be
post-dominated by any instruction after the catch.  Unfortunately I don't
have time to look into this myself.  Come to think of it, break and continue
Java instructions might also result in jimple code like this.

-Richard

On Tue, Nov 3, 2009 at 5:32 AM, Eric Bodden <
bodden at st.informatik.tu-darmstadt.de> wrote:

> Hi Cristiane.
>
> This should be easy with Soot. For any method body, Soot gives you a
> list of "traps". (see
> http://www.sable.mcgill.ca/soot/doc/soot/Body.html#getTraps%28%29)
> Each trap basically models the "try" part of a try/catch. Using
> Trap.getHandlerUnit(), you can access the target of the trap, i.e.,
> the beginning of the "catch" part. Getting the end of the "catch" is
> more tricky. It should be possible to find this end through a
> dominator analysis, though: If I am not mistaken, then the first
> statement after the catch block should always post-dominate the end of
> the "try" part. You can find post-dominators using:
>
> http://www.sable.mcgill.ca/soot/doc/soot/toolkits/graph/MHGPostDominatorsFinder.html
>
> Eric
>
> --
> Eric Bodden
> Software Technology Group, Technische Universität Darmstadt, Germany
> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>
>
>
> 2009/11/3 Cristiane Queiroz <criscq at gmail.com>:
> > Hi,
> > I'm developing a tool to extract Java exception handling to AspectJ
> aspects,
> > and I need to analyze information that is contained within a catch, such
> as
> > if the catch block contains references to class methods, variables,
> > parameters of methods.
> >
> > Could you help me and tell me if there is any way to do this?
> >
> > []'s Cristiane Queiroz
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >
> >
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20091103/92917b18/attachment.html 


More information about the Soot-list mailing list