Import and use libbacktrace

Alexander Monakov amonakov at ispras.ru
Sun May 19 07:39:46 PDT 2013


Hello,

These patches improve stack recording on ELF platforms by using libbacktrace
(and libbfd for demangling).  The first patch is a small cleanup to existing
code.

The last patch introduces a dependency on libbfd + demangle.h.  Should it be
checked somehow in CMakeLists.txt?  Apart from that, libbacktrace has soft
dependencies on dwarf.h and unwind.h, but will build without those (although
common/trace_backtrace.* does not check BACKTRACE_SUPPORTED macro yet).

Alexander

 CMakeLists.txt             |   6 +
 common/trace_backtrace.cpp | 278 ++++++++++++++++++---------------------------
 common/trace_backtrace.hpp |  20 +---
 wrappers/CMakeLists.txt    |   2 +
 4 files changed, 118 insertions(+), 188 deletions(-)

 thirdparty/libbacktrace/CMakeLists.txt           |  140 +
 thirdparty/libbacktrace/ChangeLog                |  285 ++
 thirdparty/libbacktrace/README                   |   23 +
 thirdparty/libbacktrace/alloc.c                  |  140 +
 thirdparty/libbacktrace/auxincl/dwarf2.h         |   52 +
 thirdparty/libbacktrace/auxincl/filenames.h      |   40 +
 thirdparty/libbacktrace/backtrace-supported.h.in |   61 +
 thirdparty/libbacktrace/backtrace.c              |  108 +
 thirdparty/libbacktrace/backtrace.h              |  199 ++
 thirdparty/libbacktrace/btest.c                  |  628 +++++
 thirdparty/libbacktrace/config.h.in.cmake        |   21 +
 thirdparty/libbacktrace/dwarf.c                  | 3007 ++++++++++++++++++++++
 thirdparty/libbacktrace/elf.c                    |  904 +++++++
 thirdparty/libbacktrace/fileline.c               |  208 ++
 thirdparty/libbacktrace/internal.h               |  242 ++
 thirdparty/libbacktrace/mmap.c                   |  264 ++
 thirdparty/libbacktrace/mmapio.c                 |  100 +
 thirdparty/libbacktrace/nounwind.c               |   66 +
 thirdparty/libbacktrace/posix.c                  |  100 +
 thirdparty/libbacktrace/print.c                  |   92 +
 thirdparty/libbacktrace/read.c                   |   96 +
 thirdparty/libbacktrace/simple.c                 |  108 +
 thirdparty/libbacktrace/state.c                  |   72 +
 thirdparty/libbacktrace/unknown.c                |   64 +
 24 files changed, 7020 insertions(+)



More information about the apitrace mailing list