[Soot-list] Class field in call graph

Steven Arzt Steven.Arzt at cased.de
Thu Dec 17 18:01:16 EST 2015


Hi Yasmin,

 

This is pretty easy to do. You only need to to iterate over the the units in all bodies of all methods in all classes and check whether there is a reference to the field you are looking for.  That should be sufficient for your use case.

 

Best regards,

  Steven

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA] Im Auftrag von Yasmin Khairina
Gesendet: Donnerstag, 17. Dezember 2015 21:25
An: soot-list at cs.mcgill.ca
Betreff: [Soot-list] Class field in call graph

 

Hello,

I am new to Soot, and until now I have successfully used Soot to generate a call graph. As far as I know, the call graph only shows the calling relationship between methods (which I think is supposed to be).
However, what I’m interested in is to find out which methods call/access some certain class fields. Hence my question is, can I obtain the class field in the call graph as well? For example, if I have a class field named xPos, then I would like to have the call graph to have a node for xPos and find which methods call/access xPos. Of course if the class field have setter and getter, it will not be a problem, but this is not always the case.
If it’s not possible, is there any way to extend any classes of Soot to do it? Or do I need to do other kind of analysis to obtain that information?

Thank you.

Best regards,
Yasmin 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20151218/a8d1075b/attachment.html 


More information about the Soot-list mailing list