On 06/09/12 03:23, Malte Forkel wrote:
Am 04.09.2012 23:28, schrieb Ian Lance Taylor:
I don't know anything about dwfl. But you haven't showed us the
important piece of information: where does addr come from in the call
to addr_print?
Both __cyg_profile_func_enter and __cyg_profile_func_exit have
parameters 'void *this_fn' and 'void *call_site', the address of the
current function and its call site (see
http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-finstrument_002dfunctions-2296).
If memory serves me correctly the call site is implemented in terms of
__builtin_return_address (or something similar).
This then isn't the address of the call, but the address to which the
function returns after executing.
Patrick