Search code examples
c++ccall-graph

Generating dynamic call graph of c/c++ programs on the run


If one were to visualize the running of a program, I suppose one would start by getting the call graphs of the program.

But how would you get the call graph of c/c++ programs while on the run?

edit: clarifications, I'm currently running things on linux, using g++, but I suppose I am also curious about solutions if I'm using a different platform.


Solution

  • I've used etrace to trace executions of programs.

    Egypt does the same thing, but only has a limited support for C++.

    Both requires the program to be instrumented with gcc.