[Soot-list] Retaining debug information through Soot?

Nate Deisinger ndeisinger at wisc.edu
Fri Nov 22 19:50:46 EST 2013


That sounds like it would be the best option.  I'm not familiar with how 
Soot writes out to bytecode, so pointers on how to get started modifying 
that behavior (as well as how to add an appropriate Tag for variable 
names) would be appreciated.

Thanks,
Nathan

On 11/22/2013 02:18 AM, Bodden, Eric wrote:
> Hi Nathan.
>
>> Ah, my mistake for not mentioning I had tried that option. I know that gets me Jimple with the names intact, but Soot doesn't seem to translate that into actual Java debug information when exporting a class. Thanks for the response, though!
> While this is probably true (I would need to check) this should be not too hard to implement. Essentially, Soot initially parses the attributes to generate the variable names but then the original attribute is probably not actually converted into a Tag (which is Soot's internal representation of attributes). I think all one would need to do is extend Soot to create an appropriate Tag. Then in the end, this tag would automatically be written out into a bytecode attribute again by Soot. (each Tag class implements a method that defines how the tag is converted into an attribute)
>
> One thing to keep in mind is that you might want to create these tags in the end of Soot's computation such that the tags reflect renamings/additions etc. that Soot might have made.
>
> If you would like to work on such an extension let me know and I can give you some more pointers.
>
> Cheers,
> Eric



More information about the Soot-list mailing list