1 2026-06-26 Release Manager 2 3 * GCC 14.4.0 released. 4 5 2025-05-23 Release Manager 6 7 * GCC 14.3.0 released. 8 9 2025-04-25 John David Anglin <danglin (a] gcc.gnu.org> 10 11 * fileline.c (hpux_get_executable_path): New. 12 (fileline_initialize): Add pass to get hpux executable path. 13 14 2024-08-01 Release Manager 15 16 * GCC 14.2.0 released. 17 18 2024-05-07 Release Manager 19 20 * GCC 14.1.0 released. 21 22 2024-04-23 Ian Lance Taylor <iant (a] golang.org> 23 24 * configure.ac: Test --compress-debug-sections=zlib-gnu and 25 --compress-debug-sections=zlib-gabi separately, setting new 26 automake conditionals. 27 * Makefile.am (ctestg, ctestg_alloc): Only build if 28 HAVE_COMPRESSED_DEBUG_ZLIB_GNU. 29 (ctesta, ctesta_alloc): Only build if 30 HAVE_COMPRESSED_DEBUG_ZLIB_GABI. 31 (ctestzstd_alloc): New test if HAVE_COMPRESSED_DEBUG_ZSTD. 32 * configure, Makefile.in: Regenerate. 33 34 2024-03-08 Ian Lance Taylor <iant (a] golang.org> 35 36 * elf.c (elf_uncompress_chdr): Don't assume compressed section is 37 aligned. 38 39 2024-03-02 Ian Lance Taylor <iant (a] golang.org> 40 41 * Makefile.am (libbacktrace_testing_ldflags): Define. 42 (*_LDFLAGS): Add $(libbacktrace_testing_ldflags) for test 43 programs. 44 * Makefile.in: Regenerate 45 46 2024-03-02 Ian Lance Taylor <iant (a] golang.org> 47 48 * elf.c (elf_uncompress_lzma_block): Skip all header padding bytes 49 and verify that they are zero. 50 51 2024-03-02 Ian Lance Taylor <iant (a] golang.org> 52 53 PR libbacktrace/114201 54 * elf.c (elf_add): Add caller_opd parameter. Change all callers. 55 Release opd data after all recursive calls. 56 57 2024-03-01 Ian Lance Taylor <iant (a] golang.org> 58 59 * elf.c (elf_add): Add the symbol table from a debuginfo file. 60 * Makefile.am (MAKETESTS): Add buildidfull and gnudebuglinkfull 61 variants of buildid and gnudebuglink tests. 62 (%_gnudebuglinkfull, %_buildidfull): New patterns. 63 * Makefile.in: Regenerate. 64 65 2023-11-30 Ian Lance Taylor <iant (a] golang.org> 66 67 * pecoff.c: Include <windows.h> if available. 68 (coff_add): On Windows call GetModuleHandle to get base address. 69 70 2023-11-29 Ian Lance Taylor <iant (a] golang.org> 71 72 * fileline.c: Include <windows.h> if available. 73 (windows_get_executable_path): New static function. 74 (fileline_initialize): Call windows_get_executable_path. 75 * configure.ac: Checked for windows.h 76 * configure: Regenerate. 77 * config.h.in: Regenerate. 78 79 2023-10-22 Iain Sandoe <iain (a] sandoe.co.uk> 80 81 * configure: Regenerate. 82 * configure.ac: Handle Darwin rpaths. 83 84 2023-08-07 Nick Alcock <nick.alcock (a] oracle.com> 85 86 * configure: Regenerate. 87 88 2023-08-07 Alexander von Gluck IV <kallisti5 (a] unixzen.com> 89 90 * configure: Regenerate. 91 92 2023-08-07 Nick Alcock <nick.alcock (a] oracle.com> 93 94 * configure: Regenerate. 95 96 2023-08-07 Nick Alcock <nick.alcock (a] oracle.com> 97 98 * configure: Regenerate. 99 100 2023-08-07 H.J. Lu <hjl.tools (a] gmail.com> 101 102 * configure: Regenerate. 103 104 2023-08-07 H.J. Lu <hjl.tools (a] gmail.com> 105 106 * configure: Regenerate. 107 108 2023-08-03 Richard Biener <rguenther (a] suse.de> 109 110 * zstdtest.c (test_samples): Properly compute the allocation 111 size for the uncompressed data. 112 113 2023-07-31 Ian Lance Taylor <iant (a] golang.org> 114 115 * configure.ac: Check for _pgmptr declaration. 116 * fileline.c (fileline_initialize): Check for _pgmfptr before 117 /proc/self/exec. 118 * configure, config.h.in: Regenerate. 119 120 2023-03-28 Ian Lance Taylor <iant (a] golang.org> 121 122 * elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading 123 bits, not before. Add unlikely for error case. 124 (elf_zstd_offset_table): Regenerate. 125 (elf_zstd_read_huff): Clear 13 entries in weight_mark, not 12. 126 (elf_zstd_read_literals): For a single stream adjust by 127 total_streams_size, not compressed_size. 128 129 2023-01-20 Ian Lance Taylor <iant (a] golang.org> 130 131 * dwarf.c (struct function_addrs): Change low and high fields to 132 uintptr_t. 133 (struct unit_addrs): Likewise. 134 (resolve_addr_index): Change address parameter to uintptr_t*. 135 (add_unit_addr): Change lowpc and highpc parameters to uintptr_t. 136 (add_function_range): Likewise. 137 (struct pcrange): Change lowpc and highpc fields to uintptr_t. 138 (add_low_high_range): Change add_range lowpc and highpc parameters 139 to uintptr_t. 140 (add_ranges_from_ranges): Likewise. 141 (add_ranges_from_rnglists): Likewise. 142 (add_low_high_range): Chnage lowpc and highpc variables to 143 uintpr_t. 144 (add_ranges_from_rnglists): Change some local variables to 145 uintptr_t. 146 (add_ranges_from_ranges): Change base parameter to uintptr_t. 147 (add_ranges_from_rnglists): Likewise. 148 (read_function_entry): Likewise. 149 (resolve_addr_index): Add explicit casts to uintptr_t. 150 (update_pcrange): Likewise. 151 (add_ranges_from_ranges): Likewise. 152 (add_ranges_from_rnglists): Likewise. 153 (read_function_entry): Likewise. 154 155 2023-01-17 Martin Liska <mliska (a] suse.cz> 156 157 * Makefile.in: Regenerate. 158 159 2023-01-06 Ian Lance Taylor <iant (a] golang.org> 160 161 PR libbacktrace/108297 162 * configure.ac: Test whether linker supports --build-id. 163 * Makefile.am: Only run --build-id tests if supported. 164 * configure, Makefile.in: Regenerate. 165 166 2022-12-17 Ian Lance Taylor <iant (a] golang.org> 167 168 * elf.c (elf_fetch_backward_init): New static function. 169 (ZSTD_TABLE_SIZE): Use huffman scratch space size rather than 170 literal size. 171 (ZSTD_TABLE_WORK_LIT_SIZE): Don't define. 172 (elf_zstd_read_huff): Use elf_fetch_backward_init. 173 (elf_zstd_read_literals): New static function. 174 (ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define. 175 (struct elf_zstd_literals): Don't define. 176 (elf_zstd_literal_output): Remove static function. 177 (elf_zstd_decompress): Use elf_fetch_backward_init and 178 elf_zstd_read_literals. Rewrite literal copying.< 179 180 2022-12-10 Ian Lance Taylor <iant (a] golang.org> 181 182 * elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry. 183 (ZSTD_ENCODE_BASELINE_BITS): Define. 184 (ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define. 185 (elf_zstd_literal_length_base): New static const array. 186 (elf_zstd_match_length_base): Likewise. 187 (struct elf_zstd_fse_baseline_entry): Define. 188 (elf_zstd_make_literal_baseline_fse): New static function. 189 (elf_zstd_make_offset_baseline_fse): Likewise. 190 (elf_zstd_make_match_baseline_fse): Likewise. 191 (print_table, main): Use elf_zstd_fse_baseline_entry. 192 (elf_zstd_lit_table, elf_zstd_match_table): Likewise. 193 (elf_zstd_offset_table): Likewise. 194 (struct elf_zstd_seq_decode): Likewise. Remove use_rle and rle 195 fields. 196 (elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry, 197 taking a conversion function. Convert RLE to FSE. 198 (elf_zstd_literal_length_baseline): Remove. 199 (elf_zstd_literal_length_bits): Remove. 200 (elf_zstd_match_length_baseline): Remove. 201 (elf_zstd_match_length_bits): Remove. 202 (elf_zstd_decompress): Use elf_zstd_fse_baseline_entry. Rewrite 203 and simplify main loop. 204 205 2022-12-08 Ian Lance Taylor <iant (a] golang.org> 206 207 * configure.ac: Check for zstd library and 208 --compress-debug-sections=zstd linker option. 209 * Makefile.am (zstdtest_*): New targets. 210 (zstdtest_alloc_*, ctestzstd_*): New targets. 211 (BUILDTESTS): Add zstdtest, zstdtest_alloc, ctestzstd as 212 appropriate. 213 * elf.c (ELFCOMPRESS_ZSTD): Define. 214 (elf_fetch_bits): Rename from elf_zlib_fetch. Update uses. 215 (elf_fetch_bits_backward): New static function. 216 (ZLIB_HUFFMAN_*): Rename from HUFFMAN_*. Update uses. 217 (ZLIB_TABLE_*): Rename from ZDEBUG_TABLE_*. Update uses. 218 (ZSTD_TABLE_*): Define. 219 (struct elf_zstd_fse_entry): Define. 220 (elf_zstd_read_fse): New static function. 221 (elf_zstd_build_fse): Likewise. 222 (lit): Define if BACKTRACE_GENERATE_ZSTD_FSE_TABLES. 223 (match, offset, next, print_table, main): Likewise. 224 (elf_zstd_lit_table): New static const array. 225 (elf_zstd_match_table, elf_zstd_offset_table): Likewise. 226 (elf_zstd_read_huff): New static function. 227 (struct elf_zstd_seq_decode): Define. 228 (elf_zstd_unpack_seq_decode): New static function. 229 (ZSTD_LIT_*): Define. 230 (struct elf_zstd_literals): Define. 231 (elf_zstd_literal_output): New static function. 232 (ZSTD_LITERAL_LENGTH_BASELINE_OFFSET): Define. 233 (elf_zstd_literal_length_baseline): New static const array. 234 (elf_zstd_literal_length_bits): Likewise. 235 (ZSTD_MATCH_LENGTH_BASELINE_OFFSET): Define. 236 (elf_zstd_match_length_baseline): New static const array. 237 (elf_zstd_match_length_bits): Likewise. 238 (elf_zstd_decompress): New static function. 239 (ZDEBUG_TABLE_SIZE): New definition. 240 (elf_uncompress_chdr): Support ELF_COMPRESS_ZSTD. 241 (backtrace_uncompress_zstd): New function. 242 (elf_add): Use ZLIB_TABLE_SIZE for zlib-gnu sections. 243 * internal.h (backtrace_uncompress_zstd): Declare. 244 * zstdtest.c: New file. 245 * configure, config.h.in, Makefile.in: Regenerate. 246 247 2022-10-12 Martin Liska <mliska (a] suse.cz> 248 249 * configure: Regenerate. 250 251 2022-10-11 Olivier Hainque <hainque (a] adacore.com> 252 Olivier Hainque <hainque (a] adacore.com> 253 254 * configure: Regenerate. 255 256 2022-07-08 Ian Lance Taylor <iant (a] golang.org> 257 258 * configure.ac: Check for sys/link.h. Use either link.h or 259 sys/link.h when checking for dl_iterate_phdr. 260 * elf.c: Include sys/link.h if available. 261 * configure, config.h.in: Regenerate. 262 263 2022-07-07 Ian Lance Taylor <iant (a] golang.org> 264 265 * macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit 266 loop if we can't find debug info for one shared library. 267 268 2022-07-07 Ian Lance Taylor <iant (a] golang.org> 269 270 * Makefile.am (MAKETESTS): New variable split out of TESTS. 271 (CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS. 272 * Makefile.in: Regenerate. 273 274 2022-06-27 Ian Lance Taylor <iant (a] golang.org> 275 276 * configure.ac: Use grep instead of fgrep. 277 * configure, Makefile.in: Regenerate. 278 279 2022-05-28 Ian Lance Taylor <iant (a] golang.org> 280 281 PR libbacktrace/105721 282 * README: Update. 283 284 2022-04-05 Ian Lance Taylor <iant (a] golang.org> 285 286 * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in 287 uncompressed block. 288 289 2022-02-17 Ian Lance Taylor <iant (a] golang.org> 290 291 * dwarf.c (find_address_ranges): Handle skeleton units. 292 (read_function_entry): Likewise. 293 294 2022-02-16 Ian Lance Taylor <iant (a] golang.org> 295 296 * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit. 297 298 2022-02-03 David Seifert <soap (a] gentoo.org> 299 Jakub Jelinek <jakub (a] redhat.com> 300 301 * configure.ac: Support --disable-werror. 302 * configure: Regenerate. 303 304 2021-12-28 Francois-Xavier Coudert <fxcoudert (a] gmail.com> 305 306 PR libbacktrace/103822 307 * Makefile.am: Fix newline. 308 * Makefile.in: Regenerate. 309 310 2021-11-12 Martin Liska <mliska (a] suse.cz> 311 312 PR libbacktrace/103167 313 * elf.c (elf_uncompress_lzma_block): Cast to unsigned int. 314 (elf_uncompress_lzma): Likewise. 315 * xztest.c (test_samples): memcpy only if v > 0. 316 317 2021-10-22 Martin Liska <mliska (a] suse.cz> 318 319 PR testsuite/102742 320 * btest.c (MIN_DESCRIPTOR): New. 321 (MAX_DESCRIPTOR): Likewise. 322 (check_available_files): Likewise. 323 (check_open_files): Check only file descriptors that 324 were not available at the entry. 325 (main): Call check_available_files. 326 327 2021-08-13 Sergei Trofimovich <siarheit (a] google.com> 328 329 * install-debuginfo-for-buildid.sh.in: Force non-localized readelf 330 output with LANG=C. 331 332 2021-06-28 Clment Chigot <clement.chigot (a] atos.net> 333 334 * xcoff.c (SSUBTYP_DWRNGES): New define. 335 (xcoff_add): Use correct XCOFF DWARF section subtype 336 for DEBUG_RANGES. Remove lineoff workaround. 337 Adjust base_address. 338 (xcoff_initialize_syminfo): Adapt to new base_address. 339 (xcoff_lookup_pc): Likewise. 340 (xcoff_initialize_fileline): Likewise. 341 342 2021-05-03 H.J. Lu <hjl.tools (a] gmail.com> 343 344 PR bootstrap/99703 345 * configure: Regenerated. 346 347 2021-03-03 Ian Lance Taylor <iant (a] golang.org> 348 349 * dwarf.c (read_line_program): Don't special case file 0. 350 (read_function_entry): Likewise. 351 352 2021-03-02 Ian Lance Taylor <iant (a] golang.org> 353 354 PR libbacktrace/98818 355 * dwarf.c (dwarf_buf_error): Add errnum parameter. Change all 356 callers. 357 * backtrace.h: Update backtrace_error_callback comment. 358 359 2021-02-12 Ian Lance Taylor <iant (a] golang.org> 360 361 * configure.ac: Check for objcopy --add-gnu-debuglink by using 362 objcopy --help. 363 * configure: Regenerate 364 365 2021-01-18 Ian Lance Taylor <iant (a] golang.org> 366 367 * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info. 368 * Makefile.in: Regenerate. 369 * configure: Regenerate. 370 371 2021-01-18 Ian Lance Taylor <iant (a] golang.org> 372 373 PR debug/98716 374 * dwarf.c (read_v2_paths): Allocate zero entry for dirs and 375 filenames. 376 (read_line_program): Remove parameter u, change caller. Don't 377 subtract one from dirs and filenames index. 378 (read_function_entry): Don't subtract one from filenames index. 379 380 2021-01-05 Samuel Thibault <samuel.thibault (a] ens-lyon.org> 381 382 * configure: Re-generate. 383 384 2020-12-05 Iain Sandoe <iain (a] sandoe.co.uk> 385 386 PR target/97865 387 * configure: Regenerate. 388 389 2020-12-02 Ian Lance Taylor <iant (a] golang.org> 390 391 * dwarf.c (resolve_string): Use > rather than >= to check whether 392 string index extends past buffer. 393 (resolve_addr_index): Similarly for address index. 394 395 2020-11-29 John David Anglin <danglin (a] gcc.gnu.org> 396 397 * configure: Regenerate. 398 399 2020-10-20 Ian Lance Taylor <iant (a] golang.org> 400 401 * internal.h (ATTRIBUTE_FALLTHROUGH): Define. 402 * elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH. 403 404 2020-09-28 Ian Lance Taylor <iant (a] golang.org> 405 406 PR libbacktrace/97082 407 * Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL. 408 * Makefile.in: Regenerate. 409 410 2020-09-28 Ian Lance Taylor <iant (a] golang.org> 411 412 PR libbacktrace/97227 413 * configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL. 414 * Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL. 415 * configure: Regenerate. 416 * Makefile.in: Regenerate. 417 418 2020-09-23 Ian Lance Taylor <iant (a] golang.org> 419 420 * dwarf.c (report_inlined_functions): Handle PC == -1 and PC == 421 p->low. 422 (dwarf_lookup_pc): Likewise. 423 424 2020-09-17 Ian Lance Taylor <iant (a] golang.org> 425 426 PR libbacktrace/97080 427 * fileline.c (backtrace_syminfo_to_full_callback): New function. 428 (backtrace_syminfo_to_full_error_callback): New function. 429 * elf.c (elf_nodebug): Call syminfo_fn if possible. 430 * internal.h (struct backtrace_call_full): Define. 431 (backtrace_syminfo_to_full_callback): Declare. 432 (backtrace_syminfo_to_full_error_callback): Declare. 433 * mtest.c (f3): Only check all[i] if data.index permits. 434 435 2020-09-16 Iain Sandoe <iain (a] sandoe.co.uk> 436 437 * macho.c (MACH_O_CPU_TYPE_PPC): New. 438 (MACH_O_CPU_TYPE_PPC64): New. 439 Add compile-tests for powerpc to the Mach-O variants. 440 441 2020-09-14 Ian Lance Taylor <iant (a] golang.org> 442 443 PR libbacktrace/93608 444 Add support for MiniDebugInfo. 445 * elf.c (struct elf_view): Define. Replace most uses of 446 backtrace_view with elf_view. 447 (elf_get_view): New static functions. Replace most calls of 448 backtrace_get_view with elf_get_view. 449 (elf_release_view): New static functions. Replace most calls of 450 backtrace_release_view with elf_release_view. 451 (elf_uncompress_failed): Rename from elf_zlib_failed. Change all 452 callers. 453 (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define. 454 (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define. 455 (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define. 456 (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define. 457 (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define. 458 (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define. 459 (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define. 460 (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define. 461 (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define. 462 (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define. 463 (LZMA_PROB_DIST_ALIGN_LEN): Define. 464 (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define. 465 (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define. 466 (LZMA_PROB_MATCH_LEN_LOW_LEN): Define. 467 (LZMA_PROB_MATCH_LEN_MID_LEN): Define. 468 (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define. 469 (LZMA_PROB_REP_LEN_CHOICE_LEN): Define. 470 (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define. 471 (LZMA_PROB_REP_LEN_LOW_LEN): Define. 472 (LZMA_PROB_REP_LEN_MID_LEN): Define. 473 (LZMA_PROB_REP_LEN_HIGH_LEN): Define. 474 (LZMA_PROB_LITERAL_LEN): Define. 475 (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define. 476 (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define. 477 (LZMA_PROB_IS_REP2_OFFSET): Define. 478 (LZMA_PROB_IS_REP0_LONG_OFFSET): Define. 479 (LZMA_PROB_DIST_SLOT_OFFSET): Define. 480 (LZMA_PROB_DIST_SPECIAL_OFFSET): Define. 481 (LZMA_PROB_DIST_ALIGN_OFFSET): Define. 482 (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define. 483 (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define. 484 (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define. 485 (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define. 486 (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define. 487 (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define. 488 (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define. 489 (LZMA_PROB_REP_LEN_LOW_OFFSET): Define. 490 (LZMA_PROB_REP_LEN_MID_OFFSET): Define. 491 (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define. 492 (LZMA_PROB_LITERAL_OFFSET): Define. 493 (LZMA_PROB_TOTAL_COUNT): Define. 494 (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define. 495 (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define. 496 (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define. 497 (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define. 498 (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define. 499 (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define. 500 (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define. 501 (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define. 502 (elf_lzma_varint): New static function. 503 (elf_lzma_range_normalize): New static function. 504 (elf_lzma_bit, elf_lzma_integer): New static functions. 505 (elf_lzma_reverse_integer): New static function. 506 (elf_lzma_len, elf_uncompress_lzma_block): New static functions. 507 (elf_uncompress_lzma): New static function. 508 (backtrace_uncompress_lzma): New function. 509 (elf_add): Add memory and memory_size parameters. Change all 510 callers. Look for .gnu_debugdata section, and, if found, 511 decompress it and use it for symbols and debug info. Permit the 512 descriptor parameter to be -1. 513 * internal.h (backtrace_uncompress_lzma): Declare. 514 * mtest.c: New file. 515 * xztest.c: New file. 516 * configure.ac: Check for nm, xz, and comm programs. Check for 517 liblzma library. 518 (HAVE_MINIDEBUG): Define. 519 * Makefile.am (mtest_SOURCES): Define. 520 (mtest_CFLAGS, mtest_LDADD): Define. 521 (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG. 522 (%_minidebug): New pattern rule, if HAVE_MINIDEBUG. 523 (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define. 524 (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define 525 (xztest_alloc_LDADD): Define. 526 (BUILDTESTS): Add mtest, xztest, xztest_alloc. 527 (CLEANFILES): Add files created by minidebug pattern. 528 (btest.lo): Correct INCDIR reference. 529 (mtest.lo, xztest.lo, ztest.lo): New targets. 530 * configure: Regenerate. 531 * config.h.in: Regenerate. 532 * Makefile.in: Regenerate. 533 534 2020-09-09 Ian Lance Taylor <iant (a] golang.org> 535 536 * pecoff.c (coff_initialize_syminfo): Add is_64 parameter. 537 (coff_add): Determine and pass is_64. 538 539 2020-09-09 Ian Lance Taylor <iant (a] golang.org> 540 541 PR libbacktrace/96973 542 * fileline.c (macho_get_executable_path): New static function. 543 (fileline_initialize): Call macho_get_executable_path. 544 545 2020-09-09 Ian Lance Taylor <iant (a] golang.org> 546 547 * dwarf.c (function_addrs_search): Compare against the next entry 548 low address, not the high address. 549 (unit_addrs_search): Likewise. 550 (build_address_map): Add a trailing unit_addrs. 551 (read_function_entry): Add a trailing function_addrs. 552 (read_function_info): Likewise. 553 (report_inlined_functions): Search backward for function_addrs 554 match. 555 (dwarf_lookup_pc): Search backward for unit_addrs and 556 function_addrs matches. 557 558 2020-09-08 Ian Lance Taylor <iant (a] golang.org> 559 560 * simple.c (simple_unwind): Correct comment spelling. 561 562 2020-09-08 Ian Lance Taylor <iant (a] golang.org> 563 564 * macho.c (macho_add_dsym): Make space for '/' in dsym. Use 565 correct length when freeing diralc. 566 567 2020-09-08 Ian Lance Taylor <iant (a] golang.org> 568 569 PR libbacktrace/96973 570 * macho.c (macho_add_fat): Correctly swap 32-bit file offset. 571 572 2020-09-08 Ian Lance Taylor <iant (a] golang.org> 573 574 PR libbacktrace/96971 575 * filetype.awk: Only match magic number at start of line. 576 577 2020-08-24 Ian Lance Taylor <iant (a] golang.org> 578 579 * macho.c (MACH_O_MH_MAGIC_FAT_64): Define. 580 (MACH_O_MH_CIGAM_FAT_64): Define. 581 (struct macho_fat_arch_64): Define. 582 (macho_add_fat): Add and use is_64 parameter. 583 (macho_add): Recognize 64-bit fat files. 584 585 2020-07-30 H.J. Lu <hjl.tools (a] gmail.com> 586 587 PR bootstrap/96202 588 * configure: Regenerated. 589 590 2020-07-08 Ian Lance Taylor <iant (a] golang.org> 591 592 * configure.ac: Test linker support for DWARF5 593 * configure: Regenerate 594 595 2020-05-29 H.J. Lu <hjl.tools (a] gmail.com> 596 597 PR bootstrap/95413 598 * configure: Regenerated. 599 600 2020-05-15 H.J. Lu <hongjiu.lu (a] intel.com> 601 602 PR bootstrap/95147 603 * configure: Regenerated. 604 605 2020-05-14 H.J. Lu <hongjiu.lu (a] intel.com> 606 607 * configure: Regenerated. 608 609 2020-05-13 Ian Lance Taylor <iant (a] golang.org> 610 611 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED. 612 613 2020-05-13 Ian Lance Taylor <iant (a] golang.org> 614 615 PR go/95061 616 * posix.c (backtrace_open): Treat EACCESS like ENOENT. 617 618 2020-05-12 H.J. Lu <hongjiu.lu (a] intel.com> 619 620 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS). 621 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and 622 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't 623 enabled. 624 * Makefile.in: Regenerated. 625 * configure: Likewise. 626 627 2020-05-11 Ian Lance Taylor <iant (a] golang.org> 628 629 PR libbacktrace/95012 630 * configure.ac: Check for getpagesize declaration. 631 * mmap.c: Declare getpagesize if necessary. 632 * mmapio.c: Likewise. 633 * configure: Regenerate. 634 * config.h.in: Regenerate. 635 * Makefile.in: Regenerate. 636 637 2020-05-09 Roland McGrath <mcgrathr (a] google.com> 638 639 * elf.c (elf_add): Bail early if there are no section headers at all. 640 641 2020-05-09 Ian Lance Taylor <iant (a] golang.org> 642 643 * elf.c (elf_add): Don't free strtab if an error occurs after 644 recording symbol information. 645 646 2020-05-09 Ian Lance Taylor <iant (a] golang.org> 647 648 PR libbacktrace/88745 649 * macho.c: New file. 650 * filetype.awk: Recognize Mach-O files. 651 * Makefile.am (FORMAT_FILES): Add macho.c. 652 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL. 653 (%.dSYM): New pattern target. 654 (test_macho_SOURCES, test_macho_CFLAGS): New targets. 655 (test_macho_LDADD): New target. 656 (BUILDTESTS): Add test_macho. 657 (macho.lo): Add dependencies. 658 * configure.ac: Recognize macho file type. Check for 659 mach-o/dyld.h. Don't try to run objcopy if we don't find it. 660 Look for dsymutil and define a HAVE_DSYMUTIL conditional. 661 * Makefile.in: Regenerate. 662 * configure: Regenerate. 663 * config.h.in: Regenerate. 664 665 2020-05-09 Ian Lance Taylor <iant (a] golang.org> 666 667 * read.c (backtrace_get_view): Support short read. 668 669 2020-05-09 Ian Lance Taylor <iant (a] golang.org> 670 671 * elf.c (elf_add): If debug sections are very large or far apart, 672 read them individually rather than as a single view. 673 674 2020-05-08 Ian Lance Taylor <iant (a] golang.org> 675 676 * fileline.c (sysctl_exec_name): New static function. 677 (sysctl_exec_name1): New macro or static function. 678 (sysctl_exec_name2): Likewise. 679 (fileline_initialize): Try sysctl_exec_name[12]. 680 * configure.ac: Check for sysctl args to fetch executable name. 681 * configure: Regenerate. 682 * config.h.in: Regenerate. 683 684 2020-02-15 Ian Lance Taylor <iant (a] golang.org> 685 686 * ztest.c (test_large): Update file to current libgo test file. 687 688 2020-02-03 Ian Lance Taylor <iant (a] golang.org> 689 690 * Makefile.am (libbacktrace_TEST_CFLAGS): Define. 691 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS). 692 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise. 693 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise. 694 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise. 695 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise. 696 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise. 697 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise. 698 (stest_alloc_CFLAGS): Likewise. 699 * Makefile.in: Regenerate. 700 * ztest.c (error_callback_compress): Mark vdata unused. 701 (test_large): Add casts to avoid warnings. 702 703 2020-01-01 Jakub Jelinek <jakub (a] redhat.com> 704 705 Update copyright years. 706 707 2019-12-13 Ian Lance Taylor <iant (a] golang.org> 708 709 Add DWARF 5 support. 710 * dwarf.c (struct attr): Add val field. 711 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX, 712 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX. 713 (struct line_header): Add addrsize field. 714 (struct line_header_format): Define. 715 (struct unit): Add str_offsets_base, addr_base, and rnglists_base 716 fields. 717 (read_uint24): New static function. 718 (read_attribute): Add implicit_val parameter. Replace dwarf_str 719 and dwarf_str_size parameters with dwarf_sections parameter. Add 720 support for new DWARF 5 forms. Change all callers. 721 (resolve_string): New static function. 722 (resolve_addr_index): Likewise. 723 (read_abbrevs): Support DW_FORM_implicit_const. 724 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index, 725 and ranges_is_index fields. 726 (update_pcrange): Support DWARF 5 encodings. 727 (add_high_low_range): New static function, split out of 728 add_ranges. 729 (add_ranges_from_ranges): Likewise. 730 (add_ranges_from_rnglists): New static function. 731 (add_ranges): Just call new helper functions. 732 (find_address_ranges): Use resolve_string for strings, after 733 reading all attributes. Handle new DWARF 5 attributes. 734 (build_address_map): Support DWARF 5 compilation units. 735 (read_v2_paths): New static function, split out of 736 read_line_header. 737 (read_lnct): New static function. 738 (read_line_header_format_entries): Likewise. 739 (read_line_header): Add ddata parameter. Support DWARF 5 line 740 headers. Call new helper functions. Change all callers. 741 (read_line_program): Use addrsize from line program header. Don't 742 special case directory index 0 for DWARF 5. 743 (read_referenced_name): Use resolve_string. 744 (read_function_entry): Handle DWARF 5 encodings. Use 745 resolve_string. 746 * internal.h (enum dwarf_section): Add DEBUG_ADDR, 747 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS. 748 * elf.c (dwarf_section_names): Add new section names. 749 * pecoff.c (dwarf_section_names): Likewise. 750 * xcoff.c (xcoff_add): Clear dwarf_sections before setting 751 fields. 752 * configure.ac: Define HAVE_DWARF5 automake conditional. 753 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5. 754 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise. 755 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise. 756 (dwarf5_alloc_LDADD): Likewise. 757 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5. 758 (CLEANFILES, clean-local): Define. 759 760 2019-12-08 Ian Lance Taylor <iant (a] golang.org> 761 762 * dwarf.c (struct pcrange): Define. 763 (update_pcrange, add_ranges): New static functions. 764 (add_unit_addr): Change signature to work with add_ranges. Don't 765 add base_address here. 766 (add_unit_ranges): Remove. 767 (find_address_ranges): Replace str/ranges parameters with 768 dwarf_sections. Use update_pcrange and add_ranges. Change all 769 callers. 770 (add_function_range): Change signature to work with add_ranges. 771 Don't add base_address here. 772 (add_function_ranges): Remove. 773 (read_function_entry): Use update_pcrange and add_ranges. 774 775 2019-12-04 Ian Lance Taylor <iant (a] golang.org> 776 777 * edtest.c (test1): Add noclone attribute. 778 779 2019-12-04 Ian Lance Taylor <iant (a] golang.org> 780 781 * internal.h (enum dwarf_section): Define. 782 (struct dwarf_sections): Define. 783 (backtrace_dwarf_add): Update declaration to replace specific 784 section parameters with dwarf_sections parameter. 785 * dwarf.c (struct dwarf_data): Replace specific section fields 786 with dwarf_sections field. 787 (read_attribute): Use dwarf_sections with altlink. 788 (build_address_map): Replace specific section parameters with 789 dwarf_sections parameter. Change all callers. 790 (read_line_info): Use dwarf_sections with ddata. 791 (read_referenced_name): Likewise. 792 (add_function_ranges): Likewise. 793 (read_function_entry): Likewise. 794 (read_function_info): Likewise. 795 (build_dwarf_data): Replace specific section parameters with 796 dwarf_sections parameter. Change all callers. 797 (backtrace_dwarf_add): Likewise. 798 * elf.c (enum debug_section): Remove. 799 (dwarf_section_names): Remove .zdebug names. 800 (elf_add): Track zsections separately. Build dwarf_sections. 801 * pecoff.c (enum debug_section): Remove. 802 (struct debug_section_info): Remove data field. 803 (coff_add): Build dwarf_sections. 804 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx 805 references with DEBUG_xxx references. 806 (xcoff_add): Build dwarf_sections. 807 808 2019-09-27 Maciej W. Rozycki <macro (a] wdc.com> 809 810 * configure: Regenerate. 811 812 2019-09-26 Ian Lance Taylor <iant (a] golang.org> 813 814 PR libbacktrace/91908 815 * pecoff.c (backtrace_initialize): Explicitly cast unchecked 816 __sync_bool_compare_and_swap to void. 817 * xcoff.c (backtrace_initialize): Likewise. 818 819 2019-09-03 Ulrich Weigand <uweigand (a] de.ibm.com> 820 821 * configure.ac: Remove references to spu. 822 * configure: Regenerate. 823 824 2019-05-24 Clement Chigot <clement.chigot (a] atos.net> 825 826 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and 827 test_elf_64. 828 * Makefile.in: Regenerate. 829 830 2019-05-14 Rainer Orth <ro (a] CeBiTec.Uni-Bielefeld.DE> 831 832 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10* 833 handling. 834 * configure: Regenerate. 835 836 2019-03-11 Ian Lance Taylor <iant (a] golang.org> 837 838 PR libbacktrace/89669 839 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if 840 HAVE_ELF. 841 * Makefile.in: Regenerate. 842 843 2019-02-26 Tom de Vries <tdevries (a] suse.de> 844 845 * btest.c (test5): Allow global.* as minimal symbol name for global. 846 847 2019-02-26 Tom de Vries <tdevries (a] suse.de> 848 849 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ. 850 * Makefile.in: Regenerate. 851 852 2019-02-12 Tom de Vries <tdevries (a] suse.de> 853 854 PR libbacktrace/81983 855 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0. 856 857 2019-02-10 Tom de Vries <tdevries (a] suse.de> 858 859 * Makefile.am (BUILDTESTS): Add btest_lto. 860 * Makefile.in: Regenerate. 861 * btest.c (test1, f2, f3, test3, f22, f23): Declare with 862 __attribute__((noclone)). 863 864 2019-02-08 Tom de Vries <tdevries (a] suse.de> 865 866 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)). 867 * print.c (backtrace_print): Same. 868 * simple.c (backtrace_simple): Same. 869 870 2019-02-08 Tom de Vries <tdevries (a] suse.de> 871 872 PR libbacktrace/78063 873 * dwarf.c (build_address_map): Keep all parsed units. 874 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr. 875 876 2019-01-31 Tom de Vries <tdevries (a] suse.de> 877 878 PR libbacktrace/89136 879 * elf.c (elf_add): Read build-id if with_buildid_data. Fix 880 'debugaltlink_name_len =+ 1'. 881 882 2019-01-29 Tom de Vries <tdevries (a] suse.de> 883 884 * install-debuginfo-for-buildid.sh.in: New script. 885 * Makefile.am (check_PROGRAMS): Add b2test and b3test. 886 (TESTS): Add b2test_buildid and b3test_dwz_buildid. 887 * Makefile.in: Regenerate. 888 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL. 889 (READELF): Set with AC_CHECK_PROG. 890 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES. 891 * configure: Regenerate. 892 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ... 893 (elf_open_debugfile_by_buildid): ... here. 894 895 2019-01-29 Tom de Vries <tdevries (a] suse.de> 896 897 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for 898 allocfail. 899 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS. 900 (check_PROGRAMS): Add BUILDTESTS. 901 * Makefile.in: Regenerate. 902 903 2019-01-28 Tom de Vries <tdevries (a] suse.de> 904 905 * Makefile.am (xcoff_%.c): Generate sed result into temporary file. 906 Use $< to access prerequisite. 907 * Makefile.in: Regenerate. 908 909 2019-01-25 Nathan Sidwell <nathan (a] acm.org> 910 911 * elf.c (elf_add): Pass "" filename to recursive call with 912 separated debug. 913 914 2019-01-25 Tom de Vries <tdevries (a] suse.de> 915 916 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with 917 filename == "". 918 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink. 919 * Makefile.in: Regenerate. 920 921 2019-01-25 Tom de Vries <tdevries (a] suse.de> 922 923 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule. 924 (TESTS): Rename dtest to btest_gnudebuglink. 925 * Makefile.in: Regenerate. 926 927 2019-01-23 Tom de Vries <tdevries (a] suse.de> 928 929 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields. 930 (units_search, find_unit): Use size_t for offset. 931 (build_address_map): Use size_t for unit_offset. 932 933 2019-01-20 Gerald Pfeifer <gerald (a] pfeifer.com> 934 935 * allocfail.c (main): Increase portability of printf statement. 936 937 2019-01-18 Ian Lance Taylor <iant (a] golang.org> 938 939 PR libbacktrace/88890 940 * mmapio.c (backtrace_get_view): Change size parameter to 941 uint64_t. Check that value fits in size_t. 942 * read.c (backtrace_get_view): Likewise. 943 * internal.h (backtrace_get_view): Update declaration. 944 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view. 945 946 2019-01-17 Tom de Vries <tdevries (a] suse.de> 947 948 PR libbacktrace/82857 949 * configure.ac (DWZ): Set with AC_CHECK_PROG. 950 (HAVE_DWZ): Set with AM_CONDITIONAL. 951 * configure: Regenerate. 952 * Makefile.am (TESTS): Add btest_dwz. 953 * Makefile.in: Regenerate. 954 955 2019-01-17 Tom de Vries <tdevries (a] suse.de> 956 957 PR libbacktrace/82857 958 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO. 959 (read_attribute): Handle DW_FORM_GNU_ref_alt using 960 ATTR_VAL_REF_ALT_INFO. 961 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt. 962 963 2019-01-17 Tom de Vries <tdevries (a] suse.de> 964 965 * dwarf.c (struct unit): Add low_offset and high_offset fields. 966 (struct unit_vector): New type. 967 (struct dwarf_data): Add units and units_counts fields. 968 (find_unit): New function. 969 (find_address_ranges): Add and handle unit_tag parameter. 970 (build_address_map): Add and handle units_vec parameter. 971 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting 972 units vector. 973 974 2019-01-17 Tom de Vries <tdevries (a] suse.de> 975 976 PR libbacktrace/82857 977 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt 978 using altlink. 979 980 2019-01-17 Tom de Vries <tdevries (a] suse.de> 981 982 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE. 983 (read_attribute): Add altlink parameter. Handle missing altlink for 984 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt. 985 (find_address_ranges, build_address_map, build_dwarf_data): Add and 986 handle altlink parameter. 987 (read_referenced_name, read_function_entry): Add argument to 988 read_attribute call. 989 990 2019-01-17 Tom de Vries <tdevries (a] suse.de> 991 992 * dwarf.c (struct dwarf_data): Add altlink field. 993 (backtrace_dwarf_add): Add and handle fileline_altlink parameter. 994 * elf.c (elf_add): Add argument to backtrace_dwarf_add call. 995 (phdr_callback, backtrace_initialize): Add argument to elf_add calls. 996 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter. 997 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call. 998 * xcoff.c (xcoff_add): Same. 999 1000 2019-01-17 Tom de Vries <tdevries (a] suse.de> 1001 1002 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter. 1003 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter. 1004 * elf.c (elf_add): Add and handle fileline_entry parameter. Add 1005 argument to backtrace_dwarf_add call. 1006 (phdr_callback, backtrace_initialize): Add argument to elf_add calls. 1007 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call. 1008 * xcoff.c (xcoff_add): Same. 1009 1010 2019-01-17 Tom de Vries <tdevries (a] suse.de> 1011 1012 * elf.c (elf_add): Add and handle with_buildid_data and 1013 with_buildid_size parameters. Handle .gnu_debugaltlink section. 1014 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls. 1015 1016 2019-01-16 Tom de Vries <tdevries (a] suse.de> 1017 1018 * dwarf.c (read_referenced_name_from_attr): New function. Factor out 1019 of ... 1020 (read_referenced_name): ... here, and ... 1021 (read_function_entry): ... here. 1022 1023 2019-01-16 Tom de Vries <tdevries (a] suse.de> 1024 1025 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any 1026 name. 1027 (read_function_entry): Same. Don't allow name found via 1028 DW_AT_abstract_origin or case DW_AT_specification to override linkage 1029 name. 1030 1031 2019-01-09 Sandra Loosemore <sandra (a] codesourcery.com> 1032 1033 PR other/16615 1034 1035 * backtrace.h: Mechanically replace "can not" with "cannot". 1036 1037 2019-01-01 Jakub Jelinek <jakub (a] redhat.com> 1038 1039 Update copyright years. 1040 1041 2018-12-29 Gerald Pfeifer <gerald (a] pfeifer.com> 1042 1043 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n 1044 in sed pattern. 1045 * Makefile.in: Regenerate. 1046 1047 2018-12-28 Tom de Vries <tdevries (a] suse.de> 1048 1049 * dwarf.c (build_address_map): Reuse unused units. 1050 1051 2018-12-28 Tom de Vries <tdevries (a] suse.de> 1052 1053 * dwarf.c (build_address_map): Simplify by removing local variable 1054 abbrevs. 1055 1056 2018-12-28 Ian Lance Taylor <iant (a] golang.org> 1057 Tom de Vries <tdevries (a] suse.de> 1058 1059 PR libbacktrace/88063 1060 * dwarf.c (free_unit_addrs_vector): Remove. 1061 (build_address_map): Keep track of allocated units in vector. Free 1062 allocated units and corresponding abbrevs upon failure. Remove now 1063 redundant call to free_unit_addrs_vector. Free addrs vector upon 1064 failure. Free allocated unit vector. 1065 1066 2018-12-28 Tom de Vries <tdevries (a] suse.de> 1067 1068 * dwarf.c (build_address_map): Free addrs vector upon failure. 1069 1070 2018-12-14 Tom de Vries <tdevries (a] suse.de> 1071 1072 PR testsuite/88491 1073 * allocfail.sh: Remove "set -o pipefail". 1074 1075 2018-12-12 Tom de Vries <tdevries (a] suse.de> 1076 1077 * Makefile.am (TESTS): Add allocfail.sh. 1078 (check_PROGRAMS): Add allocfail. 1079 * Makefile.in: Regenerate. 1080 * instrumented_alloc.c: New file. Redefine malloc and realloc. 1081 Include alloc.c. 1082 * allocfail.c: New file. 1083 * allocfail.sh: New file. 1084 1085 2018-11-30 Tom de Vries <tdevries (a] suse.de> 1086 1087 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32, 1088 test_xcoff_64, test_pecoff and test_unknown. 1089 * Makefile.in: Regenerate. 1090 * test_format.c: New file. 1091 1092 2018-11-30 Tom de Vries <tdevries (a] suse.de> 1093 1094 * Makefile.am : Add _with_alloc version for each test in 1095 check_PROGRAMS. 1096 * Makefile.in: Regenerate. 1097 1098 2018-11-30 Tom de Vries <tdevries (a] suse.de> 1099 1100 * internal.h (backtrace_vector_free): New static inline fuction, 1101 factored out of ... 1102 * dwarf.c (read_line_info): ... here. 1103 1104 2018-11-28 Tom de Vries <tdevries (a] suse.de> 1105 1106 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation 1107 failure. 1108 1109 2018-11-27 Tom de Vries <tdevries (a] suse.de> 1110 1111 * mmap.c (backtrace_vector_release): Same. 1112 * unittest.c (test1): Add check. 1113 1114 2018-11-27 Tom de Vries <tdevries (a] suse.de> 1115 1116 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free 1117 instead of realloc. 1118 * Makefile.am (check_PROGRAMS): Add unittest. 1119 * Makefile.in: Regenerate. 1120 * unittest.c: New file. 1121 1122 2018-11-22 Tom de Vries <tdevries (a] suse.de> 1123 1124 * dwarf.c (read_initial_length): Factor out of ... 1125 (build_address_map, read_line_info): ... here. 1126 1127 2018-11-21 Tom de Vries <tdevries (a] suse.de> 1128 1129 * dwarf.c (read_string): Factor out of ... 1130 (read_attribute, read_line_header, read_line_program): ... here. 1131 1132 2018-10-31 Joseph Myers <joseph (a] codesourcery.com> 1133 1134 PR bootstrap/82856 1135 * Makefile.am: Include multilib.am. 1136 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. 1137 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. 1138 1139 2018-10-05 Ian Lance Taylor <iant (a] golang.org> 1140 1141 PR libbacktrace/87529 1142 * backtrace.h: Document that backtrace_create_state should be 1143 called only once. 1144 1145 2018-08-05 Iain Buclaw <ibuclaw (a] gdcproject.org> 1146 1147 * configure.ac: Move define of HAVE_ZLIB into check for -lz. 1148 * Makefile.in: Regenerate. 1149 * config.h.in: Likewise. 1150 * configure: Likewise. 1151 1152 2018-08-01 Tony Reix <tony.reix (a] atos.net> 1153 1154 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove. 1155 (struct xcoff_func, struct xcoff_func_vector): New structs. 1156 (xcoff_syminfo): Drop leading dot from symbol name. 1157 (xcoff_line_compare, xcoff_line_search): Remove. 1158 (xcoff_func_compare, xcoff_func_search): New static functions. 1159 (xcoff_lookup_pc): Search function table. 1160 (xcoff_add_line, xcoff_process_linenos): Remove. 1161 (xcoff_initialize_fileline): Build function table. 1162 1163 2018-06-21 Denis Khalikov <d.khalikov (a] partner.samsung.com> 1164 1165 PR other/86198 1166 * elf.c (elf_add): Increase ".note.gnu.build-id" section size 1167 checking up to 36 bytes. 1168 1169 2018-04-24 H.J. Lu <hongjiu.lu (a] intel.com> 1170 1171 * configure: Regenerated. 1172 1173 2018-04-19 Jakub Jelinek <jakub (a] redhat.com> 1174 1175 * configure: Regenerated. 1176 1177 2018-04-17 Ian Lance Taylor <iant (a] golang.org> 1178 1179 * backtrace.c: Revert last two changes. Don't call mmap 1180 directly. 1181 1182 2018-04-17 Ian Lance Taylor <iant (a] golang.org> 1183 1184 * backtrace.c: Include backtrace-supported.h before checking 1185 BACKTRACE_USES_MALLOC. 1186 1187 2018-04-17 Ian Lance Taylor <iant (a] golang.org> 1188 1189 * backtrace.c (backtrace_full): When testing whether we can 1190 allocate memory, call mmap directly, and munmap the memory. 1191 1192 2018-04-04 Jakub Jelinek <jakub (a] redhat.com> 1193 1194 PR other/85161 1195 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for 1196 big endian, only use 32-bit loads if endianity macros are predefined 1197 and indicate big or little endian. 1198 1199 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist (a] intel.com> 1200 1201 PR target/84148 1202 * configure: Regenerate. 1203 1204 2018-02-15 Jakub Jelinek <jakub (a] redhat.com> 1205 1206 PR other/82368 1207 * elf.c (SHT_PROGBITS): Undefine and define. 1208 1209 2018-02-14 Jakub Jelinek <jakub (a] redhat.com> 1210 1211 PR other/82368 1212 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define. 1213 (struct elf_ppc64_opd_data): New type. 1214 (elf_initialize_syminfo): Add opd argument, handle symbols 1215 pointing into the PowerPC64 ELFv1 .opd section. 1216 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer 1217 to structure with .opd data to elf_initialize_syminfo. 1218 1219 2018-01-31 Ian Lance Taylor <iant (a] golang.org> 1220 1221 * elf.c (elf_add): Close descriptor if we use a debugfile. 1222 * btest.c (check_open_files): New static function. 1223 (main): Call check_open_files. 1224 1225 2018-01-25 Ian Lance Taylor <iant (a] golang.org> 1226 1227 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the 1228 desired CRC is zero. 1229 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo. 1230 1231 2018-01-25 Ian Lance Taylor <iant (a] golang.org> 1232 1233 * pecoff.c (coff_add): Only release syms_view if it is valid. 1234 1235 2018-01-25 Ian Lance Taylor <iant (a] golang.org> 1236 1237 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix. 1238 1239 2018-01-24 Ian Lance Taylor <iant (a] golang.org> 1240 1241 * pecoff.c (coff_add): Use coff_read4, not memcpy. 1242 1243 2018-01-24 Ian Lance Taylor <iant (a] golang.org> 1244 1245 PR other/68239 1246 * mmap.c (backtrace_free_locked): Don't put more than 16 entries 1247 on the free list. 1248 1249 2018-01-19 Tony Reix <tony.reix (a] atos.net> 1250 1251 * xcoff.c (xcoff_incl_compare): New function. 1252 (xcoff_incl_search): New function. 1253 (xcoff_process_linenos): Use bsearch to find include file. 1254 (xcoff_initialize_fileline): Sort include file information. 1255 1256 2018-01-16 Ian Lance Taylor <iant (a] golang.org> 1257 1258 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be 1259 288. 1260 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to 1261 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table. 1262 (elf_zlib_default_table): Update. 1263 (elf_zlib_default_dist_table): New static array. 1264 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table 1265 for block type 1. 1266 * ztest.c (struct zlib_test): Add uncompressed_len. 1267 (tests): Initialize uncompressed_len field. Add new test case. 1268 (test_samples): Use uncompressed_len field. 1269 1270 2018-01-03 Jakub Jelinek <jakub (a] redhat.com> 1271 1272 Update copyright years. 1273 1274 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist (a] intel.com> 1275 1276 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS. 1277 * aclocal.m4: Regenerate. 1278 * Makefile.in: Likewise. 1279 * configure: Likewise. 1280 1281 2017-10-06 Ian Lance Taylor <iant (a] golang.org> 1282 1283 * ztest.c (test_large): Pass unsigned long *, not size_t *, to 1284 zlib uncompress function. 1285 1286 2017-10-05 Ian Lance Taylor <iant (a] golang.org> 1287 1288 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *. 1289 Read a four byte integer. 1290 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit 1291 boundary before ever calling elf_zlib_fetch. 1292 * ztest.c (test_large): Simplify print statements a bit. 1293 1294 2017-10-02 Ian Lance Taylor <iant (a] golang.org> 1295 1296 * ztest.c: #include <errno.h>. 1297 (TEST_TIMING): Don't define, don't test. 1298 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME. 1299 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise. 1300 (ZLIB_CLOCK_GETTIME_ARG): Define. 1301 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK. 1302 * Makefile.am: Likewise. 1303 * configure, Makefile.in: Rebuild. 1304 1305 2017-10-02 Thomas Schwinge <thomas (a] codesourcery.com> 1306 1307 PR other/67165 1308 * Makefile.am: Append the content of clock_gettime_link to 1309 ztest_LDADD. 1310 * configure.ac: Test for the case that clock_gettime is in librt. 1311 * Makefile.in: Regenerate. 1312 * configure: Likewise. 1313 1314 PR other/67165 1315 * configure.ac: Check for clock_gettime. 1316 * config.h.in: Regenerate. 1317 * configure: Likewise. 1318 * ztest.c (average_time, test_large): Conditionalize test timing 1319 on clock_gettime availability. 1320 1321 2017-09-29 Tony Reix <tony.reix (a] atos.net> 1322 1323 * xcoff.c: Initial support for DWARF debug sections in XCOFF. 1324 (STYP_DWARF, SSUBTYP_DW*): Define. 1325 (enum dwarf_section): Define. 1326 (struct dwsect_info): Define. 1327 (xcoff_add): Look for DWARF sections, pass them to 1328 backtrace_dwarf_add. 1329 1330 2017-09-28 Ian Lance Taylor <iant (a] golang.org> 1331 1332 PR other/67165 1333 * elf.c (__builtin_prefetch): Define if not __GNUC__. 1334 (unlikely): Define. 1335 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define. 1336 (b_elf_chdr): Define type. 1337 (enum debug_section): Add ZDEBUG_xxx values. 1338 (debug_section_names): Add names for new sections. 1339 (struct debug_section_info): Add compressed field. 1340 (elf_zlib_failed, elf_zlib_fetch): New static functions. 1341 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define. 1342 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define. 1343 (HUFFMAN_SECONDARY_SHIFT): Define. 1344 (ZDEBUG_TABLE_SIZE): Define. 1345 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define. 1346 (final_next_secondary): New static variable if 1347 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE. 1348 (elf_zlib_inflate_table): New static function. 1349 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main 1350 function to produce fixed Huffman table. 1351 (elf_zlib_default_table): New static variable. 1352 (elf_zlib_inflate): New static function. 1353 (elf_zlib_verify_checksum): Likewise. 1354 (elf_zlib_inflate_and_verify): Likewise. 1355 (elf_uncompress_zdebug): Likewise. 1356 (elf_uncompress_chdr): Likewise. 1357 (backtrace_uncompress_zdebug): New extern function. 1358 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug 1359 sections, and uncompress them. 1360 * internal.h (backtrace_compress_zdebug): Declare. 1361 * ztest.c: New file. 1362 * configure.ac: Check for -lz and check whether the linker 1363 supports --compress-debug-sections. 1364 * Makefile.am (ztest_SOURCES): New variable. 1365 (ztest_CFLAGS, ztest_LDADD): New variables. 1366 (check_PROGRAMS): Add ztest. 1367 (ctestg_SOURCES): New variable. 1368 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables. 1369 (ctesta_SOURCES): New variable. 1370 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables. 1371 (check_PROGRAMS): Add ctestg and ctesta. 1372 * configure, config.h.in, Makefile.in: Rebuild. 1373 1374 2017-09-22 Ian Lance Taylor <iant (a] golang.org> 1375 1376 PR sanitizer/77631 1377 * configure.ac: Check for lstat and readlink. 1378 * elf.c (lstat, readlink): Provide dummy versions if real versions 1379 are not available. 1380 * configure, config.h.in: Rebuild. 1381 1382 2017-09-21 Ian Lance Taylor <iant (a] google.com> 1383 1384 PR go/82284 1385 * elf.c (backtrace_initialize): Set pd.exe_filename. 1386 1387 2017-09-20 Ian Lance Taylor <iant (a] golang.org> 1388 Denis Khalikov <d.khalikov (a] partner.samsung.com> 1389 1390 PR sanitizer/77631 1391 Support for external debug info. 1392 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>. 1393 (S_ISLNK): Define if not defined. 1394 (xstrnlen): Define if strnlen is not available. 1395 (b_elf_note): Define type. 1396 (NT_GNU_BUILD_ID): Define macro. 1397 (elf_crc32, elf_crc32_file): New static functions. 1398 (elf_is_symlink, elf_readlink): New static functions. 1399 (elf_open_debugfile_by_buildid): New static function. 1400 (elf_try_debugfile): New static function. 1401 (elf_find_debugfile_by_debuglink): New static function. 1402 (elf_open_debugfile_by_debuglink): New static function. 1403 (elf_add): Add filename and debuginfo parameters. Adjust all 1404 callers. Look for external debug info notes, and try to fetch 1405 debug info from external file. 1406 (struct phdr_data): Add exe_filename field. 1407 (phdr_callback): Pass filename to elf_add. 1408 (backtrace_initialize): Add filename parameter. 1409 * internal.h (backtrace_initialize): Add filename parameter. 1410 * fileline.c (fileline_initialize): Pass filename to 1411 backtrace_initialize. 1412 * pecoff.c (fileline_initialize): Add unused filename parameter. 1413 * unknown.c (fileline_initialize): Likewise. 1414 * xcoff.c (fileline_initialize): Likewise. 1415 * configure.ac: Check for objcopy --add-gnu-debuglink. 1416 * Makefile.am (dtest): New test target. 1417 * configure, Makefile.in: Rebuild. 1418 1419 2017-09-12 Steve Ellcey <sellcey (a] cavium.com> 1420 1421 PR other/81096 1422 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS) 1423 * Makefile.in: Regenerate. 1424 1425 2017-09-12 Steve Ellcey <sellcey (a] cavium.com> 1426 1427 PR other/81096 1428 * libbacktrace/Makefile.in 1429 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS) 1430 1431 2017-08-02 David Edelsohn <dje.gcc (a] gmail.com> 1432 1433 PR bootstrap/81638 1434 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL. 1435 1436 2017-07-28 Tony Reix <tony.reix (a] atos.net> 1437 1438 * xcoff.c: Don't leak a file descriptor if an archive is malformed. 1439 1440 2017-07-28 Rainer Orth <ro (a] CeBiTec.Uni-Bielefeld.DE> 1441 1442 * fileline.c (fileline_initialize): Print pid_t as long. 1443 1444 2017-07-26 Tony Reix <tony.reix (a] atos.net> 1445 1446 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery. 1447 * filetype.awk: Separate AIX XCOFF32 and XCOFF64. 1448 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats. 1449 * configure, config.h.in: Regenerate. 1450 1451 2017-07-21 Tony Reix <tony.reix (a] atos.net> 1452 1453 * filetype.awk: Add AIX XCOFF type detection. 1454 * configure.ac: Recognize xcoff format. 1455 * Makefile.am (FORMAT_FILES): Add xcoff.c. 1456 * fileline.c: Include <unistd.h>. 1457 (fileline_initialize): Add case for AIX procfs. 1458 * xcoff.c: New file. 1459 * configure, Makefile.in: Rebuild. 1460 1461 2017-06-21 Richard Biener <rguenther (a] suse.de> 1462 1463 * configure.ac: Add AC_SYS_LARGEFILE. 1464 * config.h.in: Regenerate. 1465 * configure: Likewise. 1466 1467 2017-06-11 Ian Lance Taylor <iant (a] golang.org> 1468 1469 * elf.c (backtrace_initialize): Always set *fileline_fn. 1470 * ttest.c: New file. 1471 * btest.c: Move support functions into testlib.c. Change calls to 1472 check to pass file name. 1473 * testlib.c: New file, copied from (part of) btest.c. 1474 * testlib.h: New file, declarations for testlib.c. 1475 * edtest.c: Use testlib.h and testlib.c. 1476 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional. 1477 * Makefile.am (btest_SOURCES): Add testlib.c. 1478 (edtest_SOURCES): Likewise. 1479 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD. 1480 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define. 1481 * configure, Makefile.in: Rebuild. 1482 1483 2017-05-19 Than McIntosh <thanm (a] google.com> 1484 1485 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0. 1486 (read_line_header): Don't allocate dirs if dirs_count == 0. 1487 * edtest.c: New file. 1488 * edtest2.c: New file. 1489 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define. 1490 (check_PROGRAMS): Add edtest. 1491 (edtest2_build.c, gen_edtest2_build): New targets. 1492 * Makefile.in: Rebuild. 1493 1494 2017-03-08 Sam Thursfield <sam.thursfield (a] codethink.co.uk> 1495 1496 * btest.c (test5): Replace #ifdef guard with 'unused' attribute 1497 to fix compile warning when BACKTRACE_SUPPORTED isn't defined. 1498 1499 2017-01-01 Jakub Jelinek <jakub (a] redhat.com> 1500 1501 Update copyright years. 1502 1503 2016-11-15 Matthias Klose <doko (a] ubuntu.com> 1504 1505 * configure: Regenerate. 1506 1507 2016-09-11 Carlos Liam <carlos (a] aarzee.me> 1508 1509 * all: Remove meaningless trailing whitespace. 1510 1511 2016-05-18 Uros Bizjak <ubizjak (a] gmail.com> 1512 1513 PR target/71161 1514 * elf.c (phdr_callback) [__i386__]: Add 1515 __attribute__((__force_align_arg_pointer__)). 1516 1517 2016-03-02 Maxim Ostapenko <m.ostapenko (a] partner.samsung.com> 1518 1519 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to 1520 avoid possible crash. 1521 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of 1522 missing debug info anymore. 1523 1524 2016-02-06 John David Anglin <danglin (a] gcc.gnu.org> 1525 1526 * mmap.c (MAP_FAILED): Define if not defined. 1527 1528 2016-01-04 Jakub Jelinek <jakub (a] redhat.com> 1529 1530 Update copyright years. 1531 1532 2015-12-18 Andris Pavenis <andris.pavenis (a] iki.fi> 1533 1534 * configure.ac: Specify that DJGPP do not have mmap 1535 even when sys/mman.h exists. 1536 * configure: Regenerate 1537 1538 2015-12-09 John David Anglin <danglin (a] gcc.gnu.org> 1539 1540 PR libgfortran/68115 1541 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*. 1542 * configure: Regenerate. 1543 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call 1544 to void. 1545 1546 2015-09-17 Ian Lance Taylor <iant (a] google.com> 1547 1548 * posix.c (backtrace_open): Cast second argument of open() to int. 1549 1550 2015-09-11 Ian Lance Taylor <iant (a] google.com> 1551 1552 * Makefile.am (backtrace.lo): Depend on internal.h. 1553 (sort.lo, stest.lo): Add explicit dependencies. 1554 * Makefile.in: Rebuild. 1555 1556 2015-09-09 Hans-Peter Nilsson <hp (a] axis.com> 1557 1558 * backtrace.c: #include <sys/types.h>. 1559 1560 2015-09-08 Ian Lance Taylor <iant (a] google.com> 1561 1562 PR other/67457 1563 * backtrace.c: #include "internal.h". 1564 (struct backtrace_data): Add can_alloc field. 1565 (unwind): If can_alloc is false, don't try to get file/line 1566 information. 1567 (backtrace_full): Set can_alloc field in bdata. 1568 * alloc.c (backtrace_alloc): Don't call error_callback if it is 1569 NULL. 1570 * mmap.c (backtrace_alloc): Likewise. 1571 * internal.h: Update comments for backtrace_alloc and 1572 backtrace_free. 1573 1574 2015-09-08 Ian Lance Taylor <iant (a] google.com> 1575 1576 PR other/67457 1577 * mmap.c (backtrace_alloc): Correct test for mmap failure. 1578 1579 2015-08-31 Ulrich Weigand <Ulrich.Weigand (a] de.ibm.com> 1580 1581 * configure.ac: For spu-*-* targets, set have_fcntl to no. 1582 * configure: Regenerate. 1583 1584 2015-08-27 Ulrich Weigand <Ulrich.Weigand (a] de.ibm.com> 1585 1586 * configure.ac: Remove [disable-shared] argument to LT_INIT. 1587 Remove setting PIC_FLAG when building as target library. 1588 * configure: Regenerate. 1589 1590 2015-08-26 Hans-Peter Nilsson <hp (a] axis.com> 1591 1592 * configure.ac: Only compile with -fPIC if the target 1593 supports it. 1594 * configure: Regenerate. 1595 1596 2015-08-24 Ulrich Weigand <Ulrich.Weigand (a] de.ibm.com> 1597 1598 * configure.ac: Set have_mmap to no on spu-*-* targets. 1599 * configure: Regenerate. 1600 1601 2015-08-13 Ian Lance Taylor <iant (a] google.com> 1602 1603 * dwarf.c (read_function_entry): Add vec_inlined parameter. 1604 Change all callers. 1605 1606 2015-06-11 Martin Sebor <msebor (a] redhat.com> 1607 1608 PR sanitizer/65479 1609 * dwarf.c (struct line): Add new field idx. 1610 (line_compare): Use it. 1611 (add_line): Set it. 1612 (read_line_info): Reset it. 1613 1614 2015-05-29 Tristan Gingold <gingold (a] adacore.com> 1615 1616 * pecoff.c: New file. 1617 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies. 1618 * Makefile.in: Regenerate. 1619 * filetype.awk: Detect pecoff. 1620 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms. 1621 Add pecoff. 1622 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is 1623 true. 1624 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define. 1625 * configure: Regenerate. 1626 * pecoff.c: New file. 1627 1628 2015-05-13 Michael Haubenwallner <michael.haubenwallner (a] ssi-schaefer.com> 1629 1630 * Makefile.in: Regenerated with automake-1.11.6. 1631 * aclocal.m4: Likewise. 1632 * configure: Likewise. 1633 1634 2015-01-24 Matthias Klose <doko (a] ubuntu.com> 1635 1636 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. 1637 * configure: Regenerate. 1638 1639 2015-01-05 Jakub Jelinek <jakub (a] redhat.com> 1640 1641 Update copyright years. 1642 1643 2014-11-21 H.J. Lu <hongjiu.lu (a] intel.com> 1644 1645 PR bootstrap/63784 1646 * configure: Regenerated. 1647 1648 2014-11-11 David Malcolm <dmalcolm (a] redhat.com> 1649 1650 * ChangeLog.jit: New. 1651 1652 2014-11-11 Francois-Xavier Coudert <fxcoudert (a] gcc.gnu.org> 1653 1654 PR target/63610 1655 * configure: Regenerate. 1656 1657 2014-10-23 Ian Lance Taylor <iant (a] google.com> 1658 1659 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]: 1660 Fix to return void *. 1661 1662 2014-05-08 Ian Lance Taylor <iant (a] google.com> 1663 1664 * mmap.c (backtrace_free): If freeing a large aligned block of 1665 memory, call munmap rather than holding onto it. 1666 (backtrace_vector_grow): When growing a vector, double the number 1667 of pages requested. When releasing the old version of a grown 1668 vector, pass the correct size to backtrace_free. 1669 1670 2014-03-07 Ian Lance Taylor <iant (a] google.com> 1671 1672 * sort.c (backtrace_qsort): Use middle element as pivot. 1673 1674 2014-03-06 Ian Lance Taylor <iant (a] google.com> 1675 1676 * sort.c: New file. 1677 * stest.c: New file. 1678 * internal.h (backtrace_qsort): Declare. 1679 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort. 1680 (read_line_info, read_function_entry): Likewise. 1681 (read_function_info, build_dwarf_data): Likewise. 1682 * elf.c (elf_initialize_syminfo): Likewise. 1683 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c. 1684 (stest_SOURCES, stest_LDADD): Define. 1685 (check_PROGRAMS): Add stest. 1686 1687 2014-02-07 Misty De Meo <misty (a] brew.sh> 1688 1689 PR target/58710 1690 * configure.ac: Use AC_LINK_IFELSE in check for 1691 _Unwind_GetIPInfo. 1692 * configure: Regenerate. 1693 1694 2014-01-02 Richard Sandiford <rdsandiford (a] googlemail.com> 1695 1696 Update copyright years 1697 1698 2013-12-06 Jakub Jelinek <jakub (a] redhat.com> 1699 1700 * elf.c (ET_DYN): Undefine and define again. 1701 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN, 1702 return early -1 without closing the descriptor. 1703 (struct phdr_data): Add exe_descriptor. 1704 (phdr_callback): If pd->exe_descriptor is not -1, for very first 1705 call if dlpi_name is NULL just call elf_add with the exe_descriptor, 1706 otherwise backtrace_close the exe_descriptor if not -1. Adjust 1707 call to elf_add. 1708 (backtrace_initialize): Adjust call to elf_add. If it returns 1709 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1. 1710 1711 2013-12-05 Ian Lance Taylor <iant (a] google.com> 1712 1713 * alloc.c (backtrace_vector_finish): Add error_callback and data 1714 parameters. Call backtrace_vector_release. Return address base. 1715 * mmap.c (backtrace_vector_finish): Add error_callback and data 1716 parameters. Return address base. 1717 * dwarf.c (read_function_info): Get new address base from 1718 backtrace_vector_finish. 1719 * internal.h (backtrace_vector_finish): Update declaration. 1720 1721 2013-11-27 Ian Lance Taylor <iant (a] google.com> 1722 1723 * dwarf.c (find_address_ranges): New static function, broken out 1724 of build_address_map. 1725 (build_address_map): Call it. 1726 * btest.c (check): Check for missing filename or function, rather 1727 than crashing. 1728 (f3): Check that enough frames were returned. 1729 1730 2013-11-19 Jakub Jelinek <jakub (a] redhat.com> 1731 1732 * backtrace.h (backtrace_syminfo_callback): Add symsize argument. 1733 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as 1734 last argument. 1735 * btest.c (struct symdata): Add size field. 1736 (callback_three): Add symsize argument. Copy it to the data->size 1737 field. 1738 (f23): Set symdata.size to 0. 1739 (test5): Likewise. If sizeof (int) > 1, lookup address of 1740 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size 1741 values. 1742 1743 * atomic.c: Include sys/types.h. 1744 1745 2013-11-18 Ian Lance Taylor <iant (a] google.com> 1746 1747 * configure.ac: Check for support of __atomic extensions. 1748 * internal.h: Declare or #define atomic functions for use in 1749 backtrace code. 1750 * atomic.c: New file. 1751 * dwarf.c (dwarf_lookup_pc): Use atomic functions. 1752 (dwarf_fileline, backtrace_dwarf_add): Likewise. 1753 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise. 1754 (backtrace_initialize): Likewise. 1755 * fileline.c (fileline_initialize): Likewise. 1756 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c. 1757 * configure, config.h.in, Makefile.in: Rebuild. 1758 1759 2013-11-18 Jakub Jelinek <jakub (a] redhat.com> 1760 1761 * elf.c (SHN_UNDEF): Define. 1762 (elf_initialize_syminfo): Add base_address argument. Ignore symbols 1763 with st_shndx == SHN_UNDEF. Add base_address to address fields. 1764 (elf_add): Adjust caller. 1765 1766 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally. 1767 1768 2013-11-16 Ian Lance Taylor <iant (a] google.com> 1769 1770 * backtrace.h (backtrace_create_state): Correct comment about 1771 threading. 1772 1773 2013-11-15 Ian Lance Taylor <iant (a] google.com> 1774 1775 * backtrace.h (backtrace_syminfo): Update comment and parameter 1776 name to take any address, not just a PC value. 1777 * elf.c (STT_OBJECT): Define. 1778 (elf_nosyms): Rename parameter pc to addr. 1779 (elf_symbol_search): Rename local variable pc to addr. 1780 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols. 1781 (elf_syminfo): Rename parameter pc to addr. 1782 * btest.c (global): New global variable. 1783 (test5): New test. 1784 (main): Call test5. 1785 1786 2013-10-17 Ian Lance Taylor <iant (a] google.com> 1787 1788 * elf.c (elf_add): Don't get the wrong offsets if a debug section 1789 is missing. 1790 1791 2013-10-15 David Malcolm <dmalcolm (a] redhat.com> 1792 1793 * configure.ac: Add --enable-host-shared, setting up 1794 pre-existing PIC_FLAG variable within Makefile.am et al. 1795 * configure: Regenerate. 1796 1797 2013-09-20 Alan Modra <amodra (a] gmail.com> 1798 1799 * configure: Regenerate. 1800 1801 2013-07-23 Alexander Monakov <amonakov (a] ispras.ru> 1802 1803 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain. 1804 1805 2013-07-23 Alexander Monakov <amonakov (a] ispras.ru> 1806 1807 * elf.c (backtrace_initialize): Pass elf_fileline_fn to 1808 dl_iterate_phdr callbacks. 1809 1810 2013-03-25 Ian Lance Taylor <iant (a] google.com> 1811 1812 * alloc.c: #include <sys/types.h>. 1813 * mmap.c: Likewise. 1814 1815 2013-01-31 Ian Lance Taylor <iant (a] google.com> 1816 1817 * dwarf.c (read_function_info): Permit fvec parameter to be NULL. 1818 (dwarf_lookup_pc): Don't use ddata->fvec if threaded. 1819 1820 2013-01-25 Jakub Jelinek <jakub (a] redhat.com> 1821 1822 PR other/56076 1823 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir 1824 attribute was not seen. 1825 1826 2013-01-16 Ian Lance Taylor <iant (a] google.com> 1827 1828 * dwarf.c (struct unit): Add filename and abs_filename fields. 1829 (build_address_map): Set new fields when reading unit. 1830 (dwarf_lookup_pc): If we don't find an entry in the line table, 1831 just return the main file name. 1832 1833 2013-01-14 Richard Sandiford <rdsandiford (a] googlemail.com> 1834 1835 Update copyright years. 1836 1837 2013-01-01 Ian Lance Taylor <iant (a] google.com> 1838 1839 PR bootstrap/54834 1840 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I 1841 $(MULTIBUILDTOP)/../../gcc/include. 1842 * Makefile.in: Rebuild. 1843 1844 2013-01-01 Ian Lance Taylor <iant (a] google.com> 1845 1846 PR other/55536 1847 * mmap.c (backtrace_alloc): Don't call sync functions if not 1848 threaded. 1849 (backtrace_free): Likewise. 1850 1851 2012-12-12 John David Anglin <dave.anglin (a] nrc-cnrc.gc.ca> 1852 1853 * mmapio.c: Define MAP_FAILED if not defined. 1854 1855 2012-12-11 Jakub Jelinek <jakub (a] redhat.com> 1856 1857 PR bootstrap/54926 1858 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@. 1859 * configure.ac: If --with-target-subdir, add -frandom-seed=$@ 1860 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler 1861 accepts it. 1862 * Makefile.in: Regenerated. 1863 * configure: Regenerated. 1864 1865 2012-12-07 Jakub Jelinek <jakub (a] redhat.com> 1866 1867 PR bootstrap/54926 1868 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@. 1869 * Makefile.in: Regenerated. 1870 1871 2012-11-20 Ian Lance Taylor <iant (a] google.com> 1872 1873 * dwarf.c (read_attribute): Always clear val. 1874 1875 2012-11-13 Ian Lance Taylor <iant (a] google.com> 1876 1877 PR other/55312 1878 * configure.ac: Only add -Werror if building a target library. 1879 * configure: Rebuild. 1880 1881 2012-11-12 Ian Lance Taylor <iant (a] google.com> 1882 Rainer Orth <ro (a] CeBiTec.Uni-Bielefeld.DE> 1883 Gerald Pfeifer <gerald (a] pfeifer.com> 1884 1885 * configure.ac: Check for getexecname. 1886 * fileline.c: #include <errno.h>. Define getexecname if not 1887 available. 1888 (fileline_initialize): Try to find the executable in a few 1889 different ways. 1890 * print.c (error_callback): Only print the filename if it came 1891 from the backtrace state. 1892 * configure, config.h.in: Rebuild. 1893 1894 2012-10-29 Ian Lance Taylor <iant (a] google.com> 1895 1896 * mmap.c (backtrace_vector_release): Correct last patch: add 1897 aligned, not size. 1898 1899 2012-10-29 Ian Lance Taylor <iant (a] google.com> 1900 1901 * mmap.c (backtrace_vector_release): Make sure freed block is 1902 aligned on 8-byte boundary. 1903 1904 2012-10-26 Ian Lance Taylor <iant (a] google.com> 1905 1906 PR other/55087 1907 * posix.c (backtrace_open): Add does_not_exist parameter. 1908 * elf.c (phdr_callback): Do not warn if shared library could not 1909 be opened. 1910 * fileline.c (fileline_initialize): Update calls to 1911 backtrace_open. 1912 * internal.h (backtrace_open): Update declaration. 1913 1914 2012-10-26 Jack Howarth <howarth (a] bromo.med.uc.edu> 1915 1916 PR target/55061 1917 * configure.ac: Check for _Unwind_GetIPInfo function declaration. 1918 * configure: Regenerate. 1919 1920 2012-10-24 Ian Lance Taylor <iant (a] google.com> 1921 1922 PR target/55061 1923 * configure.ac: Check whether -funwind-tables option works. 1924 * configure: Rebuild. 1925 1926 2012-10-11 Ian Lance Taylor <iant (a] google.com> 1927 1928 * configure.ac: Do not use dl_iterate_phdr on Solaris 10. 1929 * configure: Rebuild. 1930 1931 2012-10-10 Ian Lance Taylor <iant (a] google.com> 1932 1933 * elf.c: Rename all Elf typedefs to start with b_elf, and be all 1934 lower case. 1935 1936 2012-10-10 Hans-Peter Nilsson <hp (a] bitrange.com> 1937 1938 * elf.c (elf_add_syminfo_data): Add casts to avoid warning. 1939 1940 2012-10-09 Ian Lance Taylor <iant (a] google.com> 1941 1942 * dwarf.c (dwarf_fileline): Add cast to avoid warning. 1943 (backtrace_dwarf_add): Likewise. 1944 1945 2012-10-09 Ian Lance Taylor <iant (a] google.com> 1946 1947 Add support for tracing through shared libraries. 1948 * configure.ac: Check for link.h and dl_iterate_phdr. 1949 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef 1950 ELF macros before #defining them. 1951 (dl_phdr_info, dl_iterate_phdr): Define if system does not have 1952 dl_iterate_phdr. 1953 (struct elf_syminfo_data): Add next field. 1954 (elf_initialize_syminfo): Initialize next field. 1955 (elf_add_syminfo_data): New static function. 1956 (elf_add): New static function, broken out of 1957 backtrace_initialize. Call backtrace_dwarf_add instead of 1958 backtrace_dwarf_initialize. 1959 (struct phdr_data): Define. 1960 (phdr_callback): New static function. 1961 (backtrace_initialize): Call elf_add. 1962 * dwarf.c (struct dwarf_data): Add next and base_address fields. 1963 (add_unit_addr): Add base_address parameter. Change all callers. 1964 (add_unit_ranges, build_address_map): Likewise. 1965 (add_line): Add ddata parameter. Change all callers. 1966 (read_line_program, add_function_range): Likewise. 1967 (dwarf_lookup_pc): New static function, broken out of 1968 dwarf_fileline. 1969 (dwarf_fileline): Call dwarf_lookup_pc. 1970 (build_dwarf_data): New static function. 1971 (backtrace_dwarf_add): New function. 1972 (backtrace_dwarf_initialize): Remove. 1973 * internal.h (backtrace_dwarf_initialize): Don't declare. 1974 (backtrace_dwarf_add): Declare. 1975 * configure, config.h.in: Rebuild. 1976 1977 2012-10-04 Gerald Pfeifer <gerald (a] pfeifer.com> 1978 1979 * btest.c (f23): Avoid uninitialized variable warning. 1980 1981 2012-10-04 Ian Lance Taylor <iant (a] google.com> 1982 1983 * dwarf.c: If the system header files do not declare strnlen, 1984 provide our own version. 1985 1986 2012-10-03 Ian Lance Taylor <iant (a] google.com> 1987 1988 * dwarf.c (read_uleb128): Fix overflow test. 1989 (read_sleb128): Likewise. 1990 (build_address_map): Don't change unit_buf.start. 1991 1992 2012-10-02 Uros Bizjak <ubizjak (a] gmail.com> 1993 1994 PR other/54761 1995 * configure.ac (EXTRA_FLAGS): New. 1996 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS). 1997 * configure, Makefile.in: Regenerate. 1998 1999 2012-09-29 Ian Lance Taylor <iant (a] google.com> 2000 2001 PR other/54749 2002 * fileline.c (fileline_initialize): Pass errnum as -1 when 2003 reporting that we could not read executable information after a 2004 previous failure. 2005 2006 2012-09-27 Ian Lance Taylor <iant (a] google.com> 2007 2008 PR bootstrap/54732 2009 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE. 2010 * Makefile.am: Add dependencies for all objects. 2011 * configure, aclocal.m4, Makefile.in: Rebuild. 2012 2013 2012-09-27 Ian Lance Taylor <iant (a] google.com> 2014 2015 PR other/54726 2016 * elf.c (backtrace_initialize): Set *fileln_fn, not 2017 state->fileln_fn. 2018 2019 2012-09-19 Ian Lance Taylor <iant (a] google.com> 2020 2021 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled 2022 as a target library. 2023 * configure: Rebuild. 2024 2025 2012-09-19 Rainer Orth <ro (a] CeBiTec.Uni-Bielefeld.DE> 2026 Ian Lance Taylor <iant (a] google.com> 2027 2028 * configure.ac (GCC_HEADER_STDINT): Invoke. 2029 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h". 2030 * btest.c: Don't include <stdint.h>. 2031 * dwarf.c: Likewise. 2032 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild. 2033 2034 2012-09-18 Ian Lance Taylor <iant (a] google.com> 2035 2036 PR bootstrap/54623 2037 * Makefile.am (AM_CPPFLAGS): Define. 2038 (AM_CFLAGS): Remove -I options. 2039 * Makefile.in: Rebuild. 2040 2041 2012-09-18 Ian Lance Taylor <iant (a] google.com> 2042 2043 * posix.c (O_BINARY): Define if not defined. 2044 (backtrace_open): Pass O_BINARY to open. Only call fcntl if 2045 HAVE_FCNTL is defined. 2046 * configure.ac: Test for the fcntl function. 2047 * configure, config.h.in: Rebuild. 2048 2049 2012-09-18 Ian Lance Taylor <iant (a] google.com> 2050 2051 * btest.c (test1, test2, test3, test4): Add the unused attribute. 2052 2053 2012-09-18 Ian Lance Taylor <iant (a] google.com> 2054 2055 * dwarf.c: Correct test of HAVE_DECL_STRNLEN. 2056 2057 2012-09-18 Ian Lance Taylor <iant (a] google.com> 2058 2059 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS. 2060 * mmapio.c: Don't define _GNU_SOURCE. 2061 * configure, config.h.in: Rebuild. 2062 2063 2012-09-18 Ian Lance Taylor <iant (a] google.com> 2064 2065 * configure.ac: Check whether strnlen is declared. 2066 * dwarf.c: Declare strnlen if not declared. 2067 * configure, config.h.in: Rebuild. 2068 2069 2012-09-18 Rainer Orth <ro (a] CeBiTec.Uni-Bielefeld.DE> 2070 2071 * fileline.c: Include <stdlib.h>. 2072 * mmap.c: Likewise. 2073 2074 2012-09-17 Ian Lance Taylor <iant (a] google.com> 2075 2076 PR bootstrap/54611 2077 * nounwind.c (backtrace_full): Rename from backtrace. Add state 2078 parameter. 2079 2080 2012-09-17 Gerald Pfeifer <gerald (a] pfeifer.com> 2081 2082 PR bootstrap/54611 2083 * nounwind.c (backtrace_simple): Add state parameter. 2084 2085 2012-09-17 Ian Lance Taylor <iant (a] google.com> 2086 2087 PR bootstrap/54609 2088 * unknown.c (unknown_fileline): Add state parameter, remove 2089 fileline_data parameter, name error_callback parameter. 2090 (backtrace_initialize): Add state parameter. 2091 2092 2012-09-17 Ian Lance Taylor <iant (a] google.com> 2093 2094 * Initial implementation. 2095 2097 Copyright (C) 2012-2024 Free Software Foundation, Inc. 2098 2099 Copying and distribution of this file, with or without modification, 2100 are permitted in any medium without royalty provided the copyright 2101 notice and this notice are preserved. 2102