gcc/libbacktrace
Ian Lance Taylor 9283471ba0 re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split)
PR sanitizer/77631
	Support for external debug info.
	* elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
	(S_ISLNK): Define if not defined.
	(xstrnlen): Define if strnlen is not available.
	(b_elf_note): Define type.
	(NT_GNU_BUILD_ID): Define macro.
	(elf_crc32, elf_crc32_file): New static functions.
	(elf_is_symlink, elf_readlink): New static functions.
	(elf_open_debugfile_by_buildid): New static function.
	(elf_try_debugfile): New static function.
	(elf_find_debugfile_by_debuglink): New static function.
	(elf_open_debugfile_by_debuglink): New static function.
	(elf_add): Add filename and debuginfo parameters.  Adjust all
	callers.  Look for external debug info notes, and try to fetch
	debug info from external file.
	(struct phdr_data): Add exe_filename field.
	(phdr_callback): Pass filename to elf_add.
	(backtrace_initialize): Add filename parameter.
	* internal.h (backtrace_initialize): Add filename parameter.
	* fileline.c (fileline_initialize): Pass filename to
	backtrace_initialize.
	* pecoff.c (fileline_initialize): Add unused filename parameter.
	* unknown.c (fileline_initialize): Likewise.
	* xcoff.c (fileline_initialize): Likewise.
	* configure.ac: Check for objcopy --add-gnu-debuglink.
	* Makefile.am (dtest): New test target.
	* configure, Makefile.in: Rebuild.

Co-Authored-By: Denis Khalikov <d.khalikov@partner.samsung.com>

From-SVN: r253032
2017-09-20 21:09:37 +00:00
..
aclocal.m4
alloc.c
atomic.c
backtrace-supported.h.in
backtrace.c
backtrace.h
btest.c
ChangeLog re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
ChangeLog.jit
config.h.in configure.ac: Check for XCOFF32/XCOFF64. 2017-07-26 21:43:28 +00:00
configure re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
configure.ac re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
dwarf.c
edtest2.c
edtest.c
elf.c re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
fileline.c re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
filetype.awk configure.ac: Check for XCOFF32/XCOFF64. 2017-07-26 21:43:28 +00:00
internal.h re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
Makefile.am re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
Makefile.in re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
mmap.c
mmapio.c
nounwind.c
pecoff.c re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
posix.c
print.c
read.c
README
simple.c
sort.c
state.c
stest.c
testlib.c
testlib.h
ttest.c
unknown.c re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00
xcoff.c re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info is split) 2017-09-20 21:09:37 +00:00

The libbacktrace library
Initially written by Ian Lance Taylor <iant@google.com>

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 September 2012, libbacktrace only supports ELF executables with
DWARF debugging information.  The library is written to make it
straightforward to add support for other object file and debugging
formats.