代码之家  ›  专栏  ›  技术社区  ›  Megidd

如何跟踪源代码调用堆栈

  •  0
  • Megidd  · 技术社区  · 4 年前

    我正在尝试重新实现GO中的C++代码。具体来说,我关注的是 meshToVolume tool OpenVDB库的。

    如手动准备的 code flow screenshot ,即使是粗略的调用堆栈映射也是相当令人困惑的。

    我正在寻找一个工具来帮助我跟踪调用堆栈和代码流。到目前为止:

    • 我看过 this post 试过BOUML,但没用
    • 此外,OpenVDB还有一个 Doxygen ,但在跟踪代码流和调用堆栈方面,我没有得到多少帮助

    0 回复  |  直到 4 年前
        1
  •  0
  •   Megidd    4 年前

    使用强氧,我终于可以想象 调用图 !

    方法

    Downloaded doc 目录,设置为运行Doxygen的工作目录。

    Working directories

    enter image description here

    我的机器上安装了Graphviz点语言。在那里,我可以使用它生成调用图:

    Dot tool

    最后,Doxygen生成可在以下位置访问的输出HTML:

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

    enter image description here

    依赖关系图示例:

    Dependency graph sample