Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get doxygen to produce call & caller graphs for c functions

Tags:

c

doxygen

I've spent some time reviewing the docs and going through my doxy config file from end to end. I cut doxygen loose on my config file and it produces documentation and indices for structs and cpp classes but I don't see call or caller graphs for the multitude of c functions in my source tree.

Can anybody tell me how to configure doxygen to produces these call and caller trees ? I do have graphviz installed.

like image 963
user501138 Avatar asked Jan 16 '12 23:01

user501138


People also ask

How do you use doxygen C code?

The Doxygen structural command to use is “@mainpage” as shown in the example above. This tag on one of our markdown files will tell the Doxygen parser that a given markdown file is the main page for the project. This is the page shown when you click index. html from the HTML folder generated by Doxygen.

Can I configure doxygen from the command line?

You can run doxygen from the command line as long as you have a configuration file to use. However, it is often more convenient to run the Doxygen Wizard – this is a GUI that helps you create a Doxygen configuration file and then runs Doxygen for you.

How do I create a doxygen comment?

Once specified, you can generate the comment stub by typing the respective “///” or “/**” above a function, or by using the (Ctrl+/) shortcut. To get started, you can have Visual Studio generate an . editorconfig file for you based on your existing setting for documentation by using the “Generate .


2 Answers

You have to set HAVE_DOT, CALL_GRAPH and CALLER_GRAPH to YES. Also make sure the path to dot is in your PATH variable.

If that still doesn't work, you might have to set EXTRACT_ALL and/or EXTRACT_STATIC, depending on your functions.

like image 117
pezcode Avatar answered Oct 01 '22 18:10

pezcode


doxywizard is also useful. It gives you all the options in a GUI. Selecting any option shows quick help about that option.

You might also be interested in COLLABORATION_GRAPH or GRAPHICAL_HIERARCHY.

Quite convenient.

like image 27
kikeenrique Avatar answered Oct 01 '22 18:10

kikeenrique