How to use '-finstrument-functions' in C++ programs ?

Andrew Haley aph@redhat.com
Thu Dec 16 10:39:00 GMT 2004


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.



More information about the Gcc mailing list