• Uncategorized

About c : linux-tool-to-show-c-function-call-from-source-closed

Question Detail

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.

Question Answer

GNU cflow is your good friend.
https://www.gnu.org/software/cflow/manual/cflow.html

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.