I need to get the information provided by addr2line (file and line from backtracing a function call) from within a C++ program. Is there a library call similar to addr2line?
edit: I am working in a Linux environment.
I know I can call addr2line directly and I know that I can use the source code of addr2line in my program (which is also GPL licensed). But I guess calling a library function, if it exists, is cleaner.
edit: I will use bfd of the binutils, just as addr2line does. What does bfd mean anyway?
bfdis the en.wikipedia.org/wiki/Binary_File_Descriptor_library (although originally it stood for the other meaning of BFD :) – ecatmur Jul 20 '12 at 12:09ltrace, but you might not want to link against bfd directly yourself: lists.debian.org/debian-devel/2005/05/msg01086.html – Flexo♦ Jul 20 '12 at 12:24