[Soot-list] Traversing the static Instructions of a class which has no methods

ASHISH MISHRA ashish123.mishragkp at gmail.com
Thu Apr 18 17:19:26 EDT 2013


Dear All,

I have a situation similar to this

*public final class A {*
* *
*    public static final class B {*
*       public static final string ab = "teststring";*
*    }*
*    public static final class C {*
*        public static final int cd=23;*
*    }*
*    public static final class D{*
*       public static final String ef = "teststring2";*
*       public static final int gh=34;*
*    }*
*  *
*}*
*
*
I need to traverse all the field and the Instructions to collect the Fields
and their values -
 like ab- teststring etc.

I get all the classes using
*Chain<SootClass> sclist = Scene.v().getApplicationClasses();*
* **for(SootClass sc : sclist){ *
* ** Chain<SootField> sflist = sc.getFields();*
* ** for(SootField sf : sflist){*
* System.out.println("Sig "+sf.getSignature()+"name "+ sf.getNeme() );*
* }*
* }  *

*I can get the declared fields in the classes , but I could not get the
instructions and the RHS value for them. I tried looking for the issue in
soot-list but no success. Please help.*



*
*




-- 
Regards,
Ashish Mishra
Graduate Student,
Computer Science and Automation Department,IISc
Cell : +91-9611194714
Mailto : ashishmishra at csa.iisc.ernet.in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130419/46ee1cd9/attachment.html 


More information about the Soot-list mailing list