NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Mapping function address to name
On Thu, 26 Apr 2012 13:11:19 -0700
Chuck Swiger <cswiger%mac.com@localhost> wrote:
> On Apr 26, 2012, at 12:48 PM, Sad Clouds wrote:
> > Hi, I am trying to find a way to map function addresses to names,
> > during runtime for the following:
> >
> > - Shared library functions
> > - Any Functions mapped with dlopen/dlsym
> >
> > Any suggestions? Thanks.
>
> You're looking for dladdr().
>
> Regards,
> --
> -Chuck
>
Yes, but dladdr() only works for symbols obtained with dlsym(), for all
other function addresses it gives dli_sname as "_init"
Home |
Main Index |
Thread Index |
Old Index