aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace
AgeCommit message (Collapse)AuthorFilesLines
2025-04-11Daily bump.GCC Administrator1-0/+5
2025-04-10libbacktrace: Add hpux fileline supportJohn David Anglin1-1/+35
Fixes libstdc++ stacktrace tests. 2025-04-10 John David Anglin <danglin@gcc.gnu.org> libbacktrace/ChangeLog: * fileline.c (hpux_get_executable_path): New. (fileline_initialize): Add pass to get hpux executable path.
2025-04-10Daily bump.GCC Administrator1-0/+7
2025-04-09bootstrap/119680 - fix cross-compiler build with --enable-host-sharedRichard Biener2-5/+18
It seems that at least when cross-compiling at least collect2 pulls in objects from libbacktrace.a which is linked via LIBDEPS. But libbacktrace for the host is only built -fPIC with --enable-host-shared but not -fPIE with --enable-host-pie so this fails. The following teaches libbacktrace about --enable-host-pie and handles it similar to libcpp. PR bootstrap/119680 libbacktrace/ * configure.ac (--enable-host-pie): Handle by setting PIC_FLAG to -fPIE. * configure: Regenerate.
2025-04-08Daily bump.GCC Administrator1-0/+4
2025-04-07libbacktrace: Use correct type in backtrace_atomic_store_intJonathan Wakely1-1/+1
libbacktrace/ChangeLog: * atomic.c (backtrace_atomic_store_int): Use int for old value.
2025-02-11Daily bump.GCC Administrator1-0/+5
2025-02-10libbacktrace: add cast to avoid undefined shiftIan Lance Taylor1-1/+1
Patch from pgerell@github. * elf.c (elf_uncompress_lzma_block): Add casts to avoid potentially shifting a value farther than its type size.
2025-01-31Daily bump.GCC Administrator1-0/+8
2025-01-30libbacktrace: add casts to avoid undefined shiftsIan Lance Taylor1-14/+20
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-29Daily bump.GCC Administrator1-0/+6
2025-01-28arm: libbacktrace: Check if the compiler supports __sync atomicsRichard Earnshaw2-0/+33
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-02Update copyright years.Jakub Jelinek1-1/+1
2025-01-02Update copyright years.Jakub Jelinek41-41/+41
2025-01-02Update Copyright year in ChangeLog filesJakub Jelinek1-1/+1
2024 -> 2025
2024-12-15Daily bump.GCC Administrator1-0/+5
2024-12-14libbacktrace: don't use ZSTD_CLEVEL_DEFAULTIan Lance Taylor1-2/+1
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-11-30Daily bump.GCC Administrator1-0/+5
2024-11-29libbacktrace: use WIN32_LEAN_AND_MEAN, not WIN32_MEAN_AND_LEANIan Lance Taylor2-4/+4
Patch from awmorgan. * fileline.c: Use WIN32_LEAN_AND_MEAN, not WIN32_MEAN_AND_LEAN. * pecoff.c: Likewise.
2024-10-26Daily bump.GCC Administrator1-0/+5
2024-10-25libbacktrace: recognize new Mach-O DWARF sectionsIan Lance Taylor1-2/+2
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-19Daily bump.GCC Administrator1-0/+6
2024-10-18libbacktrace: don't get confused by overlapping address rangesIan Lance Taylor1-15/+199
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-08-06Daily bump.GCC Administrator1-0/+7
2024-08-05libbacktrace: avoid -Wpointer-arith errorsIan Lance Taylor4-6/+11
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-07-31Daily bump.GCC Administrator1-0/+6
2024-07-30libbacktrace: fix syntax of Windows registration functionsIan Lance Taylor1-2/+2
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-19Daily bump.GCC Administrator1-0/+17
2024-07-18libbacktrace: use __has_attribute for fallthroughIan Lance Taylor2-7/+12
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-17libbacktrace: add cast to avoid warningIan Lance Taylor1-1/+1
* print.c (print_syminfo_callback): Add cast to avoid warning.
2024-07-17libbacktrace: better backtrace_print when no debug infoIan Lance Taylor1-15/+40
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-18Daily bump.GCC Administrator1-0/+20
2024-07-17libbacktrace: add notes about dl_iterate_phdr to READMEIan Lance Taylor1-1/+11
* README: Add notes about dl_iterate_phdr.
2024-07-16libbacktrace: update xcoff.c for base_address changesIan Lance Taylor3-21/+31
* 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-17Daily bump.GCC Administrator1-0/+34
2024-07-15libbacktrace: support FDPICIan Lance Taylor5-62/+123
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-13Daily bump.GCC Administrator1-0/+23
2024-07-11libbacktrace: avoid infinite recursionIan Lance Taylor3-42/+134
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-11libbacktrace: don't fail if symbol size is unknownIan Lance Taylor2-2/+2
* btest.c (test5): Don't fail if symbol size is 0. * mtest.c (test5): Likewise.
2024-07-11libbacktrace: correctly gather Mach-O symbol tableIan Lance Taylor1-6/+8
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-12Daily bump.GCC Administrator1-0/+19
2024-07-11libbacktrace: fix testsuite for clangIan Lance Taylor5-7/+9
* 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-11libbacktrace: suggest how to fix missing debug infoIan Lance Taylor3-3/+3
* elf.c (elf_nodebug): Suggest -g. * macho.c (macho_nodebug): Suggest -g and dsymutil. * pecoff.c (coff_nodebug): Suggest -g.
2024-07-11libbacktrace: remove trailing whitespaceIan Lance Taylor2-3/+2
* dwarf.c: Remove trailing whitespace. * macho.c: Likewise.
2024-06-17Daily bump.GCC Administrator1-0/+5
2024-06-16libbacktrace: it's OK if zstd decompressor sees no backward bitsIan Lance Taylor1-8/+1
* elf.c (elf_fetch_bits_backward) Don't fail if no bits are available.
2024-05-04Daily bump.GCC Administrator1-0/+9
2024-05-03libbacktrace: add DLLS as they are loadedIan Lance Taylor1-0/+106
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-04-29Daily bump.GCC Administrator1-0/+10
2024-04-28libbacktrace: load Windows modulesIan Lance Taylor4-8/+87
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.