GCC Administrator
a7ccad4a2e
Daily bump.
2025-02-11 00:17:27 +00:00
Ian Lance Taylor
d5c72da62d
libbacktrace: add cast to avoid undefined shift
...
Patch from pgerell@github.
* elf.c (elf_uncompress_lzma_block): Add casts to avoid
potentially shifting a value farther than its type size.
2025-02-10 15:03:31 -08:00
GCC Administrator
c8cc686377
Daily bump.
2025-01-31 00:17:28 +00:00
Ian Lance Taylor
5d43c3f08b
libbacktrace: add casts to avoid undefined shifts
...
Patch from pgerell@github.
* elf.c (elf_fetch_bits): Add casts to avoid potentially shifting
a value farther than its type size.
(elf_fetch_bits_backward): Likewise.
(elf_uncompress_lzma_block): Likewise.
(elf_uncompress_lzma): Likewise.
2025-01-30 15:23:46 -08:00
GCC Administrator
2abc555a80
Daily bump.
2025-01-29 00:17:48 +00:00
Richard Earnshaw
a235c45354
arm: libbacktrace: Check if the compiler supports __sync atomics
...
Older versions of the Arm architecture lack support for __sync
operations directly in hardware and require calls into appropriate
operating-system hooks. But such hooks obviously don't exist in a
freestanding environment.
Consquently, it is incorrect to assume during configure that such
functions will exist and we need a configure-time check to determine
whether or not these routines will work.
libbacktrace:
* configure.ac: Always check if the compiler supports __sync
operations.
* configure: Regenerated.
2025-01-28 13:54:02 +00:00
Jakub Jelinek
29bc14c750
Update copyright years.
2025-01-02 12:17:04 +01:00
Jakub Jelinek
6441eb6dc0
Update copyright years.
2025-01-02 11:59:57 +01:00
Jakub Jelinek
9cf2fb5db8
Update Copyright year in ChangeLog files
...
2024 -> 2025
2025-01-02 11:13:18 +01:00
GCC Administrator
c5609a755b
Daily bump.
2024-12-15 00:17:24 +00:00
Ian Lance Taylor
3e343ef7f0
libbacktrace: don't use ZSTD_CLEVEL_DEFAULT
...
PR 117812 reports that testing GCC with zstd 1.3.4 fails because
ZSTD_CLEVEL_DEFAULT is not defined, so avoid using it.
PR libbacktrace/117812
* zstdtest.c (test_large): Use 3 rather than ZSTD_CLEVEL_DEFAULT
2024-12-14 14:32:11 -08:00
GCC Administrator
20dcb7926b
Daily bump.
2024-11-30 00:20:11 +00:00
Ian Lance Taylor
f8f5732534
libbacktrace: use WIN32_LEAN_AND_MEAN, not WIN32_MEAN_AND_LEAN
...
Patch from awmorgan.
* fileline.c: Use WIN32_LEAN_AND_MEAN, not WIN32_MEAN_AND_LEAN.
* pecoff.c: Likewise.
2024-11-29 13:18:26 -08:00
GCC Administrator
c232f92161
Daily bump.
2024-10-26 00:19:39 +00:00
Ian Lance Taylor
bab7a64c1a
libbacktrace: recognize new Mach-O DWARF sections
...
Patch from Pavel Safonov.
These sections are used on macOS Sequoia.
Fixes https://github.com/ianlancetaylor/libbacktrace/issues/136
* macho.c (dwarf_section_names): Add __debug_addr and
__debug_line_str.
2024-10-25 15:20:55 -07:00
GCC Administrator
de14559ef5
Daily bump.
2024-10-19 00:19:43 +00:00
Ian Lance Taylor
f8687bceaa
libbacktrace: don't get confused by overlapping address ranges
...
Fixes https://github.com/ianlancetaylor/libbacktrace/issues/137 .
* dwarf.c (resolve_unit_addrs_overlap_walk): New static function.
(resolve_unit_addrs_overlap): New static function.
(build_dwarf_data): Call resolve_unit_addrs_overlap.
2024-10-18 13:04:11 -07:00
GCC Administrator
8ac4db24e4
Daily bump.
2024-08-06 00:17:19 +00:00
Ian Lance Taylor
3a51aaf5f4
libbacktrace: avoid -Wpointer-arith errors
...
Based on patch from Kirill Müller.
* configure.ac (ACX_PROG_CC_WARNING_OPTS): Add -Wpointer-arith.
* pecoff.c (coff_add): Cast void pointers.
* xcoff.c (xcoff_add): Likewise.
* configure: Regenerate.
2024-08-05 16:46:03 -07:00
GCC Administrator
e7f6a5dc4a
Daily bump.
2024-07-31 00:19:44 +00:00
Ian Lance Taylor
37aa98f79a
libbacktrace: fix syntax of Windows registration functions
...
Adjust the syntax to keep MSVC happy.
Fixes https://github.com/ianlancetaylor/libbacktrace/issues/131
* pecoff.c (LDR_DLL_NOTIFICATION): Put function modifier
inside parentheses.
(LDR_REGISTER_FUNCTION): Likewise.
2024-07-30 09:27:59 -07:00
GCC Administrator
e20ea6bcf8
Daily bump.
2024-07-19 00:18:20 +00:00
Ian Lance Taylor
248e8530dd
libbacktrace: use __has_attribute for fallthrough
...
Also convert some FALLTHROUGH comments to ATTRIBUTE_FALLTHROUGH.
* internal.h: Use __has_attribute to check for fallthrough
attribute.
* elf.c (elf_zstd_decompress): Use ATTRIBUTE_FALLTHROUGH rather
than a FALLTHROUGH comment.
2024-07-18 11:35:44 -07:00
Ian Lance Taylor
93c54caa64
libbacktrace: add cast to avoid warning
...
* print.c (print_syminfo_callback): Add cast to avoid warning.
2024-07-17 17:59:41 -07:00
Ian Lance Taylor
30875fa698
libbacktrace: better backtrace_print when no debug info
...
Fixes https://github.com/ianlancetaylor/libbacktrace/issues/59
* print.c (print_syminfo_callback): New static function.
(print_callback): Call backtrace_syminfo if there is no function
or file name.
2024-07-17 17:39:27 -07:00
GCC Administrator
a922de0a7a
Daily bump.
2024-07-18 00:18:58 +00:00
Ian Lance Taylor
a8b5ce1580
libbacktrace: add notes about dl_iterate_phdr to README
...
* README: Add notes about dl_iterate_phdr.
2024-07-17 17:03:30 -07:00
Ian Lance Taylor
f438299ef6
libbacktrace: update xcoff.c for base_address changes
...
* xcoff.c (struct xcoff_fileline_data): Change base_address field
to struct libbacktrace_base_address.
(xcoff_initialize_syminfo): Change base_address to struct
libbacktrace_base_address. Use libbacktrace_add_base.
(xcoff_initialize_fileline): Likewise.
(xcoff_lookup_pc): Use libbacktrace_add_base.
(xcoff_add): Change base_address to struct
libbacktrace_base_address.
(xcoff_armem_add, xcoff_add_shared_libs): Likewise.
(backtrace_initialize): Likewise.
* Makefile.am (xcoff.lo): Remove unused target.
(xcoff_32.lo, xcoff_64.lo): New targets.
* Makefile.in: Regenerate.
2024-07-16 21:27:05 -07:00
GCC Administrator
72bce1fbef
Daily bump.
2024-07-17 00:18:32 +00:00
Ian Lance Taylor
c6803cdaba
libbacktrace: support FDPIC
...
Based on patch by Max Filippov.
* internal.h: If FDPIC, #include <link.h> and/or <sys/link.h>.
(libbacktrace_using_fdpic): Define.
(struct libbacktrace_base_address): Define.
(libbacktrace_add_base): Define.
(backtrace_dwarf_add): Change base_address to struct
libbacktrace_base_address.
* dwarf.c (struct dwarf_data): Change base_address to struct
libbacktrace_base_address.
(add_ranges, find_address_ranges, build_ddress_map): Likewise.
(build_dwarf_data, build_dwarf_add): Likewise.
(add_low_high_range): Change base_address to struct
libbacktrace_base_address. Use libbacktrace_add_base.
(add_ranges_from_ranges, add_ranges_from_rnglists): Likewise.
(add_line): Use libbacktrace_add_base.
* elf.c (elf_initialize_syminfo): Change base_address to struct
libbacktrace_base_address. Use libbacktrace_add_base.
(elf_add): Change base_address to struct
libbacktrace_base_address.
(phdr_callback): Likewise. Initialize base_address.m.
(backtrace_initialize): If using FDPIC, don't call elf_add with
main executable; always use dl_iterate_phdr.
* macho.c (macho_add_symtab): Change base_address to struct
libbacktrace_base_address. Use libbacktrace_add_base.
(macho_syminfo): Change base_address to struct
libbacktrace_base_address.
(macho_add_fat, macho_add_dsym, macho_add): Likewise.
(backtrace_initialize): Likewise. Initialize base_address.m.
* pecoff.c (coff_initialize_syminfo): Change base_address to
struct libbacktrace_base_address. Use libbacktrace_add_base.
(coff_add): Change base_address to struct
libbacktrace_base_address. Initialize base_address.m.
2024-07-15 17:28:28 -07:00
GCC Administrator
2ee5b58be6
Daily bump.
2024-07-13 00:17:42 +00:00
Ian Lance Taylor
bf406a5369
libbacktrace: avoid infinite recursion
...
We could get an infinite recursion in an odd case in which a
.gnu_debugdata section was added to a debug file, and mini_debuginfo
was put into the debug file, and the debug file was put into a
/usr/lib/debug directory to be found by build ID. This combination
doesn't really make sense but we shouldn't get an infinite recursion.
* elf.c (elf_add): Don't use .gnu_debugdata if we are already
reading a debuginfo file.
* Makefile.am (m2test_*): New test targets.
(CHECK_PROGRAMS): Add m2test.
(MAKETESTS): Add m2test_minidebug2.
(%_minidebug2): New pattern.
(CLEANFILES): Remove minidebug2 files.
* Makefile.in: Regenerate.
2024-07-11 19:34:45 -07:00
Ian Lance Taylor
d7318f4cf8
libbacktrace: don't fail if symbol size is unknown
...
* btest.c (test5): Don't fail if symbol size is 0.
* mtest.c (test5): Likewise.
2024-07-11 17:58:17 -07:00
Ian Lance Taylor
b870086904
libbacktrace: correctly gather Mach-O symbol table
...
For PR libbacktrace/97082.
* macho.c (MACH_O_N_EXT): Don't define.
(MACH_O_N_UNDF): Define.
(macho_defined_symbol): Don't discard N_EXT symbols. Do
discard N_UNDF symbols.
2024-07-11 17:54:43 -07:00
GCC Administrator
88ff0504ab
Daily bump.
2024-07-12 00:17:52 +00:00
Ian Lance Taylor
8f7c06df42
libbacktrace: fix testsuite for clang
...
* btest.c (test1, test3): Add optnone attribute.
* edtest.c (test1): Likewise.
* mtest.c (test1, test3): Likewise.
* configure.ac: Use -Wno-attributes and -Wno-unknown-attributes.
* configure: Regenerate.
2024-07-11 16:12:47 -07:00
Ian Lance Taylor
b96789abf8
libbacktrace: suggest how to fix missing debug info
...
* elf.c (elf_nodebug): Suggest -g.
* macho.c (macho_nodebug): Suggest -g and dsymutil.
* pecoff.c (coff_nodebug): Suggest -g.
2024-07-11 15:39:07 -07:00
Ian Lance Taylor
02f7525e5e
libbacktrace: remove trailing whitespace
...
* dwarf.c: Remove trailing whitespace.
* macho.c: Likewise.
2024-07-11 15:29:24 -07:00
GCC Administrator
6c08b82965
Daily bump.
2024-06-17 00:16:32 +00:00
Ian Lance Taylor
8348f8c22f
libbacktrace: it's OK if zstd decompressor sees no backward bits
...
* elf.c (elf_fetch_bits_backward) Don't fail if no bits are
available.
2024-06-16 15:44:36 -07:00
GCC Administrator
3e3d115c94
Daily bump.
2024-05-04 00:16:30 +00:00
Ian Lance Taylor
b69dac54ef
libbacktrace: add DLLS as they are loaded
...
Patch from Björn Schäpers.
* pecoff.c (struct dll_notification_data): Define.
(LDR_DLL_NOTIFICATION): New typedef.
(LDR_REGISTER_FUNCTION): New typedef.
(struct dll_notification_context): Define.
(dll_notification): New static function.
(backtrace_initialize): Register DLL notification.
2024-05-03 15:25:00 -07:00
GCC Administrator
deb69bfbb0
Daily bump.
2024-04-29 00:17:54 +00:00
Ian Lance Taylor
942a9cf2a9
libbacktrace: load Windows modules
...
Patch from Björn Schäpers <bjoern@hazardy.de >.
* configure.ac: Checked for tlhelp32.h
* pecoff.c: Include <tlhelp32.h> if available.
(backtrace_initialize): Use tlhelp32 api for a snapshot to
detect loaded modules.
(coff_add): New argument for the module handle of the file,
to get the base address.
* configure, config.h.in: Regenerate.
2024-04-28 11:14:17 -07:00
GCC Administrator
3091f1dfa7
Daily bump.
2024-04-24 00:16:29 +00:00
Ian Lance Taylor
d2f05fed44
libbacktrace: test --compress-debug-sections=ARG for each ARG
...
This should fix a testsuite problem with Solaris ld that supports zlib
but not zlib-gabi.
* configure.ac: Test --compress-debug-sections=zlib-gnu and
--compress-debug-sections=zlib-gabi separately, setting new
automake conditionals.
* Makefile.am (ctestg, ctestg_alloc): Only build if
HAVE_COMPRESSED_DEBUG_ZLIB_GNU.
(ctesta, ctesta_alloc): Only build if
HAVE_COMPRESSED_DEBUG_ZLIB_GABI.
(ctestzstd_alloc): New test if HAVE_COMPRESSED_DEBUG_ZSTD.
* configure, Makefile.in: Regenerate.
2024-04-23 10:04:16 -07:00
GCC Administrator
c775a030af
Daily bump.
2024-03-09 00:17:14 +00:00
Ian Lance Taylor
5825bd0e0d
libbacktrace: don't assume compressed section is aligned
...
Patch originally by GitHub user ubyte at
https://github.com/ianlancetaylor/libbacktrace/pull/120 .
* elf.c (elf_uncompress_chdr): Don't assume compressed section is
aligned.
2024-03-08 13:56:33 -08:00
GCC Administrator
ef1b788584
Daily bump.
2024-03-03 00:17:08 +00:00
Ian Lance Taylor
9b0d218544
libbacktrace: pass -no-install when linking test programs
...
* Makefile.am (libbacktrace_testing_ldflags): Define.
(*_LDFLAGS): Add $(libbacktrace_testing_ldflags) for test
programs.
* Makefile.in: Regenerate
2024-03-02 13:11:07 -08:00