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