[Soot-list] getTag() for self added Tags

Eric Bodden eric.bodden at mail.mcgill.ca
Mon Mar 2 18:09:58 EST 2009


Oh, that explains a lot.

I don't think that Soot generates tags from bytecode attributes
automatically. It does so for some specific attributes like the ones
or line numbers, but not for attributes in general. To the best of my
knowledge, you'll have to implement that conversion yourself.

Eric

2009/3/2 Manjiri Namjoshi <manjiri.namjoshi at googlemail.com>:
> I forgot to mention, I am trying to call getTag () in a different program
> which has the annotated classfiles as input.
> First program will addTags, output the annotated classfiles. Second program
> takes the annotated classfiles as input and tries to getTags.
>
> Thank You.
>
> Sincerely,
> Manjiri
>
> 2009/3/2 Eric Bodden <eric.bodden at mail.mcgill.ca>
>>
>> This seems to work for me. In any case, you can also use getTags().
>>
>> Eric
>>
>> 2009/3/2 Manjiri Namjoshi <manjiri.namjoshi at googlemail.com>:
>> > Hello,
>> >
>> > Is there any way to get the name and value of Tag which we have added.
>> > Example:
>> > protected void internalTransform (Body b, String phaseName, Map
>> > options){
>> >     SootMethod sootMethod = b.getMethod();
>> >     Tag appMethod = new GenericAttribute("ApplicationMethod",
>> > "ApplicationMethod".getBytes());
>> >     sootMethod.addTag(appMethod);
>> > }
>> >
>> > getTag("ApplicationMethod") doesnt give me back the tag which I had
>> > added.
>> >
>> > Does getTag only work for the soot's standard Tags?
>> > Or am I doing anything wrong?
>> >
>> > Thank You.
>> >
>> >
>> > Sincerely,
>> > Manjiri
>> >
>> > _______________________________________________
>> > Soot-list mailing list
>> > Soot-list at sable.mcgill.ca
>> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>> >
>> >
>>
>>
>>
>> --
>> Eric Bodden
>> Sable Research Group, McGill University
>> Montréal, Québec, Canada
>
>



-- 
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada


More information about the Soot-list mailing list