[Soot-list] Getting line numbers from .java files

Martin Schäf martinschaef at gmail.com
Mon Sep 15 10:39:11 EDT 2014


Maybe you are looking for SourceLnTag or what ever it is called. Just
print all tags, one of them should have it.
There are several tags that can carry line number and LineNumberTag is
not the one that shows up when you parse from source.
---
Martin Schäf

> On Sep 15, 2014, at 6:34, "Bodden, Eric" <eric.bodden at sit.fraunhofer.de> wrote:
>
> Hi Manas.
>
> No, actually this should also work when using source code.
>
> Best wishes,
> Eric
>
>
>> On 13.09.2014, at 11:17, Manas Thakur <manasthakur17 at gmail.com> wrote:
>>
>> Hi,
>>
>> Is it possible to get the line numbers from the "LineNumberTag" only when we are analysing class files? When I try to get the same by analysing java source directly, the line number tag is always null. I am using the following to extract the line number:
>>
>> LineNumberTag tag = (LineNumberTag) ut.getTag("LineNumberTag");
>> if(tag != null)
>>    int lineNumber = tag.getLineNumber();
>>
>> P.S. I am using the "-keep-line-number" option, and am able to extract them properly when I give class files as input to Soot.
>>
>> - Manas
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at CS.McGill.CA
>> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
> --
> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> Head of Secure Software Engineering  at Fraunhofer SIT, TU Darmstadt and EC SPRIDE
> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list


More information about the Soot-list mailing list