如何用gcc 3.4.5生成c程序的控制流图?

如何用gcc 3.4.5生成c程序的控制流图?,gcc,Gcc,我在命令行中键入以下命令,以便根据gcc 3.4.5为c程序生成控制流图,但找不到结果文件。 此外,我如何看到控制流图Garphicalyy? 谢谢您忘了包含命令行。。。我假设-fprofile弧。gcc手册页中描述了输出文件的位置: ... Each object file's auxname is generated from the name of the output file, if explicitly speci- fied and it is not the fi

我在命令行中键入以下命令,以便根据gcc 3.4.5为c程序生成控制流图,但找不到结果文件。 此外,我如何看到控制流图Garphicalyy?
谢谢

您忘了包含命令行。。。我假设-fprofile弧。gcc手册页中描述了输出文件的位置:

... Each object file's auxname is generated from the name of the output file, if explicitly speci- fied and it is not the final executable, otherwise it is the base- name of the source file. In both cases any suffix is removed (e.g. foo.gcda for input file dir/foo.c, or dir/foo.gcda for output file specified as -o dir/foo.o). ... 每个对象文件的auxname都是 根据输出文件的名称生成,如果显式指定- 它不是最终的可执行文件,否则它是基础文件- 源文件的名称。在这两种情况下,都会删除任何后缀(例如。 输入文件dir/foo.c为foo.gcda,输出文件为dir/foo.gcda 指定为-o dir/foo.o)。
因此,输出将与对象文件一起写入它们的目录中。如果将源代码直接编译为可执行文件,您将在编译器将可执行文件写入的目录中找到分析输出。

使用
gcc-fdump tree cfg
作为控制流图

请参阅GUI的链接。