2026-04-30 Release Manager * GCC 16.1.0 released. 2025-12-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * configure: Regenerate. 2025-11-06 Ian Lance Taylor <iant@golang.org> * elf.c (ELFMAGn): In #undef rename from ELF_MAGn. 2025-11-03 Sam James <sam@gentoo.org> * configure: Regenerate. 2025-10-02 H.J. Lu <hjl.tools@gmail.com> * Makefile.in: Regenerated. * aclocal.m4: Likewise. * configure: Likewise. 2025-09-28 Ian Lance Taylor <iant@golang.org> * filetype.awk: Recognize PE bigobj objects at configure time. 2025-04-10 John David Anglin <danglin@gcc.gnu.org> * fileline.c (hpux_get_executable_path): New. (fileline_initialize): Add pass to get hpux executable path. 2025-04-09 Richard Biener <rguenther@suse.de> PR bootstrap/119680 * configure.ac (--enable-host-pie): Handle by setting PIC_FLAG to -fPIE. * configure: Regenerate. 2025-04-07 Jonathan Wakely <jwakely@redhat.com> * atomic.c (backtrace_atomic_store_int): Use int for old value. 2025-02-10 Ian Lance Taylor <iant@golang.org> * elf.c (elf_uncompress_lzma_block): Add casts to avoid potentially shifting a value farther than its type size. 2025-01-30 Ian Lance Taylor <iant@golang.org> * 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-28 Richard Earnshaw <rearnsha@arm.com> * configure.ac: Always check if the compiler supports __sync operations. * configure: Regenerated. 2024-12-14 Ian Lance Taylor <iant@golang.org> PR libbacktrace/117812 * zstdtest.c (test_large): Use 3 rather than ZSTD_CLEVEL_DEFAULT 2024-11-29 Ian Lance Taylor <iant@golang.org> * fileline.c: Use WIN32_LEAN_AND_MEAN, not WIN32_MEAN_AND_LEAN. * pecoff.c: Likewise. 2024-10-25 Ian Lance Taylor <iant@golang.org> * macho.c (dwarf_section_names): Add __debug_addr and __debug_line_str. 2024-10-18 Ian Lance Taylor <iant@golang.org> * 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-05 Ian Lance Taylor <iant@golang.org> * 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-30 Ian Lance Taylor <iant@golang.org> * pecoff.c (LDR_DLL_NOTIFICATION): Put function modifier inside parentheses. (LDR_REGISTER_FUNCTION): Likewise. 2024-07-18 Ian Lance Taylor <iant@golang.org> * 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 Ian Lance Taylor <iant@golang.org> * print.c (print_syminfo_callback): Add cast to avoid warning. 2024-07-18 Ian Lance Taylor <iant@golang.org> * print.c (print_syminfo_callback): New static function. (print_callback): Call backtrace_syminfo if there is no function or file name. 2024-07-18 Ian Lance Taylor <iant@golang.org> * README: Add notes about dl_iterate_phdr. 2024-07-17 Ian Lance Taylor <iant@golang.org> * 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 Ian Lance Taylor <iant@golang.org> * 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-12 Ian Lance Taylor <iant@golang.org> * 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-12 Ian Lance Taylor <iant@golang.org> * btest.c (test5): Don't fail if symbol size is 0. * mtest.c (test5): Likewise. 2024-07-12 Ian Lance Taylor <iant@golang.org> * 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 Ian Lance Taylor <iant@golang.org> * 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 Ian Lance Taylor <iant@golang.org> * elf.c (elf_nodebug): Suggest -g. * macho.c (macho_nodebug): Suggest -g and dsymutil. * pecoff.c (coff_nodebug): Suggest -g. 2024-07-11 Ian Lance Taylor <iant@golang.org> * dwarf.c: Remove trailing whitespace. * macho.c: Likewise. 2024-06-16 Ian Lance Taylor <iant@golang.org> * elf.c (elf_fetch_bits_backward) Don't fail if no bits are available. 2024-05-03 Ian Lance Taylor <iant@golang.org> * 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-28 Ian Lance Taylor <iant@golang.org> * 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-23 Ian Lance Taylor <iant@golang.org> * 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-03-08 Ian Lance Taylor <iant@golang.org> * elf.c (elf_uncompress_chdr): Don't assume compressed section is aligned. 2024-03-02 Ian Lance Taylor <iant@golang.org> * Makefile.am (libbacktrace_testing_ldflags): Define. (*_LDFLAGS): Add $(libbacktrace_testing_ldflags) for test programs. * Makefile.in: Regenerate 2024-03-02 Ian Lance Taylor <iant@golang.org> * elf.c (elf_uncompress_lzma_block): Skip all header padding bytes and verify that they are zero. 2024-03-02 Ian Lance Taylor <iant@golang.org> PR libbacktrace/114201 * elf.c (elf_add): Add caller_opd parameter. Change all callers. Release opd data after all recursive calls. 2024-03-01 Ian Lance Taylor <iant@golang.org> * elf.c (elf_add): Add the symbol table from a debuginfo file. * Makefile.am (MAKETESTS): Add buildidfull and gnudebuglinkfull variants of buildid and gnudebuglink tests. (%_gnudebuglinkfull, %_buildidfull): New patterns. * Makefile.in: Regenerate. 2023-11-30 Ian Lance Taylor <iant@golang.org> * pecoff.c: Include <windows.h> if available. (coff_add): On Windows call GetModuleHandle to get base address. 2023-11-29 Ian Lance Taylor <iant@golang.org> * fileline.c: Include <windows.h> if available. (windows_get_executable_path): New static function. (fileline_initialize): Call windows_get_executable_path. * configure.ac: Checked for windows.h * configure: Regenerate. * config.h.in: Regenerate. 2023-10-22 Iain Sandoe <iain@sandoe.co.uk> * configure: Regenerate. * configure.ac: Handle Darwin rpaths. 2023-08-07 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. 2023-08-07 Alexander von Gluck IV <kallisti5@unixzen.com> * configure: Regenerate. 2023-08-07 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. 2023-08-07 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. 2023-08-07 H.J. Lu <hjl.tools@gmail.com> * configure: Regenerate. 2023-08-07 H.J. Lu <hjl.tools@gmail.com> * configure: Regenerate. 2023-08-03 Richard Biener <rguenther@suse.de> * zstdtest.c (test_samples): Properly compute the allocation size for the uncompressed data. 2023-07-31 Ian Lance Taylor <iant@golang.org> * configure.ac: Check for _pgmptr declaration. * fileline.c (fileline_initialize): Check for _pgmfptr before /proc/self/exec. * configure, config.h.in: Regenerate. 2023-03-28 Ian Lance Taylor <iant@golang.org> * elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading bits, not before. Add unlikely for error case. (elf_zstd_offset_table): Regenerate. (elf_zstd_read_huff): Clear 13 entries in weight_mark, not 12. (elf_zstd_read_literals): For a single stream adjust by total_streams_size, not compressed_size. 2023-01-20 Ian Lance Taylor <iant@golang.org> * dwarf.c (struct function_addrs): Change low and high fields to uintptr_t. (struct unit_addrs): Likewise. (resolve_addr_index): Change address parameter to uintptr_t*. (add_unit_addr): Change lowpc and highpc parameters to uintptr_t. (add_function_range): Likewise. (struct pcrange): Change lowpc and highpc fields to uintptr_t. (add_low_high_range): Change add_range lowpc and highpc parameters to uintptr_t. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): Likewise. (add_low_high_range): Chnage lowpc and highpc variables to uintpr_t. (add_ranges_from_rnglists): Change some local variables to uintptr_t. (add_ranges_from_ranges): Change base parameter to uintptr_t. (add_ranges_from_rnglists): Likewise. (read_function_entry): Likewise. (resolve_addr_index): Add explicit casts to uintptr_t. (update_pcrange): Likewise. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): Likewise. (read_function_entry): Likewise. 2023-01-17 Martin Liska <mliska@suse.cz> * Makefile.in: Regenerate. 2023-01-06 Ian Lance Taylor <iant@golang.org> PR libbacktrace/108297 * configure.ac: Test whether linker supports --build-id. * Makefile.am: Only run --build-id tests if supported. * configure, Makefile.in: Regenerate. 2022-12-17 Ian Lance Taylor <iant@golang.org> * elf.c (elf_fetch_backward_init): New static function. (ZSTD_TABLE_SIZE): Use huffman scratch space size rather than literal size. (ZSTD_TABLE_WORK_LIT_SIZE): Don't define. (elf_zstd_read_huff): Use elf_fetch_backward_init. (elf_zstd_read_literals): New static function. (ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define. (struct elf_zstd_literals): Don't define. (elf_zstd_literal_output): Remove static function. (elf_zstd_decompress): Use elf_fetch_backward_init and elf_zstd_read_literals. Rewrite literal copying.< 2022-12-10 Ian Lance Taylor <iant@golang.org> * elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry. (ZSTD_ENCODE_BASELINE_BITS): Define. (ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define. (elf_zstd_literal_length_base): New static const array. (elf_zstd_match_length_base): Likewise. (struct elf_zstd_fse_baseline_entry): Define. (elf_zstd_make_literal_baseline_fse): New static function. (elf_zstd_make_offset_baseline_fse): Likewise. (elf_zstd_make_match_baseline_fse): Likewise. (print_table, main): Use elf_zstd_fse_baseline_entry. (elf_zstd_lit_table, elf_zstd_match_table): Likewise. (elf_zstd_offset_table): Likewise. (struct elf_zstd_seq_decode): Likewise. Remove use_rle and rle fields. (elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry, taking a conversion function. Convert RLE to FSE. (elf_zstd_literal_length_baseline): Remove. (elf_zstd_literal_length_bits): Remove. (elf_zstd_match_length_baseline): Remove. (elf_zstd_match_length_bits): Remove. (elf_zstd_decompress): Use elf_zstd_fse_baseline_entry. Rewrite and simplify main loop. 2022-12-08 Ian Lance Taylor <iant@golang.org> * configure.ac: Check for zstd library and --compress-debug-sections=zstd linker option. * Makefile.am (zstdtest_*): New targets. (zstdtest_alloc_*, ctestzstd_*): New targets. (BUILDTESTS): Add zstdtest, zstdtest_alloc, ctestzstd as appropriate. * elf.c (ELFCOMPRESS_ZSTD): Define. (elf_fetch_bits): Rename from elf_zlib_fetch. Update uses. (elf_fetch_bits_backward): New static function. (ZLIB_HUFFMAN_*): Rename from HUFFMAN_*. Update uses. (ZLIB_TABLE_*): Rename from ZDEBUG_TABLE_*. Update uses. (ZSTD_TABLE_*): Define. (struct elf_zstd_fse_entry): Define. (elf_zstd_read_fse): New static function. (elf_zstd_build_fse): Likewise. (lit): Define if BACKTRACE_GENERATE_ZSTD_FSE_TABLES. (match, offset, next, print_table, main): Likewise. (elf_zstd_lit_table): New static const array. (elf_zstd_match_table, elf_zstd_offset_table): Likewise. (elf_zstd_read_huff): New static function. (struct elf_zstd_seq_decode): Define. (elf_zstd_unpack_seq_decode): New static function. (ZSTD_LIT_*): Define. (struct elf_zstd_literals): Define. (elf_zstd_literal_output): New static function. (ZSTD_LITERAL_LENGTH_BASELINE_OFFSET): Define. (elf_zstd_literal_length_baseline): New static const array. (elf_zstd_literal_length_bits): Likewise. (ZSTD_MATCH_LENGTH_BASELINE_OFFSET): Define. (elf_zstd_match_length_baseline): New static const array. (elf_zstd_match_length_bits): Likewise. (elf_zstd_decompress): New static function. (ZDEBUG_TABLE_SIZE): New definition. (elf_uncompress_chdr): Support ELF_COMPRESS_ZSTD. (backtrace_uncompress_zstd): New function. (elf_add): Use ZLIB_TABLE_SIZE for zlib-gnu sections. * internal.h (backtrace_uncompress_zstd): Declare. * zstdtest.c: New file. * configure, config.h.in, Makefile.in: Regenerate. 2022-10-12 Martin Liska <mliska@suse.cz> * configure: Regenerate. 2022-10-11 Olivier Hainque <hainque@adacore.com> Olivier Hainque <hainque@adacore.com> * configure: Regenerate. 2022-07-08 Ian Lance Taylor <iant@golang.org> * configure.ac: Check for sys/link.h. Use either link.h or sys/link.h when checking for dl_iterate_phdr. * elf.c: Include sys/link.h if available. * configure, config.h.in: Regenerate. 2022-07-07 Ian Lance Taylor <iant@golang.org> * macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit loop if we can't find debug info for one shared library. 2022-07-07 Ian Lance Taylor <iant@golang.org> * Makefile.am (MAKETESTS): New variable split out of TESTS. (CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS. * Makefile.in: Regenerate. 2022-06-27 Ian Lance Taylor <iant@golang.org> * configure.ac: Use grep instead of fgrep. * configure, Makefile.in: Regenerate. 2022-05-28 Ian Lance Taylor <iant@golang.org> PR libbacktrace/105721 * README: Update. 2022-04-05 Ian Lance Taylor <iant@golang.org> * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in uncompressed block. 2022-02-17 Ian Lance Taylor <iant@golang.org>Lines 1–500 of 2311. Load more
2026-04-30 Release Manager * GCC 16.1.0 released. 2025-12-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * configure: Regenerate. 2025-11-06 Ian Lance Taylor <iant@golang.org> * elf.c (ELFMAGn): In #undef rename from ELF_MAGn. 2025-11-03 Sam James <sam@gentoo.org> * configure: Regenerate. 2025-10-02 H.J. Lu <hjl.tools@gmail.com> * Makefile.in: Regenerated. * aclocal.m4: Likewise. * configure: Likewise. 2025-09-28 Ian Lance Taylor <iant@golang.org> * filetype.awk: Recognize PE bigobj objects at configure time. 2025-04-10 John David Anglin <danglin@gcc.gnu.org> * fileline.c (hpux_get_executable_path): New. (fileline_initialize): Add pass to get hpux executable path. 2025-04-09 Richard Biener <rguenther@suse.de> PR bootstrap/119680 * configure.ac (--enable-host-pie): Handle by setting PIC_FLAG to -fPIE. * configure: Regenerate. 2025-04-07 Jonathan Wakely <jwakely@redhat.com> * atomic.c (backtrace_atomic_store_int): Use int for old value. 2025-02-10 Ian Lance Taylor <iant@golang.org> * elf.c (elf_uncompress_lzma_block): Add casts to avoid potentially shifting a value farther than its type size. 2025-01-30 Ian Lance Taylor <iant@golang.org> * 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-28 Richard Earnshaw <rearnsha@arm.com> * configure.ac: Always check if the compiler supports __sync operations. * configure: Regenerated. 2024-12-14 Ian Lance Taylor <iant@golang.org> PR libbacktrace/117812 * zstdtest.c (test_large): Use 3 rather than ZSTD_CLEVEL_DEFAULT 2024-11-29 Ian Lance Taylor <iant@golang.org> * fileline.c: Use WIN32_LEAN_AND_MEAN, not WIN32_MEAN_AND_LEAN. * pecoff.c: Likewise. 2024-10-25 Ian Lance Taylor <iant@golang.org> * macho.c (dwarf_section_names): Add __debug_addr and __debug_line_str. 2024-10-18 Ian Lance Taylor <iant@golang.org> * 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-05 Ian Lance Taylor <iant@golang.org> * 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-30 Ian Lance Taylor <iant@golang.org> * pecoff.c (LDR_DLL_NOTIFICATION): Put function modifier inside parentheses. (LDR_REGISTER_FUNCTION): Likewise. 2024-07-18 Ian Lance Taylor <iant@golang.org> * 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 Ian Lance Taylor <iant@golang.org> * print.c (print_syminfo_callback): Add cast to avoid warning. 2024-07-18 Ian Lance Taylor <iant@golang.org> * print.c (print_syminfo_callback): New static function. (print_callback): Call backtrace_syminfo if there is no function or file name. 2024-07-18 Ian Lance Taylor <iant@golang.org> * README: Add notes about dl_iterate_phdr. 2024-07-17 Ian Lance Taylor <iant@golang.org> * 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 Ian Lance Taylor <iant@golang.org> * 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-12 Ian Lance Taylor <iant@golang.org> * 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-12 Ian Lance Taylor <iant@golang.org> * btest.c (test5): Don't fail if symbol size is 0. * mtest.c (test5): Likewise. 2024-07-12 Ian Lance Taylor <iant@golang.org> * 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 Ian Lance Taylor <iant@golang.org> * 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 Ian Lance Taylor <iant@golang.org> * elf.c (elf_nodebug): Suggest -g. * macho.c (macho_nodebug): Suggest -g and dsymutil. * pecoff.c (coff_nodebug): Suggest -g. 2024-07-11 Ian Lance Taylor <iant@golang.org> * dwarf.c: Remove trailing whitespace. * macho.c: Likewise. 2024-06-16 Ian Lance Taylor <iant@golang.org> * elf.c (elf_fetch_bits_backward) Don't fail if no bits are available. 2024-05-03 Ian Lance Taylor <iant@golang.org> * 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-28 Ian Lance Taylor <iant@golang.org> * 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-23 Ian Lance Taylor <iant@golang.org> * 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-03-08 Ian Lance Taylor <iant@golang.org> * elf.c (elf_uncompress_chdr): Don't assume compressed section is aligned. 2024-03-02 Ian Lance Taylor <iant@golang.org> * Makefile.am (libbacktrace_testing_ldflags): Define. (*_LDFLAGS): Add $(libbacktrace_testing_ldflags) for test programs. * Makefile.in: Regenerate 2024-03-02 Ian Lance Taylor <iant@golang.org> * elf.c (elf_uncompress_lzma_block): Skip all header padding bytes and verify that they are zero. 2024-03-02 Ian Lance Taylor <iant@golang.org> PR libbacktrace/114201 * elf.c (elf_add): Add caller_opd parameter. Change all callers. Release opd data after all recursive calls. 2024-03-01 Ian Lance Taylor <iant@golang.org> * elf.c (elf_add): Add the symbol table from a debuginfo file. * Makefile.am (MAKETESTS): Add buildidfull and gnudebuglinkfull variants of buildid and gnudebuglink tests. (%_gnudebuglinkfull, %_buildidfull): New patterns. * Makefile.in: Regenerate. 2023-11-30 Ian Lance Taylor <iant@golang.org> * pecoff.c: Include <windows.h> if available. (coff_add): On Windows call GetModuleHandle to get base address. 2023-11-29 Ian Lance Taylor <iant@golang.org> * fileline.c: Include <windows.h> if available. (windows_get_executable_path): New static function. (fileline_initialize): Call windows_get_executable_path. * configure.ac: Checked for windows.h * configure: Regenerate. * config.h.in: Regenerate. 2023-10-22 Iain Sandoe <iain@sandoe.co.uk> * configure: Regenerate. * configure.ac: Handle Darwin rpaths. 2023-08-07 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. 2023-08-07 Alexander von Gluck IV <kallisti5@unixzen.com> * configure: Regenerate. 2023-08-07 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. 2023-08-07 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. 2023-08-07 H.J. Lu <hjl.tools@gmail.com> * configure: Regenerate. 2023-08-07 H.J. Lu <hjl.tools@gmail.com> * configure: Regenerate. 2023-08-03 Richard Biener <rguenther@suse.de> * zstdtest.c (test_samples): Properly compute the allocation size for the uncompressed data. 2023-07-31 Ian Lance Taylor <iant@golang.org> * configure.ac: Check for _pgmptr declaration. * fileline.c (fileline_initialize): Check for _pgmfptr before /proc/self/exec. * configure, config.h.in: Regenerate. 2023-03-28 Ian Lance Taylor <iant@golang.org> * elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading bits, not before. Add unlikely for error case. (elf_zstd_offset_table): Regenerate. (elf_zstd_read_huff): Clear 13 entries in weight_mark, not 12. (elf_zstd_read_literals): For a single stream adjust by total_streams_size, not compressed_size. 2023-01-20 Ian Lance Taylor <iant@golang.org> * dwarf.c (struct function_addrs): Change low and high fields to uintptr_t. (struct unit_addrs): Likewise. (resolve_addr_index): Change address parameter to uintptr_t*. (add_unit_addr): Change lowpc and highpc parameters to uintptr_t. (add_function_range): Likewise. (struct pcrange): Change lowpc and highpc fields to uintptr_t. (add_low_high_range): Change add_range lowpc and highpc parameters to uintptr_t. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): Likewise. (add_low_high_range): Chnage lowpc and highpc variables to uintpr_t. (add_ranges_from_rnglists): Change some local variables to uintptr_t. (add_ranges_from_ranges): Change base parameter to uintptr_t. (add_ranges_from_rnglists): Likewise. (read_function_entry): Likewise. (resolve_addr_index): Add explicit casts to uintptr_t. (update_pcrange): Likewise. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): Likewise. (read_function_entry): Likewise. 2023-01-17 Martin Liska <mliska@suse.cz> * Makefile.in: Regenerate. 2023-01-06 Ian Lance Taylor <iant@golang.org> PR libbacktrace/108297 * configure.ac: Test whether linker supports --build-id. * Makefile.am: Only run --build-id tests if supported. * configure, Makefile.in: Regenerate. 2022-12-17 Ian Lance Taylor <iant@golang.org> * elf.c (elf_fetch_backward_init): New static function. (ZSTD_TABLE_SIZE): Use huffman scratch space size rather than literal size. (ZSTD_TABLE_WORK_LIT_SIZE): Don't define. (elf_zstd_read_huff): Use elf_fetch_backward_init. (elf_zstd_read_literals): New static function. (ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define. (struct elf_zstd_literals): Don't define. (elf_zstd_literal_output): Remove static function. (elf_zstd_decompress): Use elf_fetch_backward_init and elf_zstd_read_literals. Rewrite literal copying.< 2022-12-10 Ian Lance Taylor <iant@golang.org> * elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry. (ZSTD_ENCODE_BASELINE_BITS): Define. (ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define. (elf_zstd_literal_length_base): New static const array. (elf_zstd_match_length_base): Likewise. (struct elf_zstd_fse_baseline_entry): Define. (elf_zstd_make_literal_baseline_fse): New static function. (elf_zstd_make_offset_baseline_fse): Likewise. (elf_zstd_make_match_baseline_fse): Likewise. (print_table, main): Use elf_zstd_fse_baseline_entry. (elf_zstd_lit_table, elf_zstd_match_table): Likewise. (elf_zstd_offset_table): Likewise. (struct elf_zstd_seq_decode): Likewise. Remove use_rle and rle fields. (elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry, taking a conversion function. Convert RLE to FSE. (elf_zstd_literal_length_baseline): Remove. (elf_zstd_literal_length_bits): Remove. (elf_zstd_match_length_baseline): Remove. (elf_zstd_match_length_bits): Remove. (elf_zstd_decompress): Use elf_zstd_fse_baseline_entry. Rewrite and simplify main loop. 2022-12-08 Ian Lance Taylor <iant@golang.org> * configure.ac: Check for zstd library and --compress-debug-sections=zstd linker option. * Makefile.am (zstdtest_*): New targets. (zstdtest_alloc_*, ctestzstd_*): New targets. (BUILDTESTS): Add zstdtest, zstdtest_alloc, ctestzstd as appropriate. * elf.c (ELFCOMPRESS_ZSTD): Define. (elf_fetch_bits): Rename from elf_zlib_fetch. Update uses. (elf_fetch_bits_backward): New static function. (ZLIB_HUFFMAN_*): Rename from HUFFMAN_*. Update uses. (ZLIB_TABLE_*): Rename from ZDEBUG_TABLE_*. Update uses. (ZSTD_TABLE_*): Define. (struct elf_zstd_fse_entry): Define. (elf_zstd_read_fse): New static function. (elf_zstd_build_fse): Likewise. (lit): Define if BACKTRACE_GENERATE_ZSTD_FSE_TABLES. (match, offset, next, print_table, main): Likewise. (elf_zstd_lit_table): New static const array. (elf_zstd_match_table, elf_zstd_offset_table): Likewise. (elf_zstd_read_huff): New static function. (struct elf_zstd_seq_decode): Define. (elf_zstd_unpack_seq_decode): New static function. (ZSTD_LIT_*): Define. (struct elf_zstd_literals): Define. (elf_zstd_literal_output): New static function. (ZSTD_LITERAL_LENGTH_BASELINE_OFFSET): Define. (elf_zstd_literal_length_baseline): New static const array. (elf_zstd_literal_length_bits): Likewise. (ZSTD_MATCH_LENGTH_BASELINE_OFFSET): Define. (elf_zstd_match_length_baseline): New static const array. (elf_zstd_match_length_bits): Likewise. (elf_zstd_decompress): New static function. (ZDEBUG_TABLE_SIZE): New definition. (elf_uncompress_chdr): Support ELF_COMPRESS_ZSTD. (backtrace_uncompress_zstd): New function. (elf_add): Use ZLIB_TABLE_SIZE for zlib-gnu sections. * internal.h (backtrace_uncompress_zstd): Declare. * zstdtest.c: New file. * configure, config.h.in, Makefile.in: Regenerate. 2022-10-12 Martin Liska <mliska@suse.cz> * configure: Regenerate. 2022-10-11 Olivier Hainque <hainque@adacore.com> Olivier Hainque <hainque@adacore.com> * configure: Regenerate. 2022-07-08 Ian Lance Taylor <iant@golang.org> * configure.ac: Check for sys/link.h. Use either link.h or sys/link.h when checking for dl_iterate_phdr. * elf.c: Include sys/link.h if available. * configure, config.h.in: Regenerate. 2022-07-07 Ian Lance Taylor <iant@golang.org> * macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit loop if we can't find debug info for one shared library. 2022-07-07 Ian Lance Taylor <iant@golang.org> * Makefile.am (MAKETESTS): New variable split out of TESTS. (CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS. * Makefile.in: Regenerate. 2022-06-27 Ian Lance Taylor <iant@golang.org> * configure.ac: Use grep instead of fgrep. * configure, Makefile.in: Regenerate. 2022-05-28 Ian Lance Taylor <iant@golang.org> PR libbacktrace/105721 * README: Update. 2022-04-05 Ian Lance Taylor <iant@golang.org> * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in uncompressed block. 2022-02-17 Ian Lance Taylor <iant@golang.org>