How to tell gcc to instrument the code with calls to my own function each _line_ of code?

前端 未结 4 1979
你的背包
你的背包 2020-12-19 12:26

For example, there is the source:

void my_special_debugging_function(const char* function_name, const char* file_name, int line_number);

void func1() {
             


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-19 12:45

    As stated in the other answer, I don't think that there is any way to tell GCC to do that, without preprocessor tricks and edits to the source code. – nategoose

提交回复
热议问题