[Soot-list] How to create dot files of jimple control flow graphs?

Dacong Yan tonywinslow1986 at gmail.com
Wed Apr 11 18:16:18 EDT 2012


Hi Upulee,

You can take a look at the following classes and methods:
   * soot.util.cfgcmd.CFGToDotGraph
       * DotGraph drawCFG(DirectedGraph graph, Body body)
       * DotGraph drawCFG(ExceptionalGraph graph)
   * soot.util.dot.DotGraph
       * void plot(String filename)

To plot a CFG 'g' constructed from Body 'b' to file 'g.out', you can
do the following:

   CFGToDotGraph cfgToDot = new CFGToDotGraph();
   DotGraph dotGraph = cfgToDot.drawCFG(g, b);
   dotGraph.plot("g.out");

I did not try it out myself, though.

Thanks,
Tony

On Wed, Apr 11, 2012 at 1:23 PM, Upulee Kanewala <upuleegk at gmail.com> wrote:
> Hi,
>
> Is there a way to create dot files of jimple control flow graphs in soot?
>
> I tried using "-cfg-dump jb" but it does not create any dot files. and
> when I use "-cfg-dump ALL" it only creates bb.lso phase dot files.
>
> Thanks.
> Upulee
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list


More information about the Soot-list mailing list