It is backtrace(3) in C++.
Need backtrace(3) and cxxabi.h (for name demangling).
make and libbacktracpp.a will be generated.
Use make LIB_DIR=library-output-directory to specify where to put libbacktracpp.a, or current directory if not specified.
make sample and run backtrace.out
Have gtest installed and make runtest
Do whatever you want with the codes.