Commit Graph

260 Commits

Author SHA1 Message Date
GCC Administrator
c8abc2058e Daily bump. 2021-06-29 00:16:42 +00:00
Ian Lance Taylor
42ff474e28 libbacktrace: improve XCOFF support
libbacktrace/ChangeLog:
2021-06-28  Clément Chigot  <clement.chigot@atos.net>

	* xcoff.c (SSUBTYP_DWRNGES): New define.
	(xcoff_add): Use correct XCOFF DWARF section subtype
	for DEBUG_RANGES. Remove lineoff workaround.
	Adjust base_address.
	(xcoff_initialize_syminfo): Adapt to new base_address.
	(xcoff_lookup_pc): Likewise.
	(xcoff_initialize_fileline): Likewise.
2021-06-28 10:36:34 -07:00
GCC Administrator
e690396da7 Daily bump. 2021-05-04 00:16:53 +00:00
H.J. Lu
3f57062135 GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
Check if host supports multi-byte NOPs before enabling CET on host.

gcc/

	PR bootstrap/99703
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/99703
	* configure: Regenerated.

libcc1/

	PR bootstrap/99703
	* configure: Regenerated.

libcpp/

	PR bootstrap/99703
	* configure: Regenerated.

libdecnumber/

	PR bootstrap/99703
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/99703
	* configure: Regenerated.
2021-05-03 05:01:23 -07:00
GCC Administrator
f3641ac70e Daily bump. 2021-03-04 00:16:48 +00:00
Ian Lance Taylor
9b2084db9f 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.
2021-03-02 18:16:58 -08:00
GCC Administrator
d97a92dca9 Daily bump. 2021-03-03 00:16:48 +00:00
Ian Lance Taylor
df003d1e0b 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.
2021-03-02 13:46:48 -08:00
GCC Administrator
fab095dad5 Daily bump. 2021-02-13 00:16:38 +00:00
Ian Lance Taylor
3e2f329e94 libbacktrace: check for objcopy --add-gnu-debuglink using --help
* configure.ac: Check for objcopy --add-gnu-debuglink by using
	objcopy --help.
	* configure: Regenerate
2021-02-11 18:10:25 -08:00
GCC Administrator
ef1f8ee67d Daily bump. 2021-01-19 00:16:35 +00:00
Ian Lance Taylor
bfde774667 libbacktrace: don't fail tests if dwz fails
* Makefile.am (%_dwz): If dwz fails, use uncompressed debug info.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
2021-01-18 14:45:57 -08:00
Ian Lance Taylor
325e70b47c 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.
2021-01-18 14:43:00 -08:00
GCC Administrator
651b8a50a6 Daily bump. 2021-01-06 00:16:55 +00:00
Samuel Thibault
f56de3557f Update GNU/Hurd configure support
ChangeLog:

	* libtool.m4: Match gnu* along other GNU systems.
	* libgo/config/libtool.m4: Match gnu* along other GNU systems.
	* libgo/configure: Re-generate.

libffi/
	* configure: Re-generate.

libgomp/
	* configure: Re-generate.

gcc/

	* configure: Re-generate.

libatomic/

	* configure: Re-generate.

libbacktrace/

	* configure: Re-generate.

libcc1/

	* configure: Re-generate.

libgfortran/

	* configure: Re-generate.

libgomp/

	* configure: Re-generate.

libhsail-rt/

	* configure: Re-generate.

libitm/

	* configure: Re-generate.

libobjc/

	* configure: Re-generate.

liboffloadmic/

	* configure: Re-generate.
	* plugin/configure: Re-generate.

libphobos/

	* configure: Re-generate.

libquadmath/

	* configure: Re-generate.

libsanitizer/

	* configure: Re-generate.

libssp/

	* configure: Re-generate.

libstdc++-v3/

	* configure: Re-generate.

libvtv/

	* configure: Re-generate.

lto-plugin/

	* configure: Re-generate.

zlib/

	* configure: Re-generate.
2021-01-05 16:04:14 -07:00
Jakub Jelinek
99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
Jakub Jelinek
c48514bea6 Update Copyright in ChangeLog files
Do this separately from all other Copyright updates, as ChangeLog files
can be modified only separately.
2021-01-04 09:35:45 +01:00
GCC Administrator
6e1edf48eb Daily bump. 2020-12-06 00:16:44 +00:00
Iain Sandoe
1352bc88a0 Darwin : Update libtool and dependencies for Darwin20 [PR97865]
The change in major version (and the increment from Darwin19 to 20)
caused libtool tests to fail which resulted in incorrect build settings
for shared libraries.

We take this opportunity to sort out the shared undefined symbols state
rather than propagating the current unsound behaviour into a new rev.

This change means that we default to the case that missing symbols are
considered an error, and if one wants to allow this intentionally, the
confiuration for that case should be set appropriately.

Three existing cases need undefined dynamic lookup:
 libitm, where there is already a configuration mechanism to add the
         flags.
 libcc1, where we add simple configuration to add the flags for Darwin.
 libsanitizer, where we can add to the existing extra flags.

libcc1/ChangeLog:

	PR target/97865
	* Makefile.am: Add dynamic_lookup to LD flags for Darwin.
	* configure.ac: Test for Darwin host and set a flag.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

libitm/ChangeLog:

	PR target/97865
	* configure.tgt: Add dynamic_lookup to XLDFLAGS for Darwin.
	* configure: Regenerate.

libsanitizer/ChangeLog:

	PR target/97865
	* configure.tgt: Add dynamic_lookup to EXTRA_CXXFLAGS for
	Darwin.
	* configure: Regenerate.

ChangeLog:

	PR target/97865
	* libtool.m4: Update handling of Darwin platform link flags
	for Darwin20.

gcc/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libatomic/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libbacktrace/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libffi/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libgfortran/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libgomp/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libhsail-rt/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libobjc/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libphobos/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libquadmath/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libssp/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libstdc++-v3/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libvtv/ChangeLog:

	PR target/97865
	* configure: Regenerate.

zlib/ChangeLog:

	PR target/97865
	* configure: Regenerate.
2020-12-05 08:43:20 +00:00
GCC Administrator
11860cf440 Daily bump. 2020-12-03 00:16:47 +00:00
Ian Lance Taylor
8f461a883b 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.
2020-12-02 11:07:59 -08:00
GCC Administrator
a9625c50dd Daily bump. 2020-11-30 00:16:27 +00:00
John David Anglin
4e4ba6478a Fix hppa64-hpux11 build to remove source paths from embedded path.
This change adds the +nodefaultrpath ld option to remove all library
paths that were specified with the -L option from the embedded path.

2020-11-29  John David Anglin  <danglin@gcc.gnu.org>

ChangeLog:
	* libtool.m4 (archive_cmds): Add +nodefaultrpath ld option on
	hppa64-*-hpux11*.

libatomic/ChangeLog:
	* configure: Regenerate.

libbacktrace/ChangeLog:
	* configure: Regenerate.

libcc1/ChangeLog:
	* configure: Regenerate.

libffi/ChangeLog:
	* configure: Regenerate.

libgfortran/ChangeLog:
	* configure: Regenerate.

libgomp/ChangeLog:
	* configure: Regenerate.

libhsail-rt/ChangeLog:
	* configure: Regenerate.

libitm/ChangeLog:
	* configure: Regenerate.

libobjc/ChangeLog:
	* configure: Regenerate.

liboffloadmic/ChangeLog:
	* configure: Regenerate.
	* plugin/configure: Regenerate.

libquadmath/ChangeLog:
	* configure: Regenerate.

libsanitizer/ChangeLog:
	* configure: Regenerate.

libssp/ChangeLog:
	* configure: Regenerate.

libstdc++-v3/ChangeLog:
	* configure: Regenerate.

libvtv/ChangeLog:
	* configure: Regenerate.

lto-plugin/ChangeLog:
	* configure: Regenerate.

zlib/ChangeLog:
	* configure: Regenerate.
2020-11-29 20:11:38 +00:00
GCC Administrator
e2e0428854 Daily bump. 2020-10-21 00:16:36 +00:00
Ian Lance Taylor
d962ef77da libbacktrace: use __attribute__((__fallthrough__))
Use an attribute rather than a comment when falling through a switch case.

	* internal.h (ATTRIBUTE_FALLTHROUGH): Define.
	* elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH.
2020-10-20 11:49:58 -07:00
GCC Administrator
e84761c6f3 Daily bump. 2020-09-29 00:16:30 +00:00
Ian Lance Taylor
5f394e2d4c libbacktrace: build mtest.dSYM if using dsymutil
libbacktrace/ChangeLog:
	PR libbacktrace/97082
	* Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL.
	* Makefile.in: Regenerate.
2020-09-28 13:54:57 -07:00
Ian Lance Taylor
7c363a4e04 libbacktrace: only run dsymutil with Mach-O
libbacktrace/ChangeLog:
	PR libbacktrace/97227
	* configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL.
	* Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
2020-09-28 13:49:39 -07:00
GCC Administrator
82b77dee75 Daily bump. 2020-09-24 00:16:31 +00:00
Ian Lance Taylor
e41e66b78d libbacktrace: handle pc == low correctly
* dwarf.c (report_inlined_functions): Handle PC == -1 and PC ==
	p->low.
	(dwarf_lookup_pc): Likewise.
2020-09-22 17:28:24 -07:00
GCC Administrator
ecde1b0a46 Daily bump. 2020-09-17 00:16:31 +00:00
Ian Lance Taylor
90c2545651 libbacktrace: use ELF symbol table if no debug info available
PR libbacktrace/97080
	* fileline.c (backtrace_syminfo_to_full_callback): New function.
	(backtrace_syminfo_to_full_error_callback): New function.
	* elf.c (elf_nodebug): Call syminfo_fn if possible.
	* internal.h (struct backtrace_call_full): Define.
	(backtrace_syminfo_to_full_callback): Declare.
	(backtrace_syminfo_to_full_error_callback): Declare.
	* mtest.c (f3): Only check all[i] if data.index permits.
2020-09-16 17:04:43 -07:00
Iain Sandoe
d1339b519a libbacktrace, Mach-O : Support PowerPC archs.
This adds the PPC architecture variants for Mach-O libbacktrace.

With this (as for X86 and Arm) when dsymutil is run on the binary
we get a basic usable backtrace.

Testsuite results on powerpc-apple-darwin9 are the same as for X86:
 * btest fails (TBC why)
 * dwarf5 tests fail because dsymutil does not handle that so far.

libbacktrace/ChangeLog:

	* macho.c (MACH_O_CPU_TYPE_PPC): New.
	(MACH_O_CPU_TYPE_PPC64): New.
	Add compile-tests for powerpc to the Mach-O variants.
2020-09-16 19:37:28 +01:00
GCC Administrator
50a71cd018 Daily bump. 2020-09-15 00:16:37 +00:00
Ian Lance Taylor
05f40bc4c1 libbacktrace: support MiniDebugInfo
libbacktrace/ChangeLog:
	PR libbacktrace/93608
	Add support for MiniDebugInfo.
	* elf.c (struct elf_view): Define.  Replace most uses of
	backtrace_view with elf_view.
	(elf_get_view): New static functions.  Replace most calls of
	backtrace_get_view with elf_get_view.
	(elf_release_view): New static functions.  Replace most calls of
	backtrace_release_view with elf_release_view.
	(elf_uncompress_failed): Rename from elf_zlib_failed.  Change all
	callers.
	(LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define.
	(LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define.
	(LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define.
	(LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define.
	(LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define.
	(LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define.
	(LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define.
	(LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define.
	(LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define.
	(LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define.
	(LZMA_PROB_DIST_ALIGN_LEN): Define.
	(LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define.
	(LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define.
	(LZMA_PROB_MATCH_LEN_LOW_LEN): Define.
	(LZMA_PROB_MATCH_LEN_MID_LEN): Define.
	(LZMA_PROB_MATCH_LEN_HIGH_LEN): Define.
	(LZMA_PROB_REP_LEN_CHOICE_LEN): Define.
	(LZMA_PROB_REP_LEN_CHOICE2_LEN): Define.
	(LZMA_PROB_REP_LEN_LOW_LEN): Define.
	(LZMA_PROB_REP_LEN_MID_LEN): Define.
	(LZMA_PROB_REP_LEN_HIGH_LEN): Define.
	(LZMA_PROB_LITERAL_LEN): Define.
	(LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define.
	(LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define.
	(LZMA_PROB_IS_REP2_OFFSET): Define.
	(LZMA_PROB_IS_REP0_LONG_OFFSET): Define.
	(LZMA_PROB_DIST_SLOT_OFFSET): Define.
	(LZMA_PROB_DIST_SPECIAL_OFFSET): Define.
	(LZMA_PROB_DIST_ALIGN_OFFSET): Define.
	(LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define.
	(LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define.
	(LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define.
	(LZMA_PROB_MATCH_LEN_MID_OFFSET): Define.
	(LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define.
	(LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define.
	(LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define.
	(LZMA_PROB_REP_LEN_LOW_OFFSET): Define.
	(LZMA_PROB_REP_LEN_MID_OFFSET): Define.
	(LZMA_PROB_REP_LEN_HIGH_OFFSET): Define.
	(LZMA_PROB_LITERAL_OFFSET): Define.
	(LZMA_PROB_TOTAL_COUNT): Define.
	(LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define.
	(LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define.
	(LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define.
	(LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define.
	(LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define.
	(LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define.
	(LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define.
	(LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define.
	(elf_lzma_varint): New static function.
	(elf_lzma_range_normalize): New static function.
	(elf_lzma_bit, elf_lzma_integer): New static functions.
	(elf_lzma_reverse_integer): New static function.
	(elf_lzma_len, elf_uncompress_lzma_block): New static functions.
	(elf_uncompress_lzma): New static function.
	(backtrace_uncompress_lzma): New function.
	(elf_add): Add memory and memory_size parameters.  Change all
	callers.  Look for .gnu_debugdata section, and, if found,
	decompress it and use it for symbols and debug info.  Permit the
	descriptor parameter to be -1.
	* internal.h (backtrace_uncompress_lzma): Declare.
	* mtest.c: New file.
	* xztest.c: New file.
	* configure.ac: Check for nm, xz, and comm programs.  Check for
	liblzma library.
	(HAVE_MINIDEBUG): Define.
	* Makefile.am (mtest_SOURCES): Define.
	(mtest_CFLAGS, mtest_LDADD): Define.
	(TESTS): Add mtest_minidebug if HAVE_MINIDEBUG.
	(%_minidebug): New pattern rule, if HAVE_MINIDEBUG.
	(xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define.
	(xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define
	(xztest_alloc_LDADD): Define.
	(BUILDTESTS): Add mtest, xztest, xztest_alloc.
	(CLEANFILES): Add files created by minidebug pattern.
	(btest.lo): Correct INCDIR reference.
	(mtest.lo, xztest.lo, ztest.lo): New targets.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* Makefile.in: Regenerate.
2020-09-14 14:11:17 -07:00
GCC Administrator
80f86e78ac Daily bump. 2020-09-10 00:16:28 +00:00
Ian Lance Taylor
f56f1a5a75 libbacktrace: don't strip leading underscore on 64-bit PE
* pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
	(coff_add): Determine and pass is_64.
2020-09-08 19:21:54 -07:00
Ian Lance Taylor
181f877b6c libbacktrace: fetch executable path on macOS
PR libbacktrace/96973
	* fileline.c (macho_get_executable_path): New static function.
	(fileline_initialize): Call macho_get_executable_path.
2020-09-08 19:09:21 -07:00
Ian Lance Taylor
0755f573f0 libbacktrace: avoid ambiguous binary search
Searching for a range match can cause the search order to not match
the sort order, which can cause libbacktrace to miss matching entries.
Allocate an extra entry at the end of function_addrs and unit_addrs vectors,
so that we can safely compare to the next entry when searching.
Adjust the matching code accordingly.

Fixes https://github.com/ianlancetaylor/libbacktrace/issues/44.

	* dwarf.c (function_addrs_search): Compare against the next entry
	low address, not the high address.
	(unit_addrs_search): Likewise.
	(build_address_map): Add a trailing unit_addrs.
	(read_function_entry): Add a trailing function_addrs.
	(read_function_info): Likewise.
	(report_inlined_functions): Search backward for function_addrs
	match.
	(dwarf_lookup_pc): Search backward for unit_addrs and
	function_addrs matches.
2020-09-08 18:22:35 -07:00
GCC Administrator
31a0504624 Daily bump. 2020-09-09 00:16:29 +00:00
Ian Lance Taylor
494c5103c9 libbacktrace: fix tipo in comment
* simple.c (simple_unwind): Correct comment spelling.
2020-09-08 15:07:24 -07:00
Ian Lance Taylor
a8a7a97b4e libbacktrace: correct memory lengths in Mach-O dsym support
* macho.c (macho_add_dsym): Make space for '/' in dsym.  Use
	correct length when freeing diralc.
2020-09-08 14:51:32 -07:00
Ian Lance Taylor
488e33339e libbacktrace: correctly swap Mach-O 32-bit file offset
libbacktrace/ChangeLog:
	PR libbacktrace/96973
	* macho.c (macho_add_fat): Correctly swap 32-bit file offset.
2020-09-08 13:20:26 -07:00
Ian Lance Taylor
651c61c3ce libbacktrace: only match magic number at start of line
libbacktrace/ChangeLog:
	PR libbacktrace/96971
	* filetype.awk: Only match magic number at start of line.
2020-09-08 12:52:29 -07:00
GCC Administrator
b2b24d30bb Daily bump. 2020-08-25 00:16:24 +00:00
Ian Lance Taylor
74c176ca2f libbacktrace: add Mach-O 64-bit FAT support
libbacktrace/:
	* macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
	(MACH_O_MH_CIGAM_FAT_64): Define.
	(struct macho_fat_arch_64): Define.
	(macho_add_fat): Add and use is_64 parameter.
	(macho_add): Recognize 64-bit fat files.
2020-08-24 13:10:26 -07:00
GCC Administrator
d48cca8f21 Daily bump. 2020-07-31 00:16:26 +00:00
H.J. Lu
4712bde3ca Require CET support only for the final GCC build
With --enable-cet, require CET support only for the final GCC build.
Don't enable CET without CET support for non-bootstrap build, in stage1
nor for build support.

config/

	PR bootstrap/96202
	* cet.m4 (GCC_CET_HOST_FLAGS): Don't enable CET without CET
	support in stage1 nor for build support.

gcc/

	PR bootstrap/96202
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/96202
	* configure: Regenerated.

libcc1/

	PR bootstrap/96202
	* configure: Regenerated.

libcpp/

	PR bootstrap/96202
	* configure: Regenerated.

libdecnumber/

	PR bootstrap/96202
	* configure: Regenerated.

libiberty/

	PR bootstrap/96202
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/96202
	* configure: Regenerated.
2020-07-30 05:36:24 -07:00
GCC Administrator
50873cc588 Daily bump. 2020-07-09 00:16:44 +00:00
Ian Lance Taylor
fccb41b909 libbacktrace: test linker support for DWARF 5
On AIX, the compiler supports DWARF 5 but the linker does not.

2020-07-07 Clement Chigot <clement.chigot@atos.net>

	* configure.ac: Test linker support for DWARF5
	* configure: Regenerate
2020-07-07 20:45:10 -07:00