[Soot-list] Jimple Traps

Eric Bodden eric.bodden at ec-spride.de
Sun Nov 27 04:10:40 EST 2011


Hello Martin.

Did you look at ThrowsAnalysis? It may be doing (at least almost)
exactly what you are looking for.

Eric

On 26 November 2011 13:43, Martin Schäf <martinschaef at googlemail.com> wrote:
> Hi,
>
> I'm trying to check which exceptions can be thrown by a method and
> which ones are already caught by the traps in Jimple.
> That is, in the example:
>        public void throwsException(int size) {
>                throw new EmptyStackException();
>        }
>
>        public void catchException(int a) {
>                try { throwsException(a); } catch (EmptyStackException e) { }
>        }
>
>        public void dontcatch(int x) throws EmptyStackException {
>                throwsException(x);
>        }
> I want to find out that throwsException throws an exception, and
> catchException doesn't.
>
> Hence I want to check if a Unit is in a Try Block. What is the most
> elegant way to iterate
> from  Trap.getBeginUnit() to Trap.getEndUnit() ?
>
> Or is there a shortcut to do all this?
>
> Thanks,
> M
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
Eric Bodden, Ph.D., http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Principal Investigator in Secure Services at CASED
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 32, 64293 Darmstadt


More information about the Soot-list mailing list