Egypt is a simple tool for creating call graphs of C programs.
egypt [--omit function,function,...] [--include-external]
egypt [--omit function,function,...] [--include-external]
omit
Omit the given functions from the call graph. Multiple function names may be given separated by commas.
include-external
Include calls to external functions in the call graph. A function is considered external if it is not defined in any of the input files. For example, functions in the standard C library are external. By default, such calls are not shown. Even with this option, only direct calls will be shown; there is no way to show indirect calls to external functions.
Generating the RTL file
make clean
make CFLAGS=-dr
Viewing the CALL GRAPH
egypt foo.c.00.rtl | dotty -
优点和缺点:使用gcc分析source code,使用 dotty生成图像,使用简单;但是必须要生成相应的rtf文件,对于很大的工程,也许相当麻烦。
没有评论:
发表评论