This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to use '-finstrument-functions' in C++ programs ?
- From: Andrew Haley <aph at redhat dot com>
- To: Dmitry Antipov <antipov at dev dot rtsoft dot ru>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 16 Dec 2004 10:38:29 +0000
- Subject: Re: How to use '-finstrument-functions' in C++ programs ?
- References: <41C16C90.6080705@dev.rtsoft.ru>
Dmitry Antipov writes:
> Looking through generated assembly shows that the calls of __cyg_* functions
> are emitted, but these functions itself are generated with mangled names.
> Here is a piece of 'nm' output:
>
> U __cyg_profile_func_enter
> U __cyg_profile_func_exit
> ...
> 00000050 T _Z23__cyg_profile_func_exitPvS_
> 00000000 T _Z24__cyg_profile_func_enterPvS_
The __cyg_ functions you write must be declared first as extern "C".
Andrew.