head 1.1; branch 1.1.1; access; symbols netbsd-11-0-RC6:1.1.1.2 netbsd-11-0-RC5:1.1.1.2 netbsd-11-0-RC4:1.1.1.2 netbsd-11-0-RC3:1.1.1.2 gdb-17-1:1.1.1.2 netbsd-11-0-RC2:1.1.1.2 netbsd-11-0-RC1:1.1.1.2 gdb-16-3:1.1.1.2 perseant-exfatfs-base-20250801:1.1.1.2 netbsd-11:1.1.1.2.0.2 netbsd-11-base:1.1.1.2 gdb-15-1:1.1.1.2 perseant-exfatfs-base-20240630:1.1.1.1 perseant-exfatfs:1.1.1.1.0.2 perseant-exfatfs-base:1.1.1.1 gdb-13-2:1.1.1.1 FSF:1.1.1; locks; strict; comment @# @; 1.1 date 2023.07.30.22.44.07; author christos; state Exp; branches 1.1.1.1; next ; commitid HEIv4Prd74m1wSyE; 1.1.1.1 date 2023.07.30.22.44.07; author christos; state Exp; branches 1.1.1.1.2.1; next 1.1.1.2; commitid HEIv4Prd74m1wSyE; 1.1.1.2 date 2024.08.12.21.37.16; author christos; state Exp; branches; next ; commitid dWD83H91pFit0AlF; 1.1.1.1.2.1 date 2025.08.02.05.31.36; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.1 log @Initial revision @ text @2023-01-12 Nick Clifton * Makefile.am (CLEANFILES): Import patch from upstream to prevent allocafail.sh from being removed when running 'make clean'. 2021-11-12 Martin Liska PR libbacktrace/103167 * elf.c (elf_uncompress_lzma_block): Cast to unsigned int. (elf_uncompress_lzma): Likewise. * xztest.c (test_samples): memcpy only if v > 0. 2021-10-22 Martin Liska PR testsuite/102742 * btest.c (MIN_DESCRIPTOR): New. (MAX_DESCRIPTOR): Likewise. (check_available_files): Likewise. (check_open_files): Check only file descriptors that were not available at the entry. (main): Call check_available_files. 2021-08-13 Sergei Trofimovich * install-debuginfo-for-buildid.sh.in: Force non-localized readelf output with LANG=C. 2021-06-28 Clément Chigot * 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-05-03 H.J. Lu PR bootstrap/99703 * configure: Regenerated. 2021-03-03 Ian Lance Taylor * dwarf.c (read_line_program): Don't special case file 0. (read_function_entry): Likewise. 2021-03-02 Ian Lance Taylor PR libbacktrace/98818 * dwarf.c (dwarf_buf_error): Add errnum parameter. Change all callers. * backtrace.h: Update backtrace_error_callback comment. 2021-02-12 Ian Lance Taylor * configure.ac: Check for objcopy --add-gnu-debuglink by using objcopy --help. * configure: Regenerate 2021-01-18 Ian Lance Taylor * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info. * Makefile.in: Regenerate. * configure: Regenerate. 2021-01-18 Ian Lance Taylor 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-05 Samuel Thibault * configure: Re-generate. 2020-12-05 Iain Sandoe PR target/97865 * configure: Regenerate. 2020-12-02 Ian Lance Taylor * dwarf.c (resolve_string): Use > rather than >= to check whether string index extends past buffer. (resolve_addr_index): Similarly for address index. 2020-11-29 John David Anglin * configure: Regenerate. 2020-10-20 Ian Lance Taylor * internal.h (ATTRIBUTE_FALLTHROUGH): Define. * elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH. 2020-09-28 Ian Lance Taylor PR libbacktrace/97082 * Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL. * Makefile.in: Regenerate. 2020-09-28 Ian Lance Taylor 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-23 Ian Lance Taylor * dwarf.c (report_inlined_functions): Handle PC == -1 and PC == p->low. (dwarf_lookup_pc): Likewise. 2020-09-17 Ian Lance Taylor 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 Iain Sandoe * 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-14 Ian Lance Taylor 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-09 Ian Lance Taylor * pecoff.c (coff_initialize_syminfo): Add is_64 parameter. (coff_add): Determine and pass is_64. 2020-09-09 Ian Lance Taylor PR libbacktrace/96973 * fileline.c (macho_get_executable_path): New static function. (fileline_initialize): Call macho_get_executable_path. 2020-09-09 Ian Lance Taylor * 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 Ian Lance Taylor * simple.c (simple_unwind): Correct comment spelling. 2020-09-08 Ian Lance Taylor * macho.c (macho_add_dsym): Make space for '/' in dsym. Use correct length when freeing diralc. 2020-09-08 Ian Lance Taylor PR libbacktrace/96973 * macho.c (macho_add_fat): Correctly swap 32-bit file offset. 2020-09-08 Ian Lance Taylor PR libbacktrace/96971 * filetype.awk: Only match magic number at start of line. 2020-08-24 Ian Lance Taylor * 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-07-30 H.J. Lu PR bootstrap/96202 * configure: Regenerated. 2020-07-08 Ian Lance Taylor * configure.ac: Test linker support for DWARF5 * configure: Regenerate 2020-05-29 H.J. Lu PR bootstrap/95413 * configure: Regenerated. 2020-05-15 H.J. Lu PR bootstrap/95147 * configure: Regenerated. 2020-05-14 H.J. Lu * configure: Regenerated. 2020-05-13 Ian Lance Taylor * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED. 2020-05-13 Ian Lance Taylor PR go/95061 * posix.c (backtrace_open): Treat EACCESS like ENOENT. 2020-05-12 H.J. Lu * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS). * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't enabled. * Makefile.in: Regenerated. * configure: Likewise. 2020-05-11 Ian Lance Taylor PR libbacktrace/95012 * configure.ac: Check for getpagesize declaration. * mmap.c: Declare getpagesize if necessary. * mmapio.c: Likewise. * configure: Regenerate. * config.h.in: Regenerate. * Makefile.in: Regenerate. 2020-05-09 Roland McGrath * elf.c (elf_add): Bail early if there are no section headers at all. 2020-05-09 Ian Lance Taylor * elf.c (elf_add): Don't free strtab if an error occurs after recording symbol information. 2020-05-09 Ian Lance Taylor PR libbacktrace/88745 * macho.c: New file. * filetype.awk: Recognize Mach-O files. * Makefile.am (FORMAT_FILES): Add macho.c. (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL. (%.dSYM): New pattern target. (test_macho_SOURCES, test_macho_CFLAGS): New targets. (test_macho_LDADD): New target. (BUILDTESTS): Add test_macho. (macho.lo): Add dependencies. * configure.ac: Recognize macho file type. Check for mach-o/dyld.h. Don't try to run objcopy if we don't find it. Look for dsymutil and define a HAVE_DSYMUTIL conditional. * Makefile.in: Regenerate. * configure: Regenerate. * config.h.in: Regenerate. 2020-05-09 Ian Lance Taylor * read.c (backtrace_get_view): Support short read. 2020-05-09 Ian Lance Taylor * elf.c (elf_add): If debug sections are very large or far apart, read them individually rather than as a single view. 2020-05-08 Ian Lance Taylor * fileline.c (sysctl_exec_name): New static function. (sysctl_exec_name1): New macro or static function. (sysctl_exec_name2): Likewise. (fileline_initialize): Try sysctl_exec_name[12]. * configure.ac: Check for sysctl args to fetch executable name. * configure: Regenerate. * config.h.in: Regenerate. 2020-02-15 Ian Lance Taylor * ztest.c (test_large): Update file to current libgo test file. 2020-02-03 Ian Lance Taylor * Makefile.am (libbacktrace_TEST_CFLAGS): Define. (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS). (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise. (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise. (test_unknown_CFLAGS, unittest_CFLAGS): Likewise. (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise. (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise. (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise. (stest_alloc_CFLAGS): Likewise. * Makefile.in: Regenerate. * ztest.c (error_callback_compress): Mark vdata unused. (test_large): Add casts to avoid warnings. 2020-01-01 Jakub Jelinek Update copyright years. 2019-12-13 Ian Lance Taylor Add DWARF 5 support. * dwarf.c (struct attr): Add val field. (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX, ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX. (struct line_header): Add addrsize field. (struct line_header_format): Define. (struct unit): Add str_offsets_base, addr_base, and rnglists_base fields. (read_uint24): New static function. (read_attribute): Add implicit_val parameter. Replace dwarf_str and dwarf_str_size parameters with dwarf_sections parameter. Add support for new DWARF 5 forms. Change all callers. (resolve_string): New static function. (resolve_addr_index): Likewise. (read_abbrevs): Support DW_FORM_implicit_const. (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index, and ranges_is_index fields. (update_pcrange): Support DWARF 5 encodings. (add_high_low_range): New static function, split out of add_ranges. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): New static function. (add_ranges): Just call new helper functions. (find_address_ranges): Use resolve_string for strings, after reading all attributes. Handle new DWARF 5 attributes. (build_address_map): Support DWARF 5 compilation units. (read_v2_paths): New static function, split out of read_line_header. (read_lnct): New static function. (read_line_header_format_entries): Likewise. (read_line_header): Add ddata parameter. Support DWARF 5 line headers. Call new helper functions. Change all callers. (read_line_program): Use addrsize from line program header. Don't special case directory index 0 for DWARF 5. (read_referenced_name): Use resolve_string. (read_function_entry): Handle DWARF 5 encodings. Use resolve_string. * internal.h (enum dwarf_section): Add DEBUG_ADDR, DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS. * elf.c (dwarf_section_names): Add new section names. * pecoff.c (dwarf_section_names): Likewise. * xcoff.c (xcoff_add): Clear dwarf_sections before setting fields. * configure.ac: Define HAVE_DWARF5 automake conditional. * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5. (dwarf5_CFLAGS, dwarf5_LDADD): Likewise. (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise. (dwarf5_alloc_LDADD): Likewise. (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5. (CLEANFILES, clean-local): Define. 2019-12-08 Ian Lance Taylor * dwarf.c (struct pcrange): Define. (update_pcrange, add_ranges): New static functions. (add_unit_addr): Change signature to work with add_ranges. Don't add base_address here. (add_unit_ranges): Remove. (find_address_ranges): Replace str/ranges parameters with dwarf_sections. Use update_pcrange and add_ranges. Change all callers. (add_function_range): Change signature to work with add_ranges. Don't add base_address here. (add_function_ranges): Remove. (read_function_entry): Use update_pcrange and add_ranges. 2019-12-04 Ian Lance Taylor * edtest.c (test1): Add noclone attribute. 2019-12-04 Ian Lance Taylor * internal.h (enum dwarf_section): Define. (struct dwarf_sections): Define. (backtrace_dwarf_add): Update declaration to replace specific section parameters with dwarf_sections parameter. * dwarf.c (struct dwarf_data): Replace specific section fields with dwarf_sections field. (read_attribute): Use dwarf_sections with altlink. (build_address_map): Replace specific section parameters with dwarf_sections parameter. Change all callers. (read_line_info): Use dwarf_sections with ddata. (read_referenced_name): Likewise. (add_function_ranges): Likewise. (read_function_entry): Likewise. (read_function_info): Likewise. (build_dwarf_data): Replace specific section parameters with dwarf_sections parameter. Change all callers. (backtrace_dwarf_add): Likewise. * elf.c (enum debug_section): Remove. (dwarf_section_names): Remove .zdebug names. (elf_add): Track zsections separately. Build dwarf_sections. * pecoff.c (enum debug_section): Remove. (struct debug_section_info): Remove data field. (coff_add): Build dwarf_sections. * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx references with DEBUG_xxx references. (xcoff_add): Build dwarf_sections. 2019-09-27 Maciej W. Rozycki * configure: Regenerate. 2019-09-26 Ian Lance Taylor PR libbacktrace/91908 * pecoff.c (backtrace_initialize): Explicitly cast unchecked __sync_bool_compare_and_swap to void. * xcoff.c (backtrace_initialize): Likewise. 2019-09-03 Ulrich Weigand * configure.ac: Remove references to spu. * configure: Regenerate. 2019-05-24 Clement Chigot * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and test_elf_64. * Makefile.in: Regenerate. 2019-05-14 Rainer Orth * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10* handling. * configure: Regenerate. 2019-03-11 Ian Lance Taylor PR libbacktrace/89669 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if HAVE_ELF. * Makefile.in: Regenerate. 2019-02-26 Tom de Vries * btest.c (test5): Allow global.* as minimal symbol name for global. 2019-02-26 Tom de Vries * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ. * Makefile.in: Regenerate. 2019-02-12 Tom de Vries PR libbacktrace/81983 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0. 2019-02-10 Tom de Vries * Makefile.am (BUILDTESTS): Add btest_lto. * Makefile.in: Regenerate. * btest.c (test1, f2, f3, test3, f22, f23): Declare with __attribute__((noclone)). 2019-02-08 Tom de Vries * backtrace.c (backtrace_full): Declare with __attribute__((noinline)). * print.c (backtrace_print): Same. * simple.c (backtrace_simple): Same. 2019-02-08 Tom de Vries PR libbacktrace/78063 * dwarf.c (build_address_map): Keep all parsed units. (read_referenced_name_from_attr): Handle DW_FORM_ref_addr. 2019-01-31 Tom de Vries PR libbacktrace/89136 * elf.c (elf_add): Read build-id if with_buildid_data. Fix 'debugaltlink_name_len =+ 1'. 2019-01-29 Tom de Vries * install-debuginfo-for-buildid.sh.in: New script. * Makefile.am (check_PROGRAMS): Add b2test and b3test. (TESTS): Add b2test_buildid and b3test_dwz_buildid. * Makefile.in: Regenerate. * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL. (READELF): Set with AC_CHECK_PROG. (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES. * configure: Regenerate. * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ... (elf_open_debugfile_by_buildid): ... here. 2019-01-29 Tom de Vries * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for allocfail. (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS. (check_PROGRAMS): Add BUILDTESTS. * Makefile.in: Regenerate. 2019-01-28 Tom de Vries * Makefile.am (xcoff_%.c): Generate sed result into temporary file. Use $< to access prerequisite. * Makefile.in: Regenerate. 2019-01-25 Nathan Sidwell * elf.c (elf_add): Pass "" filename to recursive call with separated debug. 2019-01-25 Tom de Vries * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with filename == "". * Makefile.am (TESTS): Add btest_dwz_gnudebuglink. * Makefile.in: Regenerate. 2019-01-25 Tom de Vries * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule. (TESTS): Rename dtest to btest_gnudebuglink. * Makefile.in: Regenerate. 2019-01-23 Tom de Vries * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields. (units_search, find_unit): Use size_t for offset. (build_address_map): Use size_t for unit_offset. 2019-01-20 Gerald Pfeifer * allocfail.c (main): Increase portability of printf statement. 2019-01-18 Ian Lance Taylor PR libbacktrace/88890 * mmapio.c (backtrace_get_view): Change size parameter to uint64_t. Check that value fits in size_t. * read.c (backtrace_get_view): Likewise. * internal.h (backtrace_get_view): Update declaration. * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view. 2019-01-17 Tom de Vries PR libbacktrace/82857 * configure.ac (DWZ): Set with AC_CHECK_PROG. (HAVE_DWZ): Set with AM_CONDITIONAL. * configure: Regenerate. * Makefile.am (TESTS): Add btest_dwz. * Makefile.in: Regenerate. 2019-01-17 Tom de Vries PR libbacktrace/82857 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO. (read_attribute): Handle DW_FORM_GNU_ref_alt using ATTR_VAL_REF_ALT_INFO. (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt. 2019-01-17 Tom de Vries * dwarf.c (struct unit): Add low_offset and high_offset fields. (struct unit_vector): New type. (struct dwarf_data): Add units and units_counts fields. (find_unit): New function. (find_address_ranges): Add and handle unit_tag parameter. (build_address_map): Add and handle units_vec parameter. (build_dwarf_data): Pass units_vec to build_address_map. Store resulting units vector. 2019-01-17 Tom de Vries PR libbacktrace/82857 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt using altlink. 2019-01-17 Tom de Vries * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE. (read_attribute): Add altlink parameter. Handle missing altlink for DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt. (find_address_ranges, build_address_map, build_dwarf_data): Add and handle altlink parameter. (read_referenced_name, read_function_entry): Add argument to read_attribute call. 2019-01-17 Tom de Vries * dwarf.c (struct dwarf_data): Add altlink field. (backtrace_dwarf_add): Add and handle fileline_altlink parameter. * elf.c (elf_add): Add argument to backtrace_dwarf_add call. (phdr_callback, backtrace_initialize): Add argument to elf_add calls. * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter. * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call. * xcoff.c (xcoff_add): Same. 2019-01-17 Tom de Vries * internal.h (backtrace_dwarf_add): Add fileline_entry parameter. * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter. * elf.c (elf_add): Add and handle fileline_entry parameter. Add argument to backtrace_dwarf_add call. (phdr_callback, backtrace_initialize): Add argument to elf_add calls. * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call. * xcoff.c (xcoff_add): Same. 2019-01-17 Tom de Vries * elf.c (elf_add): Add and handle with_buildid_data and with_buildid_size parameters. Handle .gnu_debugaltlink section. (phdr_callback, backtrace_initialize): Add arguments to elf_add calls. 2019-01-16 Tom de Vries * dwarf.c (read_referenced_name_from_attr): New function. Factor out of ... (read_referenced_name): ... here, and ... (read_function_entry): ... here. 2019-01-16 Tom de Vries * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any name. (read_function_entry): Same. Don't allow name found via DW_AT_abstract_origin or case DW_AT_specification to override linkage name. 2019-01-09 Sandra Loosemore PR other/16615 * backtrace.h: Mechanically replace "can not" with "cannot". 2019-01-01 Jakub Jelinek Update copyright years. 2018-12-29 Gerald Pfeifer * Makefile.am (xcoff_%.c): Use an actual newline instead of \n in sed pattern. * Makefile.in: Regenerate. 2018-12-28 Tom de Vries * dwarf.c (build_address_map): Reuse unused units. 2018-12-28 Tom de Vries * dwarf.c (build_address_map): Simplify by removing local variable abbrevs. 2018-12-28 Ian Lance Taylor Tom de Vries PR libbacktrace/88063 * dwarf.c (free_unit_addrs_vector): Remove. (build_address_map): Keep track of allocated units in vector. Free allocated units and corresponding abbrevs upon failure. Remove now redundant call to free_unit_addrs_vector. Free addrs vector upon failure. Free allocated unit vector. 2018-12-28 Tom de Vries * dwarf.c (build_address_map): Free addrs vector upon failure. 2018-12-14 Tom de Vries PR testsuite/88491 * allocfail.sh: Remove "set -o pipefail". 2018-12-12 Tom de Vries * Makefile.am (TESTS): Add allocfail.sh. (check_PROGRAMS): Add allocfail. * Makefile.in: Regenerate. * instrumented_alloc.c: New file. Redefine malloc and realloc. Include alloc.c. * allocfail.c: New file. * allocfail.sh: New file. 2018-11-30 Tom de Vries * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32, test_xcoff_64, test_pecoff and test_unknown. * Makefile.in: Regenerate. * test_format.c: New file. 2018-11-30 Tom de Vries * Makefile.am : Add _with_alloc version for each test in check_PROGRAMS. * Makefile.in: Regenerate. 2018-11-30 Tom de Vries * internal.h (backtrace_vector_free): New static inline fuction, factored out of ... * dwarf.c (read_line_info): ... here. 2018-11-28 Tom de Vries * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation failure. 2018-11-27 Tom de Vries * mmap.c (backtrace_vector_release): Same. * unittest.c (test1): Add check. 2018-11-27 Tom de Vries * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free instead of realloc. * Makefile.am (check_PROGRAMS): Add unittest. * Makefile.in: Regenerate. * unittest.c: New file. 2018-11-22 Tom de Vries * dwarf.c (read_initial_length): Factor out of ... (build_address_map, read_line_info): ... here. 2018-11-21 Tom de Vries * dwarf.c (read_string): Factor out of ... (read_attribute, read_line_header, read_line_program): ... here. 2018-10-31 Joseph Myers PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. 2018-10-05 Ian Lance Taylor PR libbacktrace/87529 * backtrace.h: Document that backtrace_create_state should be called only once. 2018-08-05 Iain Buclaw * configure.ac: Move define of HAVE_ZLIB into check for -lz. * Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise. 2018-08-01 Tony Reix * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove. (struct xcoff_func, struct xcoff_func_vector): New structs. (xcoff_syminfo): Drop leading dot from symbol name. (xcoff_line_compare, xcoff_line_search): Remove. (xcoff_func_compare, xcoff_func_search): New static functions. (xcoff_lookup_pc): Search function table. (xcoff_add_line, xcoff_process_linenos): Remove. (xcoff_initialize_fileline): Build function table. 2018-06-21 Denis Khalikov PR other/86198 * elf.c (elf_add): Increase ".note.gnu.build-id" section size checking up to 36 bytes. 2018-04-24 H.J. Lu * configure: Regenerated. 2018-04-19 Jakub Jelinek * configure: Regenerated. 2018-04-17 Ian Lance Taylor * backtrace.c: Revert last two changes. Don't call mmap directly. 2018-04-17 Ian Lance Taylor * backtrace.c: Include backtrace-supported.h before checking BACKTRACE_USES_MALLOC. 2018-04-17 Ian Lance Taylor * backtrace.c (backtrace_full): When testing whether we can allocate memory, call mmap directly, and munmap the memory. 2018-04-04 Jakub Jelinek PR other/85161 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for big endian, only use 32-bit loads if endianity macros are predefined and indicate big or little endian. 2018-02-14 Igor Tsimbalist PR target/84148 * configure: Regenerate. 2018-02-15 Jakub Jelinek PR other/82368 * elf.c (SHT_PROGBITS): Undefine and define. 2018-02-14 Jakub Jelinek PR other/82368 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define. (struct elf_ppc64_opd_data): New type. (elf_initialize_syminfo): Add opd argument, handle symbols pointing into the PowerPC64 ELFv1 .opd section. (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer to structure with .opd data to elf_initialize_syminfo. 2018-01-31 Ian Lance Taylor * elf.c (elf_add): Close descriptor if we use a debugfile. * btest.c (check_open_files): New static function. (main): Call check_open_files. 2018-01-25 Ian Lance Taylor * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the desired CRC is zero. (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo. 2018-01-25 Ian Lance Taylor * pecoff.c (coff_add): Only release syms_view if it is valid. 2018-01-25 Ian Lance Taylor * pecoff.c (coff_add): Another memcpy -> coff_read4 fix. 2018-01-24 Ian Lance Taylor * pecoff.c (coff_add): Use coff_read4, not memcpy. 2018-01-24 Ian Lance Taylor PR other/68239 * mmap.c (backtrace_free_locked): Don't put more than 16 entries on the free list. 2018-01-19 Tony Reix * xcoff.c (xcoff_incl_compare): New function. (xcoff_incl_search): New function. (xcoff_process_linenos): Use bsearch to find include file. (xcoff_initialize_fileline): Sort include file information. 2018-01-16 Ian Lance Taylor * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be 288. (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to elf_zlib_inflate_table. Generate elf_zlib_default_dist_table. (elf_zlib_default_table): Update. (elf_zlib_default_dist_table): New static array. (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table for block type 1. * ztest.c (struct zlib_test): Add uncompressed_len. (tests): Initialize uncompressed_len field. Add new test case. (test_samples): Use uncompressed_len field. 2018-01-03 Jakub Jelinek Update copyright years. 2017-11-17 Igor Tsimbalist * configure.ac: Add CET_FLAGS to EXTRA_FLAGS. * aclocal.m4: Regenerate. * Makefile.in: Likewise. * configure: Likewise. 2017-10-06 Ian Lance Taylor * ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function. 2017-10-05 Ian Lance Taylor * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *. Read a four byte integer. (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit boundary before ever calling elf_zlib_fetch. * ztest.c (test_large): Simplify print statements a bit. 2017-10-02 Ian Lance Taylor * ztest.c: #include . (TEST_TIMING): Don't define, don't test. (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME. (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise. (ZLIB_CLOCK_GETTIME_ARG): Define. * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK. * Makefile.am: Likewise. * configure, Makefile.in: Rebuild. 2017-10-02 Thomas Schwinge PR other/67165 * Makefile.am: Append the content of clock_gettime_link to ztest_LDADD. * configure.ac: Test for the case that clock_gettime is in librt. * Makefile.in: Regenerate. * configure: Likewise. PR other/67165 * configure.ac: Check for clock_gettime. * config.h.in: Regenerate. * configure: Likewise. * ztest.c (average_time, test_large): Conditionalize test timing on clock_gettime availability. 2017-09-29 Tony Reix * xcoff.c: Initial support for DWARF debug sections in XCOFF. (STYP_DWARF, SSUBTYP_DW*): Define. (enum dwarf_section): Define. (struct dwsect_info): Define. (xcoff_add): Look for DWARF sections, pass them to backtrace_dwarf_add. 2017-09-28 Ian Lance Taylor PR other/67165 * elf.c (__builtin_prefetch): Define if not __GNUC__. (unlikely): Define. (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define. (b_elf_chdr): Define type. (enum debug_section): Add ZDEBUG_xxx values. (debug_section_names): Add names for new sections. (struct debug_section_info): Add compressed field. (elf_zlib_failed, elf_zlib_fetch): New static functions. (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define. (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define. (HUFFMAN_SECONDARY_SHIFT): Define. (ZDEBUG_TABLE_SIZE): Define. (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define. (final_next_secondary): New static variable if BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE. (elf_zlib_inflate_table): New static function. (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main function to produce fixed Huffman table. (elf_zlib_default_table): New static variable. (elf_zlib_inflate): New static function. (elf_zlib_verify_checksum): Likewise. (elf_zlib_inflate_and_verify): Likewise. (elf_uncompress_zdebug): Likewise. (elf_uncompress_chdr): Likewise. (backtrace_uncompress_zdebug): New extern function. (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug sections, and uncompress them. * internal.h (backtrace_compress_zdebug): Declare. * ztest.c: New file. * configure.ac: Check for -lz and check whether the linker supports --compress-debug-sections. * Makefile.am (ztest_SOURCES): New variable. (ztest_CFLAGS, ztest_LDADD): New variables. (check_PROGRAMS): Add ztest. (ctestg_SOURCES): New variable. (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables. (ctesta_SOURCES): New variable. (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables. (check_PROGRAMS): Add ctestg and ctesta. * configure, config.h.in, Makefile.in: Rebuild. 2017-09-22 Ian Lance Taylor PR sanitizer/77631 * configure.ac: Check for lstat and readlink. * elf.c (lstat, readlink): Provide dummy versions if real versions are not available. * configure, config.h.in: Rebuild. 2017-09-21 Ian Lance Taylor PR go/82284 * elf.c (backtrace_initialize): Set pd.exe_filename. 2017-09-20 Ian Lance Taylor Denis Khalikov PR sanitizer/77631 Support for external debug info. * elf.c: Include , , . (S_ISLNK): Define if not defined. (xstrnlen): Define if strnlen is not available. (b_elf_note): Define type. (NT_GNU_BUILD_ID): Define macro. (elf_crc32, elf_crc32_file): New static functions. (elf_is_symlink, elf_readlink): New static functions. (elf_open_debugfile_by_buildid): New static function. (elf_try_debugfile): New static function. (elf_find_debugfile_by_debuglink): New static function. (elf_open_debugfile_by_debuglink): New static function. (elf_add): Add filename and debuginfo parameters. Adjust all callers. Look for external debug info notes, and try to fetch debug info from external file. (struct phdr_data): Add exe_filename field. (phdr_callback): Pass filename to elf_add. (backtrace_initialize): Add filename parameter. * internal.h (backtrace_initialize): Add filename parameter. * fileline.c (fileline_initialize): Pass filename to backtrace_initialize. * pecoff.c (fileline_initialize): Add unused filename parameter. * unknown.c (fileline_initialize): Likewise. * xcoff.c (fileline_initialize): Likewise. * configure.ac: Check for objcopy --add-gnu-debuglink. * Makefile.am (dtest): New test target. * configure, Makefile.in: Rebuild. 2017-09-12 Steve Ellcey PR other/81096 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS) * Makefile.in: Regenerate. 2017-09-12 Steve Ellcey PR other/81096 * libbacktrace/Makefile.in (HAVE_PTHREAD_TRUE@@@@NATIVE_TRUE@@ttest_CFLAGS): Add $(AM_CFLAGS) 2017-08-02 David Edelsohn PR bootstrap/81638 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL. 2017-07-28 Tony Reix * xcoff.c: Don't leak a file descriptor if an archive is malformed. 2017-07-28 Rainer Orth * fileline.c (fileline_initialize): Print pid_t as long. 2017-07-26 Tony Reix * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery. * filetype.awk: Separate AIX XCOFF32 and XCOFF64. * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats. * configure, config.h.in: Regenerate. 2017-07-21 Tony Reix * filetype.awk: Add AIX XCOFF type detection. * configure.ac: Recognize xcoff format. * Makefile.am (FORMAT_FILES): Add xcoff.c. * fileline.c: Include . (fileline_initialize): Add case for AIX procfs. * xcoff.c: New file. * configure, Makefile.in: Rebuild. 2017-06-21 Richard Biener * configure.ac: Add AC_SYS_LARGEFILE. * config.h.in: Regenerate. * configure: Likewise. 2017-06-11 Ian Lance Taylor * elf.c (backtrace_initialize): Always set *fileline_fn. * ttest.c: New file. * btest.c: Move support functions into testlib.c. Change calls to check to pass file name. * testlib.c: New file, copied from (part of) btest.c. * testlib.h: New file, declarations for testlib.c. * edtest.c: Use testlib.h and testlib.c. * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional. * Makefile.am (btest_SOURCES): Add testlib.c. (edtest_SOURCES): Likewise. (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD. (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define. * configure, Makefile.in: Rebuild. 2017-05-19 Than McIntosh * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0. (read_line_header): Don't allocate dirs if dirs_count == 0. * edtest.c: New file. * edtest2.c: New file. * Makefile.am (edtest_SOURCES, edtest_LDADD): Define. (check_PROGRAMS): Add edtest. (edtest2_build.c, gen_edtest2_build): New targets. * Makefile.in: Rebuild. 2017-03-08 Sam Thursfield * btest.c (test5): Replace #ifdef guard with 'unused' attribute to fix compile warning when BACKTRACE_SUPPORTED isn't defined. 2017-01-01 Jakub Jelinek Update copyright years. 2016-11-15 Matthias Klose * configure: Regenerate. 2016-09-11 Carlos Liam * all: Remove meaningless trailing whitespace. 2016-05-18 Uros Bizjak PR target/71161 * elf.c (phdr_callback) [__i386__]: Add __attribute__((__force_align_arg_pointer__)). 2016-03-02 Maxim Ostapenko * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to avoid possible crash. (elf_add): Don't set *fileline_fn to elf_nodebug value in case of missing debug info anymore. 2016-02-06 John David Anglin * mmap.c (MAP_FAILED): Define if not defined. 2016-01-04 Jakub Jelinek Update copyright years. 2015-12-18 Andris Pavenis * configure.ac: Specify that DJGPP do not have mmap even when sys/mman.h exists. * configure: Regenerate 2015-12-09 John David Anglin PR libgfortran/68115 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*. * configure: Regenerate. * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call to void. 2015-09-17 Ian Lance Taylor * posix.c (backtrace_open): Cast second argument of open() to int. 2015-09-11 Ian Lance Taylor * Makefile.am (backtrace.lo): Depend on internal.h. (sort.lo, stest.lo): Add explicit dependencies. * Makefile.in: Rebuild. 2015-09-09 Hans-Peter Nilsson * backtrace.c: #include . 2015-09-08 Ian Lance Taylor PR other/67457 * backtrace.c: #include "internal.h". (struct backtrace_data): Add can_alloc field. (unwind): If can_alloc is false, don't try to get file/line information. (backtrace_full): Set can_alloc field in bdata. * alloc.c (backtrace_alloc): Don't call error_callback if it is NULL. * mmap.c (backtrace_alloc): Likewise. * internal.h: Update comments for backtrace_alloc and backtrace_free. 2015-09-08 Ian Lance Taylor PR other/67457 * mmap.c (backtrace_alloc): Correct test for mmap failure. 2015-08-31 Ulrich Weigand * configure.ac: For spu-*-* targets, set have_fcntl to no. * configure: Regenerate. 2015-08-27 Ulrich Weigand * configure.ac: Remove [disable-shared] argument to LT_INIT. Remove setting PIC_FLAG when building as target library. * configure: Regenerate. 2015-08-26 Hans-Peter Nilsson * configure.ac: Only compile with -fPIC if the target supports it. * configure: Regenerate. 2015-08-24 Ulrich Weigand * configure.ac: Set have_mmap to no on spu-*-* targets. * configure: Regenerate. 2015-08-13 Ian Lance Taylor * dwarf.c (read_function_entry): Add vec_inlined parameter. Change all callers. 2015-06-11 Martin Sebor PR sanitizer/65479 * dwarf.c (struct line): Add new field idx. (line_compare): Use it. (add_line): Set it. (read_line_info): Reset it. 2015-05-29 Tristan Gingold * 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. 2015-05-13 Michael Haubenwallner * Makefile.in: Regenerated with automake-1.11.6. * aclocal.m4: Likewise. * configure: Likewise. 2015-01-24 Matthias Klose * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. * configure: Regenerate. 2015-01-05 Jakub Jelinek Update copyright years. 2014-11-21 H.J. Lu PR bootstrap/63784 * configure: Regenerated. 2014-11-11 David Malcolm * ChangeLog.jit: New. 2014-11-11 Francois-Xavier Coudert PR target/63610 * configure: Regenerate. 2014-10-23 Ian Lance Taylor * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]: Fix to return void *. 2014-05-08 Ian Lance Taylor * 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. 2014-03-07 Ian Lance Taylor * sort.c (backtrace_qsort): Use middle element as pivot. 2014-03-06 Ian Lance Taylor * 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. 2014-02-07 Misty De Meo PR target/58710 * configure.ac: Use AC_LINK_IFELSE in check for _Unwind_GetIPInfo. * configure: Regenerate. 2014-01-02 Richard Sandiford Update copyright years 2013-12-06 Jakub Jelinek * 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. 2013-12-05 Ian Lance Taylor * 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. 2013-11-27 Ian Lance Taylor * 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. 2013-11-19 Jakub Jelinek * 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. * atomic.c: Include sys/types.h. 2013-11-18 Ian Lance Taylor * 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. 2013-11-18 Jakub Jelinek * 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. * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally. 2013-11-16 Ian Lance Taylor * backtrace.h (backtrace_create_state): Correct comment about threading. 2013-11-15 Ian Lance Taylor * 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. 2013-10-17 Ian Lance Taylor * elf.c (elf_add): Don't get the wrong offsets if a debug section is missing. 2013-10-15 David Malcolm * configure.ac: Add --enable-host-shared, setting up pre-existing PIC_FLAG variable within Makefile.am et al. * configure: Regenerate. 2013-09-20 Alan Modra * configure: Regenerate. 2013-07-23 Alexander Monakov * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain. 2013-07-23 Alexander Monakov * elf.c (backtrace_initialize): Pass elf_fileline_fn to dl_iterate_phdr callbacks. 2013-03-25 Ian Lance Taylor * alloc.c: #include . * mmap.c: Likewise. 2013-01-31 Ian Lance Taylor * dwarf.c (read_function_info): Permit fvec parameter to be NULL. (dwarf_lookup_pc): Don't use ddata->fvec if threaded. 2013-01-25 Jakub Jelinek PR other/56076 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir attribute was not seen. 2013-01-16 Ian Lance Taylor * 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. 2013-01-14 Richard Sandiford Update copyright years. 2013-01-01 Ian Lance Taylor PR bootstrap/54834 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I $(MULTIBUILDTOP)/../../gcc/include. * Makefile.in: Rebuild. 2013-01-01 Ian Lance Taylor PR other/55536 * mmap.c (backtrace_alloc): Don't call sync functions if not threaded. (backtrace_free): Likewise. 2012-12-12 John David Anglin * mmapio.c: Define MAP_FAILED if not defined. 2012-12-11 Jakub Jelinek 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. 2012-12-07 Jakub Jelinek PR bootstrap/54926 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@@. * Makefile.in: Regenerated. 2012-11-20 Ian Lance Taylor * dwarf.c (read_attribute): Always clear val. 2012-11-13 Ian Lance Taylor PR other/55312 * configure.ac: Only add -Werror if building a target library. * configure: Rebuild. 2012-11-12 Ian Lance Taylor Rainer Orth Gerald Pfeifer * configure.ac: Check for getexecname. * fileline.c: #include . 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. 2012-10-29 Ian Lance Taylor * mmap.c (backtrace_vector_release): Correct last patch: add aligned, not size. 2012-10-29 Ian Lance Taylor * mmap.c (backtrace_vector_release): Make sure freed block is aligned on 8-byte boundary. 2012-10-26 Ian Lance Taylor 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. 2012-10-26 Jack Howarth PR target/55061 * configure.ac: Check for _Unwind_GetIPInfo function declaration. * configure: Regenerate. 2012-10-24 Ian Lance Taylor PR target/55061 * configure.ac: Check whether -funwind-tables option works. * configure: Rebuild. 2012-10-11 Ian Lance Taylor * configure.ac: Do not use dl_iterate_phdr on Solaris 10. * configure: Rebuild. 2012-10-10 Ian Lance Taylor * elf.c: Rename all Elf typedefs to start with b_elf, and be all lower case. 2012-10-10 Hans-Peter Nilsson * elf.c (elf_add_syminfo_data): Add casts to avoid warning. 2012-10-09 Ian Lance Taylor * dwarf.c (dwarf_fileline): Add cast to avoid warning. (backtrace_dwarf_add): Likewise. 2012-10-09 Ian Lance Taylor Add support for tracing through shared libraries. * configure.ac: Check for link.h and dl_iterate_phdr. * elf.c: #include 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. 2012-10-04 Gerald Pfeifer * btest.c (f23): Avoid uninitialized variable warning. 2012-10-04 Ian Lance Taylor * dwarf.c: If the system header files do not declare strnlen, provide our own version. 2012-10-03 Ian Lance Taylor * dwarf.c (read_uleb128): Fix overflow test. (read_sleb128): Likewise. (build_address_map): Don't change unit_buf.start. 2012-10-02 Uros Bizjak PR other/54761 * configure.ac (EXTRA_FLAGS): New. * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS). * configure, Makefile.in: Regenerate. 2012-09-29 Ian Lance Taylor PR other/54749 * fileline.c (fileline_initialize): Pass errnum as -1 when reporting that we could not read executable information after a previous failure. 2012-09-27 Ian Lance Taylor 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. 2012-09-27 Ian Lance Taylor PR other/54726 * elf.c (backtrace_initialize): Set *fileln_fn, not state->fileln_fn. 2012-09-19 Ian Lance Taylor * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library. * configure: Rebuild. 2012-09-19 Rainer Orth Ian Lance Taylor * configure.ac (GCC_HEADER_STDINT): Invoke. * backtrace.h: If we can't find , use "gstdint.h". * btest.c: Don't include . * dwarf.c: Likewise. * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild. 2012-09-18 Ian Lance Taylor PR bootstrap/54623 * Makefile.am (AM_CPPFLAGS): Define. (AM_CFLAGS): Remove -I options. * Makefile.in: Rebuild. 2012-09-18 Ian Lance Taylor * 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. 2012-09-18 Ian Lance Taylor * btest.c (test1, test2, test3, test4): Add the unused attribute. 2012-09-18 Ian Lance Taylor * dwarf.c: Correct test of HAVE_DECL_STRNLEN. 2012-09-18 Ian Lance Taylor * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS. * mmapio.c: Don't define _GNU_SOURCE. * configure, config.h.in: Rebuild. 2012-09-18 Ian Lance Taylor * configure.ac: Check whether strnlen is declared. * dwarf.c: Declare strnlen if not declared. * configure, config.h.in: Rebuild. 2012-09-18 Rainer Orth * fileline.c: Include . * mmap.c: Likewise. 2012-09-17 Ian Lance Taylor PR bootstrap/54611 * nounwind.c (backtrace_full): Rename from backtrace. Add state parameter. 2012-09-17 Gerald Pfeifer PR bootstrap/54611 * nounwind.c (backtrace_simple): Add state parameter. 2012-09-17 Ian Lance Taylor PR bootstrap/54609 * unknown.c (unknown_fileline): Add state parameter, remove fileline_data parameter, name error_callback parameter. (backtrace_initialize): Add state parameter. 2012-09-17 Ian Lance Taylor * Initial implementation. Copyright (C) 2012-2021 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. @ 1.1.1.1 log @Import gdb-13.2 over gdb-11.0.50 May 27th, 2023: GDB 13.2 Released! The latest version of GDB, version 13.2, is available for download. This is a minor corrective release over GDB 13.1, fixing the following issues: PR testsuite/30158 (rustc testsuite fails with 13.1, apparently worked before with trunk 20230114 on i686-linux-gnu and powerpc64le-linux-gnu) PR gdb/30214 (GDB 13.1 does not compile on FreeBSD 13.1) PR gdb/30240 ((linux/aarch) thread.c:86: internal-error: inferior_thread: Assertion `current_thread_ != nullptr' failed) PR gdb/30249 ([13 regression] hookpost-extended-remote will not work) PR exp/30271 (Addresses of static thread_local fields are badly calculated sometimes) PR symtab/30357 (Segmentation fault for the 'start' command) PR symtab/30369 ([gdb/symtab] False match issue in skip_prologue_using_linetable) PR gdb/30423 (Build failures with clang 16) PR build/30450 (Build failure (linux-low.cc:5393:45: error: expected ':' before ')' token) with musl-1.2.4) See the NEWS file for a more complete and detailed list of what this release includes. Feb 19th, 2023: GDB 13.1 Released! The latest version of GDB, version 13.1, is available for download. This version of GDB includes the following changes and enhancements: Support for the following new targets has been added in both GDB and GDBserver: GNU/Linux/LoongArch (gdbserver) loongarch*-*-linux* GNU/Linux/CSKY (gdbserver) csky*-*linux* The Windows native target now supports target async. FreeBSD: Arm and AArch64: Support for Thread Local Storage (TLS) variables Hardware watchpoint support on AArch64 FreeBSD Floating-point support has now been added on LoongArch GNU/Linux. New commands: set print nibbles [on|off] show print nibbles This controls whether the 'print/t' command will display binary values in groups of four bits, known as "nibbles". The default is 'off'. Various styling-related commands. See the gdb/NEWS file for more details. Various maintenance commands. These are normally aimed at GDB experts or developers. See the gdb/NEWS file for more details. Python API improvements: New Python API for instruction disassembly. The new attribute 'locations' of gdb.Breakpoint returns a list of gdb.BreakpointLocation objects specifying the locations where the breakpoint is inserted into the debuggee. New Python type gdb.BreakpointLocation. New function gdb.format_address(ADDRESS, PROGSPACE, ARCHITECTURE) that formats ADDRESS as 'address ' New function gdb.current_language that returns the name of the current language. Unlike gdb.parameter('language'), this will never return 'auto'. New function gdb.print_options that returns a dictionary of the prevailing print options, in the form accepted by gdb.Value.format_string. New method gdb.Frame.language that returns the name of the frame's language. gdb.Value.format_string now uses the format provided by 'print', if it is called during a 'print' or other similar operation. gdb.Value.format_string now accepts the 'summary' keyword. This can be used to request a shorter representation of a value, the way that 'set print frame-arguments scalars' does. The gdb.register_window_type method now restricts the set of acceptable window names. The first character of a window's name must start with a character in the set [a-zA-Z], every subsequent character of a window's name must be in the set [-_.a-zA-Z0-9]. ` GDB/MI changes: MI version 1 is deprecated, and will be removed in GDB 14. The async record stating the stopped reason 'breakpoint-hit' now contains an optional field locno. Miscellaneous improvements: gdb now supports zstd compressed debug sections (ELFCOMPRESS_ZSTD) for ELF. New convenience variable $_inferior_thread_count contains the number of live threads in the current inferior. New convenience variables $_hit_bpnum and $_hit_locno, set to the breakpoint number and the breakpoint location number of the breakpoint last hit. The "info breakpoints" now displays enabled breakpoint locations of disabled breakpoints as in the "y-" state. The format of 'disassemble /r' and 'record instruction-history /r' has changed to match the layout of GNU objdump when disassembling. A new format "/b" has been introduce to provide the old behavior of "/r". The TUI no longer styles the source and assembly code highlighted by the current position indicator by default. You can however re-enable styling using the new "set style tui-current-position" command. It is now possible to use the "document" command to document user-defined commands. Support for memory tag data for AArch64 MTE. Support Removal notices: DBX mode has been removed. Support for building against Python version 2 has been removed. It is now only possible to build GDB against Python 3. Support for the following commands has been removed: set debug aix-solib on|off show debug aix-solib set debug solib-frv on|off show debug solib-frv Use the "set/show debug solib" commands instead. See the NEWS file for a more complete and detailed list of what this release includes. Dec 18th, 2022: GDB 13 branch created The GDB 13 branch (gdb-13-branch) has been created. To check out a copy of the branch use: git clone --branch gdb-13-branch https://sourceware.org/git/binutils-gdb.git May 1st, 2022: GDB 12.1 Released! The latest version of GDB, version 12.1, is available for download. This version of GDB includes the following changes and enhancements: New support for the following native configuration: GNU/Linux/OpenRISC or1k*-*-linux* New support for the following targets: GNU/Linux/LoongArch loongarch*-*-linux* New GDBserver support on the following configuration: GNU/Linux/OpenRISC or1k*-*-linux* Support for the following target has been removed: S+core score-*-* Multithreaded symbol loading is now enabled by default Deprecation Notices: GDB 12 is the last release of GDB that will support building against Python 2 DBX mode is deprecated, and will be removed in GDB 13 GDB/MI changes: The '-add-inferior' with no option flags now inherits the connection of the current inferior, this restores the behaviour of GDB as it was prior to GDB 10. The '-add-inferior' command now accepts a '--no-connection' option, which causes the new inferior to start without a connection. Python API enhancements: It is now possible to add GDB/MI commands implemented in Python New function gdb.Architecture.integer_type() New gdb.events.gdb_exiting event New 'gdb.events.connection_removed' event registry New gdb.TargetConnection object New gdb.Inferior.connection property New read-only attribute gdb.InferiorThread.details New gdb.RemoteTargetConnection.send_packet method New read-only attributes gdb.Type.is_scalar and gdb.Type.is_signed The gdb.Value.format_string method now takes a 'styling' argument Various new function in the "gdb" module Miscellaneous: The FreeBSD native target now supports async mode Improved C++ template support Support for disabling source highlighting through GNU of the Pygments library instead. The "print" command has been changed so as to print floating-point values with a base-modifying formats such as "/x" to display the underlying bytes of the value in the desired base. The "clone-inferior" command now ensures that the TTY, CMD and ARGS settings are copied from the original inferior to the new one. All modifications to the environment variables done using the 'set environment' or 'unset environment' commands are also copied to the new inferior. Various new commands have been introduced See the NEWS file for a more complete and detailed list of what this release includes. Mar 20th, 2022: GDB 12 branch created The GDB 12 branch (gdb-12-branch) has been created. To check out a copy of the branch use: git clone --branch gdb-12-branch https://sourceware.org/git/binutils-gdb.git January 16th, 2022: GDB 11.2 Released! The latest version of GDB, version 11.2, is available for download. This is a minor corrective release over GDB 11.1, fixing the following issues: PR sim/28302 (gdb fails to build with glibc 2.34) PR build/28318 (std::thread support configure check does not use CXX_DIALECT) PR gdb/28405 (arm-none-eabi: internal-error: ptid_t remote_target::select_thread_for_ambiguous_stop_reply(const target_waitstatus*): Assertion `first_resumed_thread != nullptr' failed) PR tui/28483 ([gdb/tui] breakpoint creation not displayed) PR build/28555 (uclibc compile failure since commit 4655f8509fd44e6efabefa373650d9982ff37fd6) PR rust/28637 (Rust characters will be encoded using DW_ATE_UTF) PR gdb/28758 (GDB 11 doesn't work correctly on binaries with a SHT_RELR (.relr.dyn) section) PR gdb/28785 (Support SHT_RELR (.relr.dyn) section) See the NEWS file for a more complete and detailed list of what this release includes. September 13th, 2021: GDB 11.1 Released! The latest version of GDB, version 11.1, is available for download. This version of GDB includes the following changes and enhancements: Support for ARM Symbian (arm*-*-symbianelf*) has been removed. Building GDB now requires GMP (The GNU Multiple Precision Arithmetic Library). New command-line options "--early-init-command" (or "-eix") and "--early-init-eval-command" (or "-eiex") GDB/MI Changes: New --qualified option for the '-break-insert' and '-dprintf-insert' commands. New --force-condition option for the '-break-insert' and '-dprintf-insert' commands. New --force option for the '-break-condition' command. The '-file-list-exec-source-files' now accepts an optional regular expression to filter the source files included in the result. The results from '-file-list-exec-source-files' now include a 'debug-fully-read' field to indicate if the corresponding source's debugging information has been partially read (false) or has been fully read (true). TUI Improvements: Mouse actions are now supported. The mouse wheel scrolls the appropriate window. Key combinations that do not have a specific action on the focused window are now passed to GDB. Python enhancements: Inferior objects now contain a read-only 'connection_num' attribute that gives the connection number as seen in 'info connections' and 'info inferiors'. New method gdb.Frame.level() which returns the stack level of the frame object. New method gdb.PendingFrame.level() which returns the stack level of the frame object. When hitting a catchpoint, the Python API will now emit a gdb.BreakpointEvent rather than a gdb.StopEvent. The gdb.Breakpoint attached to the event will have type BP_CATCHPOINT. Python TUI windows can now receive mouse click events. If the Window object implements the click method, it is called for each mouse click event in this window. New setting "python ignore-environment on|off"; if "on", causes GDB's builtin Python to ignore any environment variable that would otherwise affect how Python behaves (needs to be set during "early initialization" (see above). New setting "python dont-write-bytecode auto|on|off". Guile API enhancements: Improved support for rvalue reference values. New procedures for obtaining value variants: value-reference-value, value-rvalue-reference-value and value-const-value. New "qMemTags" and "QMemTags" remote protocol packets (associated with Memory Tagging). GDB will now look for the .gdbinit file in a config directory before looking for ~/.gdbinit. The file is searched for in the following locations: $XDG_CONFIG_HOME/gdb/gdbinit, $HOME/.config/gdb/gdbinit, $HOME/.gdbinit. On Apple hosts the search order is instead: $HOME/Library/Preferences/gdb/gdbinit, $HOME/.gdbinit. The "break [...] if CONDITION" command no longer returns an error when the condition is invalid at one or more locations. Instead, if the condition is valid at one or more locations, the locations where the condition is not valid are disabled. The behavior of the "condition" command is changed to match the new behavior of the "break" command. Support for general memory tagging functionality (currently limited to AArch64 MTE) Core file debugging now supported for x86_64 Cygwin programs. New "org.gnu.gdb.riscv.vector" feature for RISC-V targets. GDB now supports fixed point types which are described in DWARF as base types with a fixed-point encoding. Additionally, support for the DW_AT_GNU_numerator and DW_AT_GNU_denominator has also been added. Miscellaneous: New "startup-quietly on|off" setting; when "on", behaves the same as passing the "-silent" option on the command line. New "print type hex on|off" setting; when 'on', the 'ptype' command uses hexadecimal notation to print sizes and offsets of struct members. When 'off', decimal notation is used. The "inferior" command, when run without argument, prints information about the current inferior. The "ptype" command now supports "/x" and "/d", affecting the base used to print sizes and offsets. The output of the "info source" has been restructured. New "style version foreground | background | intensity" commands to control the styling of the GDB version number. Various debug and maintenance commands (mostly useful for the GDB developers) See the NEWS file for a more complete and detailed list of what this release includes. @ text @@ 1.1.1.1.2.1 log @Sync with HEAD @ text @d1 1 a1 1 2024-03-08 Ian Lance Taylor d3 2 a4 273 * elf.c (elf_uncompress_chdr): Don't assume compressed section is aligned. 2024-03-02 Ian Lance Taylor * Makefile.am (libbacktrace_testing_ldflags): Define. (*_LDFLAGS): Add $(libbacktrace_testing_ldflags) for test programs. * Makefile.in: Regenerate 2024-03-02 Ian Lance Taylor * elf.c (elf_uncompress_lzma_block): Skip all header padding bytes and verify that they are zero. 2024-03-02 Ian Lance Taylor 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 * 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 * pecoff.c: Include if available. (coff_add): On Windows call GetModuleHandle to get base address. 2023-11-29 Ian Lance Taylor * fileline.c: Include 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 * configure: Regenerate. * configure.ac: Handle Darwin rpaths. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 Alexander von Gluck IV * configure: Regenerate. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 H.J. Lu * configure: Regenerate. 2023-08-07 H.J. Lu * configure: Regenerate. 2023-08-03 Richard Biener * zstdtest.c (test_samples): Properly compute the allocation size for the uncompressed data. 2023-07-31 Ian Lance Taylor * 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 * 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 * 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 * Makefile.in: Regenerate. 2023-01-06 Ian Lance Taylor 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 * 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 * 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 * 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 * configure: Regenerate. 2022-10-11 Olivier Hainque Olivier Hainque * configure: Regenerate. 2022-07-08 Ian Lance Taylor * 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 * 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 * 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 * configure.ac: Use grep instead of fgrep. * configure, Makefile.in: Regenerate. 2022-05-28 Ian Lance Taylor PR libbacktrace/105721 * README: Update. 2022-04-05 Ian Lance Taylor * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in uncompressed block. 2022-02-17 Ian Lance Taylor * dwarf.c (find_address_ranges): Handle skeleton units. (read_function_entry): Likewise. 2022-02-16 Ian Lance Taylor * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit. 2022-02-03 David Seifert Jakub Jelinek * configure.ac: Support --disable-werror. * configure: Regenerate. 2021-12-28 Francois-Xavier Coudert PR libbacktrace/103822 * Makefile.am: Fix newline. * Makefile.in: Regenerate. d1792 1 a1792 1 Copyright (C) 2012-2024 Free Software Foundation, Inc. @ 1.1.1.2 log @Import gdb-15.1, previous was 13.2 ChangeLog: 2024-03-20 Simon Marchi * .pre-commit-config.yaml: Bump black hook to 24.3.0 2024-03-20 Simon Marchi * .pre-commit-config.yaml: New. 2024-03-14 Simon Marchi * Makefile.def: Add configure-gdbserver and all-gdbserver dependencies on all-libiconv. * Makefile.in: Re-generate. 2024-01-15 Nick Clifton * 2.42 branch point. 2023-11-15 Arsen Arsenović * intl: Remove directory. Replaced with out-of-tree GNU gettext. * .gitignore: Add '/gettext*'. * configure.ac (host_libs): Replace intl with gettext. (hbaseargs, bbaseargs, baseargs): Split baseargs into {h,b}baseargs. (skip_barg): New flag. Skips appending current flag to bbaseargs. : Exempt --with-libintl-{type,prefix} from target and build machine argument passing. * configure: Regenerate. * Makefile.def (host_modules): Replace intl module with gettext module. (configure-ld): Depend on configure-gettext. * Makefile.in: Regenerate. * src-release.sh: Remove references to the intl/ directory. 2023-07-03 Nick Clifton 2.41 Branch Point. 2023-06-26 Nick Clifton * Import these updates to the config scripts commit 4ad4bb7c30aca1e705448ba8d51a210bbd47bb52 Author: Paul Eggert Date: Fri Jun 23 09:55:10 2023 -0700 Quote 'like this', not `like this'. commit 63acb96f92473ceb5e21d873d7c0aee266b3d6d3 Author: Paul Eggert Date: Sat Jan 21 00:15:01 2023 -0600 Fix config.sub spelling typo for "athlon" commit 4ce12a5c9125cedc0d0ba584444a6865396923ec Author: Dmitry V. Levin Date: Sun Jan 1 08:00:00 2023 +0000 Update copyright years commit c397e2c040bce50bcdccb131f90115ba7e8bfc19 Author: Arsen Arsenovi Date: Sat Sep 17 23:34:48 2022 +0200 config.sub: add linux-mlibc targets commit 9f9f9b0b13197269848c76e3e057a3ed0680b4bf Author: Arsen Arsenovi Date: Sat Sep 17 23:34:47 2022 +0200 config.guess: support running on Managarm systems commit 87e6687749da7bb2ab158a79fa83721c19ed9246 Author: Arsen Arsenovi Date: Sat Sep 17 23:34:46 2022 +0200 config.sub: add managarm-{mlibc,kernel} targets commit 20403c5701973a4cbd7e0b4bbeb627fcd424a0f1 Author: Xiaotian Wu Date: Mon Aug 1 16:05:29 2022 +0800 Remove loongarchx32 commit 02ba26b218d3d3db6c56e014655faf463cefa983 Author: Alexander von Gluck IV Date: Wed May 25 15:43:13 2022 -0500 config.guess: Update Haiku guesses commit f56a7140386d08a531bcfd444d632b28c61a6329 Author: Bruno Haible Date: Sun May 8 19:08:08 2022 +0200 config.guess (x86_64:Linux:*:*): Detect 32-bit ABI. 2023-04-20 Nick Clifton * SECURITY.txt: New file. * src-release.sh (DEVO_SUPPORT): Add SECURITY.txt. 2022-12-31 Nick Clifton * 2.40 binutils branch created. @ text @d1 1 a1 1 2024-03-08 Ian Lance Taylor d3 2 a4 273 * elf.c (elf_uncompress_chdr): Don't assume compressed section is aligned. 2024-03-02 Ian Lance Taylor * Makefile.am (libbacktrace_testing_ldflags): Define. (*_LDFLAGS): Add $(libbacktrace_testing_ldflags) for test programs. * Makefile.in: Regenerate 2024-03-02 Ian Lance Taylor * elf.c (elf_uncompress_lzma_block): Skip all header padding bytes and verify that they are zero. 2024-03-02 Ian Lance Taylor 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 * 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 * pecoff.c: Include if available. (coff_add): On Windows call GetModuleHandle to get base address. 2023-11-29 Ian Lance Taylor * fileline.c: Include 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 * configure: Regenerate. * configure.ac: Handle Darwin rpaths. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 Alexander von Gluck IV * configure: Regenerate. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 H.J. Lu * configure: Regenerate. 2023-08-07 H.J. Lu * configure: Regenerate. 2023-08-03 Richard Biener * zstdtest.c (test_samples): Properly compute the allocation size for the uncompressed data. 2023-07-31 Ian Lance Taylor * 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 * 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 * 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 * Makefile.in: Regenerate. 2023-01-06 Ian Lance Taylor 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 * 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 * 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 * 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 * configure: Regenerate. 2022-10-11 Olivier Hainque Olivier Hainque * configure: Regenerate. 2022-07-08 Ian Lance Taylor * 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 * 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 * 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 * configure.ac: Use grep instead of fgrep. * configure, Makefile.in: Regenerate. 2022-05-28 Ian Lance Taylor PR libbacktrace/105721 * README: Update. 2022-04-05 Ian Lance Taylor * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in uncompressed block. 2022-02-17 Ian Lance Taylor * dwarf.c (find_address_ranges): Handle skeleton units. (read_function_entry): Likewise. 2022-02-16 Ian Lance Taylor * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit. 2022-02-03 David Seifert Jakub Jelinek * configure.ac: Support --disable-werror. * configure: Regenerate. 2021-12-28 Francois-Xavier Coudert PR libbacktrace/103822 * Makefile.am: Fix newline. * Makefile.in: Regenerate. d1792 1 a1792 1 Copyright (C) 2012-2024 Free Software Foundation, Inc. @