[Soot-list] Map from source line numbers to class file line numbers
Bodden, Eric
eric.bodden at sit.fraunhofer.de
Fri Nov 7 06:22:32 EST 2014
Hi Manur.
I am not sure what you mean by "line number 20 in the class file". Class files have no line numbers. Do you mean the instruction count maybe? If so, if I remember correctly then there is a different kind of tag that Soot uses to keep track of those.
Best wishes,
Eric
> On 07.11.2014, at 11:30, Manas Thakur <manasthakur17 at gmail.com> wrote:
>
> Hi Eric
>
> I think I did not put up my question clearly. What I meant is the following:
> In my Java file, suppose variable ‘x’ is being assigned in line no. 10, and it is present in line number 20 in the class file (this relationship is available through java -p). When I am taking the line number tag, I am still getting ’10’ even though I am giving my class file as input to Soot, i.e., the line number of the variable in the java file. Is there some way through which I can get ’20’?
> Or am I doing something wrong already because of which I still get the line number from the java file?
>
> - Manas
>
>
>
>
>
>
>> On 07-Nov-2014, at 3:26 pm, Bodden, Eric <eric.bodden at sit.fraunhofer.de> wrote:
>>
>> Hi Manur.
>>
>> Yes, you can get them the very same way. In the current API (nightly build) there is even a convenience method for it: getJavaSourceStartLineNumber()
>>
>> Best wishes,
>> Eric
>>
>>> On 07.11.2014, at 07:21, Manas Thakur <manasthakur17 at gmail.com> wrote:
>>>
>>> Using "-keep-line-number", I can get the line numbers from java files. When I am analyzing class files, I want to get the corresponding line numbers in the class file. I know that they are available as an output of "javap -l"; is there a way I can get them in 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 869-127
>> Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt
>>
>
--
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 869-127
Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141107/89ca3b8e/attachment.bin
More information about the Soot-list
mailing list