[Soot-list] Multiple runs of Soot

Eric Bodden eric.bodden at mail.mcgill.ca
Mon Jul 20 12:37:12 EDT 2009


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


More information about the Soot-list mailing list