[Soot-list] Position Tagger

Tristan RATCHFORD tratch at cs.mcgill.ca
Sun Mar 14 14:04:20 EDT 2010


Hi Eric,

I got it to work once I used the Soot version from SVN. Just as an FYI, 
it's not included in the sootall-2.3.0.jar 
<http://www.sable.mcgill.ca/software/sootall-2.3.0.jar> version. Thanks 
for all your help and time! I promise to lay low on the Sootlist for awhile.

Tristan

On 13/03/10 06:04 AM, Eric Bodden wrote:
> I am not sure why this isn't working for you but for me it works. Are
> you maybe using an outdated version of Soot?
>
> I just tried this with the SVN trunk:
>
> java soot.Main -f J -keep-line-number -print-tags -src-prec java Main
>
> This results in a file Main.jimple looking like this:
>
> public class Main extends java.lang.Object
> {
> /*Main.java*/
>
> /*[args]*/
>      public static void main(java.lang.String[])
>      {
>          java.lang.String[] args;
>          int x, i, temp$0, temp$1, temp$2, temp$3;
>
>          args := @parameter0: java.lang.String[];
> /*Source Line Pos Tag: sline: 7 eline: 7 spos: 26 epos: 38 file: Main.java*/
>          i = 0;
> /*Source Line Pos Tag: sline: 9 eline: 9 spos: 7 epos: 13 file: Main.java*/
>
> ...
>
> So clearly the tags are present.
>
> Eric
>
> --
> Dr. Eric Bodden
> Software Technology Group, Technische Universität Darmstadt, Germany
> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>
>
>
> On 13 March 2010 04:41, Humberto sousa pacheco<humbertocin at gmail.com>  wrote:
>    
>> I have the same problem, only see the LineNumberTag. I would see the column
>> number too.
>>
>>
>> On Fri, Mar 12, 2010 at 6:08 PM, Tristan RATCHFORD<tratch at cs.mcgill.ca>
>> wrote:
>>      
>>> Hi Eric,
>>>
>>> You were indeed right that I was processing the bytecode files rather
>>> than the Java source files, but even after i corrected this I still only
>>> see the LineNumberTag. I set the soot options as follows:
>>>
>>>          opt.set_src_prec(Options.src_prec_java);
>>>
>>> opt.set_process_dir(Util.getProjectSourcePathList(aProject));    //gets
>>> the src root dirs
>>>          String lJarPath = Util.getJarPath(aProject);
>>>          String lSrcPath = Util.getProjectSourcePath(aProject);
>>>          opt.set_soot_classpath(lJarPath+lSrcPath);
>>>          opt.set_keep_line_number(true);
>>>
>>> Thanks again,
>>>
>>> Tristan
>>>
>>> On 12/03/10 02:51 AM, Eric Bodden wrote:
>>>        
>>>> Could it be that you are creating Jimple from bytecode instead of
>>>> source code (maybe by accident)? LineNumberTags normally model line
>>>> numbers in bytecode if I remember correctly.
>>>>
>>>> Eric
>>>>
>>>> --
>>>> Dr. Eric Bodden
>>>> Software Technology Group, Technische Universität Darmstadt, Germany
>>>> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
>>>> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>>>>
>>>>
>>>>
>>>> On 12 March 2010 01:30, Tristan RATCHFORD<tratch at cs.mcgill.ca>    wrote:
>>>>
>>>>          
>>>>> Hi Eric,
>>>>>
>>>>> I run through each Jimple Unit that is visited in my analysis with the
>>>>> Eclipse debugger and the only tags present are the LineNumberTags.
>>>>>
>>>>> Tristan
>>>>>
>>>>> On 11/03/10 04:54 PM, Eric Bodden wrote:
>>>>>
>>>>>            
>>>>>>> This information should be sufficient to accomplish what I am trying
>>>>>>> to
>>>>>>> do,
>>>>>>> but I still can't seem to get the SourceLnPosTag in the TagList of a
>>>>>>> Unit.
>>>>>>> When I set the option, set_keep_line_number(true), all I get is a Tag
>>>>>>> of
>>>>>>> type LineNumberTag. Can you tell me which option includes the
>>>>>>> SourceLnPosTag?
>>>>>>>
>>>>>>>
>>>>>>>                
>>>>>> Actually this should just work.  But it may be the case that not all
>>>>>> units have line numbers, due to several transformations that Soot
>>>>>> makes. Has none of your units line numbers or are just some missing
>>>>>> this info?
>>>>>>
>>>>>> Eric
>>>>>>
>>>>>>
>>>>>>              
>>>>>
>>>>>            
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at sable.mcgill.ca
>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>>        
>>
>> thanks
>> --
>> Humberto S. Pachêco - hsp
>>
>>      

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100314/951e138d/attachment.html 


More information about the Soot-list mailing list