On 01/28/2010 02:44 PM, Paulo J. Matos wrote: > On Wed, Jan 27, 2010 at 12:25 PM, Paulo J. Matos <pocmatos@xxxxxxxxx> wrote: >> Now, I wonder in this more general case, where can I obtain the >> function decl (so I can get its assembler name) for the function the >> pointer is pointing to? >> > > Allow me to revive this question by asking if I can obtain the > function assembler name given a direct function pointer to the > function. > > For example: > void foo1(void) {...} > > __get_name(foo1) ==> "foo1" > > int foo2(int *x) { ... } > > __get_name(foo2) ==> "foo2" > > This is all I need. Any tips? dladdr() Andrew.