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]

Re: Treatment of builtin that receives function pointer


On 01/28/2010 02:44 PM, Paulo J. Matos wrote:
> On Wed, Jan 27, 2010 at 12:25 PM, Paulo J. Matos <pocmatos@gmail.com> 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.


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