This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Thu, 2008-05-29 12:03:05 +0000, Narech K <narechk@gmail.com> 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 jbglaw@lug-owl.de +49-172-7608481
Signature of: They that give up essential liberty to obtain temporary safety,
the second : deserve neither liberty nor safety. (Ben Franklin)
Attachment:
signature.asc
Description: Digital signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |