简体   繁体   中英

How to keep track of source code call stack

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?

Using Doxygen, I could finally visualize call graph !

Approach

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

工作目录

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

在此处输入图像描述

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

点工具

Finally, Doxygen generates the output HTML accessible at:

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

在此处输入图像描述

Dependency graph sample:

依赖图示例

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM