Re: Accessing symbol table to find function given address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paulo J. Matos wrote:
Hello all,

Is there a way to access the symbol table during runtime to know which
function belongs to a given address. The problem is to print the
function name if I am instrumenting functions. I get the address, can
I during runtime print the function name? (or the solution is get it
through addr2line after program as run)?
If you are using glibc, you could try the dladdr() function. Otherwise you can try addr2line as you suggested.

David Daney.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux