add flag to detect if using the modified API
Expose dlpi_name and dlpi_addr in syminfo callback
libbacktrace: check for sys/link.h
QNX uses sys/link.h rather than link.h for dl_iterate_phdr
Fixes #86
* configure.ac: Check for sys/link.h. Use either link.h or
sys/link.h when checking for dl_iterate_phdr.
* elf.c: Include sys/link.h if available.
* configure, config.h.in: Regenerate.
libbacktrace: don't exit Mach-O dyld library loop on one failure
* macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit
loop if we can't find debug info for one shared library.
For #85
libbacktrace: don't let "make clean" remove allocfail.sh
* Makefile.am (MAKETESTS): New variable split out of TESTS.
(CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS.
* Makefile.in: Regenerate.
Fixes #81
libbacktrace: replace fgrep with grep in configure script
Patch by Xi Ruoyao.
* configure.ac: Use grep instead of fgrep.
* configure: Regenerate.
libbacktrace: don't skip initial aligned byte in uncompressed block
Patch from Rui Ueyama, who says:
libbacktrace occasionally fails to decompress compressed debug info
even though the sections contain valid zlib streams. The cause of the
issue is an off-by-one error.
If a zlib data block is a plain data (uncompressed data), the next two
bytes contain the size of the block. These two bytes value is byte-
aligned, so if we read-ahead more than 8 bits, we need to unread it.
So, the correct condition to determine whether or not we need to
unread a byte is bits >= 8 and not bits > 8. Due to this error,
if the last read bits happened to end at a byte boundary, the next
byte would be skipped. That caused the decompression failure.
This bug was originally reported against the mold linker.
rui314/mold#402
* elf.c (elf_zlib_inflate): Don't skip initial aligned byte in
uncompressed block.
libbacktrace: gather address ranges from skeleton units
* dwarf.c (find_address_ranges): Handle skeleton units.
(read_function_entry): Likewise.
libbacktrace: initialize DWARF 5 fields of unit
When I added the fields in 2019-12-13 I forgot to initialize them.
* dwarf.c (build_address_map): Initialize DWARF 5 fields of unit.
configury: support --disable-werror
configury: update to recent versions
Copied from GCC tip.
Fixes #84
config/override.m4: don't require exactly autoconf 2.69
Fixes #71
Fixes #74
libbacktrace: don't special case file 0
It's no longer necessary as file 0 is now set up in all cases.
* dwarf.c (read_line_program): Don't special case file 0.
(read_function_entry): Likewise.
Fixes #69
libbacktrace: pass -1 to error callback for unrecognized DWARF
PR libbacktrace/98818
* dwarf.c (dwarf_buf_error): Add errnum parameter. Change all
callers.
* backtrace.h: Update backtrace_error_callback comment.
libbacktrace: check for objcopy --add-gnu-debuglink using --help
* configure.ac: Check for objcopy --add-gnu-debuglink by using
objcopy --help.
* configure: Regenerate
libbacktrace: don't fail tests if dwz fails
* Makefile.am (%_dwz): If dwz fails, use uncompressed debug info.
* Makefile.in: Regenerate.
libbacktrace: use correct directory/filename for DWARF 5
PR debug/98716
* dwarf.c (read_v2_paths): Allocate zero entry for dirs and
filenames.
(read_line_program): Remove parameter u, change caller. Don't
subtract one from dirs and filenames index.
(read_function_entry): Don't subtract one from filenames index.
libbacktrace: correct buffer overflow tests
* dwarf.c (resolve_string): Use > rather than >= to check whether
string index extends past buffer.
(resolve_addr_index): Similarly for address index.
libbacktrace: update README