Adding printf to the starting of all functions in a file

后端 未结 2 633
别跟我提以往
别跟我提以往 2020-12-16 04:05

I have some very large C files, having lots of functions. I need to trace the execution path at run time. There is no way I can trace it through debugging as its a hyperviso

相关标签:
2条回答
  • 2020-12-16 04:43

    Here is a nice example of what you want.

    0 讨论(0)
  • 2020-12-16 04:53

    Just pass -finstrument-functions to gcc when compiling. See the gcc(1) man page for details.

    0 讨论(0)
提交回复
热议问题