问题
I have a large 95% C, 5% C++ Win32 code base that I am trying to grok.
What modern tools are available for generating call-graph diagrams for C or C++ projects?
回答1:
Have you tried SourceInsight's call graph feature?
- http://www.sourceinsight.com/docs35/ae1144092.htm
回答2:
Have you tried doxygen and codeviz ?
Doxygen is normally used as a documentation tool, but it can generate call graphs for you with the CALL_GRAPH/CALLER_GRAPH options turned on.
Wikipedia lists a bunch of other options that you can try.
回答3:
Good old cflow works fine for C. See here for an implementation.
回答4:
Any decent static analysis tool should have this functionality (as well as all the other stuff that such tools do). Wikipedia has a good list of such tools.
Another group of tools that may be worth checking out are coverage tools. The call graph generated by the coverage tool will contain only the calls that actually take place during a run of the program. Initially this may be more helpful to you than a full call graph. I'm unable to make any suggestions on this for Windows, but for linux projects I highly recommend gcov and lcov.
来源:https://stackoverflow.com/questions/1245979/c-c-call-graph-utility-for-windows-platform