Re: [abc-users] Re: XML attributes in a reweaving analysis

From: Eric Bodden <eric.bodden_at_mail.mcgill.ca>
Date: Fri, 29 May 2009 11:16:37 -0400

Fot this to work the target unit has to have an appropriate
source-line tag (type SourceLnPosTag). I am afraid, not all of the
units that Soot/abc produce have such tags. In any case, the Soot flag
-keep-line-number needs to be enabled for Soot to generate these tags
at all, but I think this is the case in your setup because the srcLink
seems to be set correctly.

Eric

2009/5/29 Nathan Weston <npweston_at_gmail.com>:
> OK, last question, I promise :)  The LinkTags are being added fine and the
> correct links popup when I hover over the statement.  However, clicking on
> the link does not jump to the correct point as (I believe?) it should.  I'm
> adding the tags like this:
>
>        Unit orig = (Unit)w.reverseRebind(s);
>        Unit origlink = (Unit)w.reverseRebind(link);
>
>        orig.addTag(new LinkTag(
>                "Defuse link:" + defclass + ": " + origlink.toString(),
>                origlink, defclass, "AIDA"));
>
> defclass is the getDefiningClass.getName() of the SootMethod which contains
> origlink.  The XML attributes get written like this:
>
> <link label="Defuse link:mississippi.Discount: f = $d0 * 0.9" jmpLink="0"
> srcLink="10" clssNm="mississippi.Discount" aType="AIDA"/>
>
> Note that jmpLink="0"; this is the case for all the LinkTags, and I wonder
> if it has something to do with it?
>
> Thanks,
> nathan
>
> Nathan Weston wrote:
>>
>>> It may well be the case that the Soot plugin expects a certain file
>>> ending. Are you opening AJ files with the Java editor or with the AJ
>>> editor?
>>
>> You, sir, are a genius.  Opening with the Java editor fixes just about
>> everything.
>>
>> Thanks!
>> Nathan
>
>

-- 
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada
Received on Fri May 29 2009 - 16:16:40 BST

This archive was generated by hypermail 2.2.0 : Sat May 30 2009 - 02:50:12 BST