This is the mail archive of the gcc-help@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]

How to find function name from function pointer?


Hi,

I need to find the name of a function given the function pointer
(programmatically) at run-time.  I have used dladdr() to obtain the
library name but I'm not able to obtain the function name using that.
I have used addr2line to obtain the function name using the function
pointers but it is not giving any values.

Does gcc provide any mechanism using which I can achieve the above.
I'm using gcc version 4.1 on Linux.

Thanks,
Gaurav


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]