[Soot-list] Multiple runs of Soot

Campbell Morrison cammorr at gmail.com
Mon Jul 20 10:11:05 EDT 2009


I already have -keep-line-number and -keep-offset as arguments to
soot.Main.main(..) for some of the operations I do, but SourceLnPosTag is
never added to the Jimple units.  The only tags added are
http://www.sable.mcgill.ca/soot/doc/soot/tagkit/LineNumberTag.html and
http://www.sable.mcgill.ca/soot/doc/soot/tagkit/BytecodeOffsetTag.html

I followed Soot's code around a bit and found that in
http://www.sable.mcgill.ca/soot/doc/soot/PackManager.html a
http://www.sable.mcgill.ca/soot/doc/soot/jimple/toolkits/annotation/LineNumberAdder.htmlis
instantiated and run.  This adder only adds the LineNumberTag to
units.
I can't find where or how
http://www.sable.mcgill.ca/soot/doc/soot/tagkit/SourceLnPosTag.html is added
to Jimple units.

Perhaps it has to do with where my transformer is added?  Before running
Soot, I add my own transformer with this line:
PackManager.v().getPack( "jtp" ).add( new Transform( "jtp.trueexec",
SymbolicTransformer.v()));


On Mon, Jul 20, 2009 at 2:15 PM, Eric Bodden <eric.bodden at mail.mcgill.ca>wrote:

> Hi again.
>
> > I use Soot to read in the Java class files and generate Jimple, so I
> never
> > directly look at the Java source code or the AST.  I only work with the
> > resulting Jimple code.  Can I add the SourceLnPosTag to the Jimple
> > statements without creating another transformer?  (For example using
> > -keep-line-number input command for line number tag)
>
> Yes, simply pass -keep-line-number as an argument to
> soot.Main.main(..) when you call it.
>
> Eric
> --
> Eric Bodden
> Sable Research Group, McGill University
> Montréal, Québec, Canada
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20090720/b11358d8/attachment.html 


More information about the Soot-list mailing list