[Soot-list] a question about exception analysis
John Jorgensen
jorgnsn at lcd.uregina.ca
Wed Aug 30 01:20:20 EDT 2006
>>>>> "mitch_ing" == luca <mitch_ing at yahoo.it> writes:
mitch_ing> I am tring to use soot to perform an exception
mitch_ing> analysis. I noticed that the catch statements are
mitch_ing> traslated in jimple as IdentityStatement nodes,
mitch_ing> whose right value is something like
mitch_ing> "@caughtexception", that is a JCaughtExceptionRef
mitch_ing> instance. Now i am interested in finding out how
mitch_ing> to identify the type of this right value.
If you're trying to figure out the types of exceptions that might
actually be thrown by the statements within the try block, rather
than relying entirely on the declared type of the catch
parameter, you might want to look at the information available
through the getExceptionDests() member of
soot.toolkits.graph.ExceptionalUnitGraph. getExceptionDests() is
keyed on the throwing unit, rather than the catching unit, but
the types of exceptions possibly thrown to different catch
statements is available, indirectly.
Depending on the nature of your exception analysis, there might
also be useful information in the technical report describing the
implementation of ExceptionalUnitGraph:
http://www.sable.mcgill.ca/publications/techreports/#report2003-3
More information about the Soot-list
mailing list