aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace
AgeCommit message (Collapse)AuthorFilesLines
2018-01-03Update copyright years.Jakub Jelinek32-32/+36
From-SVN: r256169
2017-11-17Enable building libbacktrace with Intel CETIgor Tsimbalist5-3/+94
libbacktrace/ * configure.ac: Add CET_FLAGS to EXTRA_FLAGS. * aclocal.m4: Regenerate. * Makefile.in: Likewise. * configure: Likewise. From-SVN: r254892
2017-10-06ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress ↵Ian Lance Taylor2-1/+9
function. * ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function. From-SVN: r253491
2017-10-05elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.Ian Lance Taylor3-16/+47
* elf.c (elf_zlib_fetch): Change pval argument to uint64_t *. Read a four byte integer. (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit boundary before ever calling elf_zlib_fetch. * ztest.c (test_large): Simplify print statements a bit. From-SVN: r253456
2017-10-03ztest.c: #include <errno.h>.Ian Lance Taylor6-22/+48
* ztest.c: #include <errno.h>. (TEST_TIMING): Don't define, don't test. (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME. (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise. (ZLIB_CLOCK_GETTIME_ARG): Define. * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK. * Makefile.am: Likewise. * configure, Makefile.in: Rebuild. From-SVN: r253377
2017-10-02libbacktrace: Support the case that clock_gettime is in librtThomas Schwinge5-4/+78
libbacktrace/ PR other/67165 * Makefile.am: Append the content of clock_gettime_link to ztest_LDADD. * configure.ac: Test for the case that clock_gettime is in librt. * Makefile.in: Regenerate. * configure: Likewise. From-SVN: r253345
2017-10-02libbacktrace: Conditionalize test timing on clock_gettime availabilityThomas Schwinge5-1/+39
libbacktrace/ PR other/67165 * configure.ac: Check for clock_gettime. * config.h.in: Regenerate. * configure: Likewise. * ztest.c (average_time, test_large): Conditionalize test timing on clock_gettime availability. From-SVN: r253344
2017-09-29xcoff.c: Initial support for DWARF debug sections in XCOFF.Tony Reix2-11/+142
* xcoff.c: Initial support for DWARF debug sections in XCOFF. (STYP_DWARF, SSUBTYP_DW*): Define. (enum dwarf_section): Define. (struct dwsect_info): Define. (xcoff_add): Look for DWARF sections, pass them to backtrace_dwarf_add. From-SVN: r253297
2017-09-29re PR other/67165 (please enable libbacktrace to work with compressed debug ↵Ian Lance Taylor9-15/+2377
sections) PR other/67165 * elf.c (__builtin_prefetch): Define if not __GNUC__. (unlikely): Define. (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define. (b_elf_chdr): Define type. (enum debug_section): Add ZDEBUG_xxx values. (debug_section_names): Add names for new sections. (struct debug_section_info): Add compressed field. (elf_zlib_failed, elf_zlib_fetch): New static functions. (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define. (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define. (HUFFMAN_SECONDARY_SHIFT): Define. (ZDEBUG_TABLE_SIZE): Define. (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define. (final_next_secondary): New static variable if BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE. (elf_zlib_inflate_table): New static function. (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main function to produce fixed Huffman table. (elf_zlib_default_table): New static variable. (elf_zlib_inflate): New static function. (elf_zlib_verify_checksum): Likewise. (elf_zlib_inflate_and_verify): Likewise. (elf_uncompress_zdebug): Likewise. (elf_uncompress_chdr): Likewise. (backtrace_uncompress_zdebug): New extern function. (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug sections, and uncompress them. * internal.h (backtrace_compress_zdebug): Declare. * ztest.c: New file. * configure.ac: Check for -lz and check whether the linker supports --compress-debug-sections. * Makefile.am (ztest_SOURCES): New variable. (ztest_CFLAGS, ztest_LDADD): New variables. (check_PROGRAMS): Add ztest. (ctestg_SOURCES): New variable. (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables. (ctesta_SOURCES): New variable. (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables. (check_PROGRAMS): Add ctestg and ctesta. * configure, config.h.in, Makefile.in: Rebuild. From-SVN: r253275
2017-09-22re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info ↵Ian Lance Taylor5-0/+57
is split) PR sanitizer/77631 * configure.ac: Check for lstat and readlink. * elf.c (lstat, readlink): Provide dummy versions if real versions are not available. * configure, config.h.in: Rebuild. From-SVN: r253095
2017-09-21re PR go/82284 (go -version segfaults on big endian architectures)Ian Lance Taylor2-0/+6
PR go/82284 * elf.c (backtrace_initialize): Set pd.exe_filename. From-SVN: r253078
2017-09-20re PR sanitizer/77631 (no symbols in backtrace shown by ASan when debug info ↵Ian Lance Taylor11-19/+705
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-12re PR other/81096 (test case ttest in libbacktrace fails starting with its ↵Steve Ellcey2-1/+7
introduction in r249111) 2017-09-12 Steve Ellcey <sellcey@cavium.com> PR other/81096 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS) * Makefile.in: Regenerate. From-SVN: r252038
2017-09-12re PR other/81096 (test case ttest in libbacktrace fails starting with its ↵Steve Ellcey2-1/+7
introduction in r249111) 2017-09-12 Steve Ellcey <sellcey@cavium.com> PR other/81096 * libbacktrace/Makefile.in (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS) From-SVN: r252035
2017-08-02Add PR number.David Edelsohn1-0/+1
From-SVN: r250825
2017-08-02* xcoff.c (xcoff_process_linenos): Initialize incl to NULL.David Edelsohn2-1/+5
From-SVN: r250824
2017-07-28* xcoff.c: Don't leak a file descriptor if an archive is malformed.Tony Reix2-4/+9
From-SVN: r250684
2017-07-28Fix pid_t printingRainer Orth2-1/+6
* fileline.c (fileline_initialize): Print pid_t as long. From-SVN: r250675
2017-07-26configure.ac: Check for XCOFF32/XCOFF64.Tony Reix7-33/+1544
* configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery. * filetype.awk: Separate AIX XCOFF32 and XCOFF64. * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats. * configure, config.h.in: Regenerate. From-SVN: r250590
2017-07-21filetype.awk: Add AIX XCOFF type detection.Tony Reix8-3/+109
* filetype.awk: Add AIX XCOFF type detection. * configure.ac: Recognize xcoff format. * Makefile.am (FORMAT_FILES): Add xcoff.c. * fileline.c: Include <unistd.h>. (fileline_initialize): Add case for AIX procfs. * xcoff.c: New file. * configure, Makefile.in: Rebuild. From-SVN: r250435
2017-06-21configure.ac: Add AC_SYS_LARGEFILE.Richard Biener4-2/+217
2017-06-21 Richard Biener <rguenther@suse.de> * configure.ac: Add AC_SYS_LARGEFILE. * config.h.in: Regenerate. * configure: Likewise. From-SVN: r249436
2017-06-12elf.c (backtrace_initialize): Always set *fileline_fn.Ian Lance Taylor11-420/+656
* elf.c (backtrace_initialize): Always set *fileline_fn. * ttest.c: New file. * btest.c: Move support functions into testlib.c. Change calls to check to pass file name. * testlib.c: New file, copied from (part of) btest.c. * testlib.h: New file, declarations for testlib.c. * edtest.c: Use testlib.h and testlib.c. * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional. * Makefile.am (btest_SOURCES): Add testlib.c. (edtest_SOURCES): Likewise. (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD. (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define. * configure, Makefile.in: Rebuild. From-SVN: r249111
2017-05-19dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.Than McIntosh6-15/+365
* dwarf.c (free_line_header): Don't free dirs if dirs_count == 0. (read_line_header): Don't allocate dirs if dirs_count == 0. * edtest.c: New file. * edtest2.c: New file. * Makefile.am (edtest_SOURCES, edtest_LDADD): Define. (check_PROGRAMS): Add edtest. (edtest2_build.c, gen_edtest2_build): New targets. * Makefile.in: Rebuild. From-SVN: r248295
2017-03-08btest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile ↵Sam Thursfield2-3/+6
warning when... * btest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile warning when BACKTRACE_SUPPORTED isn't defined. From-SVN: r245977
2017-01-01Update copyright years.Jakub Jelinek25-25/+29
From-SVN: r243994
2016-11-15config-ml.in: Remove references to GCJ.Matthias Klose2-1/+4
<toplevel> 2016-11-15 Matthias Klose <doko@ubuntu.com> * config-ml.in: Remove references to GCJ. * configure.ac: Likewise. * configure: Regenerate. config/ 2016-11-15 Matthias Klose <doko@ubuntu.com> multi.m4: Don't set GCJ. gcc/ 2016-11-15 Matthias Klose <doko@ubuntu.com> * doc/install.texi: Remove references to gcj/libjava. * doc/invoke.texi: Likewise. */ (where necessary) 2016-11-15 Matthias Klose <doko@ubuntu.com> * configure: Regenerate. From-SVN: r242433
2016-09-11* all: Remove meaningless trailing whitespace.Carlos Liam25-75/+79
From-SVN: r240084
2016-05-18re PR target/71161 (Lots of ASAN and libgo runtime FAILs after r236090)Uros Bizjak2-2/+12
PR target/71161 * elf.c (phdr_callback) [__i386__]: Add __attribute__((__force_align_arg_pointer__)). From-SVN: r236397
2016-03-02elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to avoid ↵Max Ostapenko2-2/+8
possible crash. libbacktrace/ 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com> * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to avoid possible crash. (elf_add): Don't set *fileline_fn to elf_nodebug value in case of missing debug info anymore. From-SVN: r233911
2016-02-06mmap.c (MAP_FAILED): Define if not defined.John David Anglin2-0/+8
* mmap.c (MAP_FAILED): Define if not defined. From-SVN: r233196
2016-01-04Update copyright years.Jakub Jelinek25-24/+34
From-SVN: r232055
2015-12-18Specify that DJGPP do not have mmap even when sys/mman.h existsAndris Pavenis3-2/+9
* configure.ac: Specify that DJGPP do not have mmap even when sys/mman.h exists * configure: Regenerate From-SVN: r231802
2015-12-10PR 68115/libfortranJohn David Anglin4-4/+19
PR 68115/libfortran * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*. * configure: Regenerate. * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call to void. From-SVN: r231485
2015-09-17posix.c (backtrace_open): Cast second argument of open() to int.Ian Lance Taylor2-1/+5
2015-09-17 Ian Lance Taylor <iant@google.com> * posix.c (backtrace_open): Cast second argument of open() to int. From-SVN: r227881
2015-09-11Makefile.am (backtrace.lo): Depend on internal.h.Ian Lance Taylor3-2/+13
* Makefile.am (backtrace.lo): Depend on internal.h. (sort.lo, stest.lo): Add explicit dependencies. * Makefile.in: Rebuild. From-SVN: r227691
2015-09-08* backtrace.c: #include <sys/types.h>.Hans-Peter Nilsson2-0/+6
From-SVN: r227568
2015-09-08re PR other/67457 (segfault in libbacktrace)Ian Lance Taylor5-8/+51
PR other/67457 * backtrace.c: #include "internal.h". (struct backtrace_data): Add can_alloc field. (unwind): If can_alloc is false, don't try to get file/line information. (backtrace_full): Set can_alloc field in bdata. * alloc.c (backtrace_alloc): Don't call error_callback if it is NULL. * mmap.c (backtrace_alloc): Likewise. * internal.h: Update comments for backtrace_alloc and backtrace_free. From-SVN: r227533
2015-09-08re PR other/67457 (segfault in libbacktrace)Ian Lance Taylor2-1/+6
PR other/67457 * mmap.c (backtrace_alloc): Correct test for mmap failure. From-SVN: r227529
2015-08-31configure.ac: For spu-*-* targets, set have_fcntl to no.Ulrich Weigand3-0/+7
* configure.ac: For spu-*-* targets, set have_fcntl to no. * configure: Regenerate. From-SVN: r227348
2015-08-27configure.ac: Remove [disable-shared] argument to LT_INIT.Ulrich Weigand3-53/+26
* configure.ac: Remove [disable-shared] argument to LT_INIT. Remove setting PIC_FLAG when building as target library. * configure: Regenerate. From-SVN: r227261
2015-08-25configure.ac: Only compile with -fPIC if the target supports it.Hans-Peter Nilsson3-3/+31
* configure.ac: Only compile with -fPIC if the target supports it. * configure: Regenerate. From-SVN: r227203
2015-08-24configure.ac: Set have_mmap to no on spu-*-* targets.Ulrich Weigand3-0/+29
* configure.ac: Set have_mmap to no on spu-*-* targets. * configure: Regenerate. From-SVN: r227145
2015-08-13dwarf.c (read_function_entry): Add vec_inlined parameter.Ian Lance Taylor2-4/+18
* dwarf.c (read_function_entry): Add vec_inlined parameter. Change all callers. From-SVN: r226878
2015-06-11re PR sanitizer/65479 (sanitizer stack trace missing frames past #0 on ↵Martin Sebor2-5/+20
powerpc64) 2015-06-11 Martin Sebor <msebor@redhat.com> PR sanitizer/65479 * dwarf.c (struct line): Add new field idx. (line_compare): Use it. (add_line): Set it. (read_line_info): Reset it. From-SVN: r224402
2015-05-29libbacktrace: add support of PE/COFFTristan Gingold9-2/+993
libbacktrace/ 2015-05-29 Tristan Gingold <gingold@adacore.com> * pecoff.c: New file. * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies. * Makefile.in: Regenerate. * filetype.awk: Detect pecoff. * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms. Add pecoff. * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is true. * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define. * configure: Regenerate. * pecoff.c: New file. From-SVN: r223859
2015-05-13libbacktrace: Bump to automake 1.11.6Michael Haubenwallner4-49/+97
2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> * Makefile.in: Regenerated with automake-1.11.6. * aclocal.m4: Likewise. * configure: Likewise. From-SVN: r223128
2015-01-26Move wrong ChangeLog entry from the toplevel ChangeLog toMatthias Klose1-0/+5
libbacktrace. From-SVN: r220112
2015-01-24configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.Matthias Klose2-66/+72
2015-01-24 Matthias Klose <doko@ubuntu.com> * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. * configure: Regenerate. From-SVN: r220075
2015-01-05Update copyright years.Jakub Jelinek24-23/+27
From-SVN: r219188
2014-11-21Always use PIC option with -shared in libtoolH.J. Lu2-1/+6
Libtool needs to pass PIC option -shared when creating shared object to link regular object files with slim-lto archive. PR bootstrap/63784 * libtool.m4: Add $pic_flag with -shared. boehm-gc/ PR bootstrap/63784 * configure: Regenerated. gcc/ PR bootstrap/63784 * configure: Regenerated. libatomic/ PR bootstrap/63784 * configure: Regenerated. libbacktrace/ PR bootstrap/63784 * configure: Regenerated. libcc1/ PR bootstrap/63784 * configure: Regenerated. libcilkrts/ PR bootstrap/63784 * configure: Regenerated. libffi/ PR bootstrap/63784 * configure: Regenerated. libgfortran/ PR bootstrap/63784 * configure: Regenerated. libgomp/ PR bootstrap/63784 * configure: Regenerated. libitm/ PR bootstrap/63784 * configure: Regenerated. libjava/ PR bootstrap/63784 * configure: Regenerated. libjava/classpath/ PR bootstrap/63784 * configure: Regenerated. libobjc/ PR bootstrap/63784 * configure: Regenerated. libquadmath/ PR bootstrap/63784 * configure: Regenerated. libsanitizer/ PR bootstrap/63784 * configure: Regenerated. libssp/ PR bootstrap/63784 * configure: Regenerated. libstdc++-v3/ PR bootstrap/63784 * configure: Regenerated. libvtv/ PR bootstrap/63784 * configure: Regenerated. lto-plugin/ PR bootstrap/63784 * configure: Regenerated. From-SVN: r217937