On Thu, Jan 28, 2010 at 2:58 PM, Andrew Haley <aph@xxxxxxxxxx> wrote: > > dladdr() > Thanks Andrew but this answer seems to assume I am trying to obtain this in a C program from a previously compiled function. However, I am inside GCC which access to the gimple tree of the function. I found out the problem I was having but not the solution yet. My builtin function gets angry when given a function pointer which is not (void) (*)(void). As a result, it casts the function. So something like: void foo(int) { } .. __mybuiltin(foo); becomes internally: void foo(int) { } .. (void) (foo.0) (void) = ((void) (*)(void) foo); __mybuiltin(foo.0); This is why I am not being able to get my function name from the tree of the builtin function call. I guess I need to parse the tree of the current function to find the value of foo.0. I am however open to suggestions. > Andrew. > -- Paulo Jorge Matos - pocmatos at gmail.com http://www.pmatos.net