[Soot-list] Re: Something about Soot
Archie Cobbs
archie at dellroad.org
Mon May 9 12:22:17 EDT 2005
Feng Qian wrote:
> Line numbers are saved as attributes in class files. Soot keeps line
> number attributes as tags during the transformation. In Soot's
> intermedia representation, you can get line number info from tags
> attached to entities.
Here's sample code...
PhaseOptions.v().setPhaseOption("tag.ln", "on");
...
Unit unit = ...
LineNumberTag tag = (LineNumberTag)unit.getTag("LineNumberTag");
if (tag != null) {
int lineNumber = tag.getLineNumber();
...
}
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com
More information about the Soot-list
mailing list