title: Get a pointer to the current function in C (gcc)?
body: <p>is there a magic variable in gcc holding a pointer to the current function ? </p>
  
  <p>I would like to have a kind of table containing for each function pointer a set of information. </p>
  
  <p>I know there's a __func__ variable containing the name of the current function as a string but not as a function pointer. </p>
  
  <p>This is not to call the function then but just to be used as an index.</p>
  
  <p><strong>EDIT</strong>
  Basically what i would like to do is being able to run nested functions just before the execution of the current function (and  also capturing the return to perform some things.)
  Basically, this is like __cyg_profile_func_enter and __cyg_profile_func_exit (the instrumentation functions)... But the problem is that these instrumentation functions are global and not function-dedicated.</p>
  
  <p><strong>EDIT</strong>
  In the linux kernel, you can use <code>unsigned long kallsyms_lookup_name(const char *name)</code> from <code>include/linux/kallsyms.h</code> ... Note that the <code>CONFIG_KALLSYMS</code> option must be activated.</p>