views:

1763

answers:

6

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?

+2  A: 

Have you tried SourceInsight's call graph feature?

JaredPar
+7  A: 

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.

nagul
+1: For doxygen and codeviz.
Anthony Cuozzo
+3  A: 

Good old cflow works fine for C. See here for an implementation.

lhf
+2  A: 

This is an old tool called CDoc that I have found useful.

epotter
+1  A: 

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.

Richard Corden
+2  A: 

CppDepend could be useful for this kind of needs, it provides dependency graph and also DSM (dependency matrix).

here's some snapshot of CppDepend Views:

alt text alt text

Issam