C ++代码依赖性/调用图“查看器”? [英] C++ code dependency / call-graph "viewer"?
问题描述
有没有这样的东西作为(免费)工具,将显示一个给定的函数中调用所有函数的图形?
例如,如果我在一个复杂的函数fun()上使用它,我试图理解,它将显示fun()按顺序调用的所有函数,然后我将有可能看到对于函数调用的函数fun(),等等。
我正在寻找这个C ++代码。
这样的事情是否存在?
is there such a thing as a (free) tool that would display a graph of all functions call in a given function? For instance, if I use it on a complex function fun() I'm trying to understand, it would show me all the functions called by fun() in order, then I would have the possibility to see the same thing for the function called by fun(), and so on. I'm looking for this for C++ code. Does such a thing even exist?
编辑:我使用VS 2008如果这有帮助,但我认为这样的软件将工作在源档案
edit : I am using VS 2008 if that helps, but I was thinking that such a software would work on the source files anyway
推荐答案
Doxygen 可以执行此操作。请参阅 CALL_GRAPH
配置选项:
Doxygen can do this. See the CALL_GRAPH
configuration option:
如果
CALL_GRAPH
和HAVE_DOT
标签设置为YES
,则doxygen将为每个全局函数或类方法生成调用依赖图。请注意,启用此选项将显着增加运行时间。因此,在大多数情况下,最好只使用\callgraph命令为所选函数启用调用图。
If the
CALL_GRAPH
andHAVE_DOT
tags are set toYES
then doxygen will generate a call dependency graph for every global function or class method. Note that enabling this option will significantly increase the time of a run. So in most cases it will be better to enable call graphs for selected functions only using the \callgraph command.
这篇关于C ++代码依赖性/调用图“查看器”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!