[Soot-list] how to see the CFG
Zeinab Lashkaripour
lashkaripour at yahoo.com
Wed Jan 23 13:03:31 EST 2013
Thanks for the reply Eric.
The second answer was useful but about the first one yes I knew about the plugin I wanted to know if my code which is written below is right? Because I wanted to go step by step on the data flow analysis that I need and be sure about the code I write.
SootClass c = Scene.v().loadClassAndSupport("class_name");
c.setApplicationClass();
SootMethod m = c.getMethodByName("method_name");
Body b = m.retrieveActiveBody();
DirectedGraph<Unit> g = new ExceptionalUnitGraph(b);
Best Regards,
Zeinab
----- Original Message -----
From: Eric Bodden <eric.bodden at ec-spride.de>
To: Zeinab Lashkaripour <lashkaripour at yahoo.com>
Cc: "soot-list at sable.mcgill.ca" <soot-list at sable.mcgill.ca>
Sent: Wednesday, January 23, 2013 7:45 PM
Subject: Re: [Soot-list] how to see the CFG
Hi,
> I have written the code that loads a class and constructs the CFG of a
> method and I have 2 questions:
> How can I see the CFG of the method so that I could get sure that the code
> is working right?
You can use the Eclipse plugin in "interactive mode". See our
documentation online.
> Another question is there a way to get all the method names of a class?
Just iterate through myClass.getMethods() and on each SootMethod
invoke method.getName().
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130123/70aae372/attachment.html
More information about the Soot-list
mailing list