[Soot-list] Jimple local to source expression

Patrick Lam p.lam at ece.uwaterloo.ca
Fri Aug 24 03:59:40 EDT 2012


On 08/21/2012 08:06 AM, Saswat Anand wrote:
> Hi,
>
> I have a need to map analysis results as precisely as possible to
> source code entities. For each jimple local, I want to map it either
> to it corresponding source-level local variable or the expression (for
> temporaries). Expressions can be represented by line and column
> numbers in the source code.
>
> I am wondering if Soot (with its JastAdd frontend) already computes
> such information. If it does not, how difficult will it be to
> implement such a feature. Any thoughts?

It's a bit difficult to keep exact local variable information because 
there are a bunch of transformations that happen on the Jimple code. -p 
jb:use-original-names is the best bet for keeping local variables. Then 
you'll have to do some translation to get the line and column numbers.

pat




More information about the Soot-list mailing list