Thank you Andrew.
Regards,
--Hari
Hari K. Pyla writes:
> Hi,
> I was wondering, if there is any way to register a handler which
> gets called whenever any function returns/exits, similar in lines to
> _mcount() but, which gets executed before the actual function, when
> compiled with -pg option.
> I was wondering if it is possible to print the function name or its
> address whenever a function exits by, may be making changes to gcc or
> glibc. I appreciate you taking time to answer this.
It's all documented. See item -finstrument-functions in the gcc docs.
Andrew.