[Soot-list] Adding new code attributes

Bodden, Eric eric.bodden at sit.fraunhofer.de
Fri Nov 14 04:02:32 EST 2014


Hmmm, sorry it has been a long time since I looked into this. It might help looking at where Soot calls getValue and see whether it is called in your case.

Eric

--
Sent from my mobile

On Nov 14, 2014 9:23 AM, Manas Thakur <manasthakur17 at gmail.com> wrote:
Hi Eric

Yes, I’ve implemented the getValue() method. One thing which I doubt is that I read in some related document that we need to register our tag aggregator to the CodeAttributeGenerator. But I don’t know what that means.

To describe more, I have done the following:
1. Extend Tag with a class having an integer field
2. Extended TagAggregator (with wantTag and considerTag methods)
3. Attached the tag to some units

I found one resource (soot wiki on github), which says we have to convert the Jimple body to Baf and call the transform method. When I did it, it throws an exception saying “BafBody cannot be cast to JimpleStmtBody”.

Regards,
Manas


On 14-Nov-2014, at 1:44 pm, Bodden, Eric <eric.bodden at sit.fraunhofer.de<mailto:eric.bodden at sit.fraunhofer.de>> wrote:

Hi Manas.

Did you implement the public byte[] getValue() method?

That's important to convert the tag in to the bytecode representation.

Cheers,
Eric

On 13.11.2014, at 11:13, Manas Thakur <manasthakur17 at gmail.com<mailto:manasthakur17 at gmail.com>> wrote:

Hi

I am trying to add a new integer code attribute to some of the units in my whole program analysis. But the output class file doesn’t seem to contain them. I tried “-print-tags” as well, but it too didn’t give any additional outputs.
I am following the procedure given in the “Array Bounds Check Example” at http://www.sable.mcgill.ca/soot/tutorial/addattributes/

Regards,
Manas






--
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 --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141114/9f9aede0/attachment.html 


More information about the Soot-list mailing list