Control Flow Graph

Diego Novillo dnovillo@redhat.com
Wed Nov 15 14:07:00 GMT 2006


ultimanota@libero.it wrote on 11/15/06 06:06:
> Hi all,
> i must use cfg library to build and manipulate a control flow graph. I have read more but i have not found an answer to my question: It is possible to build a cfg structure directly from a file .cfg ?? How i can building a cfg from a file??
> Thanks to all,
> 
Ask for a dump using the -blocks switch and post-process the dump file 
with the attached script.

$ gcc -fdump-tree-all-blocks file.c
$ dump2dot file.c.XXXt.yyy

It generates a graphviz file with the flow graph of the function.  The 
script is fairly simplistic and will not handle more than one function 
too gracefully, but that should be easy to change.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dump2dot
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20061115/28e40402/attachment.ksh>


More information about the Gcc mailing list