News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

How can I display a call-tree?

Started by TDuell, July 06, 2008, 03:25:58 AM

Previous topic - Next topic

TDuell

Hullo All,
I am new to CodeBlocks, so this might be a silly question.
I am trying to get an understanding of an (old) unmaintained C project, and need to understand the overall structure.
Is it possible to get a graphical display of the what calls what...I think that is known as a call tree.

Ceniza

Nope, at least not with Code::Blocks.

Jenna

The nearest thing you can do with C::B is afaik opening the "Call stack" in debug mode.
If your program stops at a breakpoint you can see the functions that where called before reaching the breakpoint.
But it is in no way graphical and (of course) might show tons of system-calls.

To activate it, place a breakpoint, start debugging and if the execution stops chose "Debug -> Debugging windows -> Call stack".

Maybe this helps a little bit.

MortenMacFly

FYI: I used Doxygen (www.doxygen.org) for similar purposes. In can create call graphs and caller graphs for you. A project is pretty simple to setup: Basically just adding files and enabling the "features" if you use the wizard.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

TDuell

QuoteFYI: I used Doxygen (www.doxygen.org) for similar purposes. In can create call graphs and caller graphs for you. A project is pretty simple to setup: Basically just adding files and enabling the "features" if you use the wizard.

Thanks for that info.
I installed doxygen and doxywizard and set it to work. Cripes, it certainly generates a lot of data...about 200MB for my project.
There are so many graphical call trees that I am a bit overwhelmed by it all. I suspect that it has actually added to the complexity rather than reduced it!
I probably need to play about a tad with a much smaller project to see how to tailor the output of doxygen to suit my needs.

Thanks again for your help.