N
N
nerudo2011-09-12 11:18:26
C++ / C#
nerudo, 2011-09-12 11:18:26

Building a function call graph from source code?

I myself am hardly a programmer, so I apologize if the question seems strange, but the following need arose:
There is a program (well, as a program - bydlocode for an embedded system) written in C, practically without using standard calls, one thread, several interrupt handlers. The volume is small - about 3-5 thousand lines lying in several files. I would like to automatically build the structure of the program in a graphical form - which functions are in which files, what is called from where, and so on. Only based on static analysis, i.e. there is no need to track the actual execution of the program.
Is there any ready made product? It is desirable that all this be saved in an editable format such as vsd / odg / svg, or there should be a built-in graphics editor to correct the “roughness” of the automatic drawing.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
abyrvalg, 2011-09-12
@abyrvalg

You will most likely like GraphViz .
Here is a more or less ready case for visualizing code with it: www.ibm.com/developerworks/library/l-graphvis/

R
rustler2000, 2011-09-12
@rustler2000

doxygen works wonders

P
Pavel Nazarov, 2011-09-13
@smbd

Also, cflow will help you , which gives you great function call graphs. Its output can be converted using cflow2vcg to .dot format, and GraphViz can render vector graphics. This is the simplest and most optimal way, we did this in coursework on networks. It worked out beautifully :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question