[Soot-list] A BUG about JimpleConstructorFolder and Line number or
any options I did not turn on?
Peng Li
lipeng360 at gmail.com
Mon Apr 9 19:05:26 EDT 2007
HI
I am using JimpleConstructorFolder, but I found there is a problem
when I try to find a line number of a stmt after it. After the
transformer JimpleConstructorFolder. I can not get any line number.
I have set soot.options.Options.v().set_keep_line_number(true) in my
program and I am using the following code to get the line number for
each stmt,
private static int getLineNumber(Stmt s) {
Iterator ti = s.getTags().iterator();
while (ti.hasNext()) {
Object o = ti.next();
if (o instanceof LineNumberTag)
{
LineNumberTag linetag = (LineNumberTag) o;
return linetag.getLineNumber();
}
}
return -1;
}
It is no problem for my program to get a line number if I remove the
JimpleConstructorFolder transformer, but I do need this transformer.
So could anyone give me some suggestions?
Cheers
Peng
More information about the Soot-list
mailing list