Ulrich Weigand
1b533361da
configure.ac: Set have_mmap to no on spu-*-* targets.
...
* configure.ac: Set have_mmap to no on spu-*-* targets.
* configure: Regenerate.
From-SVN: r227145
2015-08-24 18:48:28 +00:00
Ian Lance Taylor
d96fa208a5
dwarf.c (read_function_entry): Add vec_inlined parameter.
...
* dwarf.c (read_function_entry): Add vec_inlined parameter.
Change all callers.
From-SVN: r226878
2015-08-13 22:56:01 +00:00
Martin Sebor
d99a7b4d6b
re PR sanitizer/65479 (sanitizer stack trace missing frames past #0 on 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-06-11 18:01:50 -06: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
Michael Haubenwallner
df96c0f79a
libbacktrace: Bump to automake 1.11.6
...
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-05-13 10:58:11 +00:00
Matthias Klose
2b8fa469eb
Move wrong ChangeLog entry from the toplevel ChangeLog to
...
libbacktrace.
From-SVN: r220112
2015-01-26 14:51:12 +00:00
Jakub Jelinek
5624e564d2
Update copyright years.
...
From-SVN: r219188
2015-01-05 13:33:28 +01:00
H.J. Lu
a699d67255
Always use PIC option with -shared in libtool
...
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
2014-11-21 08:49:17 -08:00
David Malcolm
35485da996
Merger of dmalcolm/jit branch from git
...
ChangeLog:
* ChangeLog.jit: New.
* MAINTAINERS (Various Maintainers): Add myself as jit maintainer.
contrib/ChangeLog:
* ChangeLog.jit: New.
* jit-coverage-report.py: New file: a script to print crude
code-coverage information for the libgccjit API.
gcc/ChangeLog:
* ChangeLog.jit: New.
* Makefile.in (doc_build_sys): New variable, set to "sphinx" if
sphinx is installed, falling back to "texinfo" otherwise.
(FULL_DRIVER_NAME): New variable, adapted from the
install-driver target. New target, a symlink within the builddir,
linked to "xgcc", for use when running the JIT library from the
builddir.
(MOSTLYCLEANFILES): Add FULL_DRIVER_NAME.
(install-driver): Use $(FULL_DRIVER_NAME) rather than spelling it
out.
* configure.ac (doc_build_sys): New variable, set to "sphinx" if
sphinx is installed, falling back to "texinfo" otherwise.
(GCC_DRIVER_NAME): Generate a gcc-driver-name.h file containing
GCC_DRIVER_NAME for the benefit of jit/internal-api.c.
* configure: Regenerate.
* doc/install.texi (--enable-host-shared): Specify that this is
required when building libgccjit.
(Tools/packages necessary for modifying GCC): Add Sphinx.
* timevar.def (TV_JIT_REPLAY): New.
(TV_ASSEMBLE): New.
(TV_LINK): New.
(TV_LOAD): New.
gcc/java/ChangeLog:
* gcc/ChangeLog.jit: New.
gcc/jit/ChangeLog:
* ChangeLog.jit: New.
* ChangeLog: New.
* Make-lang.in: New.
* TODO.rst: New.
* config-lang.in: New.
* docs/Makefile: New.
* docs/_build/texinfo/Makefile: New.
* docs/_build/texinfo/factorial.png: New.
* docs/_build/texinfo/libgccjit.texi: New.
* docs/_build/texinfo/sum-of-squares.png: New.
* docs/conf.py: New.
* docs/examples/tut01-hello-world.c: New.
* docs/examples/tut02-square.c: New.
* docs/examples/tut03-sum-of-squares.c: New.
* docs/examples/tut04-toyvm/Makefile: New.
* docs/examples/tut04-toyvm/factorial.toy: New.
* docs/examples/tut04-toyvm/fibonacci.toy: New.
* docs/examples/tut04-toyvm/toyvm.c: New.
* docs/index.rst: New.
* docs/internals/index.rst: New.
* docs/intro/factorial.png: New.
* docs/intro/index.rst: New.
* docs/intro/sum-of-squares.png: New.
* docs/intro/tutorial01.rst: New.
* docs/intro/tutorial02.rst: New.
* docs/intro/tutorial03.rst: New.
* docs/intro/tutorial04.rst: New.
* docs/topics/contexts.rst: New.
* docs/topics/expressions.rst: New.
* docs/topics/functions.rst: New.
* docs/topics/index.rst: New.
* docs/topics/locations.rst: New.
* docs/topics/objects.rst: New.
* docs/topics/results.rst: New.
* docs/topics/types.rst: New.
* dummy-frontend.c: New.
* jit-builtins.c: New.
* jit-builtins.h: New.
* jit-common.h: New.
* jit-playback.c: New.
* jit-playback.h: New.
* jit-recording.c: New.
* jit-recording.h: New.
* libgccjit++.h: New.
* libgccjit.c: New.
* libgccjit.h: New.
* libgccjit.map: New.
* notes.txt: New.
gcc/testsuite/ChangeLog:
* ChangeLog.jit: New.
* jit.dg/all-non-failing-tests.h: New.
* jit.dg/harness.h: New.
* jit.dg/jit.exp: New.
* jit.dg/test-accessing-struct.c: New.
* jit.dg/test-accessing-union.c: New.
* jit.dg/test-array-as-pointer.c: New.
* jit.dg/test-arrays.c: New.
* jit.dg/test-calling-external-function.c: New.
* jit.dg/test-calling-function-ptr.c: New.
* jit.dg/test-combination.c: New.
* jit.dg/test-dot-product.c: New.
* jit.dg/test-empty.c: New.
* jit.dg/test-error-accessing-field-in-other-struct.c: New.
* jit.dg/test-error-adding-to-terminated-block.c: New.
* jit.dg/test-error-array-as-pointer.c: New.
* jit.dg/test-error-bad-cast.c: New.
* jit.dg/test-error-block-in-wrong-function.c: New.
* jit.dg/test-error-call-through-ptr-with-mismatching-args.c: New.
* jit.dg/test-error-call-through-ptr-with-non-function.c: New.
* jit.dg/test-error-call-through-ptr-with-non-pointer.c: New.
* jit.dg/test-error-call-through-ptr-with-not-enough-args.c: New.
* jit.dg/test-error-call-through-ptr-with-too-many-args.c: New.
* jit.dg/test-error-call-with-mismatching-args.c: New.
* jit.dg/test-error-call-with-not-enough-args.c: New.
* jit.dg/test-error-call-with-too-many-args.c: New.
* jit.dg/test-error-dereference-field-of-non-pointer.c: New.
* jit.dg/test-error-dereference-read-of-non-pointer.c: New.
* jit.dg/test-error-get-type-bad-enum.c: New.
* jit.dg/test-error-index-not-a-numeric-type.c: New.
* jit.dg/test-error-mismatching-types-in-assignment.c: New.
* jit.dg/test-error-mismatching-types-in-call.c: New.
* jit.dg/test-error-missing-return.c: New.
* jit.dg/test-error-new-binary-op-bad-op.c: New.
* jit.dg/test-error-new-function-bad-kind.c: New.
* jit.dg/test-error-new-unary-op-bad-op.c: New.
* jit.dg/test-error-null-passed-to-api.c: New.
* jit.dg/test-error-return-within-void-function.c: New.
* jit.dg/test-error-unreachable-block.c: New.
* jit.dg/test-error-unterminated-block.c: New.
* jit.dg/test-error-value-not-a-numeric-type.c: New.
* jit.dg/test-expressions.c: New.
* jit.dg/test-factorial.c: New.
* jit.dg/test-fibonacci.c: New.
* jit.dg/test-functions.c: New.
* jit.dg/test-fuzzer.c: New.
* jit.dg/test-hello-world.c: New.
* jit.dg/test-linked-list.c: New.
* jit.dg/test-long-names.c: New.
* jit.dg/test-nested-contexts.c: New.
* jit.dg/test-nested-loops.c: New.
* jit.dg/test-operator-overloading.cc: New.
* jit.dg/test-quadratic.c: New.
* jit.dg/test-quadratic.cc: New.
* jit.dg/test-reading-struct.c: New.
* jit.dg/test-string-literal.c: New.
* jit.dg/test-sum-of-squares.c: New.
* jit.dg/test-threads.c: New.
* jit.dg/test-types.c: New.
* jit.dg/test-using-global.c: New.
* jit.dg/test-volatile.c: New.
include/ChangeLog:
* ChangeLog.jit: New.
libbacktrace/ChangeLog:
* ChangeLog.jit: New.
libcpp/ChangeLog:
* ChangeLog.jit: New.
libdecnumber/ChangeLog:
* ChangeLog.jit: New.
libiberty/ChangeLog:
* ChangeLog.jit: New.
zlib/ChangeLog:
* ChangeLog.jit: New.
From-SVN: r217374
2014-11-11 21:55:52 +00:00
Francois-Xavier Coudert
ebf6d33b73
re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14))
...
toplevel:
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* libtool.m4: Fix globbing of darwin versions.
boehm-gc/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
gcc/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libatomic/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libbacktrace/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libcc1/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libcilkrts/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libffi/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libgfortran/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libgomp/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libitm/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libobjc/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libquadmath/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libsanitizer/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libssp/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libstdc++-v3/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libvtv/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
lto-plugin/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libjava/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
libjava/classpath/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
zlib/
2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/63610
* configure: Regenerate.
From-SVN: r217366
2014-11-11 20:25:18 +00:00
Ian Lance Taylor
c96601d2a7
internal.h (backtrace_atomic_load_pointer): Fix to return void *.
...
* internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
Fix to return void *.
From-SVN: r216603
2014-10-23 22:40:37 +00:00
Ian Lance Taylor
d573fd89a5
mmap.c (backtrace_free): If freeing a large aligned block of memory, call munmap rather than holding onto it.
...
* mmap.c (backtrace_free): If freeing a large aligned block of
memory, call munmap rather than holding onto it.
(backtrace_vector_grow): When growing a vector, double the number
of pages requested. When releasing the old version of a grown
vector, pass the correct size to backtrace_free.
From-SVN: r210256
2014-05-09 05:01:08 +00:00
Ian Lance Taylor
dbe2084238
* sort.c (backtrace_qsort): Use middle element as pivot.
...
From-SVN: r208403
2014-03-07 15:52:48 +00: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
Misty De Meo
63fefb4bc9
re PR libgcc/58710 (HAVE_GETIPINFO is incorrectly set on Mac OS X 10.4)
...
PR target/58710
* configure.ac: Use AC_LINK_IFELSE in check for
_Unwind_GetIPInfo.
* configure: Regenerate.
From-SVN: r207612
2014-02-07 21:10:55 +00:00
Richard Sandiford
afeba5cb1d
Update copyright years in libbacktrace/
...
From-SVN: r206292
2014-01-02 22:24:37 +00:00
Jakub Jelinek
0284b52ec9
elf.c (ET_DYN): Undefine and define again.
...
* elf.c (ET_DYN): Undefine and define again.
(elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
return early -1 without closing the descriptor.
(struct phdr_data): Add exe_descriptor.
(phdr_callback): If pd->exe_descriptor is not -1, for very first
call if dlpi_name is NULL just call elf_add with the exe_descriptor,
otherwise backtrace_close the exe_descriptor if not -1. Adjust
call to elf_add.
(backtrace_initialize): Adjust call to elf_add. If it returns
-1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
From-SVN: r205748
2013-12-06 15:48:17 +01:00
Ian Lance Taylor
bfd74f227d
alloc.c (backtrace_vector_finish): Add error_callback and data parameters.
...
* alloc.c (backtrace_vector_finish): Add error_callback and data
parameters. Call backtrace_vector_release. Return address base.
* mmap.c (backtrace_vector_finish): Add error_callback and data
parameters. Return address base.
* dwarf.c (read_function_info): Get new address base from
backtrace_vector_finish.
* internal.h (backtrace_vector_finish): Update declaration.
From-SVN: r205716
2013-12-05 18:32:02 +00:00
Ian Lance Taylor
b8ddd61b74
dwarf.c (find_address_ranges): New static function, broken out of build_address_map.
...
* dwarf.c (find_address_ranges): New static function, broken out
of build_address_map.
(build_address_map): Call it.
* btest.c (check): Check for missing filename or function, rather
than crashing.
(f3): Check that enough frames were returned.
From-SVN: r205490
2013-11-28 16:19:57 +00:00
Jakub Jelinek
1f96a712d1
backtrace.h (backtrace_syminfo_callback): Add symsize argument.
...
* backtrace.h (backtrace_syminfo_callback): Add symsize argument.
* elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
last argument.
* btest.c (struct symdata): Add size field.
(callback_three): Add symsize argument. Copy it to the data->size
field.
(f23): Set symdata.size to 0.
(test5): Likewise. If sizeof (int) > 1, lookup address of
((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
values.
From-SVN: r205028
2013-11-19 15:46:03 +01:00
Jakub Jelinek
64856e1e0b
* atomic.c: Include sys/types.h.
...
From-SVN: r205008
2013-11-19 08:43:09 +01: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
Jakub Jelinek
f18578157d
elf.c (SHN_UNDEF): Define.
...
* elf.c (SHN_UNDEF): Define.
(elf_initialize_syminfo): Add base_address argument. Ignore symbols
with st_shndx == SHN_UNDEF. Add base_address to address fields.
(elf_add): Adjust caller.
From-SVN: r204975
2013-11-18 18:15:07 +01:00
Jakub Jelinek
582f5a2df8
* elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
...
From-SVN: r204971
2013-11-18 17:30:44 +01:00
Ian Lance Taylor
25e6253e21
backtrace.h (backtrace_create_state): Correct comment about threading.
...
* backtrace.h (backtrace_create_state): Correct comment about
threading.
From-SVN: r204905
2013-11-16 18:27:17 +00:00
Ian Lance Taylor
cfa658e4f8
backtrace.h (backtrace_syminfo): Update comment and parameter name to take any address, not just a PC value.
...
* backtrace.h (backtrace_syminfo): Update comment and parameter
name to take any address, not just a PC value.
* elf.c (STT_OBJECT): Define.
(elf_nosyms): Rename parameter pc to addr.
(elf_symbol_search): Rename local variable pc to addr.
(elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
(elf_syminfo): Rename parameter pc to addr.
* btest.c (global): New global variable.
(test5): New test.
(main): Call test5.
From-SVN: r204904
2013-11-16 18:20:33 +00:00
Ian Lance Taylor
6c084a5b37
elf.c (elf_add): Don't get the wrong offsets if a debug section is missing.
...
* elf.c (elf_add): Don't get the wrong offsets if a debug section
is missing.
From-SVN: r203810
2013-10-18 04:24:48 +00:00
David Malcolm
459260ecf8
Add --enable-host-shared configuration option
...
/
* configure.ac: Add --enable-host-shared
* configure: Regenerate.
gcc/
* Makefile.in (PICFLAG): New.
(enable_host_shared): New.
(INTERNAL_CFLAGS): Use PICFLAG.
(LIBIBERTY): Use pic build of libiberty.a if configured with
--enable-host-shared.
* configure.ac: Add --enable-host-shared, setting up new
PICFLAG variable.
* configure: Regenerate.
* doc/install.texi (--enable-shared): Add note contrasting it
with...
(--enable-host-shared): New option.
libbacktrace/
* configure.ac: Add --enable-host-shared, setting up
pre-existing PIC_FLAG variable within Makefile.am et al.
* configure: Regenerate.
libcpp/
* Makefile.in (PICFLAG): New.
(ALL_CFLAGS): Add PICFLAG.
(ALL_CXXFLAGS): Likewise.
* configure.ac: Add --enable-host-shared, setting up new
PICFLAG variable.
* configure: Regenerate.
libdecnumber/
* Makefile.in (PICFLAG): New.
(ALL_CFLAGS): Add PICFLAG.
* configure.ac: Add --enable-host-shared, setting up new
PICFLAG variable.
* configure: Regenerate.
libiberty/
* configure.ac: If --enable-host-shared, use -fPIC.
* configure: Regenerate.
zlib/
* configure.ac: Add --enable-host-shared, setting up new
PICFLAG variable.
* Makefile.am: Add PICFLAG to libz_a_CFLAGS.
* Makefile.in: Regenerate.
* configure: Regenerate.
From-SVN: r203632
2013-10-15 20:33:55 +00:00
Alan Modra
3cbe17f7de
libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical ppc host match.
...
* libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
ppc host match. Support little-endian powerpc linux hosts.
Regenerate configure throughout.
From-SVN: r202773
2013-09-20 19:17:52 +09:30
Alexander Monakov
78625ce608
elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
...
* elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
From-SVN: r201159
2013-07-23 13:17:10 +04:00
Alexander Monakov
0153887c3d
elf.c (backtrace_initialize): Pass elf_fileline_fn to dl_iterate_phdr callbacks.
...
* elf.c (backtrace_initialize): Pass elf_fileline_fn to
dl_iterate_phdr callbacks.
From-SVN: r201158
2013-07-23 13:12:00 +04:00
Ian Lance Taylor
85d8c21edb
alloc.c: #include <sys/types.h>.
...
* alloc.c: #include <sys/types.h>.
* mmap.c: Likewise.
From-SVN: r197057
2013-03-25 18:13:18 +00:00
Ian Lance Taylor
38811401ad
dwarf.c (read_function_info): Permit fvec parameter to be NULL.
...
* dwarf.c (read_function_info): Permit fvec parameter to be NULL.
(dwarf_lookup_pc): Don't use ddata->fvec if threaded.
From-SVN: r195620
2013-01-31 17:50:47 +00:00
Jakub Jelinek
1e678aed6c
re PR other/56076 (Several 64-bit libgo tests FAIL in read_line_header)
...
PR other/56076
* dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
attribute was not seen.
From-SVN: r195478
2013-01-25 22:36:11 +00:00
Ian Lance Taylor
6b514c5361
dwarf.c (struct unit): Add filename and abs_filename fields.
...
* 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-17 01:20:28 +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
Ian Lance Taylor
2a5195d965
re PR other/55536 (libbacktrace abort in backtrace_alloc at mmap.c:99 running btest)
...
PR other/55536
* mmap.c (backtrace_alloc): Don't call sync functions if not
threaded.
(backtrace_free): Likewise.
From-SVN: r194768
2013-01-01 16:13:20 +00:00
John David Anglin
85619b6fc1
mmapio.c: Define MAP_FAILED if not defined.
...
* mmapio.c: Define MAP_FAILED if not defined.
From-SVN: r194443
2012-12-12 13:06:53 +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
Ian Lance Taylor
b20ade36e4
* dwarf.c (read_attribute): Always clear val.
...
From-SVN: r193670
2012-11-20 17:28:05 +00:00
Ian Lance Taylor
73c3ed27fc
re PR other/55312 (libbacktrace doesn't honor --disable-werror)
...
PR other/55312
* configure.ac: Only add -Werror if building a target library.
From-SVN: r193485
2012-11-13 21:25:39 +00:00
Ian Lance Taylor
33521509a8
configure.ac: Check for getexecname.
...
* 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-11-12 21:24:19 +00:00
Ian Lance Taylor
8fe91dea4f
mmap.c (backtrace_vector_release): Correct last patch: add aligned, not size.
...
* mmap.c (backtrace_vector_release): Correct last patch: add
aligned, not size.
From-SVN: r192956
2012-10-29 18:42:05 +00:00
Ian Lance Taylor
8277de3441
mmap.c (backtrace_vector_release): Make sure freed block is aligned on 8-byte boundary.
...
* mmap.c (backtrace_vector_release): Make sure freed block is
aligned on 8-byte boundary.
From-SVN: r192945
2012-10-29 15:43:37 +00:00
Ian Lance Taylor
73f4149137
re PR other/55087 (bogus "linux-vdso.so.1: No such file or directory" caused 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-26 20:08:29 +00:00
Jack Howarth
385710cf27
re PR target/55061 (libbacktrace build fails during bootstrap on powerpc-apple-darwin9)
...
PR target/55061
* configure.ac: Check for _Unwind_GetIPInfo function declaration.
* configure: Regenerate.
From-SVN: r192853
2012-10-26 17:34:59 +00:00
Ian Lance Taylor
32061319f7
re PR target/55061 (libbacktrace build fails during bootstrap on powerpc-apple-darwin9)
...
PR target/55061
* configure.ac: Check whether -funwind-tables option works.
* configure: Rebuild.
From-SVN: r192782
2012-10-24 21:09:55 +00:00
Ian Lance Taylor
5551b12c31
configure.ac: Do not use dl_iterate_phdr on Solaris 10.
...
* configure.ac: Do not use dl_iterate_phdr on Solaris 10.
* configure: Rebuild.
From-SVN: r192371
2012-10-11 16:43:47 +00:00
Ian Lance Taylor
40d15b5bdc
elf.c: Rename all Elf typedefs to start with b_elf, and be all lower case.
...
* elf.c: Rename all Elf typedefs to start with b_elf, and be all
lower case.
From-SVN: r192331
2012-10-10 19:59:00 +00:00
Hans-Peter Nilsson
74f8062044
* elf.c (elf_add_syminfo_data): Add casts to avoid warning.
...
From-SVN: r192311
2012-10-10 12:55:52 +00:00
Ian Lance Taylor
ce8aa07436
dwarf.c (dwarf_fileline): Add cast to avoid warning.
...
* dwarf.c (dwarf_fileline): Add cast to avoid warning.
(backtrace_dwarf_add): Likewise.
From-SVN: r192288
2012-10-10 04:37:06 +00:00
Ian Lance Taylor
e561a9920c
Add support for tracing through shared libraries.
...
* 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-09 18:20:45 +00:00
Gerald Pfeifer
068ef6d10d
* btest.c (f23): Avoid uninitialized variable warning.
...
From-SVN: r192102
2012-10-04 20:16:08 +00:00
Ian Lance Taylor
244e2d9cd3
dwarf.c: If the system header files do not declare strnlen, provide our own version.
...
* dwarf.c: If the system header files do not declare strnlen,
provide our own version.
From-SVN: r192082
2012-10-04 15:16:09 +00:00
Ian Lance Taylor
be4ba8aef3
dwarf.c (read_uleb128): Fix overflow test.
...
* dwarf.c (read_uleb128): Fix overflow test.
(read_sleb128): Likewise.
(build_address_map): Don't change unit_buf.start.
From-SVN: r192053
2012-10-03 22:07:12 +00:00
Uros Bizjak
faf86a02f3
ChangeLog: Fix whitespace.
...
* gcc/ChangeLog: Fix whitespace.
* libbacktrace/ChangeLog: Ditto.
From-SVN: r191982
2012-10-02 15:28:40 +02: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
8a447b3d4d
re PR other/54749 (libbacktrace)
...
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-29 17:50:54 +00: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
588f4f8fc1
re PR other/54726 (libbacktrace segfaults on gcc_asserts with stripped gcc)
...
PR other/54726
* elf.c (backtrace_initialize): Set *fileln_fn, not
state->fileln_fn.
From-SVN: r191811
2012-09-27 19:20:49 +00:00
Ian Lance Taylor
64b89453bc
configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library.
...
* configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
as a target library.
* configure: Rebuild.
From-SVN: r191503
2012-09-19 22:57:53 +00:00
Rainer Orth
768505569c
configure.ac (GCC_HEADER_STDINT): Invoke.
...
* 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-19 13:41:33 +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
3319ef17d2
posix.c (O_BINARY): Define if not defined.
...
* 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 18:06:28 +00:00
Ian Lance Taylor
bd3e497d0b
* btest.c (test1, test2, test3, test4): Add the unused attribute.
...
From-SVN: r191440
2012-09-18 17:10:01 +00:00
Ian Lance Taylor
30e15876ff
* dwarf.c: Correct test of HAVE_DECL_STRNLEN.
...
From-SVN: r191437
2012-09-18 16:50:29 +00:00
Ian Lance Taylor
d4c059d582
configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
...
* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
* mmapio.c: Don't define _GNU_SOURCE.
* configure, config.h.in: Rebuild.
From-SVN: r191435
2012-09-18 16:36:48 +00:00
Ian Lance Taylor
772a71a959
configure.ac: Check whether strnlen is declared.
...
* configure.ac: Check whether strnlen is declared.
* dwarf.c: Declare strnlen if not declared.
* configure, config.h.in: Rebuild.
From-SVN: r191433
2012-09-18 16:06:53 +00:00
Rainer Orth
c0558468b8
Fix libbacktrace bootstrap with gcc 4.4
...
* fileline.c: Include <stdlib.h>.
* mmap.c: Likewise.
From-SVN: r191414
2012-09-18 09:02:50 +00:00
Ian Lance Taylor
c5812e0b33
re PR bootstrap/54611 (Bootstrap failure: conflicting types for 'backtrace_simple')
...
PR bootstrap/54611
* nounwind.c (backtrace_full): Rename from backtrace. Add state
parameter.
From-SVN: r191408
2012-09-17 21:14:51 +00:00
Gerald Pfeifer
e8f4008a9e
re PR bootstrap/54611 (Bootstrap failure: conflicting types for 'backtrace_simple')
...
PR bootstrap/54611
* nounwind.c (backtrace_simple): Add state parameter.
From-SVN: r191405
2012-09-17 20:57:16 +00:00
Ian Lance Taylor
f588eb27dd
re PR bootstrap/54609 (libbacktrace breaks bootstrap on darwin)
...
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-17 17:43:26 +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