used as a dynamic library
usage: LD_PRELOAD=/path/to/libfunc_trace.so /path/to/program
Note:
- compile with -g and -finstrument-functions opthions
- use -finstrument-functions-exclude-function-list=func1,func2 to exclude function which you won't trace
- in C++ project, functions declear must be in extern "C" block, otherwise, the trace result can't be human readable; but the member function is still unreadable
copy from bigwhite/func_trace