aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace
AgeCommit message (Collapse)AuthorFilesLines
2013-01-17dwarf.c (struct unit): Add filename and abs_filename fields.Ian Lance Taylor2-2/+58
* dwarf.c (struct unit): Add filename and abs_filename fields. (build_address_map): Set new fields when reading unit. (dwarf_lookup_pc): If we don't find an entry in the line table, just return the main file name. From-SVN: r195257
2013-01-14Update copyright years in libbacktrace.Richard Sandiford21-20/+24
From-SVN: r195165
2013-01-01re PR bootstrap/54834 (bootstrap fails when building libbacktrace)Ian Lance Taylor3-2/+9
PR bootstrap/54834 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I $(MULTIBUILDTOP)/../../gcc/include. * Makefile.in: Rebuild. From-SVN: r194770
2013-01-01re PR other/55536 (libbacktrace abort in backtrace_alloc at mmap.c:99 ↵Ian Lance Taylor2-4/+28
running btest) PR other/55536 * mmap.c (backtrace_alloc): Don't call sync functions if not threaded. (backtrace_free): Likewise. From-SVN: r194768
2012-12-12mmapio.c: Define MAP_FAILED if not defined.John David Anglin2-0/+8
* mmapio.c: Define MAP_FAILED if not defined. From-SVN: r194443
2012-12-11re PR bootstrap/54926 (Bootstrap comparison failure for various files in ↵Jakub Jelinek5-10/+63
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-07re PR bootstrap/54926 (Bootstrap comparison failure for various files in ↵Jakub Jelinek3-2/+8
libbacktrace) PR bootstrap/54926 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@. * Makefile.in: Regenerated. From-SVN: r194303
2012-11-20* dwarf.c (read_attribute): Always clear val.Ian Lance Taylor2-0/+10
From-SVN: r193670
2012-11-13re PR other/55312 (libbacktrace doesn't honor --disable-werror)Ian Lance Taylor3-2/+7
PR other/55312 * configure.ac: Only add -Werror if building a target library. From-SVN: r193485
2012-11-12configure.ac: Check for getexecname.Ian Lance Taylor6-10/+111
* configure.ac: Check for getexecname. * fileline.c: #include <errno.h>. Define getexecname if not available. (fileline_initialize): Try to find the executable in a few different ways. * print.c (error_callback): Only print the filename if it came from the backtrace state. * configure, config.h.in: Rebuild. Co-Authored-By: Gerald Pfeifer <gerald@pfeifer.com> Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> From-SVN: r193454
2012-10-29mmap.c (backtrace_vector_release): Correct last patch: add aligned, not size.Ian Lance Taylor2-1/+7
* mmap.c (backtrace_vector_release): Correct last patch: add aligned, not size. From-SVN: r192956
2012-10-29mmap.c (backtrace_vector_release): Make sure freed block is aligned on ↵Ian Lance Taylor2-2/+17
8-byte boundary. * mmap.c (backtrace_vector_release): Make sure freed block is aligned on 8-byte boundary. From-SVN: r192945
2012-10-26re PR other/55087 (bogus "linux-vdso.so.1: No such file or directory" caused ↵Ian Lance Taylor5-7/+31
by libbacktrace) PR other/55087 * posix.c (backtrace_open): Add does_not_exist parameter. * elf.c (phdr_callback): Do not warn if shared library could not be opened. * fileline.c (fileline_initialize): Update calls to backtrace_open. * internal.h (backtrace_open): Update declaration. From-SVN: r192861
2012-10-26re PR target/55061 (libbacktrace build fails during bootstrap on ↵Jack Howarth3-5/+40
powerpc-apple-darwin9) PR target/55061 * configure.ac: Check for _Unwind_GetIPInfo function declaration. * configure: Regenerate. From-SVN: r192853
2012-10-24re PR target/55061 (libbacktrace build fails during bootstrap on ↵Ian Lance Taylor3-2/+53
powerpc-apple-darwin9) PR target/55061 * configure.ac: Check whether -funwind-tables option works. * configure: Rebuild. From-SVN: r192782
2012-10-11configure.ac: Do not use dl_iterate_phdr on Solaris 10.Ian Lance Taylor3-0/+17
* configure.ac: Do not use dl_iterate_phdr on Solaris 10. * configure: Rebuild. From-SVN: r192371
2012-10-10elf.c: Rename all Elf typedefs to start with b_elf, and be all lower case.Ian Lance Taylor2-61/+66
* elf.c: Rename all Elf typedefs to start with b_elf, and be all lower case. From-SVN: r192331
2012-10-10* elf.c (elf_add_syminfo_data): Add casts to avoid warning.Hans-Peter Nilsson2-2/+6
From-SVN: r192311
2012-10-10dwarf.c (dwarf_fileline): Add cast to avoid warning.Ian Lance Taylor2-3/+8
* dwarf.c (dwarf_fileline): Add cast to avoid warning. (backtrace_dwarf_add): Likewise. From-SVN: r192288
2012-10-09Add support for tracing through shared libraries.Ian Lance Taylor7-106/+579
* configure.ac: Check for link.h and dl_iterate_phdr. * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef ELF macros before #defining them. (dl_phdr_info, dl_iterate_phdr): Define if system does not have dl_iterate_phdr. (struct elf_syminfo_data): Add next field. (elf_initialize_syminfo): Initialize next field. (elf_add_syminfo_data): New static function. (elf_add): New static function, broken out of backtrace_initialize. Call backtrace_dwarf_add instead of backtrace_dwarf_initialize. (struct phdr_data): Define. (phdr_callback): New static function. (backtrace_initialize): Call elf_add. * dwarf.c (struct dwarf_data): Add next and base_address fields. (add_unit_addr): Add base_address parameter. Change all callers. (add_unit_ranges, build_address_map): Likewise. (add_line): Add ddata parameter. Change all callers. (read_line_program, add_function_range): Likewise. (dwarf_lookup_pc): New static function, broken out of dwarf_fileline. (dwarf_fileline): Call dwarf_lookup_pc. (build_dwarf_data): New static function. (backtrace_dwarf_add): New function. (backtrace_dwarf_initialize): Remove. * internal.h (backtrace_dwarf_initialize): Don't declare. (backtrace_dwarf_add): Declare. * configure, config.h.in: Rebuild. From-SVN: r192267
2012-10-04* btest.c (f23): Avoid uninitialized variable warning.Gerald Pfeifer2-1/+5
From-SVN: r192102
2012-10-04dwarf.c: If the system header files do not declare strnlen, provide our own ↵Ian Lance Taylor2-2/+21
version. * dwarf.c: If the system header files do not declare strnlen, provide our own version. From-SVN: r192082
2012-10-03dwarf.c (read_uleb128): Fix overflow test.Ian Lance Taylor2-10/+25
* dwarf.c (read_uleb128): Fix overflow test. (read_sleb128): Likewise. (build_address_map): Don't change unit_buf.start. From-SVN: r192053
2012-10-02ChangeLog: Fix whitespace.Uros Bizjak1-3/+3
* gcc/ChangeLog: Fix whitespace. * libbacktrace/ChangeLog: Ditto. From-SVN: r191982
2012-10-02re PR other/54761 (FAIL log)Uros Bizjak5-5/+26
PR other/54761 * configure.ac (EXTRA_FLAGS): New. * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS). * configure, Makefile.in: Regenerate. From-SVN: r191981
2012-09-29re PR other/54749 (libbacktrace)Ian Lance Taylor2-1/+8
PR other/54749 * fileline.c (fileline_initialize): Pass errnum as -1 when reporting that we could not read executable information after a previous failure. From-SVN: r191855
2012-09-28re PR bootstrap/54732 (Installation failure: libbacktrace rebuilds upon ↵Ian Lance Taylor6-682/+100
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-27re PR other/54726 (libbacktrace segfaults on gcc_asserts with stripped gcc)Ian Lance Taylor2-1/+7
PR other/54726 * elf.c (backtrace_initialize): Set *fileln_fn, not state->fileln_fn. From-SVN: r191811
2012-09-19configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target ↵Ian Lance Taylor3-1/+30
library. * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library. * configure: Rebuild. From-SVN: r191503
2012-09-19configure.ac (GCC_HEADER_STDINT): Invoke.Rainer Orth9-5/+1078
* configure.ac (GCC_HEADER_STDINT): Invoke. * backtrace.h: If we can't find <stdint.h>, use "gstdint.h". * btest.c: Don't include <stdint.h>. * dwarf.c: Likewise. * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild. Co-Authored-By: Ian Lance Taylor <iant@google.com> From-SVN: r191474
2012-09-19re PR bootstrap/54623 (install fails with libbacktrace/backtrace.c:35:20: ↵Ian Lance Taylor3-2/+15
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-18posix.c (O_BINARY): Define if not defined.Ian Lance Taylor5-1/+53
* posix.c (O_BINARY): Define if not defined. (backtrace_open): Pass O_BINARY to open. Only call fcntl if HAVE_FCNTL is defined. * configure.ac: Test for the fcntl function. * configure, config.h.in: Rebuild. From-SVN: r191443
2012-09-18* btest.c (test1, test2, test3, test4): Add the unused attribute.Ian Lance Taylor2-4/+8
From-SVN: r191440
2012-09-18* dwarf.c: Correct test of HAVE_DECL_STRNLEN.Ian Lance Taylor2-1/+5
From-SVN: r191437
2012-09-18configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.Ian Lance Taylor5-995/+1639
* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS. * mmapio.c: Don't define _GNU_SOURCE. * configure, config.h.in: Rebuild. From-SVN: r191435
2012-09-18configure.ac: Check whether strnlen is declared.Ian Lance Taylor5-2/+77
* configure.ac: Check whether strnlen is declared. * dwarf.c: Declare strnlen if not declared. * configure, config.h.in: Rebuild. From-SVN: r191433
2012-09-18Fix libbacktrace bootstrap with gcc 4.4Rainer Orth3-0/+7
* fileline.c: Include <stdlib.h>. * mmap.c: Likewise. From-SVN: r191414
2012-09-17re PR bootstrap/54611 (Bootstrap failure: conflicting types for ↵Ian Lance Taylor2-3/+10
'backtrace_simple') PR bootstrap/54611 * nounwind.c (backtrace_full): Rename from backtrace. Add state parameter. From-SVN: r191408
2012-09-17re PR bootstrap/54611 (Bootstrap failure: conflicting types for ↵Gerald Pfeifer2-1/+7
'backtrace_simple') PR bootstrap/54611 * nounwind.c (backtrace_simple): Add state parameter. From-SVN: r191405
2012-09-17re PR bootstrap/54609 (libbacktrace breaks bootstrap on darwin)Ian Lance Taylor2-6/+13
PR bootstrap/54609 * unknown.c (unknown_fileline): Add state parameter, remove fileline_data parameter, name error_callback parameter. (backtrace_initialize): Add state parameter. From-SVN: r191402
2012-09-17libbacktrace/:Ian Lance Taylor27-0/+21527
* 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