This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question about -finstrument-functions
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Subject: Question about -finstrument-functions
- From: Andreas Sorensen <andreas dot sorensen at linacre dot oxford dot ac dot uk>
- Date: Sat, 24 Jun 2000 19:03:14 +0100
The gcc option -finstrument-functions generates calls to the profiling
functions
void __cyg_profile_func_enter (void *this_fn, void *call_site);
void __cyg_profile_func_exit (void *this_fn, void *call_site);
My question is: what is the value of call_site if this_fn is a signal
handler? If call_site is an address "outside" the program being profiled,
is there a simple way to test this (without having to look up in the
program's symbol table? What I'm looking for is to write something like
void __cyg_profile_func_enter (void *this_fn, void *call_site)
{
if (call_site is some strange address)
{
/* this_fn just entered is a signal handler, do something safe... */
}
else
{
/* this_fn is a "normal" function, do something else... */
}
}
Thanks for any help,
Andreas Sorensen