1 2023-11-29 Ian Lance Taylor <iant@golang.org>
3 * fileline.c: Include <windows.h> if available.
4 (windows_get_executable_path): New static function.
5 (fileline_initialize): Call windows_get_executable_path.
6 * configure.ac: Checked for windows.h
7 * configure: Regenerate.
8 * config.h.in: Regenerate.
10 2023-10-22 Iain Sandoe <iain@sandoe.co.uk>
12 * configure: Regenerate.
13 * configure.ac: Handle Darwin rpaths.
15 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
17 * configure: Regenerate.
19 2023-08-07 Alexander von Gluck IV <kallisti5@unixzen.com>
21 * configure: Regenerate.
23 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
25 * configure: Regenerate.
27 2023-08-07 Nick Alcock <nick.alcock@oracle.com>
29 * configure: Regenerate.
31 2023-08-07 H.J. Lu <hjl.tools@gmail.com>
33 * configure: Regenerate.
35 2023-08-07 H.J. Lu <hjl.tools@gmail.com>
37 * configure: Regenerate.
39 2023-08-03 Richard Biener <rguenther@suse.de>
41 * zstdtest.c (test_samples): Properly compute the allocation
42 size for the uncompressed data.
44 2023-07-31 Ian Lance Taylor <iant@golang.org>
46 * configure.ac: Check for _pgmptr declaration.
47 * fileline.c (fileline_initialize): Check for _pgmfptr before
49 * configure, config.h.in: Regenerate.
51 2023-03-28 Ian Lance Taylor <iant@golang.org>
53 * elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading
54 bits, not before. Add unlikely for error case.
55 (elf_zstd_offset_table): Regenerate.
56 (elf_zstd_read_huff): Clear 13 entries in weight_mark, not 12.
57 (elf_zstd_read_literals): For a single stream adjust by
58 total_streams_size, not compressed_size.
60 2023-01-20 Ian Lance Taylor <iant@golang.org>
62 * dwarf.c (struct function_addrs): Change low and high fields to
64 (struct unit_addrs): Likewise.
65 (resolve_addr_index): Change address parameter to uintptr_t*.
66 (add_unit_addr): Change lowpc and highpc parameters to uintptr_t.
67 (add_function_range): Likewise.
68 (struct pcrange): Change lowpc and highpc fields to uintptr_t.
69 (add_low_high_range): Change add_range lowpc and highpc parameters
71 (add_ranges_from_ranges): Likewise.
72 (add_ranges_from_rnglists): Likewise.
73 (add_low_high_range): Chnage lowpc and highpc variables to
75 (add_ranges_from_rnglists): Change some local variables to
77 (add_ranges_from_ranges): Change base parameter to uintptr_t.
78 (add_ranges_from_rnglists): Likewise.
79 (read_function_entry): Likewise.
80 (resolve_addr_index): Add explicit casts to uintptr_t.
81 (update_pcrange): Likewise.
82 (add_ranges_from_ranges): Likewise.
83 (add_ranges_from_rnglists): Likewise.
84 (read_function_entry): Likewise.
86 2023-01-17 Martin Liska <mliska@suse.cz>
88 * Makefile.in: Regenerate.
90 2023-01-06 Ian Lance Taylor <iant@golang.org>
92 PR libbacktrace/108297
93 * configure.ac: Test whether linker supports --build-id.
94 * Makefile.am: Only run --build-id tests if supported.
95 * configure, Makefile.in: Regenerate.
97 2022-12-17 Ian Lance Taylor <iant@golang.org>
99 * elf.c (elf_fetch_backward_init): New static function.
100 (ZSTD_TABLE_SIZE): Use huffman scratch space size rather than
102 (ZSTD_TABLE_WORK_LIT_SIZE): Don't define.
103 (elf_zstd_read_huff): Use elf_fetch_backward_init.
104 (elf_zstd_read_literals): New static function.
105 (ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define.
106 (struct elf_zstd_literals): Don't define.
107 (elf_zstd_literal_output): Remove static function.
108 (elf_zstd_decompress): Use elf_fetch_backward_init and
109 elf_zstd_read_literals. Rewrite literal copying.<
111 2022-12-10 Ian Lance Taylor <iant@golang.org>
113 * elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry.
114 (ZSTD_ENCODE_BASELINE_BITS): Define.
115 (ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define.
116 (elf_zstd_literal_length_base): New static const array.
117 (elf_zstd_match_length_base): Likewise.
118 (struct elf_zstd_fse_baseline_entry): Define.
119 (elf_zstd_make_literal_baseline_fse): New static function.
120 (elf_zstd_make_offset_baseline_fse): Likewise.
121 (elf_zstd_make_match_baseline_fse): Likewise.
122 (print_table, main): Use elf_zstd_fse_baseline_entry.
123 (elf_zstd_lit_table, elf_zstd_match_table): Likewise.
124 (elf_zstd_offset_table): Likewise.
125 (struct elf_zstd_seq_decode): Likewise. Remove use_rle and rle
127 (elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry,
128 taking a conversion function. Convert RLE to FSE.
129 (elf_zstd_literal_length_baseline): Remove.
130 (elf_zstd_literal_length_bits): Remove.
131 (elf_zstd_match_length_baseline): Remove.
132 (elf_zstd_match_length_bits): Remove.
133 (elf_zstd_decompress): Use elf_zstd_fse_baseline_entry. Rewrite
134 and simplify main loop.
136 2022-12-08 Ian Lance Taylor <iant@golang.org>
138 * configure.ac: Check for zstd library and
139 --compress-debug-sections=zstd linker option.
140 * Makefile.am (zstdtest_*): New targets.
141 (zstdtest_alloc_*, ctestzstd_*): New targets.
142 (BUILDTESTS): Add zstdtest, zstdtest_alloc, ctestzstd as
144 * elf.c (ELFCOMPRESS_ZSTD): Define.
145 (elf_fetch_bits): Rename from elf_zlib_fetch. Update uses.
146 (elf_fetch_bits_backward): New static function.
147 (ZLIB_HUFFMAN_*): Rename from HUFFMAN_*. Update uses.
148 (ZLIB_TABLE_*): Rename from ZDEBUG_TABLE_*. Update uses.
149 (ZSTD_TABLE_*): Define.
150 (struct elf_zstd_fse_entry): Define.
151 (elf_zstd_read_fse): New static function.
152 (elf_zstd_build_fse): Likewise.
153 (lit): Define if BACKTRACE_GENERATE_ZSTD_FSE_TABLES.
154 (match, offset, next, print_table, main): Likewise.
155 (elf_zstd_lit_table): New static const array.
156 (elf_zstd_match_table, elf_zstd_offset_table): Likewise.
157 (elf_zstd_read_huff): New static function.
158 (struct elf_zstd_seq_decode): Define.
159 (elf_zstd_unpack_seq_decode): New static function.
160 (ZSTD_LIT_*): Define.
161 (struct elf_zstd_literals): Define.
162 (elf_zstd_literal_output): New static function.
163 (ZSTD_LITERAL_LENGTH_BASELINE_OFFSET): Define.
164 (elf_zstd_literal_length_baseline): New static const array.
165 (elf_zstd_literal_length_bits): Likewise.
166 (ZSTD_MATCH_LENGTH_BASELINE_OFFSET): Define.
167 (elf_zstd_match_length_baseline): New static const array.
168 (elf_zstd_match_length_bits): Likewise.
169 (elf_zstd_decompress): New static function.
170 (ZDEBUG_TABLE_SIZE): New definition.
171 (elf_uncompress_chdr): Support ELF_COMPRESS_ZSTD.
172 (backtrace_uncompress_zstd): New function.
173 (elf_add): Use ZLIB_TABLE_SIZE for zlib-gnu sections.
174 * internal.h (backtrace_uncompress_zstd): Declare.
175 * zstdtest.c: New file.
176 * configure, config.h.in, Makefile.in: Regenerate.
178 2022-10-12 Martin Liska <mliska@suse.cz>
180 * configure: Regenerate.
182 2022-10-11 Olivier Hainque <hainque@adacore.com>
183 Olivier Hainque <hainque@adacore.com>
185 * configure: Regenerate.
187 2022-07-08 Ian Lance Taylor <iant@golang.org>
189 * configure.ac: Check for sys/link.h. Use either link.h or
190 sys/link.h when checking for dl_iterate_phdr.
191 * elf.c: Include sys/link.h if available.
192 * configure, config.h.in: Regenerate.
194 2022-07-07 Ian Lance Taylor <iant@golang.org>
196 * macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit
197 loop if we can't find debug info for one shared library.
199 2022-07-07 Ian Lance Taylor <iant@golang.org>
201 * Makefile.am (MAKETESTS): New variable split out of TESTS.
202 (CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS.
203 * Makefile.in: Regenerate.
205 2022-06-27 Ian Lance Taylor <iant@golang.org>
207 * configure.ac: Use grep instead of fgrep.
208 * configure, Makefile.in: Regenerate.
210 2022-05-28 Ian Lance Taylor <iant@golang.org>
212 PR libbacktrace/105721
215 2022-04-05 Ian Lance Taylor <iant@golang.org>
217 * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in
220 2022-02-17 Ian Lance Taylor <iant@golang.org>
222 * dwarf.c (find_address_ranges): Handle skeleton units.
223 (read_function_entry): Likewise.
225 2022-02-16 Ian Lance Taylor <iant@golang.org>
227 * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit.
229 2022-02-03 David Seifert <soap@gentoo.org>
230 Jakub Jelinek <jakub@redhat.com>
232 * configure.ac: Support --disable-werror.
233 * configure: Regenerate.
235 2021-12-28 Francois-Xavier Coudert <fxcoudert@gmail.com>
237 PR libbacktrace/103822
238 * Makefile.am: Fix newline.
239 * Makefile.in: Regenerate.
241 2021-11-12 Martin Liska <mliska@suse.cz>
243 PR libbacktrace/103167
244 * elf.c (elf_uncompress_lzma_block): Cast to unsigned int.
245 (elf_uncompress_lzma): Likewise.
246 * xztest.c (test_samples): memcpy only if v > 0.
248 2021-10-22 Martin Liska <mliska@suse.cz>
251 * btest.c (MIN_DESCRIPTOR): New.
252 (MAX_DESCRIPTOR): Likewise.
253 (check_available_files): Likewise.
254 (check_open_files): Check only file descriptors that
255 were not available at the entry.
256 (main): Call check_available_files.
258 2021-08-13 Sergei Trofimovich <siarheit@google.com>
260 * install-debuginfo-for-buildid.sh.in: Force non-localized readelf
263 2021-06-28 Clément Chigot <clement.chigot@atos.net>
265 * xcoff.c (SSUBTYP_DWRNGES): New define.
266 (xcoff_add): Use correct XCOFF DWARF section subtype
267 for DEBUG_RANGES. Remove lineoff workaround.
269 (xcoff_initialize_syminfo): Adapt to new base_address.
270 (xcoff_lookup_pc): Likewise.
271 (xcoff_initialize_fileline): Likewise.
273 2021-05-03 H.J. Lu <hjl.tools@gmail.com>
276 * configure: Regenerated.
278 2021-03-03 Ian Lance Taylor <iant@golang.org>
280 * dwarf.c (read_line_program): Don't special case file 0.
281 (read_function_entry): Likewise.
283 2021-03-02 Ian Lance Taylor <iant@golang.org>
285 PR libbacktrace/98818
286 * dwarf.c (dwarf_buf_error): Add errnum parameter. Change all
288 * backtrace.h: Update backtrace_error_callback comment.
290 2021-02-12 Ian Lance Taylor <iant@golang.org>
292 * configure.ac: Check for objcopy --add-gnu-debuglink by using
294 * configure: Regenerate
296 2021-01-18 Ian Lance Taylor <iant@golang.org>
298 * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info.
299 * Makefile.in: Regenerate.
300 * configure: Regenerate.
302 2021-01-18 Ian Lance Taylor <iant@golang.org>
305 * dwarf.c (read_v2_paths): Allocate zero entry for dirs and
307 (read_line_program): Remove parameter u, change caller. Don't
308 subtract one from dirs and filenames index.
309 (read_function_entry): Don't subtract one from filenames index.
311 2021-01-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
313 * configure: Re-generate.
315 2020-12-05 Iain Sandoe <iain@sandoe.co.uk>
318 * configure: Regenerate.
320 2020-12-02 Ian Lance Taylor <iant@golang.org>
322 * dwarf.c (resolve_string): Use > rather than >= to check whether
323 string index extends past buffer.
324 (resolve_addr_index): Similarly for address index.
326 2020-11-29 John David Anglin <danglin@gcc.gnu.org>
328 * configure: Regenerate.
330 2020-10-20 Ian Lance Taylor <iant@golang.org>
332 * internal.h (ATTRIBUTE_FALLTHROUGH): Define.
333 * elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH.
335 2020-09-28 Ian Lance Taylor <iant@golang.org>
337 PR libbacktrace/97082
338 * Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL.
339 * Makefile.in: Regenerate.
341 2020-09-28 Ian Lance Taylor <iant@golang.org>
343 PR libbacktrace/97227
344 * configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL.
345 * Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL.
346 * configure: Regenerate.
347 * Makefile.in: Regenerate.
349 2020-09-23 Ian Lance Taylor <iant@golang.org>
351 * dwarf.c (report_inlined_functions): Handle PC == -1 and PC ==
353 (dwarf_lookup_pc): Likewise.
355 2020-09-17 Ian Lance Taylor <iant@golang.org>
357 PR libbacktrace/97080
358 * fileline.c (backtrace_syminfo_to_full_callback): New function.
359 (backtrace_syminfo_to_full_error_callback): New function.
360 * elf.c (elf_nodebug): Call syminfo_fn if possible.
361 * internal.h (struct backtrace_call_full): Define.
362 (backtrace_syminfo_to_full_callback): Declare.
363 (backtrace_syminfo_to_full_error_callback): Declare.
364 * mtest.c (f3): Only check all[i] if data.index permits.
366 2020-09-16 Iain Sandoe <iain@sandoe.co.uk>
368 * macho.c (MACH_O_CPU_TYPE_PPC): New.
369 (MACH_O_CPU_TYPE_PPC64): New.
370 Add compile-tests for powerpc to the Mach-O variants.
372 2020-09-14 Ian Lance Taylor <iant@golang.org>
374 PR libbacktrace/93608
375 Add support for MiniDebugInfo.
376 * elf.c (struct elf_view): Define. Replace most uses of
377 backtrace_view with elf_view.
378 (elf_get_view): New static functions. Replace most calls of
379 backtrace_get_view with elf_get_view.
380 (elf_release_view): New static functions. Replace most calls of
381 backtrace_release_view with elf_release_view.
382 (elf_uncompress_failed): Rename from elf_zlib_failed. Change all
384 (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define.
385 (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define.
386 (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define.
387 (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define.
388 (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define.
389 (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define.
390 (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define.
391 (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define.
392 (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define.
393 (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define.
394 (LZMA_PROB_DIST_ALIGN_LEN): Define.
395 (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define.
396 (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define.
397 (LZMA_PROB_MATCH_LEN_LOW_LEN): Define.
398 (LZMA_PROB_MATCH_LEN_MID_LEN): Define.
399 (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define.
400 (LZMA_PROB_REP_LEN_CHOICE_LEN): Define.
401 (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define.
402 (LZMA_PROB_REP_LEN_LOW_LEN): Define.
403 (LZMA_PROB_REP_LEN_MID_LEN): Define.
404 (LZMA_PROB_REP_LEN_HIGH_LEN): Define.
405 (LZMA_PROB_LITERAL_LEN): Define.
406 (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define.
407 (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define.
408 (LZMA_PROB_IS_REP2_OFFSET): Define.
409 (LZMA_PROB_IS_REP0_LONG_OFFSET): Define.
410 (LZMA_PROB_DIST_SLOT_OFFSET): Define.
411 (LZMA_PROB_DIST_SPECIAL_OFFSET): Define.
412 (LZMA_PROB_DIST_ALIGN_OFFSET): Define.
413 (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define.
414 (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define.
415 (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define.
416 (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define.
417 (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define.
418 (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define.
419 (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define.
420 (LZMA_PROB_REP_LEN_LOW_OFFSET): Define.
421 (LZMA_PROB_REP_LEN_MID_OFFSET): Define.
422 (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define.
423 (LZMA_PROB_LITERAL_OFFSET): Define.
424 (LZMA_PROB_TOTAL_COUNT): Define.
425 (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define.
426 (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define.
427 (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define.
428 (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define.
429 (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define.
430 (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define.
431 (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define.
432 (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define.
433 (elf_lzma_varint): New static function.
434 (elf_lzma_range_normalize): New static function.
435 (elf_lzma_bit, elf_lzma_integer): New static functions.
436 (elf_lzma_reverse_integer): New static function.
437 (elf_lzma_len, elf_uncompress_lzma_block): New static functions.
438 (elf_uncompress_lzma): New static function.
439 (backtrace_uncompress_lzma): New function.
440 (elf_add): Add memory and memory_size parameters. Change all
441 callers. Look for .gnu_debugdata section, and, if found,
442 decompress it and use it for symbols and debug info. Permit the
443 descriptor parameter to be -1.
444 * internal.h (backtrace_uncompress_lzma): Declare.
446 * xztest.c: New file.
447 * configure.ac: Check for nm, xz, and comm programs. Check for
449 (HAVE_MINIDEBUG): Define.
450 * Makefile.am (mtest_SOURCES): Define.
451 (mtest_CFLAGS, mtest_LDADD): Define.
452 (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG.
453 (%_minidebug): New pattern rule, if HAVE_MINIDEBUG.
454 (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define.
455 (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define
456 (xztest_alloc_LDADD): Define.
457 (BUILDTESTS): Add mtest, xztest, xztest_alloc.
458 (CLEANFILES): Add files created by minidebug pattern.
459 (btest.lo): Correct INCDIR reference.
460 (mtest.lo, xztest.lo, ztest.lo): New targets.
461 * configure: Regenerate.
462 * config.h.in: Regenerate.
463 * Makefile.in: Regenerate.
465 2020-09-09 Ian Lance Taylor <iant@golang.org>
467 * pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
468 (coff_add): Determine and pass is_64.
470 2020-09-09 Ian Lance Taylor <iant@golang.org>
472 PR libbacktrace/96973
473 * fileline.c (macho_get_executable_path): New static function.
474 (fileline_initialize): Call macho_get_executable_path.
476 2020-09-09 Ian Lance Taylor <iant@golang.org>
478 * dwarf.c (function_addrs_search): Compare against the next entry
479 low address, not the high address.
480 (unit_addrs_search): Likewise.
481 (build_address_map): Add a trailing unit_addrs.
482 (read_function_entry): Add a trailing function_addrs.
483 (read_function_info): Likewise.
484 (report_inlined_functions): Search backward for function_addrs
486 (dwarf_lookup_pc): Search backward for unit_addrs and
487 function_addrs matches.
489 2020-09-08 Ian Lance Taylor <iant@golang.org>
491 * simple.c (simple_unwind): Correct comment spelling.
493 2020-09-08 Ian Lance Taylor <iant@golang.org>
495 * macho.c (macho_add_dsym): Make space for '/' in dsym. Use
496 correct length when freeing diralc.
498 2020-09-08 Ian Lance Taylor <iant@golang.org>
500 PR libbacktrace/96973
501 * macho.c (macho_add_fat): Correctly swap 32-bit file offset.
503 2020-09-08 Ian Lance Taylor <iant@golang.org>
505 PR libbacktrace/96971
506 * filetype.awk: Only match magic number at start of line.
508 2020-08-24 Ian Lance Taylor <iant@golang.org>
510 * macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
511 (MACH_O_MH_CIGAM_FAT_64): Define.
512 (struct macho_fat_arch_64): Define.
513 (macho_add_fat): Add and use is_64 parameter.
514 (macho_add): Recognize 64-bit fat files.
516 2020-07-30 H.J. Lu <hjl.tools@gmail.com>
519 * configure: Regenerated.
521 2020-07-08 Ian Lance Taylor <iant@golang.org>
523 * configure.ac: Test linker support for DWARF5
524 * configure: Regenerate
526 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
529 * configure: Regenerated.
531 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
534 * configure: Regenerated.
536 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
538 * configure: Regenerated.
540 2020-05-13 Ian Lance Taylor <iant@golang.org>
542 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
544 2020-05-13 Ian Lance Taylor <iant@golang.org>
547 * posix.c (backtrace_open): Treat EACCESS like ENOENT.
549 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
551 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
552 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
553 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
555 * Makefile.in: Regenerated.
556 * configure: Likewise.
558 2020-05-11 Ian Lance Taylor <iant@golang.org>
560 PR libbacktrace/95012
561 * configure.ac: Check for getpagesize declaration.
562 * mmap.c: Declare getpagesize if necessary.
563 * mmapio.c: Likewise.
564 * configure: Regenerate.
565 * config.h.in: Regenerate.
566 * Makefile.in: Regenerate.
568 2020-05-09 Roland McGrath <mcgrathr@google.com>
570 * elf.c (elf_add): Bail early if there are no section headers at all.
572 2020-05-09 Ian Lance Taylor <iant@golang.org>
574 * elf.c (elf_add): Don't free strtab if an error occurs after
575 recording symbol information.
577 2020-05-09 Ian Lance Taylor <iant@golang.org>
579 PR libbacktrace/88745
581 * filetype.awk: Recognize Mach-O files.
582 * Makefile.am (FORMAT_FILES): Add macho.c.
583 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
584 (%.dSYM): New pattern target.
585 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
586 (test_macho_LDADD): New target.
587 (BUILDTESTS): Add test_macho.
588 (macho.lo): Add dependencies.
589 * configure.ac: Recognize macho file type. Check for
590 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
591 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
592 * Makefile.in: Regenerate.
593 * configure: Regenerate.
594 * config.h.in: Regenerate.
596 2020-05-09 Ian Lance Taylor <iant@golang.org>
598 * read.c (backtrace_get_view): Support short read.
600 2020-05-09 Ian Lance Taylor <iant@golang.org>
602 * elf.c (elf_add): If debug sections are very large or far apart,
603 read them individually rather than as a single view.
605 2020-05-08 Ian Lance Taylor <iant@golang.org>
607 * fileline.c (sysctl_exec_name): New static function.
608 (sysctl_exec_name1): New macro or static function.
609 (sysctl_exec_name2): Likewise.
610 (fileline_initialize): Try sysctl_exec_name[12].
611 * configure.ac: Check for sysctl args to fetch executable name.
612 * configure: Regenerate.
613 * config.h.in: Regenerate.
615 2020-02-15 Ian Lance Taylor <iant@golang.org>
617 * ztest.c (test_large): Update file to current libgo test file.
619 2020-02-03 Ian Lance Taylor <iant@golang.org>
621 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
622 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
623 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
624 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
625 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
626 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
627 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
628 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
629 (stest_alloc_CFLAGS): Likewise.
630 * Makefile.in: Regenerate.
631 * ztest.c (error_callback_compress): Mark vdata unused.
632 (test_large): Add casts to avoid warnings.
634 2020-01-01 Jakub Jelinek <jakub@redhat.com>
636 Update copyright years.
638 2019-12-13 Ian Lance Taylor <iant@golang.org>
641 * dwarf.c (struct attr): Add val field.
642 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
643 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
644 (struct line_header): Add addrsize field.
645 (struct line_header_format): Define.
646 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
648 (read_uint24): New static function.
649 (read_attribute): Add implicit_val parameter. Replace dwarf_str
650 and dwarf_str_size parameters with dwarf_sections parameter. Add
651 support for new DWARF 5 forms. Change all callers.
652 (resolve_string): New static function.
653 (resolve_addr_index): Likewise.
654 (read_abbrevs): Support DW_FORM_implicit_const.
655 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
656 and ranges_is_index fields.
657 (update_pcrange): Support DWARF 5 encodings.
658 (add_high_low_range): New static function, split out of
660 (add_ranges_from_ranges): Likewise.
661 (add_ranges_from_rnglists): New static function.
662 (add_ranges): Just call new helper functions.
663 (find_address_ranges): Use resolve_string for strings, after
664 reading all attributes. Handle new DWARF 5 attributes.
665 (build_address_map): Support DWARF 5 compilation units.
666 (read_v2_paths): New static function, split out of
668 (read_lnct): New static function.
669 (read_line_header_format_entries): Likewise.
670 (read_line_header): Add ddata parameter. Support DWARF 5 line
671 headers. Call new helper functions. Change all callers.
672 (read_line_program): Use addrsize from line program header. Don't
673 special case directory index 0 for DWARF 5.
674 (read_referenced_name): Use resolve_string.
675 (read_function_entry): Handle DWARF 5 encodings. Use
677 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
678 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
679 * elf.c (dwarf_section_names): Add new section names.
680 * pecoff.c (dwarf_section_names): Likewise.
681 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
683 * configure.ac: Define HAVE_DWARF5 automake conditional.
684 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
685 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
686 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
687 (dwarf5_alloc_LDADD): Likewise.
688 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
689 (CLEANFILES, clean-local): Define.
691 2019-12-08 Ian Lance Taylor <iant@golang.org>
693 * dwarf.c (struct pcrange): Define.
694 (update_pcrange, add_ranges): New static functions.
695 (add_unit_addr): Change signature to work with add_ranges. Don't
696 add base_address here.
697 (add_unit_ranges): Remove.
698 (find_address_ranges): Replace str/ranges parameters with
699 dwarf_sections. Use update_pcrange and add_ranges. Change all
701 (add_function_range): Change signature to work with add_ranges.
702 Don't add base_address here.
703 (add_function_ranges): Remove.
704 (read_function_entry): Use update_pcrange and add_ranges.
706 2019-12-04 Ian Lance Taylor <iant@golang.org>
708 * edtest.c (test1): Add noclone attribute.
710 2019-12-04 Ian Lance Taylor <iant@golang.org>
712 * internal.h (enum dwarf_section): Define.
713 (struct dwarf_sections): Define.
714 (backtrace_dwarf_add): Update declaration to replace specific
715 section parameters with dwarf_sections parameter.
716 * dwarf.c (struct dwarf_data): Replace specific section fields
717 with dwarf_sections field.
718 (read_attribute): Use dwarf_sections with altlink.
719 (build_address_map): Replace specific section parameters with
720 dwarf_sections parameter. Change all callers.
721 (read_line_info): Use dwarf_sections with ddata.
722 (read_referenced_name): Likewise.
723 (add_function_ranges): Likewise.
724 (read_function_entry): Likewise.
725 (read_function_info): Likewise.
726 (build_dwarf_data): Replace specific section parameters with
727 dwarf_sections parameter. Change all callers.
728 (backtrace_dwarf_add): Likewise.
729 * elf.c (enum debug_section): Remove.
730 (dwarf_section_names): Remove .zdebug names.
731 (elf_add): Track zsections separately. Build dwarf_sections.
732 * pecoff.c (enum debug_section): Remove.
733 (struct debug_section_info): Remove data field.
734 (coff_add): Build dwarf_sections.
735 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
736 references with DEBUG_xxx references.
737 (xcoff_add): Build dwarf_sections.
739 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
741 * configure: Regenerate.
743 2019-09-26 Ian Lance Taylor <iant@golang.org>
745 PR libbacktrace/91908
746 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
747 __sync_bool_compare_and_swap to void.
748 * xcoff.c (backtrace_initialize): Likewise.
750 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
752 * configure.ac: Remove references to spu.
753 * configure: Regenerate.
755 2019-05-24 Clement Chigot <clement.chigot@atos.net>
757 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
759 * Makefile.in: Regenerate.
761 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
763 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
765 * configure: Regenerate.
767 2019-03-11 Ian Lance Taylor <iant@golang.org>
769 PR libbacktrace/89669
770 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
772 * Makefile.in: Regenerate.
774 2019-02-26 Tom de Vries <tdevries@suse.de>
776 * btest.c (test5): Allow global.* as minimal symbol name for global.
778 2019-02-26 Tom de Vries <tdevries@suse.de>
780 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
781 * Makefile.in: Regenerate.
783 2019-02-12 Tom de Vries <tdevries@suse.de>
785 PR libbacktrace/81983
786 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
788 2019-02-10 Tom de Vries <tdevries@suse.de>
790 * Makefile.am (BUILDTESTS): Add btest_lto.
791 * Makefile.in: Regenerate.
792 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
793 __attribute__((noclone)).
795 2019-02-08 Tom de Vries <tdevries@suse.de>
797 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
798 * print.c (backtrace_print): Same.
799 * simple.c (backtrace_simple): Same.
801 2019-02-08 Tom de Vries <tdevries@suse.de>
803 PR libbacktrace/78063
804 * dwarf.c (build_address_map): Keep all parsed units.
805 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
807 2019-01-31 Tom de Vries <tdevries@suse.de>
809 PR libbacktrace/89136
810 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
811 'debugaltlink_name_len =+ 1'.
813 2019-01-29 Tom de Vries <tdevries@suse.de>
815 * install-debuginfo-for-buildid.sh.in: New script.
816 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
817 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
818 * Makefile.in: Regenerate.
819 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
820 (READELF): Set with AC_CHECK_PROG.
821 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
822 * configure: Regenerate.
823 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
824 (elf_open_debugfile_by_buildid): ... here.
826 2019-01-29 Tom de Vries <tdevries@suse.de>
828 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
830 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
831 (check_PROGRAMS): Add BUILDTESTS.
832 * Makefile.in: Regenerate.
834 2019-01-28 Tom de Vries <tdevries@suse.de>
836 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
837 Use $< to access prerequisite.
838 * Makefile.in: Regenerate.
840 2019-01-25 Nathan Sidwell <nathan@acm.org>
842 * elf.c (elf_add): Pass "" filename to recursive call with
845 2019-01-25 Tom de Vries <tdevries@suse.de>
847 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
849 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
850 * Makefile.in: Regenerate.
852 2019-01-25 Tom de Vries <tdevries@suse.de>
854 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
855 (TESTS): Rename dtest to btest_gnudebuglink.
856 * Makefile.in: Regenerate.
858 2019-01-23 Tom de Vries <tdevries@suse.de>
860 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
861 (units_search, find_unit): Use size_t for offset.
862 (build_address_map): Use size_t for unit_offset.
864 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
866 * allocfail.c (main): Increase portability of printf statement.
868 2019-01-18 Ian Lance Taylor <iant@golang.org>
870 PR libbacktrace/88890
871 * mmapio.c (backtrace_get_view): Change size parameter to
872 uint64_t. Check that value fits in size_t.
873 * read.c (backtrace_get_view): Likewise.
874 * internal.h (backtrace_get_view): Update declaration.
875 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
877 2019-01-17 Tom de Vries <tdevries@suse.de>
879 PR libbacktrace/82857
880 * configure.ac (DWZ): Set with AC_CHECK_PROG.
881 (HAVE_DWZ): Set with AM_CONDITIONAL.
882 * configure: Regenerate.
883 * Makefile.am (TESTS): Add btest_dwz.
884 * Makefile.in: Regenerate.
886 2019-01-17 Tom de Vries <tdevries@suse.de>
888 PR libbacktrace/82857
889 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
890 (read_attribute): Handle DW_FORM_GNU_ref_alt using
891 ATTR_VAL_REF_ALT_INFO.
892 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
894 2019-01-17 Tom de Vries <tdevries@suse.de>
896 * dwarf.c (struct unit): Add low_offset and high_offset fields.
897 (struct unit_vector): New type.
898 (struct dwarf_data): Add units and units_counts fields.
899 (find_unit): New function.
900 (find_address_ranges): Add and handle unit_tag parameter.
901 (build_address_map): Add and handle units_vec parameter.
902 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
905 2019-01-17 Tom de Vries <tdevries@suse.de>
907 PR libbacktrace/82857
908 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
911 2019-01-17 Tom de Vries <tdevries@suse.de>
913 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
914 (read_attribute): Add altlink parameter. Handle missing altlink for
915 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
916 (find_address_ranges, build_address_map, build_dwarf_data): Add and
917 handle altlink parameter.
918 (read_referenced_name, read_function_entry): Add argument to
921 2019-01-17 Tom de Vries <tdevries@suse.de>
923 * dwarf.c (struct dwarf_data): Add altlink field.
924 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
925 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
926 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
927 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
928 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
929 * xcoff.c (xcoff_add): Same.
931 2019-01-17 Tom de Vries <tdevries@suse.de>
933 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
934 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
935 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
936 argument to backtrace_dwarf_add call.
937 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
938 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
939 * xcoff.c (xcoff_add): Same.
941 2019-01-17 Tom de Vries <tdevries@suse.de>
943 * elf.c (elf_add): Add and handle with_buildid_data and
944 with_buildid_size parameters. Handle .gnu_debugaltlink section.
945 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
947 2019-01-16 Tom de Vries <tdevries@suse.de>
949 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
951 (read_referenced_name): ... here, and ...
952 (read_function_entry): ... here.
954 2019-01-16 Tom de Vries <tdevries@suse.de>
956 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
958 (read_function_entry): Same. Don't allow name found via
959 DW_AT_abstract_origin or case DW_AT_specification to override linkage
962 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
966 * backtrace.h: Mechanically replace "can not" with "cannot".
968 2019-01-01 Jakub Jelinek <jakub@redhat.com>
970 Update copyright years.
972 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
974 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
976 * Makefile.in: Regenerate.
978 2018-12-28 Tom de Vries <tdevries@suse.de>
980 * dwarf.c (build_address_map): Reuse unused units.
982 2018-12-28 Tom de Vries <tdevries@suse.de>
984 * dwarf.c (build_address_map): Simplify by removing local variable
987 2018-12-28 Ian Lance Taylor <iant@golang.org>
988 Tom de Vries <tdevries@suse.de>
990 PR libbacktrace/88063
991 * dwarf.c (free_unit_addrs_vector): Remove.
992 (build_address_map): Keep track of allocated units in vector. Free
993 allocated units and corresponding abbrevs upon failure. Remove now
994 redundant call to free_unit_addrs_vector. Free addrs vector upon
995 failure. Free allocated unit vector.
997 2018-12-28 Tom de Vries <tdevries@suse.de>
999 * dwarf.c (build_address_map): Free addrs vector upon failure.
1001 2018-12-14 Tom de Vries <tdevries@suse.de>
1004 * allocfail.sh: Remove "set -o pipefail".
1006 2018-12-12 Tom de Vries <tdevries@suse.de>
1008 * Makefile.am (TESTS): Add allocfail.sh.
1009 (check_PROGRAMS): Add allocfail.
1010 * Makefile.in: Regenerate.
1011 * instrumented_alloc.c: New file. Redefine malloc and realloc.
1013 * allocfail.c: New file.
1014 * allocfail.sh: New file.
1016 2018-11-30 Tom de Vries <tdevries@suse.de>
1018 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
1019 test_xcoff_64, test_pecoff and test_unknown.
1020 * Makefile.in: Regenerate.
1021 * test_format.c: New file.
1023 2018-11-30 Tom de Vries <tdevries@suse.de>
1025 * Makefile.am : Add _with_alloc version for each test in
1027 * Makefile.in: Regenerate.
1029 2018-11-30 Tom de Vries <tdevries@suse.de>
1031 * internal.h (backtrace_vector_free): New static inline fuction,
1033 * dwarf.c (read_line_info): ... here.
1035 2018-11-28 Tom de Vries <tdevries@suse.de>
1037 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
1040 2018-11-27 Tom de Vries <tdevries@suse.de>
1042 * mmap.c (backtrace_vector_release): Same.
1043 * unittest.c (test1): Add check.
1045 2018-11-27 Tom de Vries <tdevries@suse.de>
1047 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
1049 * Makefile.am (check_PROGRAMS): Add unittest.
1050 * Makefile.in: Regenerate.
1051 * unittest.c: New file.
1053 2018-11-22 Tom de Vries <tdevries@suse.de>
1055 * dwarf.c (read_initial_length): Factor out of ...
1056 (build_address_map, read_line_info): ... here.
1058 2018-11-21 Tom de Vries <tdevries@suse.de>
1060 * dwarf.c (read_string): Factor out of ...
1061 (read_attribute, read_line_header, read_line_program): ... here.
1063 2018-10-31 Joseph Myers <joseph@codesourcery.com>
1066 * Makefile.am: Include multilib.am.
1067 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
1068 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
1070 2018-10-05 Ian Lance Taylor <iant@golang.org>
1072 PR libbacktrace/87529
1073 * backtrace.h: Document that backtrace_create_state should be
1076 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
1078 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
1079 * Makefile.in: Regenerate.
1080 * config.h.in: Likewise.
1081 * configure: Likewise.
1083 2018-08-01 Tony Reix <tony.reix@atos.net>
1085 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
1086 (struct xcoff_func, struct xcoff_func_vector): New structs.
1087 (xcoff_syminfo): Drop leading dot from symbol name.
1088 (xcoff_line_compare, xcoff_line_search): Remove.
1089 (xcoff_func_compare, xcoff_func_search): New static functions.
1090 (xcoff_lookup_pc): Search function table.
1091 (xcoff_add_line, xcoff_process_linenos): Remove.
1092 (xcoff_initialize_fileline): Build function table.
1094 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
1097 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
1098 checking up to 36 bytes.
1100 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1102 * configure: Regenerated.
1104 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1106 * configure: Regenerated.
1108 2018-04-17 Ian Lance Taylor <iant@golang.org>
1110 * backtrace.c: Revert last two changes. Don't call mmap
1113 2018-04-17 Ian Lance Taylor <iant@golang.org>
1115 * backtrace.c: Include backtrace-supported.h before checking
1116 BACKTRACE_USES_MALLOC.
1118 2018-04-17 Ian Lance Taylor <iant@golang.org>
1120 * backtrace.c (backtrace_full): When testing whether we can
1121 allocate memory, call mmap directly, and munmap the memory.
1123 2018-04-04 Jakub Jelinek <jakub@redhat.com>
1126 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
1127 big endian, only use 32-bit loads if endianity macros are predefined
1128 and indicate big or little endian.
1130 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1133 * configure: Regenerate.
1135 2018-02-15 Jakub Jelinek <jakub@redhat.com>
1138 * elf.c (SHT_PROGBITS): Undefine and define.
1140 2018-02-14 Jakub Jelinek <jakub@redhat.com>
1143 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
1144 (struct elf_ppc64_opd_data): New type.
1145 (elf_initialize_syminfo): Add opd argument, handle symbols
1146 pointing into the PowerPC64 ELFv1 .opd section.
1147 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
1148 to structure with .opd data to elf_initialize_syminfo.
1150 2018-01-31 Ian Lance Taylor <iant@golang.org>
1152 * elf.c (elf_add): Close descriptor if we use a debugfile.
1153 * btest.c (check_open_files): New static function.
1154 (main): Call check_open_files.
1156 2018-01-25 Ian Lance Taylor <iant@golang.org>
1158 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
1159 desired CRC is zero.
1160 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
1162 2018-01-25 Ian Lance Taylor <iant@golang.org>
1164 * pecoff.c (coff_add): Only release syms_view if it is valid.
1166 2018-01-25 Ian Lance Taylor <iant@golang.org>
1168 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
1170 2018-01-24 Ian Lance Taylor <iant@golang.org>
1172 * pecoff.c (coff_add): Use coff_read4, not memcpy.
1174 2018-01-24 Ian Lance Taylor <iant@golang.org>
1177 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
1180 2018-01-19 Tony Reix <tony.reix@atos.net>
1182 * xcoff.c (xcoff_incl_compare): New function.
1183 (xcoff_incl_search): New function.
1184 (xcoff_process_linenos): Use bsearch to find include file.
1185 (xcoff_initialize_fileline): Sort include file information.
1187 2018-01-16 Ian Lance Taylor <iant@golang.org>
1189 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
1191 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
1192 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
1193 (elf_zlib_default_table): Update.
1194 (elf_zlib_default_dist_table): New static array.
1195 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
1197 * ztest.c (struct zlib_test): Add uncompressed_len.
1198 (tests): Initialize uncompressed_len field. Add new test case.
1199 (test_samples): Use uncompressed_len field.
1201 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1203 Update copyright years.
1205 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1207 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
1208 * aclocal.m4: Regenerate.
1209 * Makefile.in: Likewise.
1210 * configure: Likewise.
1212 2017-10-06 Ian Lance Taylor <iant@golang.org>
1214 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
1215 zlib uncompress function.
1217 2017-10-05 Ian Lance Taylor <iant@golang.org>
1219 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
1220 Read a four byte integer.
1221 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
1222 boundary before ever calling elf_zlib_fetch.
1223 * ztest.c (test_large): Simplify print statements a bit.
1225 2017-10-02 Ian Lance Taylor <iant@golang.org>
1227 * ztest.c: #include <errno.h>.
1228 (TEST_TIMING): Don't define, don't test.
1229 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
1230 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
1231 (ZLIB_CLOCK_GETTIME_ARG): Define.
1232 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
1233 * Makefile.am: Likewise.
1234 * configure, Makefile.in: Rebuild.
1236 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
1239 * Makefile.am: Append the content of clock_gettime_link to
1241 * configure.ac: Test for the case that clock_gettime is in librt.
1242 * Makefile.in: Regenerate.
1243 * configure: Likewise.
1246 * configure.ac: Check for clock_gettime.
1247 * config.h.in: Regenerate.
1248 * configure: Likewise.
1249 * ztest.c (average_time, test_large): Conditionalize test timing
1250 on clock_gettime availability.
1252 2017-09-29 Tony Reix <tony.reix@atos.net>
1254 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
1255 (STYP_DWARF, SSUBTYP_DW*): Define.
1256 (enum dwarf_section): Define.
1257 (struct dwsect_info): Define.
1258 (xcoff_add): Look for DWARF sections, pass them to
1259 backtrace_dwarf_add.
1261 2017-09-28 Ian Lance Taylor <iant@golang.org>
1264 * elf.c (__builtin_prefetch): Define if not __GNUC__.
1266 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
1267 (b_elf_chdr): Define type.
1268 (enum debug_section): Add ZDEBUG_xxx values.
1269 (debug_section_names): Add names for new sections.
1270 (struct debug_section_info): Add compressed field.
1271 (elf_zlib_failed, elf_zlib_fetch): New static functions.
1272 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
1273 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
1274 (HUFFMAN_SECONDARY_SHIFT): Define.
1275 (ZDEBUG_TABLE_SIZE): Define.
1276 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
1277 (final_next_secondary): New static variable if
1278 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
1279 (elf_zlib_inflate_table): New static function.
1280 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
1281 function to produce fixed Huffman table.
1282 (elf_zlib_default_table): New static variable.
1283 (elf_zlib_inflate): New static function.
1284 (elf_zlib_verify_checksum): Likewise.
1285 (elf_zlib_inflate_and_verify): Likewise.
1286 (elf_uncompress_zdebug): Likewise.
1287 (elf_uncompress_chdr): Likewise.
1288 (backtrace_uncompress_zdebug): New extern function.
1289 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
1290 sections, and uncompress them.
1291 * internal.h (backtrace_compress_zdebug): Declare.
1292 * ztest.c: New file.
1293 * configure.ac: Check for -lz and check whether the linker
1294 supports --compress-debug-sections.
1295 * Makefile.am (ztest_SOURCES): New variable.
1296 (ztest_CFLAGS, ztest_LDADD): New variables.
1297 (check_PROGRAMS): Add ztest.
1298 (ctestg_SOURCES): New variable.
1299 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
1300 (ctesta_SOURCES): New variable.
1301 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
1302 (check_PROGRAMS): Add ctestg and ctesta.
1303 * configure, config.h.in, Makefile.in: Rebuild.
1305 2017-09-22 Ian Lance Taylor <iant@golang.org>
1308 * configure.ac: Check for lstat and readlink.
1309 * elf.c (lstat, readlink): Provide dummy versions if real versions
1311 * configure, config.h.in: Rebuild.
1313 2017-09-21 Ian Lance Taylor <iant@google.com>
1316 * elf.c (backtrace_initialize): Set pd.exe_filename.
1318 2017-09-20 Ian Lance Taylor <iant@golang.org>
1319 Denis Khalikov <d.khalikov@partner.samsung.com>
1322 Support for external debug info.
1323 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
1324 (S_ISLNK): Define if not defined.
1325 (xstrnlen): Define if strnlen is not available.
1326 (b_elf_note): Define type.
1327 (NT_GNU_BUILD_ID): Define macro.
1328 (elf_crc32, elf_crc32_file): New static functions.
1329 (elf_is_symlink, elf_readlink): New static functions.
1330 (elf_open_debugfile_by_buildid): New static function.
1331 (elf_try_debugfile): New static function.
1332 (elf_find_debugfile_by_debuglink): New static function.
1333 (elf_open_debugfile_by_debuglink): New static function.
1334 (elf_add): Add filename and debuginfo parameters. Adjust all
1335 callers. Look for external debug info notes, and try to fetch
1336 debug info from external file.
1337 (struct phdr_data): Add exe_filename field.
1338 (phdr_callback): Pass filename to elf_add.
1339 (backtrace_initialize): Add filename parameter.
1340 * internal.h (backtrace_initialize): Add filename parameter.
1341 * fileline.c (fileline_initialize): Pass filename to
1342 backtrace_initialize.
1343 * pecoff.c (fileline_initialize): Add unused filename parameter.
1344 * unknown.c (fileline_initialize): Likewise.
1345 * xcoff.c (fileline_initialize): Likewise.
1346 * configure.ac: Check for objcopy --add-gnu-debuglink.
1347 * Makefile.am (dtest): New test target.
1348 * configure, Makefile.in: Rebuild.
1350 2017-09-12 Steve Ellcey <sellcey@cavium.com>
1353 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
1354 * Makefile.in: Regenerate.
1356 2017-09-12 Steve Ellcey <sellcey@cavium.com>
1359 * libbacktrace/Makefile.in
1360 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
1362 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
1365 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
1367 2017-07-28 Tony Reix <tony.reix@atos.net>
1369 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
1371 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1373 * fileline.c (fileline_initialize): Print pid_t as long.
1375 2017-07-26 Tony Reix <tony.reix@atos.net>
1377 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
1378 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
1379 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
1380 * configure, config.h.in: Regenerate.
1382 2017-07-21 Tony Reix <tony.reix@atos.net>
1384 * filetype.awk: Add AIX XCOFF type detection.
1385 * configure.ac: Recognize xcoff format.
1386 * Makefile.am (FORMAT_FILES): Add xcoff.c.
1387 * fileline.c: Include <unistd.h>.
1388 (fileline_initialize): Add case for AIX procfs.
1389 * xcoff.c: New file.
1390 * configure, Makefile.in: Rebuild.
1392 2017-06-21 Richard Biener <rguenther@suse.de>
1394 * configure.ac: Add AC_SYS_LARGEFILE.
1395 * config.h.in: Regenerate.
1396 * configure: Likewise.
1398 2017-06-11 Ian Lance Taylor <iant@golang.org>
1400 * elf.c (backtrace_initialize): Always set *fileline_fn.
1401 * ttest.c: New file.
1402 * btest.c: Move support functions into testlib.c. Change calls to
1403 check to pass file name.
1404 * testlib.c: New file, copied from (part of) btest.c.
1405 * testlib.h: New file, declarations for testlib.c.
1406 * edtest.c: Use testlib.h and testlib.c.
1407 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
1408 * Makefile.am (btest_SOURCES): Add testlib.c.
1409 (edtest_SOURCES): Likewise.
1410 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
1411 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
1412 * configure, Makefile.in: Rebuild.
1414 2017-05-19 Than McIntosh <thanm@google.com>
1416 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
1417 (read_line_header): Don't allocate dirs if dirs_count == 0.
1418 * edtest.c: New file.
1419 * edtest2.c: New file.
1420 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
1421 (check_PROGRAMS): Add edtest.
1422 (edtest2_build.c, gen_edtest2_build): New targets.
1423 * Makefile.in: Rebuild.
1425 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
1427 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
1428 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
1430 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1432 Update copyright years.
1434 2016-11-15 Matthias Klose <doko@ubuntu.com>
1436 * configure: Regenerate.
1438 2016-09-11 Carlos Liam <carlos@aarzee.me>
1440 * all: Remove meaningless trailing whitespace.
1442 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
1445 * elf.c (phdr_callback) [__i386__]: Add
1446 __attribute__((__force_align_arg_pointer__)).
1448 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
1450 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
1451 avoid possible crash.
1452 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
1453 missing debug info anymore.
1455 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
1457 * mmap.c (MAP_FAILED): Define if not defined.
1459 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1461 Update copyright years.
1463 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
1465 * configure.ac: Specify that DJGPP do not have mmap
1466 even when sys/mman.h exists.
1467 * configure: Regenerate
1469 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
1471 PR libgfortran/68115
1472 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
1473 * configure: Regenerate.
1474 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
1477 2015-09-17 Ian Lance Taylor <iant@google.com>
1479 * posix.c (backtrace_open): Cast second argument of open() to int.
1481 2015-09-11 Ian Lance Taylor <iant@google.com>
1483 * Makefile.am (backtrace.lo): Depend on internal.h.
1484 (sort.lo, stest.lo): Add explicit dependencies.
1485 * Makefile.in: Rebuild.
1487 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
1489 * backtrace.c: #include <sys/types.h>.
1491 2015-09-08 Ian Lance Taylor <iant@google.com>
1494 * backtrace.c: #include "internal.h".
1495 (struct backtrace_data): Add can_alloc field.
1496 (unwind): If can_alloc is false, don't try to get file/line
1498 (backtrace_full): Set can_alloc field in bdata.
1499 * alloc.c (backtrace_alloc): Don't call error_callback if it is
1501 * mmap.c (backtrace_alloc): Likewise.
1502 * internal.h: Update comments for backtrace_alloc and
1505 2015-09-08 Ian Lance Taylor <iant@google.com>
1508 * mmap.c (backtrace_alloc): Correct test for mmap failure.
1510 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1512 * configure.ac: For spu-*-* targets, set have_fcntl to no.
1513 * configure: Regenerate.
1515 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1517 * configure.ac: Remove [disable-shared] argument to LT_INIT.
1518 Remove setting PIC_FLAG when building as target library.
1519 * configure: Regenerate.
1521 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
1523 * configure.ac: Only compile with -fPIC if the target
1525 * configure: Regenerate.
1527 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1529 * configure.ac: Set have_mmap to no on spu-*-* targets.
1530 * configure: Regenerate.
1532 2015-08-13 Ian Lance Taylor <iant@google.com>
1534 * dwarf.c (read_function_entry): Add vec_inlined parameter.
1537 2015-06-11 Martin Sebor <msebor@redhat.com>
1540 * dwarf.c (struct line): Add new field idx.
1541 (line_compare): Use it.
1543 (read_line_info): Reset it.
1545 2015-05-29 Tristan Gingold <gingold@adacore.com>
1547 * pecoff.c: New file.
1548 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1549 * Makefile.in: Regenerate.
1550 * filetype.awk: Detect pecoff.
1551 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1553 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1555 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1556 * configure: Regenerate.
1557 * pecoff.c: New file.
1559 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1561 * Makefile.in: Regenerated with automake-1.11.6.
1562 * aclocal.m4: Likewise.
1563 * configure: Likewise.
1565 2015-01-24 Matthias Klose <doko@ubuntu.com>
1567 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1568 * configure: Regenerate.
1570 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1572 Update copyright years.
1574 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1577 * configure: Regenerated.
1579 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1581 * ChangeLog.jit: New.
1583 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1586 * configure: Regenerate.
1588 2014-10-23 Ian Lance Taylor <iant@google.com>
1590 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1591 Fix to return void *.
1593 2014-05-08 Ian Lance Taylor <iant@google.com>
1595 * mmap.c (backtrace_free): If freeing a large aligned block of
1596 memory, call munmap rather than holding onto it.
1597 (backtrace_vector_grow): When growing a vector, double the number
1598 of pages requested. When releasing the old version of a grown
1599 vector, pass the correct size to backtrace_free.
1601 2014-03-07 Ian Lance Taylor <iant@google.com>
1603 * sort.c (backtrace_qsort): Use middle element as pivot.
1605 2014-03-06 Ian Lance Taylor <iant@google.com>
1608 * stest.c: New file.
1609 * internal.h (backtrace_qsort): Declare.
1610 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1611 (read_line_info, read_function_entry): Likewise.
1612 (read_function_info, build_dwarf_data): Likewise.
1613 * elf.c (elf_initialize_syminfo): Likewise.
1614 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1615 (stest_SOURCES, stest_LDADD): Define.
1616 (check_PROGRAMS): Add stest.
1618 2014-02-07 Misty De Meo <misty@brew.sh>
1621 * configure.ac: Use AC_LINK_IFELSE in check for
1623 * configure: Regenerate.
1625 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1627 Update copyright years
1629 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1631 * elf.c (ET_DYN): Undefine and define again.
1632 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1633 return early -1 without closing the descriptor.
1634 (struct phdr_data): Add exe_descriptor.
1635 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1636 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1637 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1639 (backtrace_initialize): Adjust call to elf_add. If it returns
1640 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1642 2013-12-05 Ian Lance Taylor <iant@google.com>
1644 * alloc.c (backtrace_vector_finish): Add error_callback and data
1645 parameters. Call backtrace_vector_release. Return address base.
1646 * mmap.c (backtrace_vector_finish): Add error_callback and data
1647 parameters. Return address base.
1648 * dwarf.c (read_function_info): Get new address base from
1649 backtrace_vector_finish.
1650 * internal.h (backtrace_vector_finish): Update declaration.
1652 2013-11-27 Ian Lance Taylor <iant@google.com>
1654 * dwarf.c (find_address_ranges): New static function, broken out
1655 of build_address_map.
1656 (build_address_map): Call it.
1657 * btest.c (check): Check for missing filename or function, rather
1659 (f3): Check that enough frames were returned.
1661 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1663 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1664 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1666 * btest.c (struct symdata): Add size field.
1667 (callback_three): Add symsize argument. Copy it to the data->size
1669 (f23): Set symdata.size to 0.
1670 (test5): Likewise. If sizeof (int) > 1, lookup address of
1671 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1674 * atomic.c: Include sys/types.h.
1676 2013-11-18 Ian Lance Taylor <iant@google.com>
1678 * configure.ac: Check for support of __atomic extensions.
1679 * internal.h: Declare or #define atomic functions for use in
1681 * atomic.c: New file.
1682 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1683 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1684 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1685 (backtrace_initialize): Likewise.
1686 * fileline.c (fileline_initialize): Likewise.
1687 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1688 * configure, config.h.in, Makefile.in: Rebuild.
1690 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1692 * elf.c (SHN_UNDEF): Define.
1693 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1694 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1695 (elf_add): Adjust caller.
1697 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1699 2013-11-16 Ian Lance Taylor <iant@google.com>
1701 * backtrace.h (backtrace_create_state): Correct comment about
1704 2013-11-15 Ian Lance Taylor <iant@google.com>
1706 * backtrace.h (backtrace_syminfo): Update comment and parameter
1707 name to take any address, not just a PC value.
1708 * elf.c (STT_OBJECT): Define.
1709 (elf_nosyms): Rename parameter pc to addr.
1710 (elf_symbol_search): Rename local variable pc to addr.
1711 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1712 (elf_syminfo): Rename parameter pc to addr.
1713 * btest.c (global): New global variable.
1717 2013-10-17 Ian Lance Taylor <iant@google.com>
1719 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1722 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1724 * configure.ac: Add --enable-host-shared, setting up
1725 pre-existing PIC_FLAG variable within Makefile.am et al.
1726 * configure: Regenerate.
1728 2013-09-20 Alan Modra <amodra@gmail.com>
1730 * configure: Regenerate.
1732 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1734 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1736 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1738 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1739 dl_iterate_phdr callbacks.
1741 2013-03-25 Ian Lance Taylor <iant@google.com>
1743 * alloc.c: #include <sys/types.h>.
1746 2013-01-31 Ian Lance Taylor <iant@google.com>
1748 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1749 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1751 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1754 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1755 attribute was not seen.
1757 2013-01-16 Ian Lance Taylor <iant@google.com>
1759 * dwarf.c (struct unit): Add filename and abs_filename fields.
1760 (build_address_map): Set new fields when reading unit.
1761 (dwarf_lookup_pc): If we don't find an entry in the line table,
1762 just return the main file name.
1764 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1766 Update copyright years.
1768 2013-01-01 Ian Lance Taylor <iant@google.com>
1771 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1772 $(MULTIBUILDTOP)/../../gcc/include.
1773 * Makefile.in: Rebuild.
1775 2013-01-01 Ian Lance Taylor <iant@google.com>
1778 * mmap.c (backtrace_alloc): Don't call sync functions if not
1780 (backtrace_free): Likewise.
1782 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1784 * mmapio.c: Define MAP_FAILED if not defined.
1786 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1789 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1790 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1791 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1793 * Makefile.in: Regenerated.
1794 * configure: Regenerated.
1796 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1799 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1800 * Makefile.in: Regenerated.
1802 2012-11-20 Ian Lance Taylor <iant@google.com>
1804 * dwarf.c (read_attribute): Always clear val.
1806 2012-11-13 Ian Lance Taylor <iant@google.com>
1809 * configure.ac: Only add -Werror if building a target library.
1810 * configure: Rebuild.
1812 2012-11-12 Ian Lance Taylor <iant@google.com>
1813 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1814 Gerald Pfeifer <gerald@pfeifer.com>
1816 * configure.ac: Check for getexecname.
1817 * fileline.c: #include <errno.h>. Define getexecname if not
1819 (fileline_initialize): Try to find the executable in a few
1821 * print.c (error_callback): Only print the filename if it came
1822 from the backtrace state.
1823 * configure, config.h.in: Rebuild.
1825 2012-10-29 Ian Lance Taylor <iant@google.com>
1827 * mmap.c (backtrace_vector_release): Correct last patch: add
1830 2012-10-29 Ian Lance Taylor <iant@google.com>
1832 * mmap.c (backtrace_vector_release): Make sure freed block is
1833 aligned on 8-byte boundary.
1835 2012-10-26 Ian Lance Taylor <iant@google.com>
1838 * posix.c (backtrace_open): Add does_not_exist parameter.
1839 * elf.c (phdr_callback): Do not warn if shared library could not
1841 * fileline.c (fileline_initialize): Update calls to
1843 * internal.h (backtrace_open): Update declaration.
1845 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1848 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1849 * configure: Regenerate.
1851 2012-10-24 Ian Lance Taylor <iant@google.com>
1854 * configure.ac: Check whether -funwind-tables option works.
1855 * configure: Rebuild.
1857 2012-10-11 Ian Lance Taylor <iant@google.com>
1859 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1860 * configure: Rebuild.
1862 2012-10-10 Ian Lance Taylor <iant@google.com>
1864 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1867 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1869 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1871 2012-10-09 Ian Lance Taylor <iant@google.com>
1873 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1874 (backtrace_dwarf_add): Likewise.
1876 2012-10-09 Ian Lance Taylor <iant@google.com>
1878 Add support for tracing through shared libraries.
1879 * configure.ac: Check for link.h and dl_iterate_phdr.
1880 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1881 ELF macros before #defining them.
1882 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1884 (struct elf_syminfo_data): Add next field.
1885 (elf_initialize_syminfo): Initialize next field.
1886 (elf_add_syminfo_data): New static function.
1887 (elf_add): New static function, broken out of
1888 backtrace_initialize. Call backtrace_dwarf_add instead of
1889 backtrace_dwarf_initialize.
1890 (struct phdr_data): Define.
1891 (phdr_callback): New static function.
1892 (backtrace_initialize): Call elf_add.
1893 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1894 (add_unit_addr): Add base_address parameter. Change all callers.
1895 (add_unit_ranges, build_address_map): Likewise.
1896 (add_line): Add ddata parameter. Change all callers.
1897 (read_line_program, add_function_range): Likewise.
1898 (dwarf_lookup_pc): New static function, broken out of
1900 (dwarf_fileline): Call dwarf_lookup_pc.
1901 (build_dwarf_data): New static function.
1902 (backtrace_dwarf_add): New function.
1903 (backtrace_dwarf_initialize): Remove.
1904 * internal.h (backtrace_dwarf_initialize): Don't declare.
1905 (backtrace_dwarf_add): Declare.
1906 * configure, config.h.in: Rebuild.
1908 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1910 * btest.c (f23): Avoid uninitialized variable warning.
1912 2012-10-04 Ian Lance Taylor <iant@google.com>
1914 * dwarf.c: If the system header files do not declare strnlen,
1915 provide our own version.
1917 2012-10-03 Ian Lance Taylor <iant@google.com>
1919 * dwarf.c (read_uleb128): Fix overflow test.
1920 (read_sleb128): Likewise.
1921 (build_address_map): Don't change unit_buf.start.
1923 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1926 * configure.ac (EXTRA_FLAGS): New.
1927 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1928 * configure, Makefile.in: Regenerate.
1930 2012-09-29 Ian Lance Taylor <iant@google.com>
1933 * fileline.c (fileline_initialize): Pass errnum as -1 when
1934 reporting that we could not read executable information after a
1937 2012-09-27 Ian Lance Taylor <iant@google.com>
1940 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1941 * Makefile.am: Add dependencies for all objects.
1942 * configure, aclocal.m4, Makefile.in: Rebuild.
1944 2012-09-27 Ian Lance Taylor <iant@google.com>
1947 * elf.c (backtrace_initialize): Set *fileln_fn, not
1950 2012-09-19 Ian Lance Taylor <iant@google.com>
1952 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1953 as a target library.
1954 * configure: Rebuild.
1956 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1957 Ian Lance Taylor <iant@google.com>
1959 * configure.ac (GCC_HEADER_STDINT): Invoke.
1960 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1961 * btest.c: Don't include <stdint.h>.
1962 * dwarf.c: Likewise.
1963 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1965 2012-09-18 Ian Lance Taylor <iant@google.com>
1968 * Makefile.am (AM_CPPFLAGS): Define.
1969 (AM_CFLAGS): Remove -I options.
1970 * Makefile.in: Rebuild.
1972 2012-09-18 Ian Lance Taylor <iant@google.com>
1974 * posix.c (O_BINARY): Define if not defined.
1975 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1976 HAVE_FCNTL is defined.
1977 * configure.ac: Test for the fcntl function.
1978 * configure, config.h.in: Rebuild.
1980 2012-09-18 Ian Lance Taylor <iant@google.com>
1982 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1984 2012-09-18 Ian Lance Taylor <iant@google.com>
1986 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1988 2012-09-18 Ian Lance Taylor <iant@google.com>
1990 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1991 * mmapio.c: Don't define _GNU_SOURCE.
1992 * configure, config.h.in: Rebuild.
1994 2012-09-18 Ian Lance Taylor <iant@google.com>
1996 * configure.ac: Check whether strnlen is declared.
1997 * dwarf.c: Declare strnlen if not declared.
1998 * configure, config.h.in: Rebuild.
2000 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2002 * fileline.c: Include <stdlib.h>.
2005 2012-09-17 Ian Lance Taylor <iant@google.com>
2008 * nounwind.c (backtrace_full): Rename from backtrace. Add state
2011 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
2014 * nounwind.c (backtrace_simple): Add state parameter.
2016 2012-09-17 Ian Lance Taylor <iant@google.com>
2019 * unknown.c (unknown_fileline): Add state parameter, remove
2020 fileline_data parameter, name error_callback parameter.
2021 (backtrace_initialize): Add state parameter.
2023 2012-09-17 Ian Lance Taylor <iant@google.com>
2025 * Initial implementation.
2027 Copyright (C) 2012-2023 Free Software Foundation, Inc.
2029 Copying and distribution of this file, with or without modification,
2030 are permitted in any medium without royalty provided the copyright
2031 notice and this notice are preserved.