1 2023-10-22 Iain Sandoe <iain@sandoe.co.uk>
3 * configure: Regenerate.
4 * configure.ac: Handle Darwin rpaths.
6 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
8 * configure: Regenerate.
10 2023-08-07 Alexander von Gluck IV <kallisti5@unixzen.com>
12 * configure: Regenerate.
14 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
16 * configure: Regenerate.
18 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
20 * configure: Regenerate.
22 2023-08-07 H.J. Lu <hjl.tools@gmail.com>
24 * configure: Regenerate.
26 2023-08-07 H.J. Lu <hjl.tools@gmail.com>
28 * configure: Regenerate.
30 2023-08-03 Richard Biener <rguenther@suse.de>
32 * zstdtest.c (test_samples): Properly compute the allocation
33 size for the uncompressed data.
35 2023-07-31 Ian Lance Taylor <iant@golang.org>
37 * configure.ac: Check for _pgmptr declaration.
38 * fileline.c (fileline_initialize): Check for _pgmfptr before
40 * configure, config.h.in: Regenerate.
42 2023-03-28 Ian Lance Taylor <iant@golang.org>
44 * elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading
45 bits, not before. Add unlikely for error case.
46 (elf_zstd_offset_table): Regenerate.
47 (elf_zstd_read_huff): Clear 13 entries in weight_mark, not 12.
48 (elf_zstd_read_literals): For a single stream adjust by
49 total_streams_size, not compressed_size.
51 2023-01-20 Ian Lance Taylor <iant@golang.org>
53 * dwarf.c (struct function_addrs): Change low and high fields to
55 (struct unit_addrs): Likewise.
56 (resolve_addr_index): Change address parameter to uintptr_t*.
57 (add_unit_addr): Change lowpc and highpc parameters to uintptr_t.
58 (add_function_range): Likewise.
59 (struct pcrange): Change lowpc and highpc fields to uintptr_t.
60 (add_low_high_range): Change add_range lowpc and highpc parameters
62 (add_ranges_from_ranges): Likewise.
63 (add_ranges_from_rnglists): Likewise.
64 (add_low_high_range): Chnage lowpc and highpc variables to
66 (add_ranges_from_rnglists): Change some local variables to
68 (add_ranges_from_ranges): Change base parameter to uintptr_t.
69 (add_ranges_from_rnglists): Likewise.
70 (read_function_entry): Likewise.
71 (resolve_addr_index): Add explicit casts to uintptr_t.
72 (update_pcrange): Likewise.
73 (add_ranges_from_ranges): Likewise.
74 (add_ranges_from_rnglists): Likewise.
75 (read_function_entry): Likewise.
77 2023-01-17 Martin Liska <mliska@suse.cz>
79 * Makefile.in: Regenerate.
81 2023-01-06 Ian Lance Taylor <iant@golang.org>
83 PR libbacktrace/108297
84 * configure.ac: Test whether linker supports --build-id.
85 * Makefile.am: Only run --build-id tests if supported.
86 * configure, Makefile.in: Regenerate.
88 2022-12-17 Ian Lance Taylor <iant@golang.org>
90 * elf.c (elf_fetch_backward_init): New static function.
91 (ZSTD_TABLE_SIZE): Use huffman scratch space size rather than
93 (ZSTD_TABLE_WORK_LIT_SIZE): Don't define.
94 (elf_zstd_read_huff): Use elf_fetch_backward_init.
95 (elf_zstd_read_literals): New static function.
96 (ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define.
97 (struct elf_zstd_literals): Don't define.
98 (elf_zstd_literal_output): Remove static function.
99 (elf_zstd_decompress): Use elf_fetch_backward_init and
100 elf_zstd_read_literals. Rewrite literal copying.<
102 2022-12-10 Ian Lance Taylor <iant@golang.org>
104 * elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry.
105 (ZSTD_ENCODE_BASELINE_BITS): Define.
106 (ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define.
107 (elf_zstd_literal_length_base): New static const array.
108 (elf_zstd_match_length_base): Likewise.
109 (struct elf_zstd_fse_baseline_entry): Define.
110 (elf_zstd_make_literal_baseline_fse): New static function.
111 (elf_zstd_make_offset_baseline_fse): Likewise.
112 (elf_zstd_make_match_baseline_fse): Likewise.
113 (print_table, main): Use elf_zstd_fse_baseline_entry.
114 (elf_zstd_lit_table, elf_zstd_match_table): Likewise.
115 (elf_zstd_offset_table): Likewise.
116 (struct elf_zstd_seq_decode): Likewise. Remove use_rle and rle
118 (elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry,
119 taking a conversion function. Convert RLE to FSE.
120 (elf_zstd_literal_length_baseline): Remove.
121 (elf_zstd_literal_length_bits): Remove.
122 (elf_zstd_match_length_baseline): Remove.
123 (elf_zstd_match_length_bits): Remove.
124 (elf_zstd_decompress): Use elf_zstd_fse_baseline_entry. Rewrite
125 and simplify main loop.
127 2022-12-08 Ian Lance Taylor <iant@golang.org>
129 * configure.ac: Check for zstd library and
130 --compress-debug-sections=zstd linker option.
131 * Makefile.am (zstdtest_*): New targets.
132 (zstdtest_alloc_*, ctestzstd_*): New targets.
133 (BUILDTESTS): Add zstdtest, zstdtest_alloc, ctestzstd as
135 * elf.c (ELFCOMPRESS_ZSTD): Define.
136 (elf_fetch_bits): Rename from elf_zlib_fetch. Update uses.
137 (elf_fetch_bits_backward): New static function.
138 (ZLIB_HUFFMAN_*): Rename from HUFFMAN_*. Update uses.
139 (ZLIB_TABLE_*): Rename from ZDEBUG_TABLE_*. Update uses.
140 (ZSTD_TABLE_*): Define.
141 (struct elf_zstd_fse_entry): Define.
142 (elf_zstd_read_fse): New static function.
143 (elf_zstd_build_fse): Likewise.
144 (lit): Define if BACKTRACE_GENERATE_ZSTD_FSE_TABLES.
145 (match, offset, next, print_table, main): Likewise.
146 (elf_zstd_lit_table): New static const array.
147 (elf_zstd_match_table, elf_zstd_offset_table): Likewise.
148 (elf_zstd_read_huff): New static function.
149 (struct elf_zstd_seq_decode): Define.
150 (elf_zstd_unpack_seq_decode): New static function.
151 (ZSTD_LIT_*): Define.
152 (struct elf_zstd_literals): Define.
153 (elf_zstd_literal_output): New static function.
154 (ZSTD_LITERAL_LENGTH_BASELINE_OFFSET): Define.
155 (elf_zstd_literal_length_baseline): New static const array.
156 (elf_zstd_literal_length_bits): Likewise.
157 (ZSTD_MATCH_LENGTH_BASELINE_OFFSET): Define.
158 (elf_zstd_match_length_baseline): New static const array.
159 (elf_zstd_match_length_bits): Likewise.
160 (elf_zstd_decompress): New static function.
161 (ZDEBUG_TABLE_SIZE): New definition.
162 (elf_uncompress_chdr): Support ELF_COMPRESS_ZSTD.
163 (backtrace_uncompress_zstd): New function.
164 (elf_add): Use ZLIB_TABLE_SIZE for zlib-gnu sections.
165 * internal.h (backtrace_uncompress_zstd): Declare.
166 * zstdtest.c: New file.
167 * configure, config.h.in, Makefile.in: Regenerate.
169 2022-10-12 Martin Liska <mliska@suse.cz>
171 * configure: Regenerate.
173 2022-10-11 Olivier Hainque <hainque@adacore.com>
174 Olivier Hainque <hainque@adacore.com>
176 * configure: Regenerate.
178 2022-07-08 Ian Lance Taylor <iant@golang.org>
180 * configure.ac: Check for sys/link.h. Use either link.h or
181 sys/link.h when checking for dl_iterate_phdr.
182 * elf.c: Include sys/link.h if available.
183 * configure, config.h.in: Regenerate.
185 2022-07-07 Ian Lance Taylor <iant@golang.org>
187 * macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit
188 loop if we can't find debug info for one shared library.
190 2022-07-07 Ian Lance Taylor <iant@golang.org>
192 * Makefile.am (MAKETESTS): New variable split out of TESTS.
193 (CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS.
194 * Makefile.in: Regenerate.
196 2022-06-27 Ian Lance Taylor <iant@golang.org>
198 * configure.ac: Use grep instead of fgrep.
199 * configure, Makefile.in: Regenerate.
201 2022-05-28 Ian Lance Taylor <iant@golang.org>
203 PR libbacktrace/105721
206 2022-04-05 Ian Lance Taylor <iant@golang.org>
208 * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in
211 2022-02-17 Ian Lance Taylor <iant@golang.org>
213 * dwarf.c (find_address_ranges): Handle skeleton units.
214 (read_function_entry): Likewise.
216 2022-02-16 Ian Lance Taylor <iant@golang.org>
218 * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit.
220 2022-02-03 David Seifert <soap@gentoo.org>
221 Jakub Jelinek <jakub@redhat.com>
223 * configure.ac: Support --disable-werror.
224 * configure: Regenerate.
226 2021-12-28 Francois-Xavier Coudert <fxcoudert@gmail.com>
228 PR libbacktrace/103822
229 * Makefile.am: Fix newline.
230 * Makefile.in: Regenerate.
232 2021-11-12 Martin Liska <mliska@suse.cz>
234 PR libbacktrace/103167
235 * elf.c (elf_uncompress_lzma_block): Cast to unsigned int.
236 (elf_uncompress_lzma): Likewise.
237 * xztest.c (test_samples): memcpy only if v > 0.
239 2021-10-22 Martin Liska <mliska@suse.cz>
242 * btest.c (MIN_DESCRIPTOR): New.
243 (MAX_DESCRIPTOR): Likewise.
244 (check_available_files): Likewise.
245 (check_open_files): Check only file descriptors that
246 were not available at the entry.
247 (main): Call check_available_files.
249 2021-08-13 Sergei Trofimovich <siarheit@google.com>
251 * install-debuginfo-for-buildid.sh.in: Force non-localized readelf
254 2021-06-28 Clément Chigot <clement.chigot@atos.net>
256 * xcoff.c (SSUBTYP_DWRNGES): New define.
257 (xcoff_add): Use correct XCOFF DWARF section subtype
258 for DEBUG_RANGES. Remove lineoff workaround.
260 (xcoff_initialize_syminfo): Adapt to new base_address.
261 (xcoff_lookup_pc): Likewise.
262 (xcoff_initialize_fileline): Likewise.
264 2021-05-03 H.J. Lu <hjl.tools@gmail.com>
267 * configure: Regenerated.
269 2021-03-03 Ian Lance Taylor <iant@golang.org>
271 * dwarf.c (read_line_program): Don't special case file 0.
272 (read_function_entry): Likewise.
274 2021-03-02 Ian Lance Taylor <iant@golang.org>
276 PR libbacktrace/98818
277 * dwarf.c (dwarf_buf_error): Add errnum parameter. Change all
279 * backtrace.h: Update backtrace_error_callback comment.
281 2021-02-12 Ian Lance Taylor <iant@golang.org>
283 * configure.ac: Check for objcopy --add-gnu-debuglink by using
285 * configure: Regenerate
287 2021-01-18 Ian Lance Taylor <iant@golang.org>
289 * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info.
290 * Makefile.in: Regenerate.
291 * configure: Regenerate.
293 2021-01-18 Ian Lance Taylor <iant@golang.org>
296 * dwarf.c (read_v2_paths): Allocate zero entry for dirs and
298 (read_line_program): Remove parameter u, change caller. Don't
299 subtract one from dirs and filenames index.
300 (read_function_entry): Don't subtract one from filenames index.
302 2021-01-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
304 * configure: Re-generate.
306 2020-12-05 Iain Sandoe <iain@sandoe.co.uk>
309 * configure: Regenerate.
311 2020-12-02 Ian Lance Taylor <iant@golang.org>
313 * dwarf.c (resolve_string): Use > rather than >= to check whether
314 string index extends past buffer.
315 (resolve_addr_index): Similarly for address index.
317 2020-11-29 John David Anglin <danglin@gcc.gnu.org>
319 * configure: Regenerate.
321 2020-10-20 Ian Lance Taylor <iant@golang.org>
323 * internal.h (ATTRIBUTE_FALLTHROUGH): Define.
324 * elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH.
326 2020-09-28 Ian Lance Taylor <iant@golang.org>
328 PR libbacktrace/97082
329 * Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL.
330 * Makefile.in: Regenerate.
332 2020-09-28 Ian Lance Taylor <iant@golang.org>
334 PR libbacktrace/97227
335 * configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL.
336 * Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL.
337 * configure: Regenerate.
338 * Makefile.in: Regenerate.
340 2020-09-23 Ian Lance Taylor <iant@golang.org>
342 * dwarf.c (report_inlined_functions): Handle PC == -1 and PC ==
344 (dwarf_lookup_pc): Likewise.
346 2020-09-17 Ian Lance Taylor <iant@golang.org>
348 PR libbacktrace/97080
349 * fileline.c (backtrace_syminfo_to_full_callback): New function.
350 (backtrace_syminfo_to_full_error_callback): New function.
351 * elf.c (elf_nodebug): Call syminfo_fn if possible.
352 * internal.h (struct backtrace_call_full): Define.
353 (backtrace_syminfo_to_full_callback): Declare.
354 (backtrace_syminfo_to_full_error_callback): Declare.
355 * mtest.c (f3): Only check all[i] if data.index permits.
357 2020-09-16 Iain Sandoe <iain@sandoe.co.uk>
359 * macho.c (MACH_O_CPU_TYPE_PPC): New.
360 (MACH_O_CPU_TYPE_PPC64): New.
361 Add compile-tests for powerpc to the Mach-O variants.
363 2020-09-14 Ian Lance Taylor <iant@golang.org>
365 PR libbacktrace/93608
366 Add support for MiniDebugInfo.
367 * elf.c (struct elf_view): Define. Replace most uses of
368 backtrace_view with elf_view.
369 (elf_get_view): New static functions. Replace most calls of
370 backtrace_get_view with elf_get_view.
371 (elf_release_view): New static functions. Replace most calls of
372 backtrace_release_view with elf_release_view.
373 (elf_uncompress_failed): Rename from elf_zlib_failed. Change all
375 (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define.
376 (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define.
377 (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define.
378 (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define.
379 (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define.
380 (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define.
381 (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define.
382 (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define.
383 (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define.
384 (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define.
385 (LZMA_PROB_DIST_ALIGN_LEN): Define.
386 (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define.
387 (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define.
388 (LZMA_PROB_MATCH_LEN_LOW_LEN): Define.
389 (LZMA_PROB_MATCH_LEN_MID_LEN): Define.
390 (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define.
391 (LZMA_PROB_REP_LEN_CHOICE_LEN): Define.
392 (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define.
393 (LZMA_PROB_REP_LEN_LOW_LEN): Define.
394 (LZMA_PROB_REP_LEN_MID_LEN): Define.
395 (LZMA_PROB_REP_LEN_HIGH_LEN): Define.
396 (LZMA_PROB_LITERAL_LEN): Define.
397 (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define.
398 (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define.
399 (LZMA_PROB_IS_REP2_OFFSET): Define.
400 (LZMA_PROB_IS_REP0_LONG_OFFSET): Define.
401 (LZMA_PROB_DIST_SLOT_OFFSET): Define.
402 (LZMA_PROB_DIST_SPECIAL_OFFSET): Define.
403 (LZMA_PROB_DIST_ALIGN_OFFSET): Define.
404 (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define.
405 (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define.
406 (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define.
407 (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define.
408 (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define.
409 (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define.
410 (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define.
411 (LZMA_PROB_REP_LEN_LOW_OFFSET): Define.
412 (LZMA_PROB_REP_LEN_MID_OFFSET): Define.
413 (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define.
414 (LZMA_PROB_LITERAL_OFFSET): Define.
415 (LZMA_PROB_TOTAL_COUNT): Define.
416 (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define.
417 (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define.
418 (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define.
419 (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define.
420 (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define.
421 (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define.
422 (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define.
423 (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define.
424 (elf_lzma_varint): New static function.
425 (elf_lzma_range_normalize): New static function.
426 (elf_lzma_bit, elf_lzma_integer): New static functions.
427 (elf_lzma_reverse_integer): New static function.
428 (elf_lzma_len, elf_uncompress_lzma_block): New static functions.
429 (elf_uncompress_lzma): New static function.
430 (backtrace_uncompress_lzma): New function.
431 (elf_add): Add memory and memory_size parameters. Change all
432 callers. Look for .gnu_debugdata section, and, if found,
433 decompress it and use it for symbols and debug info. Permit the
434 descriptor parameter to be -1.
435 * internal.h (backtrace_uncompress_lzma): Declare.
437 * xztest.c: New file.
438 * configure.ac: Check for nm, xz, and comm programs. Check for
440 (HAVE_MINIDEBUG): Define.
441 * Makefile.am (mtest_SOURCES): Define.
442 (mtest_CFLAGS, mtest_LDADD): Define.
443 (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG.
444 (%_minidebug): New pattern rule, if HAVE_MINIDEBUG.
445 (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define.
446 (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define
447 (xztest_alloc_LDADD): Define.
448 (BUILDTESTS): Add mtest, xztest, xztest_alloc.
449 (CLEANFILES): Add files created by minidebug pattern.
450 (btest.lo): Correct INCDIR reference.
451 (mtest.lo, xztest.lo, ztest.lo): New targets.
452 * configure: Regenerate.
453 * config.h.in: Regenerate.
454 * Makefile.in: Regenerate.
456 2020-09-09 Ian Lance Taylor <iant@golang.org>
458 * pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
459 (coff_add): Determine and pass is_64.
461 2020-09-09 Ian Lance Taylor <iant@golang.org>
463 PR libbacktrace/96973
464 * fileline.c (macho_get_executable_path): New static function.
465 (fileline_initialize): Call macho_get_executable_path.
467 2020-09-09 Ian Lance Taylor <iant@golang.org>
469 * dwarf.c (function_addrs_search): Compare against the next entry
470 low address, not the high address.
471 (unit_addrs_search): Likewise.
472 (build_address_map): Add a trailing unit_addrs.
473 (read_function_entry): Add a trailing function_addrs.
474 (read_function_info): Likewise.
475 (report_inlined_functions): Search backward for function_addrs
477 (dwarf_lookup_pc): Search backward for unit_addrs and
478 function_addrs matches.
480 2020-09-08 Ian Lance Taylor <iant@golang.org>
482 * simple.c (simple_unwind): Correct comment spelling.
484 2020-09-08 Ian Lance Taylor <iant@golang.org>
486 * macho.c (macho_add_dsym): Make space for '/' in dsym. Use
487 correct length when freeing diralc.
489 2020-09-08 Ian Lance Taylor <iant@golang.org>
491 PR libbacktrace/96973
492 * macho.c (macho_add_fat): Correctly swap 32-bit file offset.
494 2020-09-08 Ian Lance Taylor <iant@golang.org>
496 PR libbacktrace/96971
497 * filetype.awk: Only match magic number at start of line.
499 2020-08-24 Ian Lance Taylor <iant@golang.org>
501 * macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
502 (MACH_O_MH_CIGAM_FAT_64): Define.
503 (struct macho_fat_arch_64): Define.
504 (macho_add_fat): Add and use is_64 parameter.
505 (macho_add): Recognize 64-bit fat files.
507 2020-07-30 H.J. Lu <hjl.tools@gmail.com>
510 * configure: Regenerated.
512 2020-07-08 Ian Lance Taylor <iant@golang.org>
514 * configure.ac: Test linker support for DWARF5
515 * configure: Regenerate
517 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
520 * configure: Regenerated.
522 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
525 * configure: Regenerated.
527 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
529 * configure: Regenerated.
531 2020-05-13 Ian Lance Taylor <iant@golang.org>
533 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
535 2020-05-13 Ian Lance Taylor <iant@golang.org>
538 * posix.c (backtrace_open): Treat EACCESS like ENOENT.
540 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
542 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
543 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
544 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
546 * Makefile.in: Regenerated.
547 * configure: Likewise.
549 2020-05-11 Ian Lance Taylor <iant@golang.org>
551 PR libbacktrace/95012
552 * configure.ac: Check for getpagesize declaration.
553 * mmap.c: Declare getpagesize if necessary.
554 * mmapio.c: Likewise.
555 * configure: Regenerate.
556 * config.h.in: Regenerate.
557 * Makefile.in: Regenerate.
559 2020-05-09 Roland McGrath <mcgrathr@google.com>
561 * elf.c (elf_add): Bail early if there are no section headers at all.
563 2020-05-09 Ian Lance Taylor <iant@golang.org>
565 * elf.c (elf_add): Don't free strtab if an error occurs after
566 recording symbol information.
568 2020-05-09 Ian Lance Taylor <iant@golang.org>
570 PR libbacktrace/88745
572 * filetype.awk: Recognize Mach-O files.
573 * Makefile.am (FORMAT_FILES): Add macho.c.
574 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
575 (%.dSYM): New pattern target.
576 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
577 (test_macho_LDADD): New target.
578 (BUILDTESTS): Add test_macho.
579 (macho.lo): Add dependencies.
580 * configure.ac: Recognize macho file type. Check for
581 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
582 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
583 * Makefile.in: Regenerate.
584 * configure: Regenerate.
585 * config.h.in: Regenerate.
587 2020-05-09 Ian Lance Taylor <iant@golang.org>
589 * read.c (backtrace_get_view): Support short read.
591 2020-05-09 Ian Lance Taylor <iant@golang.org>
593 * elf.c (elf_add): If debug sections are very large or far apart,
594 read them individually rather than as a single view.
596 2020-05-08 Ian Lance Taylor <iant@golang.org>
598 * fileline.c (sysctl_exec_name): New static function.
599 (sysctl_exec_name1): New macro or static function.
600 (sysctl_exec_name2): Likewise.
601 (fileline_initialize): Try sysctl_exec_name[12].
602 * configure.ac: Check for sysctl args to fetch executable name.
603 * configure: Regenerate.
604 * config.h.in: Regenerate.
606 2020-02-15 Ian Lance Taylor <iant@golang.org>
608 * ztest.c (test_large): Update file to current libgo test file.
610 2020-02-03 Ian Lance Taylor <iant@golang.org>
612 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
613 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
614 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
615 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
616 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
617 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
618 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
619 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
620 (stest_alloc_CFLAGS): Likewise.
621 * Makefile.in: Regenerate.
622 * ztest.c (error_callback_compress): Mark vdata unused.
623 (test_large): Add casts to avoid warnings.
625 2020-01-01 Jakub Jelinek <jakub@redhat.com>
627 Update copyright years.
629 2019-12-13 Ian Lance Taylor <iant@golang.org>
632 * dwarf.c (struct attr): Add val field.
633 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
634 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
635 (struct line_header): Add addrsize field.
636 (struct line_header_format): Define.
637 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
639 (read_uint24): New static function.
640 (read_attribute): Add implicit_val parameter. Replace dwarf_str
641 and dwarf_str_size parameters with dwarf_sections parameter. Add
642 support for new DWARF 5 forms. Change all callers.
643 (resolve_string): New static function.
644 (resolve_addr_index): Likewise.
645 (read_abbrevs): Support DW_FORM_implicit_const.
646 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
647 and ranges_is_index fields.
648 (update_pcrange): Support DWARF 5 encodings.
649 (add_high_low_range): New static function, split out of
651 (add_ranges_from_ranges): Likewise.
652 (add_ranges_from_rnglists): New static function.
653 (add_ranges): Just call new helper functions.
654 (find_address_ranges): Use resolve_string for strings, after
655 reading all attributes. Handle new DWARF 5 attributes.
656 (build_address_map): Support DWARF 5 compilation units.
657 (read_v2_paths): New static function, split out of
659 (read_lnct): New static function.
660 (read_line_header_format_entries): Likewise.
661 (read_line_header): Add ddata parameter. Support DWARF 5 line
662 headers. Call new helper functions. Change all callers.
663 (read_line_program): Use addrsize from line program header. Don't
664 special case directory index 0 for DWARF 5.
665 (read_referenced_name): Use resolve_string.
666 (read_function_entry): Handle DWARF 5 encodings. Use
668 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
669 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
670 * elf.c (dwarf_section_names): Add new section names.
671 * pecoff.c (dwarf_section_names): Likewise.
672 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
674 * configure.ac: Define HAVE_DWARF5 automake conditional.
675 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
676 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
677 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
678 (dwarf5_alloc_LDADD): Likewise.
679 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
680 (CLEANFILES, clean-local): Define.
682 2019-12-08 Ian Lance Taylor <iant@golang.org>
684 * dwarf.c (struct pcrange): Define.
685 (update_pcrange, add_ranges): New static functions.
686 (add_unit_addr): Change signature to work with add_ranges. Don't
687 add base_address here.
688 (add_unit_ranges): Remove.
689 (find_address_ranges): Replace str/ranges parameters with
690 dwarf_sections. Use update_pcrange and add_ranges. Change all
692 (add_function_range): Change signature to work with add_ranges.
693 Don't add base_address here.
694 (add_function_ranges): Remove.
695 (read_function_entry): Use update_pcrange and add_ranges.
697 2019-12-04 Ian Lance Taylor <iant@golang.org>
699 * edtest.c (test1): Add noclone attribute.
701 2019-12-04 Ian Lance Taylor <iant@golang.org>
703 * internal.h (enum dwarf_section): Define.
704 (struct dwarf_sections): Define.
705 (backtrace_dwarf_add): Update declaration to replace specific
706 section parameters with dwarf_sections parameter.
707 * dwarf.c (struct dwarf_data): Replace specific section fields
708 with dwarf_sections field.
709 (read_attribute): Use dwarf_sections with altlink.
710 (build_address_map): Replace specific section parameters with
711 dwarf_sections parameter. Change all callers.
712 (read_line_info): Use dwarf_sections with ddata.
713 (read_referenced_name): Likewise.
714 (add_function_ranges): Likewise.
715 (read_function_entry): Likewise.
716 (read_function_info): Likewise.
717 (build_dwarf_data): Replace specific section parameters with
718 dwarf_sections parameter. Change all callers.
719 (backtrace_dwarf_add): Likewise.
720 * elf.c (enum debug_section): Remove.
721 (dwarf_section_names): Remove .zdebug names.
722 (elf_add): Track zsections separately. Build dwarf_sections.
723 * pecoff.c (enum debug_section): Remove.
724 (struct debug_section_info): Remove data field.
725 (coff_add): Build dwarf_sections.
726 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
727 references with DEBUG_xxx references.
728 (xcoff_add): Build dwarf_sections.
730 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
732 * configure: Regenerate.
734 2019-09-26 Ian Lance Taylor <iant@golang.org>
736 PR libbacktrace/91908
737 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
738 __sync_bool_compare_and_swap to void.
739 * xcoff.c (backtrace_initialize): Likewise.
741 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
743 * configure.ac: Remove references to spu.
744 * configure: Regenerate.
746 2019-05-24 Clement Chigot <clement.chigot@atos.net>
748 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
750 * Makefile.in: Regenerate.
752 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
754 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
756 * configure: Regenerate.
758 2019-03-11 Ian Lance Taylor <iant@golang.org>
760 PR libbacktrace/89669
761 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
763 * Makefile.in: Regenerate.
765 2019-02-26 Tom de Vries <tdevries@suse.de>
767 * btest.c (test5): Allow global.* as minimal symbol name for global.
769 2019-02-26 Tom de Vries <tdevries@suse.de>
771 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
772 * Makefile.in: Regenerate.
774 2019-02-12 Tom de Vries <tdevries@suse.de>
776 PR libbacktrace/81983
777 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
779 2019-02-10 Tom de Vries <tdevries@suse.de>
781 * Makefile.am (BUILDTESTS): Add btest_lto.
782 * Makefile.in: Regenerate.
783 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
784 __attribute__((noclone)).
786 2019-02-08 Tom de Vries <tdevries@suse.de>
788 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
789 * print.c (backtrace_print): Same.
790 * simple.c (backtrace_simple): Same.
792 2019-02-08 Tom de Vries <tdevries@suse.de>
794 PR libbacktrace/78063
795 * dwarf.c (build_address_map): Keep all parsed units.
796 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
798 2019-01-31 Tom de Vries <tdevries@suse.de>
800 PR libbacktrace/89136
801 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
802 'debugaltlink_name_len =+ 1'.
804 2019-01-29 Tom de Vries <tdevries@suse.de>
806 * install-debuginfo-for-buildid.sh.in: New script.
807 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
808 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
809 * Makefile.in: Regenerate.
810 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
811 (READELF): Set with AC_CHECK_PROG.
812 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
813 * configure: Regenerate.
814 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
815 (elf_open_debugfile_by_buildid): ... here.
817 2019-01-29 Tom de Vries <tdevries@suse.de>
819 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
821 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
822 (check_PROGRAMS): Add BUILDTESTS.
823 * Makefile.in: Regenerate.
825 2019-01-28 Tom de Vries <tdevries@suse.de>
827 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
828 Use $< to access prerequisite.
829 * Makefile.in: Regenerate.
831 2019-01-25 Nathan Sidwell <nathan@acm.org>
833 * elf.c (elf_add): Pass "" filename to recursive call with
836 2019-01-25 Tom de Vries <tdevries@suse.de>
838 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
840 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
841 * Makefile.in: Regenerate.
843 2019-01-25 Tom de Vries <tdevries@suse.de>
845 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
846 (TESTS): Rename dtest to btest_gnudebuglink.
847 * Makefile.in: Regenerate.
849 2019-01-23 Tom de Vries <tdevries@suse.de>
851 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
852 (units_search, find_unit): Use size_t for offset.
853 (build_address_map): Use size_t for unit_offset.
855 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
857 * allocfail.c (main): Increase portability of printf statement.
859 2019-01-18 Ian Lance Taylor <iant@golang.org>
861 PR libbacktrace/88890
862 * mmapio.c (backtrace_get_view): Change size parameter to
863 uint64_t. Check that value fits in size_t.
864 * read.c (backtrace_get_view): Likewise.
865 * internal.h (backtrace_get_view): Update declaration.
866 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
868 2019-01-17 Tom de Vries <tdevries@suse.de>
870 PR libbacktrace/82857
871 * configure.ac (DWZ): Set with AC_CHECK_PROG.
872 (HAVE_DWZ): Set with AM_CONDITIONAL.
873 * configure: Regenerate.
874 * Makefile.am (TESTS): Add btest_dwz.
875 * Makefile.in: Regenerate.
877 2019-01-17 Tom de Vries <tdevries@suse.de>
879 PR libbacktrace/82857
880 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
881 (read_attribute): Handle DW_FORM_GNU_ref_alt using
882 ATTR_VAL_REF_ALT_INFO.
883 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
885 2019-01-17 Tom de Vries <tdevries@suse.de>
887 * dwarf.c (struct unit): Add low_offset and high_offset fields.
888 (struct unit_vector): New type.
889 (struct dwarf_data): Add units and units_counts fields.
890 (find_unit): New function.
891 (find_address_ranges): Add and handle unit_tag parameter.
892 (build_address_map): Add and handle units_vec parameter.
893 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
896 2019-01-17 Tom de Vries <tdevries@suse.de>
898 PR libbacktrace/82857
899 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
902 2019-01-17 Tom de Vries <tdevries@suse.de>
904 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
905 (read_attribute): Add altlink parameter. Handle missing altlink for
906 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
907 (find_address_ranges, build_address_map, build_dwarf_data): Add and
908 handle altlink parameter.
909 (read_referenced_name, read_function_entry): Add argument to
912 2019-01-17 Tom de Vries <tdevries@suse.de>
914 * dwarf.c (struct dwarf_data): Add altlink field.
915 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
916 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
917 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
918 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
919 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
920 * xcoff.c (xcoff_add): Same.
922 2019-01-17 Tom de Vries <tdevries@suse.de>
924 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
925 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
926 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
927 argument to backtrace_dwarf_add call.
928 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
929 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
930 * xcoff.c (xcoff_add): Same.
932 2019-01-17 Tom de Vries <tdevries@suse.de>
934 * elf.c (elf_add): Add and handle with_buildid_data and
935 with_buildid_size parameters. Handle .gnu_debugaltlink section.
936 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
938 2019-01-16 Tom de Vries <tdevries@suse.de>
940 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
942 (read_referenced_name): ... here, and ...
943 (read_function_entry): ... here.
945 2019-01-16 Tom de Vries <tdevries@suse.de>
947 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
949 (read_function_entry): Same. Don't allow name found via
950 DW_AT_abstract_origin or case DW_AT_specification to override linkage
953 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
957 * backtrace.h: Mechanically replace "can not" with "cannot".
959 2019-01-01 Jakub Jelinek <jakub@redhat.com>
961 Update copyright years.
963 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
965 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
967 * Makefile.in: Regenerate.
969 2018-12-28 Tom de Vries <tdevries@suse.de>
971 * dwarf.c (build_address_map): Reuse unused units.
973 2018-12-28 Tom de Vries <tdevries@suse.de>
975 * dwarf.c (build_address_map): Simplify by removing local variable
978 2018-12-28 Ian Lance Taylor <iant@golang.org>
979 Tom de Vries <tdevries@suse.de>
981 PR libbacktrace/88063
982 * dwarf.c (free_unit_addrs_vector): Remove.
983 (build_address_map): Keep track of allocated units in vector. Free
984 allocated units and corresponding abbrevs upon failure. Remove now
985 redundant call to free_unit_addrs_vector. Free addrs vector upon
986 failure. Free allocated unit vector.
988 2018-12-28 Tom de Vries <tdevries@suse.de>
990 * dwarf.c (build_address_map): Free addrs vector upon failure.
992 2018-12-14 Tom de Vries <tdevries@suse.de>
995 * allocfail.sh: Remove "set -o pipefail".
997 2018-12-12 Tom de Vries <tdevries@suse.de>
999 * Makefile.am (TESTS): Add allocfail.sh.
1000 (check_PROGRAMS): Add allocfail.
1001 * Makefile.in: Regenerate.
1002 * instrumented_alloc.c: New file. Redefine malloc and realloc.
1004 * allocfail.c: New file.
1005 * allocfail.sh: New file.
1007 2018-11-30 Tom de Vries <tdevries@suse.de>
1009 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
1010 test_xcoff_64, test_pecoff and test_unknown.
1011 * Makefile.in: Regenerate.
1012 * test_format.c: New file.
1014 2018-11-30 Tom de Vries <tdevries@suse.de>
1016 * Makefile.am : Add _with_alloc version for each test in
1018 * Makefile.in: Regenerate.
1020 2018-11-30 Tom de Vries <tdevries@suse.de>
1022 * internal.h (backtrace_vector_free): New static inline fuction,
1024 * dwarf.c (read_line_info): ... here.
1026 2018-11-28 Tom de Vries <tdevries@suse.de>
1028 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
1031 2018-11-27 Tom de Vries <tdevries@suse.de>
1033 * mmap.c (backtrace_vector_release): Same.
1034 * unittest.c (test1): Add check.
1036 2018-11-27 Tom de Vries <tdevries@suse.de>
1038 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
1040 * Makefile.am (check_PROGRAMS): Add unittest.
1041 * Makefile.in: Regenerate.
1042 * unittest.c: New file.
1044 2018-11-22 Tom de Vries <tdevries@suse.de>
1046 * dwarf.c (read_initial_length): Factor out of ...
1047 (build_address_map, read_line_info): ... here.
1049 2018-11-21 Tom de Vries <tdevries@suse.de>
1051 * dwarf.c (read_string): Factor out of ...
1052 (read_attribute, read_line_header, read_line_program): ... here.
1054 2018-10-31 Joseph Myers <joseph@codesourcery.com>
1057 * Makefile.am: Include multilib.am.
1058 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
1059 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
1061 2018-10-05 Ian Lance Taylor <iant@golang.org>
1063 PR libbacktrace/87529
1064 * backtrace.h: Document that backtrace_create_state should be
1067 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
1069 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
1070 * Makefile.in: Regenerate.
1071 * config.h.in: Likewise.
1072 * configure: Likewise.
1074 2018-08-01 Tony Reix <tony.reix@atos.net>
1076 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
1077 (struct xcoff_func, struct xcoff_func_vector): New structs.
1078 (xcoff_syminfo): Drop leading dot from symbol name.
1079 (xcoff_line_compare, xcoff_line_search): Remove.
1080 (xcoff_func_compare, xcoff_func_search): New static functions.
1081 (xcoff_lookup_pc): Search function table.
1082 (xcoff_add_line, xcoff_process_linenos): Remove.
1083 (xcoff_initialize_fileline): Build function table.
1085 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
1088 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
1089 checking up to 36 bytes.
1091 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1093 * configure: Regenerated.
1095 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1097 * configure: Regenerated.
1099 2018-04-17 Ian Lance Taylor <iant@golang.org>
1101 * backtrace.c: Revert last two changes. Don't call mmap
1104 2018-04-17 Ian Lance Taylor <iant@golang.org>
1106 * backtrace.c: Include backtrace-supported.h before checking
1107 BACKTRACE_USES_MALLOC.
1109 2018-04-17 Ian Lance Taylor <iant@golang.org>
1111 * backtrace.c (backtrace_full): When testing whether we can
1112 allocate memory, call mmap directly, and munmap the memory.
1114 2018-04-04 Jakub Jelinek <jakub@redhat.com>
1117 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
1118 big endian, only use 32-bit loads if endianity macros are predefined
1119 and indicate big or little endian.
1121 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1124 * configure: Regenerate.
1126 2018-02-15 Jakub Jelinek <jakub@redhat.com>
1129 * elf.c (SHT_PROGBITS): Undefine and define.
1131 2018-02-14 Jakub Jelinek <jakub@redhat.com>
1134 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
1135 (struct elf_ppc64_opd_data): New type.
1136 (elf_initialize_syminfo): Add opd argument, handle symbols
1137 pointing into the PowerPC64 ELFv1 .opd section.
1138 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
1139 to structure with .opd data to elf_initialize_syminfo.
1141 2018-01-31 Ian Lance Taylor <iant@golang.org>
1143 * elf.c (elf_add): Close descriptor if we use a debugfile.
1144 * btest.c (check_open_files): New static function.
1145 (main): Call check_open_files.
1147 2018-01-25 Ian Lance Taylor <iant@golang.org>
1149 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
1150 desired CRC is zero.
1151 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
1153 2018-01-25 Ian Lance Taylor <iant@golang.org>
1155 * pecoff.c (coff_add): Only release syms_view if it is valid.
1157 2018-01-25 Ian Lance Taylor <iant@golang.org>
1159 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
1161 2018-01-24 Ian Lance Taylor <iant@golang.org>
1163 * pecoff.c (coff_add): Use coff_read4, not memcpy.
1165 2018-01-24 Ian Lance Taylor <iant@golang.org>
1168 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
1171 2018-01-19 Tony Reix <tony.reix@atos.net>
1173 * xcoff.c (xcoff_incl_compare): New function.
1174 (xcoff_incl_search): New function.
1175 (xcoff_process_linenos): Use bsearch to find include file.
1176 (xcoff_initialize_fileline): Sort include file information.
1178 2018-01-16 Ian Lance Taylor <iant@golang.org>
1180 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
1182 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
1183 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
1184 (elf_zlib_default_table): Update.
1185 (elf_zlib_default_dist_table): New static array.
1186 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
1188 * ztest.c (struct zlib_test): Add uncompressed_len.
1189 (tests): Initialize uncompressed_len field. Add new test case.
1190 (test_samples): Use uncompressed_len field.
1192 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1194 Update copyright years.
1196 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1198 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
1199 * aclocal.m4: Regenerate.
1200 * Makefile.in: Likewise.
1201 * configure: Likewise.
1203 2017-10-06 Ian Lance Taylor <iant@golang.org>
1205 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
1206 zlib uncompress function.
1208 2017-10-05 Ian Lance Taylor <iant@golang.org>
1210 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
1211 Read a four byte integer.
1212 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
1213 boundary before ever calling elf_zlib_fetch.
1214 * ztest.c (test_large): Simplify print statements a bit.
1216 2017-10-02 Ian Lance Taylor <iant@golang.org>
1218 * ztest.c: #include <errno.h>.
1219 (TEST_TIMING): Don't define, don't test.
1220 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
1221 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
1222 (ZLIB_CLOCK_GETTIME_ARG): Define.
1223 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
1224 * Makefile.am: Likewise.
1225 * configure, Makefile.in: Rebuild.
1227 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
1230 * Makefile.am: Append the content of clock_gettime_link to
1232 * configure.ac: Test for the case that clock_gettime is in librt.
1233 * Makefile.in: Regenerate.
1234 * configure: Likewise.
1237 * configure.ac: Check for clock_gettime.
1238 * config.h.in: Regenerate.
1239 * configure: Likewise.
1240 * ztest.c (average_time, test_large): Conditionalize test timing
1241 on clock_gettime availability.
1243 2017-09-29 Tony Reix <tony.reix@atos.net>
1245 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
1246 (STYP_DWARF, SSUBTYP_DW*): Define.
1247 (enum dwarf_section): Define.
1248 (struct dwsect_info): Define.
1249 (xcoff_add): Look for DWARF sections, pass them to
1250 backtrace_dwarf_add.
1252 2017-09-28 Ian Lance Taylor <iant@golang.org>
1255 * elf.c (__builtin_prefetch): Define if not __GNUC__.
1257 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
1258 (b_elf_chdr): Define type.
1259 (enum debug_section): Add ZDEBUG_xxx values.
1260 (debug_section_names): Add names for new sections.
1261 (struct debug_section_info): Add compressed field.
1262 (elf_zlib_failed, elf_zlib_fetch): New static functions.
1263 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
1264 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
1265 (HUFFMAN_SECONDARY_SHIFT): Define.
1266 (ZDEBUG_TABLE_SIZE): Define.
1267 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
1268 (final_next_secondary): New static variable if
1269 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
1270 (elf_zlib_inflate_table): New static function.
1271 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
1272 function to produce fixed Huffman table.
1273 (elf_zlib_default_table): New static variable.
1274 (elf_zlib_inflate): New static function.
1275 (elf_zlib_verify_checksum): Likewise.
1276 (elf_zlib_inflate_and_verify): Likewise.
1277 (elf_uncompress_zdebug): Likewise.
1278 (elf_uncompress_chdr): Likewise.
1279 (backtrace_uncompress_zdebug): New extern function.
1280 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
1281 sections, and uncompress them.
1282 * internal.h (backtrace_compress_zdebug): Declare.
1283 * ztest.c: New file.
1284 * configure.ac: Check for -lz and check whether the linker
1285 supports --compress-debug-sections.
1286 * Makefile.am (ztest_SOURCES): New variable.
1287 (ztest_CFLAGS, ztest_LDADD): New variables.
1288 (check_PROGRAMS): Add ztest.
1289 (ctestg_SOURCES): New variable.
1290 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
1291 (ctesta_SOURCES): New variable.
1292 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
1293 (check_PROGRAMS): Add ctestg and ctesta.
1294 * configure, config.h.in, Makefile.in: Rebuild.
1296 2017-09-22 Ian Lance Taylor <iant@golang.org>
1299 * configure.ac: Check for lstat and readlink.
1300 * elf.c (lstat, readlink): Provide dummy versions if real versions
1302 * configure, config.h.in: Rebuild.
1304 2017-09-21 Ian Lance Taylor <iant@google.com>
1307 * elf.c (backtrace_initialize): Set pd.exe_filename.
1309 2017-09-20 Ian Lance Taylor <iant@golang.org>
1310 Denis Khalikov <d.khalikov@partner.samsung.com>
1313 Support for external debug info.
1314 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
1315 (S_ISLNK): Define if not defined.
1316 (xstrnlen): Define if strnlen is not available.
1317 (b_elf_note): Define type.
1318 (NT_GNU_BUILD_ID): Define macro.
1319 (elf_crc32, elf_crc32_file): New static functions.
1320 (elf_is_symlink, elf_readlink): New static functions.
1321 (elf_open_debugfile_by_buildid): New static function.
1322 (elf_try_debugfile): New static function.
1323 (elf_find_debugfile_by_debuglink): New static function.
1324 (elf_open_debugfile_by_debuglink): New static function.
1325 (elf_add): Add filename and debuginfo parameters. Adjust all
1326 callers. Look for external debug info notes, and try to fetch
1327 debug info from external file.
1328 (struct phdr_data): Add exe_filename field.
1329 (phdr_callback): Pass filename to elf_add.
1330 (backtrace_initialize): Add filename parameter.
1331 * internal.h (backtrace_initialize): Add filename parameter.
1332 * fileline.c (fileline_initialize): Pass filename to
1333 backtrace_initialize.
1334 * pecoff.c (fileline_initialize): Add unused filename parameter.
1335 * unknown.c (fileline_initialize): Likewise.
1336 * xcoff.c (fileline_initialize): Likewise.
1337 * configure.ac: Check for objcopy --add-gnu-debuglink.
1338 * Makefile.am (dtest): New test target.
1339 * configure, Makefile.in: Rebuild.
1341 2017-09-12 Steve Ellcey <sellcey@cavium.com>
1344 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
1345 * Makefile.in: Regenerate.
1347 2017-09-12 Steve Ellcey <sellcey@cavium.com>
1350 * libbacktrace/Makefile.in
1351 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
1353 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
1356 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
1358 2017-07-28 Tony Reix <tony.reix@atos.net>
1360 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
1362 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1364 * fileline.c (fileline_initialize): Print pid_t as long.
1366 2017-07-26 Tony Reix <tony.reix@atos.net>
1368 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
1369 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
1370 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
1371 * configure, config.h.in: Regenerate.
1373 2017-07-21 Tony Reix <tony.reix@atos.net>
1375 * filetype.awk: Add AIX XCOFF type detection.
1376 * configure.ac: Recognize xcoff format.
1377 * Makefile.am (FORMAT_FILES): Add xcoff.c.
1378 * fileline.c: Include <unistd.h>.
1379 (fileline_initialize): Add case for AIX procfs.
1380 * xcoff.c: New file.
1381 * configure, Makefile.in: Rebuild.
1383 2017-06-21 Richard Biener <rguenther@suse.de>
1385 * configure.ac: Add AC_SYS_LARGEFILE.
1386 * config.h.in: Regenerate.
1387 * configure: Likewise.
1389 2017-06-11 Ian Lance Taylor <iant@golang.org>
1391 * elf.c (backtrace_initialize): Always set *fileline_fn.
1392 * ttest.c: New file.
1393 * btest.c: Move support functions into testlib.c. Change calls to
1394 check to pass file name.
1395 * testlib.c: New file, copied from (part of) btest.c.
1396 * testlib.h: New file, declarations for testlib.c.
1397 * edtest.c: Use testlib.h and testlib.c.
1398 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
1399 * Makefile.am (btest_SOURCES): Add testlib.c.
1400 (edtest_SOURCES): Likewise.
1401 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
1402 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
1403 * configure, Makefile.in: Rebuild.
1405 2017-05-19 Than McIntosh <thanm@google.com>
1407 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
1408 (read_line_header): Don't allocate dirs if dirs_count == 0.
1409 * edtest.c: New file.
1410 * edtest2.c: New file.
1411 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
1412 (check_PROGRAMS): Add edtest.
1413 (edtest2_build.c, gen_edtest2_build): New targets.
1414 * Makefile.in: Rebuild.
1416 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
1418 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
1419 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
1421 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1423 Update copyright years.
1425 2016-11-15 Matthias Klose <doko@ubuntu.com>
1427 * configure: Regenerate.
1429 2016-09-11 Carlos Liam <carlos@aarzee.me>
1431 * all: Remove meaningless trailing whitespace.
1433 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
1436 * elf.c (phdr_callback) [__i386__]: Add
1437 __attribute__((__force_align_arg_pointer__)).
1439 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
1441 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
1442 avoid possible crash.
1443 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
1444 missing debug info anymore.
1446 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
1448 * mmap.c (MAP_FAILED): Define if not defined.
1450 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1452 Update copyright years.
1454 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
1456 * configure.ac: Specify that DJGPP do not have mmap
1457 even when sys/mman.h exists.
1458 * configure: Regenerate
1460 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
1462 PR libgfortran/68115
1463 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
1464 * configure: Regenerate.
1465 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
1468 2015-09-17 Ian Lance Taylor <iant@google.com>
1470 * posix.c (backtrace_open): Cast second argument of open() to int.
1472 2015-09-11 Ian Lance Taylor <iant@google.com>
1474 * Makefile.am (backtrace.lo): Depend on internal.h.
1475 (sort.lo, stest.lo): Add explicit dependencies.
1476 * Makefile.in: Rebuild.
1478 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
1480 * backtrace.c: #include <sys/types.h>.
1482 2015-09-08 Ian Lance Taylor <iant@google.com>
1485 * backtrace.c: #include "internal.h".
1486 (struct backtrace_data): Add can_alloc field.
1487 (unwind): If can_alloc is false, don't try to get file/line
1489 (backtrace_full): Set can_alloc field in bdata.
1490 * alloc.c (backtrace_alloc): Don't call error_callback if it is
1492 * mmap.c (backtrace_alloc): Likewise.
1493 * internal.h: Update comments for backtrace_alloc and
1496 2015-09-08 Ian Lance Taylor <iant@google.com>
1499 * mmap.c (backtrace_alloc): Correct test for mmap failure.
1501 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1503 * configure.ac: For spu-*-* targets, set have_fcntl to no.
1504 * configure: Regenerate.
1506 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1508 * configure.ac: Remove [disable-shared] argument to LT_INIT.
1509 Remove setting PIC_FLAG when building as target library.
1510 * configure: Regenerate.
1512 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
1514 * configure.ac: Only compile with -fPIC if the target
1516 * configure: Regenerate.
1518 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1520 * configure.ac: Set have_mmap to no on spu-*-* targets.
1521 * configure: Regenerate.
1523 2015-08-13 Ian Lance Taylor <iant@google.com>
1525 * dwarf.c (read_function_entry): Add vec_inlined parameter.
1528 2015-06-11 Martin Sebor <msebor@redhat.com>
1531 * dwarf.c (struct line): Add new field idx.
1532 (line_compare): Use it.
1534 (read_line_info): Reset it.
1536 2015-05-29 Tristan Gingold <gingold@adacore.com>
1538 * pecoff.c: New file.
1539 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1540 * Makefile.in: Regenerate.
1541 * filetype.awk: Detect pecoff.
1542 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1544 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1546 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1547 * configure: Regenerate.
1548 * pecoff.c: New file.
1550 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1552 * Makefile.in: Regenerated with automake-1.11.6.
1553 * aclocal.m4: Likewise.
1554 * configure: Likewise.
1556 2015-01-24 Matthias Klose <doko@ubuntu.com>
1558 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1559 * configure: Regenerate.
1561 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1563 Update copyright years.
1565 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1568 * configure: Regenerated.
1570 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1572 * ChangeLog.jit: New.
1574 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1577 * configure: Regenerate.
1579 2014-10-23 Ian Lance Taylor <iant@google.com>
1581 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1582 Fix to return void *.
1584 2014-05-08 Ian Lance Taylor <iant@google.com>
1586 * mmap.c (backtrace_free): If freeing a large aligned block of
1587 memory, call munmap rather than holding onto it.
1588 (backtrace_vector_grow): When growing a vector, double the number
1589 of pages requested. When releasing the old version of a grown
1590 vector, pass the correct size to backtrace_free.
1592 2014-03-07 Ian Lance Taylor <iant@google.com>
1594 * sort.c (backtrace_qsort): Use middle element as pivot.
1596 2014-03-06 Ian Lance Taylor <iant@google.com>
1599 * stest.c: New file.
1600 * internal.h (backtrace_qsort): Declare.
1601 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1602 (read_line_info, read_function_entry): Likewise.
1603 (read_function_info, build_dwarf_data): Likewise.
1604 * elf.c (elf_initialize_syminfo): Likewise.
1605 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1606 (stest_SOURCES, stest_LDADD): Define.
1607 (check_PROGRAMS): Add stest.
1609 2014-02-07 Misty De Meo <misty@brew.sh>
1612 * configure.ac: Use AC_LINK_IFELSE in check for
1614 * configure: Regenerate.
1616 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1618 Update copyright years
1620 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1622 * elf.c (ET_DYN): Undefine and define again.
1623 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1624 return early -1 without closing the descriptor.
1625 (struct phdr_data): Add exe_descriptor.
1626 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1627 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1628 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1630 (backtrace_initialize): Adjust call to elf_add. If it returns
1631 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1633 2013-12-05 Ian Lance Taylor <iant@google.com>
1635 * alloc.c (backtrace_vector_finish): Add error_callback and data
1636 parameters. Call backtrace_vector_release. Return address base.
1637 * mmap.c (backtrace_vector_finish): Add error_callback and data
1638 parameters. Return address base.
1639 * dwarf.c (read_function_info): Get new address base from
1640 backtrace_vector_finish.
1641 * internal.h (backtrace_vector_finish): Update declaration.
1643 2013-11-27 Ian Lance Taylor <iant@google.com>
1645 * dwarf.c (find_address_ranges): New static function, broken out
1646 of build_address_map.
1647 (build_address_map): Call it.
1648 * btest.c (check): Check for missing filename or function, rather
1650 (f3): Check that enough frames were returned.
1652 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1654 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1655 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1657 * btest.c (struct symdata): Add size field.
1658 (callback_three): Add symsize argument. Copy it to the data->size
1660 (f23): Set symdata.size to 0.
1661 (test5): Likewise. If sizeof (int) > 1, lookup address of
1662 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1665 * atomic.c: Include sys/types.h.
1667 2013-11-18 Ian Lance Taylor <iant@google.com>
1669 * configure.ac: Check for support of __atomic extensions.
1670 * internal.h: Declare or #define atomic functions for use in
1672 * atomic.c: New file.
1673 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1674 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1675 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1676 (backtrace_initialize): Likewise.
1677 * fileline.c (fileline_initialize): Likewise.
1678 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1679 * configure, config.h.in, Makefile.in: Rebuild.
1681 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1683 * elf.c (SHN_UNDEF): Define.
1684 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1685 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1686 (elf_add): Adjust caller.
1688 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1690 2013-11-16 Ian Lance Taylor <iant@google.com>
1692 * backtrace.h (backtrace_create_state): Correct comment about
1695 2013-11-15 Ian Lance Taylor <iant@google.com>
1697 * backtrace.h (backtrace_syminfo): Update comment and parameter
1698 name to take any address, not just a PC value.
1699 * elf.c (STT_OBJECT): Define.
1700 (elf_nosyms): Rename parameter pc to addr.
1701 (elf_symbol_search): Rename local variable pc to addr.
1702 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1703 (elf_syminfo): Rename parameter pc to addr.
1704 * btest.c (global): New global variable.
1708 2013-10-17 Ian Lance Taylor <iant@google.com>
1710 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1713 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1715 * configure.ac: Add --enable-host-shared, setting up
1716 pre-existing PIC_FLAG variable within Makefile.am et al.
1717 * configure: Regenerate.
1719 2013-09-20 Alan Modra <amodra@gmail.com>
1721 * configure: Regenerate.
1723 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1725 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1727 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1729 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1730 dl_iterate_phdr callbacks.
1732 2013-03-25 Ian Lance Taylor <iant@google.com>
1734 * alloc.c: #include <sys/types.h>.
1737 2013-01-31 Ian Lance Taylor <iant@google.com>
1739 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1740 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1742 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1745 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1746 attribute was not seen.
1748 2013-01-16 Ian Lance Taylor <iant@google.com>
1750 * dwarf.c (struct unit): Add filename and abs_filename fields.
1751 (build_address_map): Set new fields when reading unit.
1752 (dwarf_lookup_pc): If we don't find an entry in the line table,
1753 just return the main file name.
1755 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1757 Update copyright years.
1759 2013-01-01 Ian Lance Taylor <iant@google.com>
1762 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1763 $(MULTIBUILDTOP)/../../gcc/include.
1764 * Makefile.in: Rebuild.
1766 2013-01-01 Ian Lance Taylor <iant@google.com>
1769 * mmap.c (backtrace_alloc): Don't call sync functions if not
1771 (backtrace_free): Likewise.
1773 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1775 * mmapio.c: Define MAP_FAILED if not defined.
1777 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1780 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1781 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1782 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1784 * Makefile.in: Regenerated.
1785 * configure: Regenerated.
1787 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1790 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1791 * Makefile.in: Regenerated.
1793 2012-11-20 Ian Lance Taylor <iant@google.com>
1795 * dwarf.c (read_attribute): Always clear val.
1797 2012-11-13 Ian Lance Taylor <iant@google.com>
1800 * configure.ac: Only add -Werror if building a target library.
1801 * configure: Rebuild.
1803 2012-11-12 Ian Lance Taylor <iant@google.com>
1804 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1805 Gerald Pfeifer <gerald@pfeifer.com>
1807 * configure.ac: Check for getexecname.
1808 * fileline.c: #include <errno.h>. Define getexecname if not
1810 (fileline_initialize): Try to find the executable in a few
1812 * print.c (error_callback): Only print the filename if it came
1813 from the backtrace state.
1814 * configure, config.h.in: Rebuild.
1816 2012-10-29 Ian Lance Taylor <iant@google.com>
1818 * mmap.c (backtrace_vector_release): Correct last patch: add
1821 2012-10-29 Ian Lance Taylor <iant@google.com>
1823 * mmap.c (backtrace_vector_release): Make sure freed block is
1824 aligned on 8-byte boundary.
1826 2012-10-26 Ian Lance Taylor <iant@google.com>
1829 * posix.c (backtrace_open): Add does_not_exist parameter.
1830 * elf.c (phdr_callback): Do not warn if shared library could not
1832 * fileline.c (fileline_initialize): Update calls to
1834 * internal.h (backtrace_open): Update declaration.
1836 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1839 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1840 * configure: Regenerate.
1842 2012-10-24 Ian Lance Taylor <iant@google.com>
1845 * configure.ac: Check whether -funwind-tables option works.
1846 * configure: Rebuild.
1848 2012-10-11 Ian Lance Taylor <iant@google.com>
1850 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1851 * configure: Rebuild.
1853 2012-10-10 Ian Lance Taylor <iant@google.com>
1855 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1858 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1860 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1862 2012-10-09 Ian Lance Taylor <iant@google.com>
1864 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1865 (backtrace_dwarf_add): Likewise.
1867 2012-10-09 Ian Lance Taylor <iant@google.com>
1869 Add support for tracing through shared libraries.
1870 * configure.ac: Check for link.h and dl_iterate_phdr.
1871 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1872 ELF macros before #defining them.
1873 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1875 (struct elf_syminfo_data): Add next field.
1876 (elf_initialize_syminfo): Initialize next field.
1877 (elf_add_syminfo_data): New static function.
1878 (elf_add): New static function, broken out of
1879 backtrace_initialize. Call backtrace_dwarf_add instead of
1880 backtrace_dwarf_initialize.
1881 (struct phdr_data): Define.
1882 (phdr_callback): New static function.
1883 (backtrace_initialize): Call elf_add.
1884 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1885 (add_unit_addr): Add base_address parameter. Change all callers.
1886 (add_unit_ranges, build_address_map): Likewise.
1887 (add_line): Add ddata parameter. Change all callers.
1888 (read_line_program, add_function_range): Likewise.
1889 (dwarf_lookup_pc): New static function, broken out of
1891 (dwarf_fileline): Call dwarf_lookup_pc.
1892 (build_dwarf_data): New static function.
1893 (backtrace_dwarf_add): New function.
1894 (backtrace_dwarf_initialize): Remove.
1895 * internal.h (backtrace_dwarf_initialize): Don't declare.
1896 (backtrace_dwarf_add): Declare.
1897 * configure, config.h.in: Rebuild.
1899 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1901 * btest.c (f23): Avoid uninitialized variable warning.
1903 2012-10-04 Ian Lance Taylor <iant@google.com>
1905 * dwarf.c: If the system header files do not declare strnlen,
1906 provide our own version.
1908 2012-10-03 Ian Lance Taylor <iant@google.com>
1910 * dwarf.c (read_uleb128): Fix overflow test.
1911 (read_sleb128): Likewise.
1912 (build_address_map): Don't change unit_buf.start.
1914 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1917 * configure.ac (EXTRA_FLAGS): New.
1918 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1919 * configure, Makefile.in: Regenerate.
1921 2012-09-29 Ian Lance Taylor <iant@google.com>
1924 * fileline.c (fileline_initialize): Pass errnum as -1 when
1925 reporting that we could not read executable information after a
1928 2012-09-27 Ian Lance Taylor <iant@google.com>
1931 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1932 * Makefile.am: Add dependencies for all objects.
1933 * configure, aclocal.m4, Makefile.in: Rebuild.
1935 2012-09-27 Ian Lance Taylor <iant@google.com>
1938 * elf.c (backtrace_initialize): Set *fileln_fn, not
1941 2012-09-19 Ian Lance Taylor <iant@google.com>
1943 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1944 as a target library.
1945 * configure: Rebuild.
1947 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1948 Ian Lance Taylor <iant@google.com>
1950 * configure.ac (GCC_HEADER_STDINT): Invoke.
1951 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1952 * btest.c: Don't include <stdint.h>.
1953 * dwarf.c: Likewise.
1954 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1956 2012-09-18 Ian Lance Taylor <iant@google.com>
1959 * Makefile.am (AM_CPPFLAGS): Define.
1960 (AM_CFLAGS): Remove -I options.
1961 * Makefile.in: Rebuild.
1963 2012-09-18 Ian Lance Taylor <iant@google.com>
1965 * posix.c (O_BINARY): Define if not defined.
1966 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1967 HAVE_FCNTL is defined.
1968 * configure.ac: Test for the fcntl function.
1969 * configure, config.h.in: Rebuild.
1971 2012-09-18 Ian Lance Taylor <iant@google.com>
1973 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1975 2012-09-18 Ian Lance Taylor <iant@google.com>
1977 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1979 2012-09-18 Ian Lance Taylor <iant@google.com>
1981 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1982 * mmapio.c: Don't define _GNU_SOURCE.
1983 * configure, config.h.in: Rebuild.
1985 2012-09-18 Ian Lance Taylor <iant@google.com>
1987 * configure.ac: Check whether strnlen is declared.
1988 * dwarf.c: Declare strnlen if not declared.
1989 * configure, config.h.in: Rebuild.
1991 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1993 * fileline.c: Include <stdlib.h>.
1996 2012-09-17 Ian Lance Taylor <iant@google.com>
1999 * nounwind.c (backtrace_full): Rename from backtrace. Add state
2002 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
2005 * nounwind.c (backtrace_simple): Add state parameter.
2007 2012-09-17 Ian Lance Taylor <iant@google.com>
2010 * unknown.c (unknown_fileline): Add state parameter, remove
2011 fileline_data parameter, name error_callback parameter.
2012 (backtrace_initialize): Add state parameter.
2014 2012-09-17 Ian Lance Taylor <iant@google.com>
2016 * Initial implementation.
2018 Copyright (C) 2012-2023 Free Software Foundation, Inc.
2020 Copying and distribution of this file, with or without modification,
2021 are permitted in any medium without royalty provided the copyright
2022 notice and this notice are preserved.