Tools to get a pictorial function call graph of code [closed]

0 votes
asked Feb 5, 2009 by goldenmean

I have a large work space which has many source files of C code. Although I can see the functions called from a function in MS VS2005 using the Object browser, and in MSVC 6.0 also, this only shows functions called from a particular function in a non-graphical kind of display. Additionally, it does not show the function called starting from say main(), and then the functions called from it, and so on, deeper inside to the leaf level function.

I need a tool which will give me a function call graph pictorially with functions callee and caller connected by arrows or something like that, starting from main() to the last level of function, or at least showing a call graph of all functions in one C source file pictorially. It would be great if I could print this graph.

Any good tools to do that (need not be free tools)?

6 Answers

0 votes
answered Jan 5, 2009 by finnw

doxygen (combined with graphviz) can generate call graphs.

0 votes
answered Jan 5, 2009 by mattk

Understand does a very good job of creating call graphs.

0 votes
answered Feb 5, 2009 by philant
0 votes
answered Jan 4, 2010 by ira-baxter

Our DMS Software Reengineering Toolkit has static control/dataflow/points-to/call graph analysis that has been applied to huge systems (~~25 million lines) of C code, and produced such call graphs, including functions called via function pointers.

0 votes
answered Jan 21, 2014 by fabio-visona

You may try CScope + tceetree + Graphviz.

0 votes
answered Jan 3, 2015 by jason-nyberg

You can check out my bash-based C call tree generator here. It lets you specify one or more C functions for which you want caller and/or called information, or you can specify a set of functions and determine the reachability graph of function calls that connects them... I.e. tell me all the ways main(), foo(), and bar() are connected. It uses graphviz/dot for a graphing engine.

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter