I've recently returned to the world of software development for a research role, and as expected, I've been handed a big codebase to get to grips with.
To save time I often reach out to graphing tools to get an understanding of how the source code is really structured. There are plenty of complex tools but I just use Doxygen with Graphviz. Unfortunately, even that's not a terribly useable tool, so I'm writing down the steps I use here.
Go into your project and run:
doxygen -g Doxyfile
Edit the Doxyfile and make sure the following variables are set:
EXTRACT_ALL = YES
RECURSIVE = YES
CALL_GRAPH = YES
OPTIMIZE_OUTPUT_FOR_C = YES
HAVE_DOT = YES
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
DISABLE_INDEX = YES
GENERATE_TREEVIEW = YES
RECURSIVE = YES
NCC is another nice tool but the Ubuntu package doesn't seem to include everything but the C compiler itself. It does have a linker, C++ compiler, though. Something for me to look into at some point in the future.
There is also cflow which is quite nice. However, it only generates POSIX flow graphs. For actual pictures like PNG, use mycflow2dot
pip install pycflow2dot