开发者

how to generate control flow graph for a c program by gcc version 3.4.5?

开发者 https://www.devze.com 2023-01-12 15:05 出处:网络
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.

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消