I am looking for such kind of a tool on either Unix/Linux platform which can achieve:
- I have the source files and I compiled the application myself (the source code is in C, although I don't really think it matters here)
- I want to run this application while every function calls are printed/logged to a stdout/file
For example:
#include <stdio.h>
int square(int x) { return x*x; }
int main(void) {
square(2);
}
And when I run this program it will print out
- main
- square
I understand that gdb can do this to some extent, or valgrind but they all do not do exactly what I want. I am just wondering if such a tool exist? Thanks.