I've used a Linux tool to show C function calls from the source long time ago. It looks like the following snapshot,
$ cat tmp.c
void foo1(){
...
}
void foo2(){
foo1();
...
}
void foo3(){
...
}
void foo(){
foo3();
foo1();
foo2();
...
}
$ <the_tool> tmp.c
foo1
foo2
foo1
foo3
foo
foo3
foo1
foo2
For example, the sample code is called "tmp.c", and the tool, called "the_tool", takes the sample code as input and generates the hierarchy of the functions calls with indentions as above. People don't need to compile the code and run it using a tracer or profiler like gdb, gprof, valgrind, and so on.
Can anyone help me to recall this tool? Thank you.