[Soot-list] SootField Line Numbers

Richard Warburton richard.warburton at gmail.com
Wed May 25 09:23:10 EDT 2011


> I am afraid that is impossible because the Java class file format
> stores line numbers only for code, not for fields. Hence Soot has no
> way to recover this info from the code.
>
> May I ask why you would need that information? Maybe we can help you
> out some other way.

I'm using soot to identify some bugs in code.  The bug itself is to do
with a field, and many of my other bug reports have line numbers
associated with them, so I was hoping to be able to point to the line
number where the problem was found.  Its not too much of an issue with
fields, since they have unique names with classes, so would be easy
for a programmer to find what the bug report is referring to.  If the
field is initialized by a non constant literal value then there's some
code that performs the initialization that might have a line number
associated with it, but I don't see a general solution otherwise.
Thanks for your reply anyhow.

regards,

  Richard


More information about the Soot-list mailing list