[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem Body.getLocals()



On Sat, Jun 19, 2004 at 11:00:25AM +0200, Marco Bakera wrote:
> Hey there,
> >
> > This could be caused by various things. Are you reading it in from a
> > .class file, a .jimple file, or a .java file, or are you creating it
> > yourself? What is the soot command line that you're using? In general,
> > Soot allows you to insert multiple locals with the same name, and these
> > are considered *different* variables.
> >
> The commandline we ware using is
> 
> -src-prec J -p jb use-original-names:true -f J foo
> 
> and as one could see we are reading the jimple. Any idea how this happened?

This is happening because the in the jb phase, the local i gets split,
because the definition i=5 at the end of the method is completely
independent of other defs and uses of i. If you don't use -p jb
use-original-names:true, you'll see exactly what's happening.

If you want the jimple that you actually give Soot, without any of these
transformations from the jb phase, you can turn off the jb phase with
-p jb off. At one point, we thought about removing jb entirely for
classes coming from Jimple (since the point of jb is to generate
Jimple), but nobody expressed any opinions about it.

Ondrej

> 
> --
> Marco     www.bakera.de
> ICQ       59397823
>