I couldn't generate a control flow graph for a c program by gcc 3.4.5
.
if it is possible help me to generate cfg. I use the following commands but I couldn't find the cfg file.
$ gcc -o -dv prog.c -o prog
result: unrecognized command line option "-fdump-tree-fixupcfg"
$ gcc -fdump-tree-cfg prog.c
result: it is not generat开发者_JS百科e any cfg file. Regards.
GCC 3.4.x is a very ancient version of GCC.
Why don't you use a recent GCC, e.g. GCC 4.6 (or newer) for that purpose? Your -fdump-tree-cfg
option would then generate a file prog.c.*
addenda
You may also consider making a GCC plugin, or a MELT extension (MELT is a domain specific language to extend recent versions of GCC) for that purpose. You'll need a recent version of GCC (4.7 at least).
精彩评论