Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

linux tool to show c function call from source

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading