[Soot-list] want to maintain bytecode offsets for classfiles

Eric Bodden eric.bodden at mail.mcgill.ca
Sat Oct 4 19:01:45 EDT 2008


Hi Manjiri.

I don't think that what you are looking for is possible. Soot converts
bytecode to an intermediate representation called Jimple and then back
to bytecode. This is not a 1:1 transformation. You can try to disable
some of the phases in the "jb" pack (see here
http://www.sable.mcgill.ca/soot/tutorial/phase/index.html) but I don't
think that this is going to preserve all the offsets either.

Just out of curiosity: Why would you care about the offsets?

Eric

2008/10/4 Manjiri Namjoshi <manjiri.namjoshi at googlemail.com>:
> Hello,
>
> I am trying to run a soot transformation and annotate the classfiles.
> I observed that the classfiles which the soot produces have different
> bytecode offsets than the original bytecode offsets.
>
> I think soot optimizations is causing this to happen.
>
> This is the transformation:
>        /* adds the transformer. */
>         PackManager.v().getPack("jtp").add(new
>                         Transform("jtp.annotexample",
>                   CreateAnnotationFile.v()));
>
>         /* invokes Soot */
>         soot.Main.main(args);
>
> I want to somehow suppress these optimizations and maintain the bytecode
> offsets.
>
> Thanks in advance!
>
> Sincerely,
> Manjiri
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



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


More information about the Soot-list mailing list