Quantcast
Viewing all articles
Browse latest Browse all 22133

How to runtime trace gcc/clang?

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 or clang not that in test.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.


Viewing all articles
Browse latest Browse all 22133

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>