A C library that may be linked into a C/C++ program to produce symbolic backtraces
Go to file
Ian Lance Taylor 012b950b37 Copy changes from GCC:
2018-04-17  Ian Lance Taylor  <iant@golang.org>

	* backtrace.c (backtrace_full): When testing whether we can
	allocate memory, call mmap directly, and munmap the memory.

2018-04-04  Jakub Jelinek  <jakub@redhat.com>

	PR other/85161
	* elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
	big endian, only use 32-bit loads if endianity macros are predefined
	and indicate big or little endian.

2018-02-15  Jakub Jelinek  <jakub@redhat.com>

	PR other/82368
	* elf.c (SHT_PROGBITS): Undefine and define.

2018-02-14  Jakub Jelinek  <jakub@redhat.com>

	PR other/82368
	* elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
	(struct elf_ppc64_opd_data): New type.
	(elf_initialize_syminfo): Add opd argument, handle symbols
	pointing into the PowerPC64 ELFv1 .opd section.
	(elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
	to structure with .opd data to elf_initialize_syminfo.

2018-01-19  Tony Reix  <tony.reix@atos.net>

	* xcoff.c (xcoff_incl_compare): New function.
	(xcoff_incl_search): New function.
	(xcoff_process_linenos): Use bsearch to find include file.
	(xcoff_initialize_fileline): Sort include file information.

Fixes #13
2018-04-17 07:04:02 -07:00
config libbacktrace: rebuild configury with GCC standard tool versions 2018-01-16 17:42:38 -08:00
.gitignore .gitignore: add simple .gitignore file 2018-01-15 15:22:10 -08:00
LICENSE libbacktrace: initial commit 2016-09-10 07:59:09 -07:00
Makefile.am libbacktrace: rebuild configury with GCC standard tool versions 2018-01-16 17:42:38 -08:00
Makefile.in libbacktrace: rebuild configury with GCC standard tool versions 2018-01-16 17:42:38 -08:00
Mark.Twain-Tom.Sawyer.txt Add text used for "inflate large" test. 2018-01-16 17:40:25 -08:00
README.md README: mention XCOFF, call this version 1.0 2018-01-24 18:37:06 -08:00
acinclude.m4 Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
aclocal.m4 libbacktrace: rebuild configury with GCC standard tool versions 2018-01-16 17:42:38 -08:00
alloc.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
atomic.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
backtrace-supported.h.in all: remove meaningless trailing whitespace 2016-09-11 06:45:37 -07:00
backtrace.c Copy changes from GCC: 2018-04-17 07:04:02 -07:00
backtrace.h Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
btest.c * elf.c (elf_add): Close descriptor if we use a debugfile. 2018-01-31 15:24:01 -08:00
config.guess libbacktrace: initial commit 2016-09-10 07:59:09 -07:00
config.h.in libbacktrace: rebuild configury with GCC standard tool versions 2018-01-16 17:42:38 -08:00
config.sub libbacktrace: initial commit 2016-09-10 07:59:09 -07:00
configure libbacktrace: rebuild configury with GCC standard tool versions 2018-01-16 17:42:38 -08:00
configure.ac libbacktrace: rebuild configury with GCC standard tool versions 2018-01-16 17:42:38 -08:00
dwarf.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
edtest.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
edtest2.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
elf.c Copy changes from GCC: 2018-04-17 07:04:02 -07:00
fileline.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
filenames.h Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
filetype.awk libbacktrace: initial commit 2016-09-10 07:59:09 -07:00
install-sh libbacktrace: initial commit 2016-09-10 07:59:09 -07:00
internal.h Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
ltmain.sh libbacktrace: rebuild configury with GCC standard tool versions 2018-01-16 17:42:38 -08:00
missing libbacktrace: initial commit 2016-09-10 07:59:09 -07:00
mmap.c * mmap.c (backtrace_free_locked): Don't put more than 16 entries 2018-01-24 18:25:39 -08:00
mmapio.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
move-if-change Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
nounwind.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
pecoff.c * pecoff.c (coff_add): Only release syms_view if it is valid. 2018-01-25 07:38:52 -08:00
posix.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
print.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
read.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
simple.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
sort.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
state.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
stest.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
testlib.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
testlib.h Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
ttest.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
unknown.c Update from gcc trunk version of libbacktrace at svn rev 256427. (#8) 2018-01-12 10:26:02 -08:00
xcoff.c Copy changes from GCC: 2018-04-17 07:04:02 -07:00
ztest.c libbacktrace: update to GCC SVN revision 256776 2018-01-16 17:39:45 -08:00

README.md

libbacktrace

A C library that may be linked into a C/C++ program to produce symbolic backtraces

Initially written by Ian Lance Taylor iant@golang.org.

This is version 1.0. It is likely that this will always be version 1.0.

The libbacktrace library may be linked into a program or library and used to produce symbolic backtraces. Sample uses would be to print a detailed backtrace when an error occurs or to gather detailed profiling information.

The libbacktrace library is provided under a BSD license. See the source files for the exact license text.

The public functions are declared and documented in the header file backtrace.h, which should be #include'd by a user of the library.

Building libbacktrace will generate a file backtrace-supported.h, which a user of the library may use to determine whether backtraces will work. See the source file backtrace-supported.h.in for the macros that it defines.

As of January 2018, libbacktrace only supports ELF, PE/COFF, and XCOFF executables with DWARF debugging information. The library is written to make it straightforward to add support for other object file and debugging formats.

The library relies on the C++ unwind API defined at https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html This API is provided by GCC.