-1

I'm trying to re-implement a C++ code in Go. Specifically, I'm focused on meshToVolume tool of OpenVDB library.

As shown by a manually-prepared code flow screenshot, even a rough call stack map is pretty perplexing.

I'm looking for a tool to help me keep track of call stack and the code flow. So far:

  • I've looked at this post and tried out BOUML, but it didn't help
  • Also, OpenVDB has a Doxygen, but I couldn't get much help regarding keeping track of code flow and call stack

Can anybody suggest a helpful tool/method?

Megidd
  • 7,089
  • 6
  • 65
  • 142
  • 1
    check if this applies https://stackoverflow.com/questions/3899870/print-call-stack-in-c-or-c – Ankur Jul 05 '20 at 08:25
  • 1
    I recommend not using a code flow visualization tool at all. They quickly get very complex, defeating their purpose. Try porting the classes and functions of meshToVolume one by one. – G. Sliepen Jul 05 '20 at 08:27
  • @G.Sliepen Thanks! I'm going to give it a try. I appreciate any tool which might possibly help a bit =) – Megidd Jul 05 '20 at 08:33

1 Answers1

0

Using Doxygen, I could finally visualize call graph!

Approach

Downloaded and installed Doxygen. Then ran Doxywizard i.e. Doxygen GUI front-end. OpenVDB has a doc directory which is set as the working directory from which Doxygen will run.

Working directories

Without selecting these options, call graphs didn't get generated for me:

enter image description here

I have Graphviz DOT language installed on my machine. There I can use it to generate call graphs:

Dot tool

Finally, Doxygen generates the output HTML accessible at:

file:///C:/Users/m3/repos/doxygen-output/html/index.html

enter image description here

Dependency graph sample:

Dependency graph sample

Megidd
  • 7,089
  • 6
  • 65
  • 142