0

I started a while ago to learn the C language, and has spent several hours I search THE miracle software.

I am looking for software that import sources of software in C (files.c) and generates a "mind map" of the code with all files, functions, variables, etc ...

Do you know if it exists? It'll help me a lot to understand the architecture of complex software.

Thank you very much for all your answers.

signo
  • 56
  • 9
  • `doxygen` i think have something like that. – NetVipeC Sep 16 '14 at 17:04
  • I tried with Doxygen that looks not bad, but it is very difficult to configure. I finally succeeded with Understand for C/C++. Thank you anyway :) – signo Sep 19 '14 at 11:31

2 Answers2

1

Take a look at the "call graph". This sort of visualization should get you started.

As the comment suggests, Doxygen is a good open-source tool. Take a look at some output here. Doxygen is straight-forward to configure for call-graph generation under *nix. It's a little more complex for Windows. First, check out this SO post: how to get doxygen to produce call & caller graphs for c functions. Doxygen's HTML output provides a number of nice cross-referencing features (files, variables, structs, etc.) in addition to caller/callee graphs.

On the commercial side, Understand for C/C++ has first-rate visualization features. Google "c call graph diagram" for other commercial and open-source options.

Finally, there are some older SO posts, like this one Tools to get a pictorial function call graph of code. Take a look at it.

albert
  • 8,285
  • 3
  • 19
  • 32
Throwback1986
  • 5,887
  • 1
  • 30
  • 22
  • I used Understand for C/C++, and that's exactly what I needed ! It's sad that it is not open source... Thank you very much !! :) – signo Sep 19 '14 at 11:26
0

Look into the program ctags. It is an indexer of names and functions based on the structure of the programming language.

It is quite mature, and has integration with a number of other tools. I use it with an older (but very nice) text editor called vi, but it can be used independently from the command line.

It does not generate a graphical view of the connections. However, in my estimation there are probably too many connections in most C programs to display visually without creating a large amount of information overload.

This answer differs from Throwback's answer in some interesting ways. A call graph can mean a few things. One thing it can mean is the path a running program took through a section of code, and another is the combination of all paths a running program might take through the code, and another is the combination of all paths in the code (whether they can be reached or not).

Your needs will drive which tool you should use.

Edwin Buck
  • 69,361
  • 7
  • 100
  • 138