Author Topic: How can I display a call-tree?  (Read 7392 times)

TDuell

  • Guest
How can I display a call-tree?
« on: July 06, 2008, 03:25:58 am »
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.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: How can I display a call-tree?
« Reply #1 on: July 06, 2008, 06:25:45 am »
Nope, at least not with Code::Blocks.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How can I display a call-tree?
« Reply #2 on: July 06, 2008, 09:52:31 am »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How can I display a call-tree?
« Reply #3 on: July 06, 2008, 08:49:35 pm »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

TDuell

  • Guest
Re: How can I display a call-tree?
« Reply #4 on: July 07, 2008, 02:56:13 am »
Quote
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.

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.