I need to get the information provided by addr2line (source file and line from backtracing a function call) from within a C++ program.
I know I can call addr2line directly as a subprocess and I know that I can copy the source code of addr2line into my program (which is also GPL licensed). But the code looks complicated and I don't feel comfortable using it directly. What does bfd
mean, anyway? I would prefer to use some function in the C++ STL library, because that would be cleaner.
I am working in a Linux environment.