[Soot-list] Multiple runs of Soot

Campbell Morrison cammorr at gmail.com
Tue Jul 21 09:48:12 EDT 2009


I'm currently bypassing my program and running Soot as a standalone
program.  I run Soot with the command:
java soot.Main -f J -d /foo/bar --soot-classpath /class/path
-keep-line-number -print-tags -src-prec java testClass and then look in the
output file testClass.jimple.  From what I see it's still just
LineNumberTag, and not SourceLnPosTag.

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

> I think a LineNumberTag in cases where a class is loaded from
> bytecode. In that case, there is no column information available, and
> hence Soot uses another Tag. Are you sure that Soot loads classes from
> source code in your case?
>
> This may help:
> http://www.sable.mcgill.ca/pipermail/soot-list/2005-July/000313.html
>
> Eric
>
> 2009/7/20 Campbell Morrison <cammorr at gmail.com>:
> > 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.html
> > is 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
> >
> >
>
>
>
> --
> 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/20090721/4617c64d/attachment-0001.html 


More information about the Soot-list mailing list