[Soot-list] annotation bug? (was: Java 1.5 annotations)

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Apr 30 09:48:21 EDT 2008


>  Is there a place that Soot stores information about which local
>  variables might correspond to which Jimple locals?  I haven't been
>  successful in using javac -g combined with -p jb.use-original-names to
>  get at this.  (I think this is because the local variable names don't
>  show up in the Java bytecode when I do a javap -c, so Jimple can't get
>  at them)

No there isn't. This would be really hard to impossible to do because
not even the compiler has to guarantee to structure stack operations
in such a way that one *could* at all reconstruct the same variables,
even if one wanted to. use-original-names often helps (given your
bytecode has debug info) but might still not give you a 1:1 mapping.

An alternative you could do is have a special block within which you
then track variables. That way you could add tags to everything
contained in the block. This would require an extension of the
frontend, though.

Eric

-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list