I want to trace all the user functions in gcc
/clang
when running something like gcc test.c
.
noted that I want to trace the functions in
gcc
orclang
not that intest.c
Some tools like strace
and ltrace
can only trace system calls or library functions, and tools like etrace need re-compile the program I want to trace (i.e. re-compile gcc
/clang
). What's more, using gdb
also have to re-compile gcc
/clang
to debug binaries. However, compiling gcc
/clang
is extremely expensive and error-prone. So is there any short cuts to achieve this?
Thank you.