[Soot-list] How could I get the source location of a Stmt/Unit?

Karthik Rao karthik.0703 at gmail.com
Tue Mar 20 23:07:39 EDT 2018


Hey Sep,

You should instruct the Java compiler to generate debug information (which
includes line numbers) while generating the class files. Also there is an
option to preserve line number in Soot  i.e.*-keep-line-number. *You can
find a list of all the command line options which Soot accepts here
<https://www.sable.mcgill.ca/soot/tutorial/usage/>.
 Cheers,
Kaarthik

On Wed, Mar 21, 2018 at 3:54 AM, 周书林 <zhoushulin1992 at gmail.com> wrote:

> Hi,
>
> I am new in soot. I use it to analyse some .jar files. In this procedure,
> I want to get the source location of a Stmt/Unit, i.e. the line number of
> this Stmt/Unit is in the source file. I found there are two APIs namely
> getJavaSourceStartLineNumber() and getJavaSourceStartColumnNumber(). But
> the return values of these two APIs are always -1.
>
> Could you please point out where is wrong about these usages? And how
> could I get the right source location of a Stmt/Unit?
>
> Thank you very much.
>
> Sincerely.
> Sep
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
>


-- 
Karthik Rao
Bangalore
+91-9480220782
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20180321/51648433/attachment.html>


More information about the Soot-list mailing list