Hi,
Using the instrument-functions flag in gcc, you can instrument the code to execute functions before and after each execution of a function. These functions are __cyg_profile_func_enter and __cyg_profile_func_exit with two parameters, the address of a current function; the second parameter for enter is the address of the call site and for exit the address from which it returns.
Is there a way to obtain the value which was actually returned by the instrumented function ?