[Soot-list] A BUG about JimpleConstructorFolder and Line number
or any options I did not turn on?
Eric Bodden
eric.bodden at mail.mcgill.ca
Mon Apr 9 19:14:40 EDT 2007
Hmm, I looked at the code and actually the only statements we delete
and newly generate are copy statements, which usually don't have a
line number associated anyway. So I doubt that this is your actual
problem.
Eric
On 09/04/07, Peng Li <lipeng360 at gmail.com> wrote:
> 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
> _______________________________________________
> 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