Home > Back-end >  Specific how to view a function pointer to invoke the name of the function
Specific how to view a function pointer to invoke the name of the function

Time:09-18

Look at the code in many documents were found a function pointer assignment, what means can know to call a function pointer call when concrete is which function? Thank you very much!

CodePudding user response:

The function called through the debug debugging into specific knew the calling function,

CodePudding user response:

The debug is supposed to be the fastest, where the function calls a breakpoint, then single-step tracking into function
Or grep once in place, and then press processing logic order le qing which deal with a function pointer is the value

CodePudding user response:

A function pointer call pointer address should be able to print, can know which function is through this address? Each function is compiled has an address

CodePudding user response:

Add a print all in each function, such as printf (" % d: % s \ n ", __LINE__, __func__);
So every time I call the corresponding function, function in the execution of this print will show the function name (and line number)

CodePudding user response:

references 4 building self-confidence boy reply:
add a print all in each function, such as printf (" % d: % s \ n ", __LINE__, __func__);
So every time I call the corresponding function, function in the execution of this print will display the function name (and line number)

This method is more troublesome, and all that is in each function will be a print, but will be more accurate
  • Related