[Soot-list] How transform local variables into class' s fields.

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Thu Dec 30 05:45:41 EST 2010


Hi Adriano.

> I thought to turn the .class file into a .jimple file and then change the
> code, and turn local variables into instance fields, so I can debug them.

Note that this will only work if your program does not use any form of
recursion. In case of recursion you have multiple copies of the same
locals on the call stack and a single field is not enough to simulate
all those copies.

But about your problem...

> When i compile into the .class file, the corresponding .java source is the
> same  i started from
> (with a little optimization), but no trace of the two added instance's
> fileds.
> Where am I wrong ?

I think I do not understand your question. The transformation
apparently shows up in the jimple code, and hence it should also show
up in the .class files that Soot outputs.

Eric


More information about the Soot-list mailing list