[Soot-list] how to see the CFG

Eric Bodden eric.bodden at ec-spride.de
Wed Jan 23 13:15:04 EST 2013


Looks ok to me.

Eric

On 23 January 2013 19:03, Zeinab Lashkaripour <lashkaripour at yahoo.com> wrote:
> 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



-- 
Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt


More information about the Soot-list mailing list