No offline debuginfo parser library can perform this address mapping
by itself since the shared library address data is only available at run time.
I'm using the dladdr() GNU extension to parse the output from backtrace() at runtime, and that gives me more information about each return address on the stack. Specifically, it gives me the shared object file name and base address, nearest symbol name and address. For the binary itself, that address is the one I need. For dynamically loaded objects, subtracting the base gives me the address I need.
gdb's backtrace command however gives me more information, such as line number and line content (when compiled with -g); that is the information I want to extract using elfutils (I know it's available, since I can read it with readelf -wL). Any help in this direction would be appreciated.
Thanks,
Mihai