Jakub Jelinek
85ec4feb11
Update copyright years.
...
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Ian Lance Taylor
8398c1dfe2
ztest.c: #include <errno.h>.
...
* 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-03 02:27:33 +00:00
Thomas Schwinge
dd954c67ab
libbacktrace: Support the case that clock_gettime is in librt
...
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-02 13:56:39 +02:00
Ian Lance Taylor
8da872d9ca
re PR other/67165 (please enable libbacktrace to work with compressed debug 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-29 00:30:35 +00:00
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
Steve Ellcey
29788f9070
re PR other/81096 (test case ttest in libbacktrace fails starting with its 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-12 17:00:00 +00:00
Tony Reix
b3530b946f
filetype.awk: Add AIX XCOFF type detection.
...
* 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-07-21 18:05:08 +00:00
Ian Lance Taylor
d1609a2326
elf.c (backtrace_initialize): Always set *fileline_fn.
...
* 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-06-12 03:25:04 +00:00
Than McIntosh
281161d16b
dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
...
* 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-05-19 16:07:24 +00:00
Jakub Jelinek
cbe34bb5ed
Update copyright years.
...
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Carlos Liam
84ebf639b8
* all: Remove meaningless trailing whitespace.
...
From-SVN: r240084
2016-09-11 13:44:07 +00:00
Jakub Jelinek
818ab71a41
Update copyright years.
...
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Ian Lance Taylor
fc00244420
Makefile.am (backtrace.lo): Depend on internal.h.
...
* Makefile.am (backtrace.lo): Depend on internal.h.
(sort.lo, stest.lo): Add explicit dependencies.
* Makefile.in: Rebuild.
From-SVN: r227691
2015-09-11 18:37:31 +00:00
Tristan Gingold
e24afc10e0
libbacktrace: add support of PE/COFF
...
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-29 08:40:20 +00:00
Jakub Jelinek
5624e564d2
Update copyright years.
...
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Ian Lance Taylor
c5604b48f9
sort.c: New file.
...
* sort.c: New file.
* stest.c: New file.
* internal.h (backtrace_qsort): Declare.
* dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
(read_line_info, read_function_entry): Likewise.
(read_function_info, build_dwarf_data): Likewise.
* elf.c (elf_initialize_syminfo): Likewise.
* Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
(stest_SOURCES, stest_LDADD): Define.
(check_PROGRAMS): Add stest.
From-SVN: r208392
2014-03-07 05:07:56 +00:00
Richard Sandiford
afeba5cb1d
Update copyright years in libbacktrace/
...
From-SVN: r206292
2014-01-02 22:24:37 +00:00
Ian Lance Taylor
49579c7e20
configure.ac: Check for support of __atomic extensions.
...
* configure.ac: Check for support of __atomic extensions.
* internal.h: Declare or #define atomic functions for use in
backtrace code.
* atomic.c: New file.
* dwarf.c (dwarf_lookup_pc): Use atomic functions.
(dwarf_fileline, backtrace_dwarf_add): Likewise.
* elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
(backtrace_initialize): Likewise.
* fileline.c (fileline_initialize): Likewise.
* Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
* configure, config.h.in, Makefile.in: Rebuild.
From-SVN: r204994
2013-11-19 01:09:47 +00:00
Richard Sandiford
f8a7e1a44d
Update copyright years in libbacktrace.
...
From-SVN: r195165
2013-01-14 18:17:30 +00:00
Ian Lance Taylor
c3de196091
re PR bootstrap/54834 (bootstrap fails when building libbacktrace)
...
PR bootstrap/54834
* Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
$(MULTIBUILDTOP)/../../gcc/include.
* Makefile.in: Rebuild.
From-SVN: r194770
2013-01-01 16:23:03 +00:00
Jakub Jelinek
36a58fb342
re PR bootstrap/54926 (Bootstrap comparison failure for various files in libbacktrace)
...
PR bootstrap/54926
* Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
* configure.ac: If --with-target-subdir, add -frandom-seed=$@
to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
accepts it.
* Makefile.in: Regenerated.
* configure: Regenerated.
From-SVN: r194412
2012-12-11 19:45:45 +01:00
Jakub Jelinek
a58dfde08d
re PR bootstrap/54926 (Bootstrap comparison failure for various files in libbacktrace)
...
PR bootstrap/54926
* Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
* Makefile.in: Regenerated.
From-SVN: r194303
2012-12-07 15:14:25 +01:00
Uros Bizjak
5619500911
re PR other/54761 (FAIL log)
...
PR other/54761
* configure.ac (EXTRA_FLAGS): New.
* Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
* configure, Makefile.in: Regenerate.
From-SVN: r191981
2012-10-02 15:14:25 +02:00
Ian Lance Taylor
af710874e9
re PR bootstrap/54732 (Installation failure: libbacktrace rebuilds upon install when built with "make bootstrap-lean")
...
PR bootstrap/54732
* configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
* Makefile.am: Add dependencies for all objects.
* configure, aclocal.m4, Makefile.in: Rebuild.
From-SVN: r191819
2012-09-28 06:13:00 +00:00
Ian Lance Taylor
9425c00b8e
re PR bootstrap/54623 (install fails with libbacktrace/backtrace.c:35:20: error: unwind.h: No such file or directory)
...
PR bootstrap/54623
* Makefile.am (AM_CPPFLAGS): Define.
(AM_CFLAGS): Remove -I options.
* Makefile.in: Rebuild.
From-SVN: r191459
2012-09-19 04:37:40 +00:00
Ian Lance Taylor
eff02e4f84
libbacktrace/:
...
* Initial implementation.
./:
* MAINTAINERS (Various Maintainers): Add libbacktrace.
* configure.ac (host_libs): Add libbacktrace.
(target_libraries): Add libbacktrace.
* Makefile.def (host_modules): Add libbacktrace.
(target_modules): Likewise.
* configure, Makefile.in: Rebuild.
gcc/go:
* config-lang.in (target_libs): Add target-libbacktrace.
From-SVN: r191397
2012-09-17 16:38:38 +00:00