1

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.

djiang
  • 48
  • 7
  • First of all, you state that you "used a Linux tool...", indicating that you already know of such a tool. So why would you ask for other "similar" tools? – Some programmer dude Jan 05 '22 at 07:34
  • With that said, please read ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) What you're asking for (a tool recommendation) is not on-topic. – Some programmer dude Jan 05 '22 at 07:34
  • Does this answer your question? [How can I trace all local function calls and exits, and record it to a file to review](https://stackoverflow.com/questions/22655948/how-can-i-trace-all-local-function-calls-and-exits-and-record-it-to-a-file-to-r) – Gaurav Pathak Jan 05 '22 at 07:35
  • I just forgot the tool, tried to recall it but can't remember it for all day long. that's why i am asking help here. – djiang Jan 05 '22 at 07:39
  • Maybe my description is not clear. I'm not asking for the tool recommendation, it's a specific tool. Bob has answered my question. Thank you anyway. – djiang Jan 05 '22 at 07:50

1 Answers1

2

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

Bob Wang
  • 36
  • 3