On Thu, 2008-05-29 12:03:05 +0000, Narech K <[EMAIL PROTECTED]> wrote: > Is there a way to make GCC to instrument every function it compiles with a > prologue/epilogue call to a user defined code a la MSVC's _penter and > _pexit, e.g.: > > http://msdn.microsoft.com/en-us/library/c63a9b7h.aspx > http://msdn.microsoft.com/en-us/library/xc11y76y.aspx > > If not, can anyone suggest a place in GCC's source to look at if one was to > add > such functionality self.
I think that could be done by defining these two functions:
void __cyg_profile_func_enter (void *func_address, void *call_site)
__attribute__ ((no_instrument_function));
void __cyg_profile_func_exit (void *func_address, void *call_site)
__attribute__ ((no_instrument_function));
...and compile with -finstrument-functions .
MfG, JBG
--
Jan-Benedict Glaw [EMAIL PROTECTED] +49-172-7608481
Signature of: They that give up essential liberty to obtain temporary safety,
the second : deserve neither liberty nor safety. (Ben Franklin)
signature.asc
Description: Digital signature
