[Ada] Fix crash on aliased renaming of unconstrained array
[official-gcc.git] / libbacktrace / ChangeLog
blob59766c6e7cf42060de34edc96e4a847abf563a8a
1 2022-06-27  Ian Lance Taylor  <iant@golang.org>
3         * configure.ac: Use grep instead of fgrep.
4         * configure, Makefile.in: Regenerate.
6 2022-05-28  Ian Lance Taylor  <iant@golang.org>
8         PR libbacktrace/105721
9         * README: Update.
11 2022-04-05  Ian Lance Taylor  <iant@golang.org>
13         * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in
14         uncompressed block.
16 2022-02-17  Ian Lance Taylor  <iant@golang.org>
18         * dwarf.c (find_address_ranges): Handle skeleton units.
19         (read_function_entry): Likewise.
21 2022-02-16  Ian Lance Taylor  <iant@golang.org>
23         * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit.
25 2022-02-03  David Seifert  <soap@gentoo.org>
26             Jakub Jelinek  <jakub@redhat.com>
28         * configure.ac: Support --disable-werror.
29         * configure: Regenerate.
31 2021-12-28  Francois-Xavier Coudert  <fxcoudert@gmail.com>
33         PR libbacktrace/103822
34         * Makefile.am: Fix newline.
35         * Makefile.in: Regenerate.
37 2021-11-12  Martin Liska  <mliska@suse.cz>
39         PR libbacktrace/103167
40         * elf.c (elf_uncompress_lzma_block): Cast to unsigned int.
41         (elf_uncompress_lzma): Likewise.
42         * xztest.c (test_samples): memcpy only if v > 0.
44 2021-10-22  Martin Liska  <mliska@suse.cz>
46         PR testsuite/102742
47         * btest.c (MIN_DESCRIPTOR): New.
48         (MAX_DESCRIPTOR): Likewise.
49         (check_available_files): Likewise.
50         (check_open_files): Check only file descriptors that
51         were not available at the entry.
52         (main): Call check_available_files.
54 2021-08-13  Sergei Trofimovich  <siarheit@google.com>
56         * install-debuginfo-for-buildid.sh.in: Force non-localized readelf
57         output with LANG=C.
59 2021-06-28  ClĂ©ment Chigot  <clement.chigot@atos.net>
61         * xcoff.c (SSUBTYP_DWRNGES): New define.
62         (xcoff_add): Use correct XCOFF DWARF section subtype
63         for DEBUG_RANGES. Remove lineoff workaround.
64         Adjust base_address.
65         (xcoff_initialize_syminfo): Adapt to new base_address.
66         (xcoff_lookup_pc): Likewise.
67         (xcoff_initialize_fileline): Likewise.
69 2021-05-03  H.J. Lu  <hjl.tools@gmail.com>
71         PR bootstrap/99703
72         * configure: Regenerated.
74 2021-03-03  Ian Lance Taylor  <iant@golang.org>
76         * dwarf.c (read_line_program): Don't special case file 0.
77         (read_function_entry): Likewise.
79 2021-03-02  Ian Lance Taylor  <iant@golang.org>
81         PR libbacktrace/98818
82         * dwarf.c (dwarf_buf_error): Add errnum parameter.  Change all
83         callers.
84         * backtrace.h: Update backtrace_error_callback comment.
86 2021-02-12  Ian Lance Taylor  <iant@golang.org>
88         * configure.ac: Check for objcopy --add-gnu-debuglink by using
89         objcopy --help.
90         * configure: Regenerate
92 2021-01-18  Ian Lance Taylor  <iant@golang.org>
94         * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info.
95         * Makefile.in: Regenerate.
96         * configure: Regenerate.
98 2021-01-18  Ian Lance Taylor  <iant@golang.org>
100         PR debug/98716
101         * dwarf.c (read_v2_paths): Allocate zero entry for dirs and
102         filenames.
103         (read_line_program): Remove parameter u, change caller.  Don't
104         subtract one from dirs and filenames index.
105         (read_function_entry): Don't subtract one from filenames index.
107 2021-01-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>
109         * configure: Re-generate.
111 2020-12-05  Iain Sandoe  <iain@sandoe.co.uk>
113         PR target/97865
114         * configure: Regenerate.
116 2020-12-02  Ian Lance Taylor  <iant@golang.org>
118         * dwarf.c (resolve_string): Use > rather than >= to check whether
119         string index extends past buffer.
120         (resolve_addr_index): Similarly for address index.
122 2020-11-29  John David Anglin  <danglin@gcc.gnu.org>
124         * configure: Regenerate.
126 2020-10-20  Ian Lance Taylor  <iant@golang.org>
128         * internal.h (ATTRIBUTE_FALLTHROUGH): Define.
129         * elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH.
131 2020-09-28  Ian Lance Taylor  <iant@golang.org>
133         PR libbacktrace/97082
134         * Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL.
135         * Makefile.in: Regenerate.
137 2020-09-28  Ian Lance Taylor  <iant@golang.org>
139         PR libbacktrace/97227
140         * configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL.
141         * Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL.
142         * configure: Regenerate.
143         * Makefile.in: Regenerate.
145 2020-09-23  Ian Lance Taylor  <iant@golang.org>
147         * dwarf.c (report_inlined_functions): Handle PC == -1 and PC ==
148         p->low.
149         (dwarf_lookup_pc): Likewise.
151 2020-09-17  Ian Lance Taylor  <iant@golang.org>
153         PR libbacktrace/97080
154         * fileline.c (backtrace_syminfo_to_full_callback): New function.
155         (backtrace_syminfo_to_full_error_callback): New function.
156         * elf.c (elf_nodebug): Call syminfo_fn if possible.
157         * internal.h (struct backtrace_call_full): Define.
158         (backtrace_syminfo_to_full_callback): Declare.
159         (backtrace_syminfo_to_full_error_callback): Declare.
160         * mtest.c (f3): Only check all[i] if data.index permits.
162 2020-09-16  Iain Sandoe  <iain@sandoe.co.uk>
164         * macho.c (MACH_O_CPU_TYPE_PPC): New.
165         (MACH_O_CPU_TYPE_PPC64): New.
166         Add compile-tests for powerpc to the Mach-O variants.
168 2020-09-14  Ian Lance Taylor  <iant@golang.org>
170         PR libbacktrace/93608
171         Add support for MiniDebugInfo.
172         * elf.c (struct elf_view): Define.  Replace most uses of
173         backtrace_view with elf_view.
174         (elf_get_view): New static functions.  Replace most calls of
175         backtrace_get_view with elf_get_view.
176         (elf_release_view): New static functions.  Replace most calls of
177         backtrace_release_view with elf_release_view.
178         (elf_uncompress_failed): Rename from elf_zlib_failed.  Change all
179         callers.
180         (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define.
181         (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define.
182         (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define.
183         (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define.
184         (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define.
185         (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define.
186         (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define.
187         (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define.
188         (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define.
189         (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define.
190         (LZMA_PROB_DIST_ALIGN_LEN): Define.
191         (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define.
192         (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define.
193         (LZMA_PROB_MATCH_LEN_LOW_LEN): Define.
194         (LZMA_PROB_MATCH_LEN_MID_LEN): Define.
195         (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define.
196         (LZMA_PROB_REP_LEN_CHOICE_LEN): Define.
197         (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define.
198         (LZMA_PROB_REP_LEN_LOW_LEN): Define.
199         (LZMA_PROB_REP_LEN_MID_LEN): Define.
200         (LZMA_PROB_REP_LEN_HIGH_LEN): Define.
201         (LZMA_PROB_LITERAL_LEN): Define.
202         (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define.
203         (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define.
204         (LZMA_PROB_IS_REP2_OFFSET): Define.
205         (LZMA_PROB_IS_REP0_LONG_OFFSET): Define.
206         (LZMA_PROB_DIST_SLOT_OFFSET): Define.
207         (LZMA_PROB_DIST_SPECIAL_OFFSET): Define.
208         (LZMA_PROB_DIST_ALIGN_OFFSET): Define.
209         (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define.
210         (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define.
211         (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define.
212         (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define.
213         (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define.
214         (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define.
215         (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define.
216         (LZMA_PROB_REP_LEN_LOW_OFFSET): Define.
217         (LZMA_PROB_REP_LEN_MID_OFFSET): Define.
218         (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define.
219         (LZMA_PROB_LITERAL_OFFSET): Define.
220         (LZMA_PROB_TOTAL_COUNT): Define.
221         (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define.
222         (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define.
223         (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define.
224         (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define.
225         (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define.
226         (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define.
227         (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define.
228         (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define.
229         (elf_lzma_varint): New static function.
230         (elf_lzma_range_normalize): New static function.
231         (elf_lzma_bit, elf_lzma_integer): New static functions.
232         (elf_lzma_reverse_integer): New static function.
233         (elf_lzma_len, elf_uncompress_lzma_block): New static functions.
234         (elf_uncompress_lzma): New static function.
235         (backtrace_uncompress_lzma): New function.
236         (elf_add): Add memory and memory_size parameters.  Change all
237         callers.  Look for .gnu_debugdata section, and, if found,
238         decompress it and use it for symbols and debug info.  Permit the
239         descriptor parameter to be -1.
240         * internal.h (backtrace_uncompress_lzma): Declare.
241         * mtest.c: New file.
242         * xztest.c: New file.
243         * configure.ac: Check for nm, xz, and comm programs.  Check for
244         liblzma library.
245         (HAVE_MINIDEBUG): Define.
246         * Makefile.am (mtest_SOURCES): Define.
247         (mtest_CFLAGS, mtest_LDADD): Define.
248         (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG.
249         (%_minidebug): New pattern rule, if HAVE_MINIDEBUG.
250         (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define.
251         (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define
252         (xztest_alloc_LDADD): Define.
253         (BUILDTESTS): Add mtest, xztest, xztest_alloc.
254         (CLEANFILES): Add files created by minidebug pattern.
255         (btest.lo): Correct INCDIR reference.
256         (mtest.lo, xztest.lo, ztest.lo): New targets.
257         * configure: Regenerate.
258         * config.h.in: Regenerate.
259         * Makefile.in: Regenerate.
261 2020-09-09  Ian Lance Taylor  <iant@golang.org>
263         * pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
264         (coff_add): Determine and pass is_64.
266 2020-09-09  Ian Lance Taylor  <iant@golang.org>
268         PR libbacktrace/96973
269         * fileline.c (macho_get_executable_path): New static function.
270         (fileline_initialize): Call macho_get_executable_path.
272 2020-09-09  Ian Lance Taylor  <iant@golang.org>
274         * dwarf.c (function_addrs_search): Compare against the next entry
275         low address, not the high address.
276         (unit_addrs_search): Likewise.
277         (build_address_map): Add a trailing unit_addrs.
278         (read_function_entry): Add a trailing function_addrs.
279         (read_function_info): Likewise.
280         (report_inlined_functions): Search backward for function_addrs
281         match.
282         (dwarf_lookup_pc): Search backward for unit_addrs and
283         function_addrs matches.
285 2020-09-08  Ian Lance Taylor  <iant@golang.org>
287         * simple.c (simple_unwind): Correct comment spelling.
289 2020-09-08  Ian Lance Taylor  <iant@golang.org>
291         * macho.c (macho_add_dsym): Make space for '/' in dsym.  Use
292         correct length when freeing diralc.
294 2020-09-08  Ian Lance Taylor  <iant@golang.org>
296         PR libbacktrace/96973
297         * macho.c (macho_add_fat): Correctly swap 32-bit file offset.
299 2020-09-08  Ian Lance Taylor  <iant@golang.org>
301         PR libbacktrace/96971
302         * filetype.awk: Only match magic number at start of line.
304 2020-08-24  Ian Lance Taylor  <iant@golang.org>
306         * macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
307         (MACH_O_MH_CIGAM_FAT_64): Define.
308         (struct macho_fat_arch_64): Define.
309         (macho_add_fat): Add and use is_64 parameter.
310         (macho_add): Recognize 64-bit fat files.
312 2020-07-30  H.J. Lu  <hjl.tools@gmail.com>
314         PR bootstrap/96202
315         * configure: Regenerated.
317 2020-07-08  Ian Lance Taylor  <iant@golang.org>
319         * configure.ac: Test linker support for DWARF5
320         * configure: Regenerate
322 2020-05-29  H.J. Lu  <hjl.tools@gmail.com>
324         PR bootstrap/95413
325         * configure: Regenerated.
327 2020-05-15  H.J. Lu  <hongjiu.lu@intel.com>
329         PR bootstrap/95147
330         * configure: Regenerated.
332 2020-05-14  H.J. Lu  <hongjiu.lu@intel.com>
334         * configure: Regenerated.
336 2020-05-13  Ian Lance Taylor  <iant@golang.org>
338         * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
340 2020-05-13  Ian Lance Taylor  <iant@golang.org>
342         PR go/95061
343         * posix.c (backtrace_open): Treat EACCESS like ENOENT.
345 2020-05-12  H.J. Lu  <hongjiu.lu@intel.com>
347         * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
348         * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
349         AC_SUBST(CET_HOST_FLAGS).  Clear CET_HOST_FLAGS if jit isn't
350         enabled.
351         * Makefile.in: Regenerated.
352         * configure: Likewise.
354 2020-05-11  Ian Lance Taylor  <iant@golang.org>
356         PR libbacktrace/95012
357         * configure.ac: Check for getpagesize declaration.
358         * mmap.c: Declare getpagesize if necessary.
359         * mmapio.c: Likewise.
360         * configure: Regenerate.
361         * config.h.in: Regenerate.
362         * Makefile.in: Regenerate.
364 2020-05-09  Roland McGrath  <mcgrathr@google.com>
366         * elf.c (elf_add): Bail early if there are no section headers at all.
368 2020-05-09  Ian Lance Taylor  <iant@golang.org>
370         * elf.c (elf_add): Don't free strtab if an error occurs after
371         recording symbol information.
373 2020-05-09  Ian Lance Taylor  <iant@golang.org>
375         PR libbacktrace/88745
376         * macho.c: New file.
377         * filetype.awk: Recognize Mach-O files.
378         * Makefile.am (FORMAT_FILES): Add macho.c.
379         (check_DATA): New variable.  Set to .dSYM if HAVE_DSYMUTIL.
380         (%.dSYM): New pattern target.
381         (test_macho_SOURCES, test_macho_CFLAGS): New targets.
382         (test_macho_LDADD): New target.
383         (BUILDTESTS): Add test_macho.
384         (macho.lo): Add dependencies.
385         * configure.ac: Recognize macho file type.  Check for
386         mach-o/dyld.h.  Don't try to run objcopy if we don't find it.
387         Look for dsymutil and define a HAVE_DSYMUTIL conditional.
388         * Makefile.in: Regenerate.
389         * configure: Regenerate.
390         * config.h.in: Regenerate.
392 2020-05-09  Ian Lance Taylor  <iant@golang.org>
394         * read.c (backtrace_get_view): Support short read.
396 2020-05-09  Ian Lance Taylor  <iant@golang.org>
398         * elf.c (elf_add): If debug sections are very large or far apart,
399         read them individually rather than as a single view.
401 2020-05-08  Ian Lance Taylor  <iant@golang.org>
403         * fileline.c (sysctl_exec_name): New static function.
404         (sysctl_exec_name1): New macro or static function.
405         (sysctl_exec_name2): Likewise.
406         (fileline_initialize): Try sysctl_exec_name[12].
407         * configure.ac: Check for sysctl args to fetch executable name.
408         * configure: Regenerate.
409         * config.h.in: Regenerate.
411 2020-02-15  Ian Lance Taylor  <iant@golang.org>
413         * ztest.c (test_large): Update file to current libgo test file.
415 2020-02-03  Ian Lance Taylor  <iant@golang.org>
417         * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
418         (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
419         (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
420         (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
421         (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
422         (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
423         (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
424         (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
425         (stest_alloc_CFLAGS): Likewise.
426         * Makefile.in: Regenerate.
427         * ztest.c (error_callback_compress): Mark vdata unused.
428         (test_large): Add casts to avoid warnings.
430 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
432         Update copyright years.
434 2019-12-13  Ian Lance Taylor  <iant@golang.org>
436         Add DWARF 5 support.
437         * dwarf.c (struct attr): Add val field.
438         (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
439         ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
440         (struct line_header): Add addrsize field.
441         (struct line_header_format): Define.
442         (struct unit): Add str_offsets_base, addr_base, and rnglists_base
443         fields.
444         (read_uint24): New static function.
445         (read_attribute): Add implicit_val parameter.  Replace dwarf_str
446         and dwarf_str_size parameters with dwarf_sections parameter.  Add
447         support for new DWARF 5 forms.  Change all callers.
448         (resolve_string): New static function.
449         (resolve_addr_index): Likewise.
450         (read_abbrevs): Support DW_FORM_implicit_const.
451         (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
452         and ranges_is_index fields.
453         (update_pcrange): Support DWARF 5 encodings.
454         (add_high_low_range): New static function, split out of
455         add_ranges.
456         (add_ranges_from_ranges): Likewise.
457         (add_ranges_from_rnglists): New static function.
458         (add_ranges): Just call new helper functions.
459         (find_address_ranges): Use resolve_string for strings, after
460         reading all attributes.  Handle new DWARF 5 attributes.
461         (build_address_map): Support DWARF 5 compilation units.
462         (read_v2_paths): New static function, split out of
463         read_line_header.
464         (read_lnct): New static function.
465         (read_line_header_format_entries): Likewise.
466         (read_line_header): Add ddata parameter.  Support DWARF 5 line
467         headers.  Call new helper functions.  Change all callers.
468         (read_line_program): Use addrsize from line program header.  Don't
469         special case directory index 0 for DWARF 5.
470         (read_referenced_name): Use resolve_string.
471         (read_function_entry): Handle DWARF 5 encodings.  Use
472         resolve_string.
473         * internal.h (enum dwarf_section): Add DEBUG_ADDR,
474         DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
475         * elf.c (dwarf_section_names): Add new section names.
476         * pecoff.c (dwarf_section_names): Likewise.
477         * xcoff.c (xcoff_add): Clear dwarf_sections before setting
478         fields.
479         * configure.ac: Define HAVE_DWARF5 automake conditional.
480         * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
481         (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
482         (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
483         (dwarf5_alloc_LDADD): Likewise.
484         (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
485         (CLEANFILES, clean-local): Define.
487 2019-12-08  Ian Lance Taylor  <iant@golang.org>
489         * dwarf.c (struct pcrange): Define.
490         (update_pcrange, add_ranges): New static functions.
491         (add_unit_addr): Change signature to work with add_ranges.  Don't
492         add base_address here.
493         (add_unit_ranges): Remove.
494         (find_address_ranges): Replace str/ranges parameters with
495         dwarf_sections.  Use update_pcrange and add_ranges.  Change all
496         callers.
497         (add_function_range): Change signature to work with add_ranges.
498         Don't add base_address here.
499         (add_function_ranges): Remove.
500         (read_function_entry): Use update_pcrange and add_ranges.
502 2019-12-04  Ian Lance Taylor  <iant@golang.org>
504         * edtest.c (test1): Add noclone attribute.
506 2019-12-04  Ian Lance Taylor  <iant@golang.org>
508         * internal.h (enum dwarf_section): Define.
509         (struct dwarf_sections): Define.
510         (backtrace_dwarf_add): Update declaration to replace specific
511         section parameters with dwarf_sections parameter.
512         * dwarf.c (struct dwarf_data): Replace specific section fields
513         with dwarf_sections field.
514         (read_attribute): Use dwarf_sections with altlink.
515         (build_address_map): Replace specific section parameters with
516         dwarf_sections parameter.  Change all callers.
517         (read_line_info): Use dwarf_sections with ddata.
518         (read_referenced_name): Likewise.
519         (add_function_ranges): Likewise.
520         (read_function_entry): Likewise.
521         (read_function_info): Likewise.
522         (build_dwarf_data): Replace specific section parameters with
523         dwarf_sections parameter.  Change all callers.
524         (backtrace_dwarf_add): Likewise.
525         * elf.c (enum debug_section): Remove.
526         (dwarf_section_names): Remove .zdebug names.
527         (elf_add): Track zsections separately.  Build dwarf_sections.
528         * pecoff.c (enum debug_section): Remove.
529         (struct debug_section_info): Remove data field.
530         (coff_add): Build dwarf_sections.
531         * xcoff.c (enum dwarf_section): Remove.  Replace DWSECT_xxx
532         references with DEBUG_xxx references.
533         (xcoff_add): Build dwarf_sections.
535 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
537         * configure: Regenerate.
539 2019-09-26  Ian Lance Taylor  <iant@golang.org>
541         PR libbacktrace/91908
542         * pecoff.c (backtrace_initialize): Explicitly cast unchecked
543         __sync_bool_compare_and_swap to void.
544         * xcoff.c (backtrace_initialize): Likewise.
546 2019-09-03  Ulrich Weigand  <uweigand@de.ibm.com>
548         * configure.ac: Remove references to spu.
549         * configure: Regenerate.
551 2019-05-24  Clement Chigot  <clement.chigot@atos.net>
553         * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
554         test_elf_64.
555         * Makefile.in: Regenerate.
557 2019-05-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
559         * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
560         handling.
561         * configure: Regenerate.
563 2019-03-11  Ian Lance Taylor  <iant@golang.org>
565         PR libbacktrace/89669
566         * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
567         HAVE_ELF.
568         * Makefile.in: Regenerate.
570 2019-02-26  Tom de Vries  <tdevries@suse.de>
572         * btest.c (test5): Allow global.* as minimal symbol name for global.
574 2019-02-26  Tom de Vries  <tdevries@suse.de>
576         * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
577         * Makefile.in: Regenerate.
579 2019-02-12  Tom de Vries  <tdevries@suse.de>
581         PR libbacktrace/81983
582         * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
584 2019-02-10  Tom de Vries  <tdevries@suse.de>
586         * Makefile.am (BUILDTESTS): Add btest_lto.
587         * Makefile.in: Regenerate.
588         * btest.c (test1, f2, f3, test3, f22, f23): Declare with
589         __attribute__((noclone)).
591 2019-02-08  Tom de Vries  <tdevries@suse.de>
593         * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
594         * print.c (backtrace_print): Same.
595         * simple.c (backtrace_simple): Same.
597 2019-02-08  Tom de Vries  <tdevries@suse.de>
599         PR libbacktrace/78063
600         * dwarf.c (build_address_map): Keep all parsed units.
601         (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
603 2019-01-31  Tom de Vries  <tdevries@suse.de>
605         PR libbacktrace/89136
606         * elf.c (elf_add): Read build-id if with_buildid_data.  Fix
607         'debugaltlink_name_len =+ 1'.
609 2019-01-29  Tom de Vries  <tdevries@suse.de>
611         * install-debuginfo-for-buildid.sh.in: New script.
612         * Makefile.am (check_PROGRAMS): Add b2test and b3test.
613         (TESTS): Add b2test_buildid and b3test_dwz_buildid.
614         * Makefile.in: Regenerate.
615         * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
616         (READELF): Set with AC_CHECK_PROG.
617         (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
618         * configure: Regenerate.
619         * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
620         (elf_open_debugfile_by_buildid): ... here.
622 2019-01-29  Tom de Vries  <tdevries@suse.de>
624         * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
625         allocfail.
626         (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
627         (check_PROGRAMS): Add BUILDTESTS.
628         * Makefile.in: Regenerate.
630 2019-01-28  Tom de Vries  <tdevries@suse.de>
632         * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
633         Use $< to access prerequisite.
634         * Makefile.in: Regenerate.
636 2019-01-25  Nathan Sidwell  <nathan@acm.org>
638         * elf.c (elf_add): Pass "" filename to recursive call with
639         separated debug.
641 2019-01-25  Tom de Vries  <tdevries@suse.de>
643         * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
644         filename == "".
645         * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
646         * Makefile.in: Regenerate.
648 2019-01-25  Tom de Vries  <tdevries@suse.de>
650         * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
651         (TESTS): Rename dtest to btest_gnudebuglink.
652         * Makefile.in: Regenerate.
654 2019-01-23  Tom de Vries  <tdevries@suse.de>
656         * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
657         (units_search, find_unit): Use size_t for offset.
658         (build_address_map): Use size_t for unit_offset.
660 2019-01-20  Gerald Pfeifer  <gerald@pfeifer.com>
662         * allocfail.c (main): Increase portability of printf statement.
664 2019-01-18  Ian Lance Taylor  <iant@golang.org>
666         PR libbacktrace/88890
667         * mmapio.c (backtrace_get_view): Change size parameter to
668         uint64_t.  Check that value fits in size_t.
669         * read.c (backtrace_get_view): Likewise.
670         * internal.h (backtrace_get_view): Update declaration.
671         * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
673 2019-01-17  Tom de Vries  <tdevries@suse.de>
675         PR libbacktrace/82857
676         * configure.ac (DWZ): Set with AC_CHECK_PROG.
677         (HAVE_DWZ): Set with AM_CONDITIONAL.
678         * configure: Regenerate.
679         * Makefile.am (TESTS): Add btest_dwz.
680         * Makefile.in: Regenerate.
682 2019-01-17  Tom de Vries  <tdevries@suse.de>
684         PR libbacktrace/82857
685         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
686         (read_attribute): Handle DW_FORM_GNU_ref_alt using
687         ATTR_VAL_REF_ALT_INFO.
688         (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
690 2019-01-17  Tom de Vries  <tdevries@suse.de>
692         * dwarf.c (struct unit): Add low_offset and high_offset fields.
693         (struct unit_vector): New type.
694         (struct dwarf_data): Add units and units_counts fields.
695         (find_unit): New function.
696         (find_address_ranges): Add and handle unit_tag parameter.
697         (build_address_map): Add and handle units_vec parameter.
698         (build_dwarf_data): Pass units_vec to build_address_map.  Store resulting
699         units vector.
701 2019-01-17  Tom de Vries  <tdevries@suse.de>
703         PR libbacktrace/82857
704         * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
705         using altlink.
707 2019-01-17  Tom de Vries  <tdevries@suse.de>
709         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
710         (read_attribute): Add altlink parameter.  Handle missing altlink for
711         DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
712         (find_address_ranges, build_address_map, build_dwarf_data): Add and
713         handle altlink parameter.
714         (read_referenced_name, read_function_entry): Add argument to
715         read_attribute call.
717 2019-01-17  Tom de Vries  <tdevries@suse.de>
719         * dwarf.c (struct dwarf_data): Add altlink field.
720         (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
721         * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
722         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
723         * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
724         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
725         * xcoff.c (xcoff_add): Same.
727 2019-01-17  Tom de Vries  <tdevries@suse.de>
729         * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
730         * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
731         * elf.c (elf_add): Add and handle fileline_entry parameter.  Add
732         argument to backtrace_dwarf_add call.
733         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
734         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
735         * xcoff.c (xcoff_add): Same.
737 2019-01-17  Tom de Vries  <tdevries@suse.de>
739         * elf.c (elf_add): Add and handle with_buildid_data and
740         with_buildid_size parameters.  Handle .gnu_debugaltlink section.
741         (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
743 2019-01-16  Tom de Vries  <tdevries@suse.de>
745         * dwarf.c (read_referenced_name_from_attr): New function.  Factor out
746         of ...
747         (read_referenced_name): ... here, and ...
748         (read_function_entry): ... here.
750 2019-01-16  Tom de Vries  <tdevries@suse.de>
752         * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
753         name.
754         (read_function_entry): Same.  Don't allow name found via
755         DW_AT_abstract_origin or case DW_AT_specification to override linkage
756         name.
758 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
760         PR other/16615
762         * backtrace.h: Mechanically replace "can not" with "cannot".
764 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
766         Update copyright years.
768 2018-12-29  Gerald Pfeifer  <gerald@pfeifer.com>
770         * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
771         in sed pattern.
772         * Makefile.in: Regenerate.
774 2018-12-28  Tom de Vries  <tdevries@suse.de>
776         * dwarf.c (build_address_map): Reuse unused units.
778 2018-12-28  Tom de Vries  <tdevries@suse.de>
780         * dwarf.c (build_address_map): Simplify by removing local variable
781         abbrevs.
783 2018-12-28  Ian Lance Taylor  <iant@golang.org>
784             Tom de Vries  <tdevries@suse.de>
786         PR libbacktrace/88063
787         * dwarf.c (free_unit_addrs_vector): Remove.
788         (build_address_map): Keep track of allocated units in vector.  Free
789         allocated units and corresponding abbrevs upon failure.  Remove now
790         redundant call to free_unit_addrs_vector.  Free addrs vector upon
791         failure.  Free allocated unit vector.
793 2018-12-28  Tom de Vries  <tdevries@suse.de>
795         * dwarf.c (build_address_map): Free addrs vector upon failure.
797 2018-12-14  Tom de Vries  <tdevries@suse.de>
799         PR testsuite/88491
800         * allocfail.sh: Remove "set -o pipefail".
802 2018-12-12  Tom de Vries  <tdevries@suse.de>
804         * Makefile.am (TESTS): Add allocfail.sh.
805         (check_PROGRAMS): Add allocfail.
806         * Makefile.in: Regenerate.
807         * instrumented_alloc.c: New file.  Redefine malloc and realloc.
808         Include alloc.c.
809         * allocfail.c: New file.
810         * allocfail.sh: New file.
812 2018-11-30  Tom de Vries  <tdevries@suse.de>
814         * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
815         test_xcoff_64, test_pecoff and test_unknown.
816         * Makefile.in: Regenerate.
817         * test_format.c: New file.
819 2018-11-30  Tom de Vries  <tdevries@suse.de>
821         * Makefile.am : Add _with_alloc version for each test in
822         check_PROGRAMS.
823         * Makefile.in: Regenerate.
825 2018-11-30  Tom de Vries  <tdevries@suse.de>
827         * internal.h (backtrace_vector_free): New static inline fuction,
828         factored out of ...
829         * dwarf.c (read_line_info): ... here.
831 2018-11-28  Tom de Vries  <tdevries@suse.de>
833         * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
834         failure.
836 2018-11-27  Tom de Vries  <tdevries@suse.de>
838         * mmap.c (backtrace_vector_release): Same.
839         * unittest.c (test1): Add check.
841 2018-11-27  Tom de Vries  <tdevries@suse.de>
843         * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
844         instead of realloc.
845         * Makefile.am (check_PROGRAMS): Add unittest.
846         * Makefile.in: Regenerate.
847         * unittest.c: New file.
849 2018-11-22  Tom de Vries  <tdevries@suse.de>
851         * dwarf.c (read_initial_length): Factor out of ...
852         (build_address_map, read_line_info): ... here.
854 2018-11-21  Tom de Vries  <tdevries@suse.de>
856         * dwarf.c (read_string): Factor out of ...
857         (read_attribute, read_line_header, read_line_program): ... here.
859 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
861         PR bootstrap/82856
862         * Makefile.am: Include multilib.am.
863         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
864         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
866 2018-10-05  Ian Lance Taylor  <iant@golang.org>
868         PR libbacktrace/87529
869         * backtrace.h: Document that backtrace_create_state should be
870         called only once.
872 2018-08-05 Iain Buclaw  <ibuclaw@gdcproject.org>
874         * configure.ac: Move define of HAVE_ZLIB into check for -lz.
875         * Makefile.in: Regenerate.
876         * config.h.in: Likewise.
877         * configure: Likewise.
879 2018-08-01  Tony Reix  <tony.reix@atos.net>
881         * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
882         (struct xcoff_func, struct xcoff_func_vector): New structs.
883         (xcoff_syminfo): Drop leading dot from symbol name.
884         (xcoff_line_compare, xcoff_line_search): Remove.
885         (xcoff_func_compare, xcoff_func_search): New static functions.
886         (xcoff_lookup_pc): Search function table.
887         (xcoff_add_line, xcoff_process_linenos): Remove.
888         (xcoff_initialize_fileline): Build function table.
890 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
892         PR other/86198
893         * elf.c (elf_add): Increase ".note.gnu.build-id" section size
894         checking up to 36 bytes.
896 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
898         * configure: Regenerated.
900 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
902         * configure: Regenerated.
904 2018-04-17  Ian Lance Taylor  <iant@golang.org>
906         * backtrace.c: Revert last two changes.  Don't call mmap
907         directly.
909 2018-04-17  Ian Lance Taylor  <iant@golang.org>
911         * backtrace.c: Include backtrace-supported.h before checking
912         BACKTRACE_USES_MALLOC.
914 2018-04-17  Ian Lance Taylor  <iant@golang.org>
916         * backtrace.c (backtrace_full): When testing whether we can
917         allocate memory, call mmap directly, and munmap the memory.
919 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
921         PR other/85161
922         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
923         big endian, only use 32-bit loads if endianity macros are predefined
924         and indicate big or little endian.
926 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
928         PR target/84148
929         * configure: Regenerate.
931 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
933         PR other/82368
934         * elf.c (SHT_PROGBITS): Undefine and define.
936 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
938         PR other/82368
939         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
940         (struct elf_ppc64_opd_data): New type.
941         (elf_initialize_syminfo): Add opd argument, handle symbols
942         pointing into the PowerPC64 ELFv1 .opd section.
943         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
944         to structure with .opd data to elf_initialize_syminfo.
946 2018-01-31  Ian Lance Taylor  <iant@golang.org>
948         * elf.c (elf_add): Close descriptor if we use a debugfile.
949         * btest.c (check_open_files): New static function.
950         (main): Call check_open_files.
952 2018-01-25  Ian Lance Taylor  <iant@golang.org>
954         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
955         desired CRC is zero.
956         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
958 2018-01-25  Ian Lance Taylor  <iant@golang.org>
960         * pecoff.c (coff_add): Only release syms_view if it is valid.
962 2018-01-25  Ian Lance Taylor  <iant@golang.org>
964         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
966 2018-01-24  Ian Lance Taylor  <iant@golang.org>
968         * pecoff.c (coff_add): Use coff_read4, not memcpy.
970 2018-01-24  Ian Lance Taylor  <iant@golang.org>
972         PR other/68239
973         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
974         on the free list.
976 2018-01-19  Tony Reix  <tony.reix@atos.net>
978         * xcoff.c (xcoff_incl_compare): New function.
979         (xcoff_incl_search): New function.
980         (xcoff_process_linenos): Use bsearch to find include file.
981         (xcoff_initialize_fileline): Sort include file information.
983 2018-01-16  Ian Lance Taylor  <iant@golang.org>
985         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
986         288.
987         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
988         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
989         (elf_zlib_default_table): Update.
990         (elf_zlib_default_dist_table): New static array.
991         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
992         for block type 1.
993         * ztest.c (struct zlib_test): Add uncompressed_len.
994         (tests): Initialize uncompressed_len field.  Add new test case.
995         (test_samples): Use uncompressed_len field.
997 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
999         Update copyright years.
1001 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
1003         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
1004         * aclocal.m4: Regenerate.
1005         * Makefile.in: Likewise.
1006         * configure: Likewise.
1008 2017-10-06  Ian Lance Taylor  <iant@golang.org>
1010         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
1011         zlib uncompress function.
1013 2017-10-05  Ian Lance Taylor  <iant@golang.org>
1015         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
1016         Read a four byte integer.
1017         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
1018         boundary before ever calling elf_zlib_fetch.
1019         * ztest.c (test_large): Simplify print statements a bit.
1021 2017-10-02  Ian Lance Taylor  <iant@golang.org>
1023         * ztest.c: #include <errno.h>.
1024         (TEST_TIMING): Don't define, don't test.
1025         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
1026         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
1027         (ZLIB_CLOCK_GETTIME_ARG): Define.
1028         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
1029         * Makefile.am: Likewise.
1030         * configure, Makefile.in: Rebuild.
1032 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
1034         PR other/67165
1035         * Makefile.am: Append the content of clock_gettime_link to
1036         ztest_LDADD.
1037         * configure.ac: Test for the case that clock_gettime is in librt.
1038         * Makefile.in: Regenerate.
1039         * configure: Likewise.
1041         PR other/67165
1042         * configure.ac: Check for clock_gettime.
1043         * config.h.in: Regenerate.
1044         * configure: Likewise.
1045         * ztest.c (average_time, test_large): Conditionalize test timing
1046         on clock_gettime availability.
1048 2017-09-29  Tony Reix  <tony.reix@atos.net>
1050         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
1051         (STYP_DWARF, SSUBTYP_DW*): Define.
1052         (enum dwarf_section): Define.
1053         (struct dwsect_info): Define.
1054         (xcoff_add): Look for DWARF sections, pass them to
1055         backtrace_dwarf_add.
1057 2017-09-28  Ian Lance Taylor  <iant@golang.org>
1059         PR other/67165
1060         * elf.c (__builtin_prefetch): Define if not __GNUC__.
1061         (unlikely): Define.
1062         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
1063         (b_elf_chdr): Define type.
1064         (enum debug_section): Add ZDEBUG_xxx values.
1065         (debug_section_names): Add names for new sections.
1066         (struct debug_section_info): Add compressed field.
1067         (elf_zlib_failed, elf_zlib_fetch): New static functions.
1068         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
1069         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
1070         (HUFFMAN_SECONDARY_SHIFT): Define.
1071         (ZDEBUG_TABLE_SIZE): Define.
1072         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
1073         (final_next_secondary): New static variable if
1074         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
1075         (elf_zlib_inflate_table): New static function.
1076         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
1077         function to produce fixed Huffman table.
1078         (elf_zlib_default_table): New static variable.
1079         (elf_zlib_inflate): New static function.
1080         (elf_zlib_verify_checksum): Likewise.
1081         (elf_zlib_inflate_and_verify): Likewise.
1082         (elf_uncompress_zdebug): Likewise.
1083         (elf_uncompress_chdr): Likewise.
1084         (backtrace_uncompress_zdebug): New extern function.
1085         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
1086         sections, and uncompress them.
1087         * internal.h (backtrace_compress_zdebug): Declare.
1088         * ztest.c: New file.
1089         * configure.ac: Check for -lz and check whether the linker
1090         supports --compress-debug-sections.
1091         * Makefile.am (ztest_SOURCES): New variable.
1092         (ztest_CFLAGS, ztest_LDADD): New variables.
1093         (check_PROGRAMS): Add ztest.
1094         (ctestg_SOURCES): New variable.
1095         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
1096         (ctesta_SOURCES): New variable.
1097         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
1098         (check_PROGRAMS): Add ctestg and ctesta.
1099         * configure, config.h.in, Makefile.in: Rebuild.
1101 2017-09-22  Ian Lance Taylor  <iant@golang.org>
1103         PR sanitizer/77631
1104         * configure.ac: Check for lstat and readlink.
1105         * elf.c (lstat, readlink): Provide dummy versions if real versions
1106         are not available.
1107         * configure, config.h.in: Rebuild.
1109 2017-09-21  Ian Lance Taylor  <iant@google.com>
1111         PR go/82284
1112         * elf.c (backtrace_initialize): Set pd.exe_filename.
1114 2017-09-20  Ian Lance Taylor  <iant@golang.org>
1115             Denis Khalikov  <d.khalikov@partner.samsung.com>
1117         PR sanitizer/77631
1118         Support for external debug info.
1119         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
1120         (S_ISLNK): Define if not defined.
1121         (xstrnlen): Define if strnlen is not available.
1122         (b_elf_note): Define type.
1123         (NT_GNU_BUILD_ID): Define macro.
1124         (elf_crc32, elf_crc32_file): New static functions.
1125         (elf_is_symlink, elf_readlink): New static functions.
1126         (elf_open_debugfile_by_buildid): New static function.
1127         (elf_try_debugfile): New static function.
1128         (elf_find_debugfile_by_debuglink): New static function.
1129         (elf_open_debugfile_by_debuglink): New static function.
1130         (elf_add): Add filename and debuginfo parameters.  Adjust all
1131         callers.  Look for external debug info notes, and try to fetch
1132         debug info from external file.
1133         (struct phdr_data): Add exe_filename field.
1134         (phdr_callback): Pass filename to elf_add.
1135         (backtrace_initialize): Add filename parameter.
1136         * internal.h (backtrace_initialize): Add filename parameter.
1137         * fileline.c (fileline_initialize): Pass filename to
1138         backtrace_initialize.
1139         * pecoff.c (fileline_initialize): Add unused filename parameter.
1140         * unknown.c (fileline_initialize): Likewise.
1141         * xcoff.c (fileline_initialize): Likewise.
1142         * configure.ac: Check for objcopy --add-gnu-debuglink.
1143         * Makefile.am (dtest): New test target.
1144         * configure, Makefile.in: Rebuild.
1146 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
1148         PR other/81096
1149         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
1150         * Makefile.in: Regenerate.
1152 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
1154         PR other/81096
1155         * libbacktrace/Makefile.in
1156         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
1158 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
1160         PR bootstrap/81638
1161         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
1163 2017-07-28  Tony Reix  <tony.reix@atos.net>
1165         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
1167 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1169         * fileline.c (fileline_initialize): Print pid_t as long.
1171 2017-07-26  Tony Reix  <tony.reix@atos.net>
1173         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
1174         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
1175         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
1176         * configure, config.h.in: Regenerate.
1178 2017-07-21  Tony Reix  <tony.reix@atos.net>
1180         * filetype.awk: Add AIX XCOFF type detection.
1181         * configure.ac: Recognize xcoff format.
1182         * Makefile.am (FORMAT_FILES): Add xcoff.c.
1183         * fileline.c: Include <unistd.h>.
1184         (fileline_initialize): Add case for AIX procfs.
1185         * xcoff.c: New file.
1186         * configure, Makefile.in: Rebuild.
1188 2017-06-21  Richard Biener  <rguenther@suse.de>
1190         * configure.ac: Add AC_SYS_LARGEFILE.
1191         * config.h.in: Regenerate.
1192         * configure: Likewise.
1194 2017-06-11  Ian Lance Taylor  <iant@golang.org>
1196         * elf.c (backtrace_initialize): Always set *fileline_fn.
1197         * ttest.c: New file.
1198         * btest.c: Move support functions into testlib.c.  Change calls to
1199         check to pass file name.
1200         * testlib.c: New file, copied from (part of) btest.c.
1201         * testlib.h: New file, declarations for testlib.c.
1202         * edtest.c: Use testlib.h and testlib.c.
1203         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
1204         * Makefile.am (btest_SOURCES): Add testlib.c.
1205         (edtest_SOURCES): Likewise.
1206         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
1207         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
1208         * configure, Makefile.in: Rebuild.
1210 2017-05-19  Than McIntosh  <thanm@google.com>
1212         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
1213         (read_line_header): Don't allocate dirs if dirs_count == 0.
1214         * edtest.c: New file.
1215         * edtest2.c: New file.
1216         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
1217         (check_PROGRAMS): Add edtest.
1218         (edtest2_build.c, gen_edtest2_build): New targets.
1219         * Makefile.in: Rebuild.
1221 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
1223         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
1224         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
1226 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1228         Update copyright years.
1230 2016-11-15  Matthias Klose  <doko@ubuntu.com>
1232         * configure: Regenerate.
1234 2016-09-11  Carlos Liam  <carlos@aarzee.me>
1236         * all: Remove meaningless trailing whitespace.
1238 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
1240         PR target/71161
1241         * elf.c (phdr_callback) [__i386__]: Add
1242         __attribute__((__force_align_arg_pointer__)).
1244 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
1246         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
1247         avoid possible crash.
1248         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
1249         missing debug info anymore.
1251 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
1253         * mmap.c (MAP_FAILED): Define if not defined.
1255 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1257         Update copyright years.
1259 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
1261         * configure.ac: Specify that DJGPP do not have mmap
1262         even when sys/mman.h exists.
1263         * configure: Regenerate
1265 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
1267         PR libgfortran/68115
1268         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
1269         * configure: Regenerate.
1270         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
1271         to void.
1273 2015-09-17  Ian Lance Taylor  <iant@google.com>
1275         * posix.c (backtrace_open): Cast second argument of open() to int.
1277 2015-09-11  Ian Lance Taylor  <iant@google.com>
1279         * Makefile.am (backtrace.lo): Depend on internal.h.
1280         (sort.lo, stest.lo): Add explicit dependencies.
1281         * Makefile.in: Rebuild.
1283 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
1285         * backtrace.c: #include <sys/types.h>.
1287 2015-09-08  Ian Lance Taylor  <iant@google.com>
1289         PR other/67457
1290         * backtrace.c: #include "internal.h".
1291         (struct backtrace_data): Add can_alloc field.
1292         (unwind): If can_alloc is false, don't try to get file/line
1293         information.
1294         (backtrace_full): Set can_alloc field in bdata.
1295         * alloc.c (backtrace_alloc): Don't call error_callback if it is
1296         NULL.
1297         * mmap.c (backtrace_alloc): Likewise.
1298         * internal.h: Update comments for backtrace_alloc and
1299         backtrace_free.
1301 2015-09-08  Ian Lance Taylor  <iant@google.com>
1303         PR other/67457
1304         * mmap.c (backtrace_alloc): Correct test for mmap failure.
1306 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1308         * configure.ac: For spu-*-* targets, set have_fcntl to no.
1309         * configure: Regenerate.
1311 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1313         * configure.ac: Remove [disable-shared] argument to LT_INIT.
1314         Remove setting PIC_FLAG when building as target library.
1315         * configure: Regenerate.
1317 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
1319         * configure.ac: Only compile with -fPIC if the target
1320         supports it.
1321         * configure: Regenerate.
1323 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1325         * configure.ac: Set have_mmap to no on spu-*-* targets.
1326         * configure: Regenerate.
1328 2015-08-13  Ian Lance Taylor  <iant@google.com>
1330         * dwarf.c (read_function_entry): Add vec_inlined parameter.
1331         Change all callers.
1333 2015-06-11  Martin Sebor  <msebor@redhat.com>
1335         PR sanitizer/65479
1336         * dwarf.c (struct line): Add new field idx.
1337         (line_compare): Use it.
1338         (add_line): Set it.
1339         (read_line_info): Reset it.
1341 2015-05-29  Tristan Gingold  <gingold@adacore.com>
1343         * pecoff.c: New file.
1344         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1345         * Makefile.in: Regenerate.
1346         * filetype.awk: Detect pecoff.
1347         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1348         Add pecoff.
1349         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1350         true.
1351         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1352         * configure: Regenerate.
1353         * pecoff.c: New file.
1355 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
1357         * Makefile.in: Regenerated with automake-1.11.6.
1358         * aclocal.m4: Likewise.
1359         * configure: Likewise.
1361 2015-01-24  Matthias Klose  <doko@ubuntu.com>
1363         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1364         * configure: Regenerate.
1366 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1368         Update copyright years.
1370 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1372         PR bootstrap/63784
1373         * configure: Regenerated.
1375 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
1377         * ChangeLog.jit: New.
1379 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1381         PR target/63610
1382         * configure: Regenerate.
1384 2014-10-23  Ian Lance Taylor  <iant@google.com>
1386         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1387         Fix to return void *.
1389 2014-05-08  Ian Lance Taylor  <iant@google.com>
1391         * mmap.c (backtrace_free): If freeing a large aligned block of
1392         memory, call munmap rather than holding onto it.
1393         (backtrace_vector_grow): When growing a vector, double the number
1394         of pages requested.  When releasing the old version of a grown
1395         vector, pass the correct size to backtrace_free.
1397 2014-03-07  Ian Lance Taylor  <iant@google.com>
1399         * sort.c (backtrace_qsort): Use middle element as pivot.
1401 2014-03-06  Ian Lance Taylor  <iant@google.com>
1403         * sort.c: New file.
1404         * stest.c: New file.
1405         * internal.h (backtrace_qsort): Declare.
1406         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1407         (read_line_info, read_function_entry): Likewise.
1408         (read_function_info, build_dwarf_data): Likewise.
1409         * elf.c (elf_initialize_syminfo): Likewise.
1410         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1411         (stest_SOURCES, stest_LDADD): Define.
1412         (check_PROGRAMS): Add stest.
1414 2014-02-07  Misty De Meo  <misty@brew.sh>
1416         PR target/58710
1417         * configure.ac: Use AC_LINK_IFELSE in check for
1418         _Unwind_GetIPInfo.
1419         * configure: Regenerate.
1421 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1423         Update copyright years
1425 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
1427         * elf.c (ET_DYN): Undefine and define again.
1428         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1429         return early -1 without closing the descriptor.
1430         (struct phdr_data): Add exe_descriptor.
1431         (phdr_callback): If pd->exe_descriptor is not -1, for very first
1432         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1433         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
1434         call to elf_add.
1435         (backtrace_initialize): Adjust call to elf_add.  If it returns
1436         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1438 2013-12-05  Ian Lance Taylor  <iant@google.com>
1440         * alloc.c (backtrace_vector_finish): Add error_callback and data
1441         parameters.  Call backtrace_vector_release.  Return address base.
1442         * mmap.c (backtrace_vector_finish): Add error_callback and data
1443         parameters.  Return address base.
1444         * dwarf.c (read_function_info): Get new address base from
1445         backtrace_vector_finish.
1446         * internal.h (backtrace_vector_finish): Update declaration.
1448 2013-11-27  Ian Lance Taylor  <iant@google.com>
1450         * dwarf.c (find_address_ranges): New static function, broken out
1451         of build_address_map.
1452         (build_address_map): Call it.
1453         * btest.c (check): Check for missing filename or function, rather
1454         than crashing.
1455         (f3): Check that enough frames were returned.
1457 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
1459         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1460         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1461         last argument.
1462         * btest.c (struct symdata): Add size field.
1463         (callback_three): Add symsize argument.  Copy it to the data->size
1464         field.
1465         (f23): Set symdata.size to 0.
1466         (test5): Likewise.  If sizeof (int) > 1, lookup address of
1467         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
1468         values.
1470         * atomic.c: Include sys/types.h.
1472 2013-11-18  Ian Lance Taylor  <iant@google.com>
1474         * configure.ac: Check for support of __atomic extensions.
1475         * internal.h: Declare or #define atomic functions for use in
1476         backtrace code.
1477         * atomic.c: New file.
1478         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1479         (dwarf_fileline, backtrace_dwarf_add): Likewise.
1480         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1481         (backtrace_initialize): Likewise.
1482         * fileline.c (fileline_initialize): Likewise.
1483         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1484         * configure, config.h.in, Makefile.in: Rebuild.
1486 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
1488         * elf.c (SHN_UNDEF): Define.
1489         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
1490         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
1491         (elf_add): Adjust caller.
1493         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1495 2013-11-16  Ian Lance Taylor  <iant@google.com>
1497         * backtrace.h (backtrace_create_state): Correct comment about
1498         threading.
1500 2013-11-15  Ian Lance Taylor  <iant@google.com>
1502         * backtrace.h (backtrace_syminfo): Update comment and parameter
1503         name to take any address, not just a PC value.
1504         * elf.c (STT_OBJECT): Define.
1505         (elf_nosyms): Rename parameter pc to addr.
1506         (elf_symbol_search): Rename local variable pc to addr.
1507         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1508         (elf_syminfo): Rename parameter pc to addr.
1509         * btest.c (global): New global variable.
1510         (test5): New test.
1511         (main): Call test5.
1513 2013-10-17  Ian Lance Taylor  <iant@google.com>
1515         * elf.c (elf_add): Don't get the wrong offsets if a debug section
1516         is missing.
1518 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
1520         * configure.ac: Add --enable-host-shared, setting up
1521         pre-existing PIC_FLAG variable within Makefile.am et al.
1522         * configure: Regenerate.
1524 2013-09-20  Alan Modra  <amodra@gmail.com>
1526         * configure: Regenerate.
1528 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1530         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1532 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1534         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1535         dl_iterate_phdr callbacks.
1537 2013-03-25  Ian Lance Taylor  <iant@google.com>
1539         * alloc.c: #include <sys/types.h>.
1540         * mmap.c: Likewise.
1542 2013-01-31  Ian Lance Taylor  <iant@google.com>
1544         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1545         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1547 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
1549         PR other/56076
1550         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1551         attribute was not seen.
1553 2013-01-16  Ian Lance Taylor  <iant@google.com>
1555         * dwarf.c (struct unit): Add filename and abs_filename fields.
1556         (build_address_map): Set new fields when reading unit.
1557         (dwarf_lookup_pc): If we don't find an entry in the line table,
1558         just return the main file name.
1560 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
1562         Update copyright years.
1564 2013-01-01  Ian Lance Taylor  <iant@google.com>
1566         PR bootstrap/54834
1567         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1568         $(MULTIBUILDTOP)/../../gcc/include.
1569         * Makefile.in: Rebuild.
1571 2013-01-01  Ian Lance Taylor  <iant@google.com>
1573         PR other/55536
1574         * mmap.c (backtrace_alloc): Don't call sync functions if not
1575         threaded.
1576         (backtrace_free): Likewise.
1578 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1580         * mmapio.c: Define MAP_FAILED if not defined.
1582 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
1584         PR bootstrap/54926
1585         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1586         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1587         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1588         accepts it.
1589         * Makefile.in: Regenerated.
1590         * configure: Regenerated.
1592 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
1594         PR bootstrap/54926
1595         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1596         * Makefile.in: Regenerated.
1598 2012-11-20  Ian Lance Taylor  <iant@google.com>
1600         * dwarf.c (read_attribute): Always clear val.
1602 2012-11-13  Ian Lance Taylor  <iant@google.com>
1604         PR other/55312
1605         * configure.ac: Only add -Werror if building a target library.
1606         * configure: Rebuild.
1608 2012-11-12  Ian Lance Taylor  <iant@google.com>
1609             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1610             Gerald Pfeifer  <gerald@pfeifer.com>
1612         * configure.ac: Check for getexecname.
1613         * fileline.c: #include <errno.h>.  Define getexecname if not
1614         available.
1615         (fileline_initialize): Try to find the executable in a few
1616         different ways.
1617         * print.c (error_callback): Only print the filename if it came
1618         from the backtrace state.
1619         * configure, config.h.in: Rebuild.
1621 2012-10-29  Ian Lance Taylor  <iant@google.com>
1623         * mmap.c (backtrace_vector_release): Correct last patch: add
1624         aligned, not size.
1626 2012-10-29  Ian Lance Taylor  <iant@google.com>
1628         * mmap.c (backtrace_vector_release): Make sure freed block is
1629         aligned on 8-byte boundary.
1631 2012-10-26  Ian Lance Taylor  <iant@google.com>
1633         PR other/55087
1634         * posix.c (backtrace_open): Add does_not_exist parameter.
1635         * elf.c (phdr_callback): Do not warn if shared library could not
1636         be opened.
1637         * fileline.c (fileline_initialize): Update calls to
1638         backtrace_open.
1639         * internal.h (backtrace_open): Update declaration.
1641 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
1643         PR target/55061
1644         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1645         * configure: Regenerate.
1647 2012-10-24  Ian Lance Taylor  <iant@google.com>
1649         PR target/55061
1650         * configure.ac: Check whether -funwind-tables option works.
1651         * configure: Rebuild.
1653 2012-10-11  Ian Lance Taylor  <iant@google.com>
1655         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1656         * configure: Rebuild.
1658 2012-10-10  Ian Lance Taylor  <iant@google.com>
1660         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1661         lower case.
1663 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
1665         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1667 2012-10-09  Ian Lance Taylor  <iant@google.com>
1669         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1670         (backtrace_dwarf_add): Likewise.
1672 2012-10-09  Ian Lance Taylor  <iant@google.com>
1674         Add support for tracing through shared libraries.
1675         * configure.ac: Check for link.h and dl_iterate_phdr.
1676         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
1677         ELF macros before #defining them.
1678         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1679         dl_iterate_phdr.
1680         (struct elf_syminfo_data): Add next field.
1681         (elf_initialize_syminfo): Initialize next field.
1682         (elf_add_syminfo_data): New static function.
1683         (elf_add): New static function, broken out of
1684         backtrace_initialize.  Call backtrace_dwarf_add instead of
1685         backtrace_dwarf_initialize.
1686         (struct phdr_data): Define.
1687         (phdr_callback): New static function.
1688         (backtrace_initialize): Call elf_add.
1689         * dwarf.c (struct dwarf_data): Add next and base_address fields.
1690         (add_unit_addr): Add base_address parameter.  Change all callers.
1691         (add_unit_ranges, build_address_map): Likewise.
1692         (add_line): Add ddata parameter.  Change all callers.
1693         (read_line_program, add_function_range): Likewise.
1694         (dwarf_lookup_pc): New static function, broken out of
1695         dwarf_fileline.
1696         (dwarf_fileline): Call dwarf_lookup_pc.
1697         (build_dwarf_data): New static function.
1698         (backtrace_dwarf_add): New function.
1699         (backtrace_dwarf_initialize): Remove.
1700         * internal.h (backtrace_dwarf_initialize): Don't declare.
1701         (backtrace_dwarf_add): Declare.
1702         * configure, config.h.in: Rebuild.
1704 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
1706         * btest.c (f23): Avoid uninitialized variable warning.
1708 2012-10-04  Ian Lance Taylor  <iant@google.com>
1710         * dwarf.c: If the system header files do not declare strnlen,
1711         provide our own version.
1713 2012-10-03  Ian Lance Taylor  <iant@google.com>
1715         * dwarf.c (read_uleb128): Fix overflow test.
1716         (read_sleb128): Likewise.
1717         (build_address_map): Don't change unit_buf.start.
1719 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
1721         PR other/54761
1722         * configure.ac (EXTRA_FLAGS): New.
1723         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1724         * configure, Makefile.in: Regenerate.
1726 2012-09-29  Ian Lance Taylor  <iant@google.com>
1728         PR other/54749
1729         * fileline.c (fileline_initialize): Pass errnum as -1 when
1730         reporting that we could not read executable information after a
1731         previous failure.
1733 2012-09-27  Ian Lance Taylor  <iant@google.com>
1735         PR bootstrap/54732
1736         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1737         * Makefile.am: Add dependencies for all objects.
1738         * configure, aclocal.m4, Makefile.in: Rebuild.
1740 2012-09-27  Ian Lance Taylor  <iant@google.com>
1742         PR other/54726
1743         * elf.c (backtrace_initialize): Set *fileln_fn, not
1744         state->fileln_fn.
1746 2012-09-19  Ian Lance Taylor  <iant@google.com>
1748         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1749         as a target library.
1750         * configure: Rebuild.
1752 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1753             Ian Lance Taylor  <iant@google.com>
1755         * configure.ac (GCC_HEADER_STDINT): Invoke.
1756         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1757         * btest.c: Don't include <stdint.h>.
1758         * dwarf.c: Likewise.
1759         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1761 2012-09-18  Ian Lance Taylor  <iant@google.com>
1763         PR bootstrap/54623
1764         * Makefile.am (AM_CPPFLAGS): Define.
1765         (AM_CFLAGS): Remove -I options.
1766         * Makefile.in: Rebuild.
1768 2012-09-18  Ian Lance Taylor  <iant@google.com>
1770         * posix.c (O_BINARY): Define if not defined.
1771         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
1772         HAVE_FCNTL is defined.
1773         * configure.ac: Test for the fcntl function.
1774         * configure, config.h.in: Rebuild.
1776 2012-09-18  Ian Lance Taylor  <iant@google.com>
1778         * btest.c (test1, test2, test3, test4): Add the unused attribute.
1780 2012-09-18  Ian Lance Taylor  <iant@google.com>
1782         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1784 2012-09-18  Ian Lance Taylor  <iant@google.com>
1786         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1787         * mmapio.c: Don't define _GNU_SOURCE.
1788         * configure, config.h.in: Rebuild.
1790 2012-09-18  Ian Lance Taylor  <iant@google.com>
1792         * configure.ac: Check whether strnlen is declared.
1793         * dwarf.c: Declare strnlen if not declared.
1794         * configure, config.h.in: Rebuild.
1796 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1798         * fileline.c: Include <stdlib.h>.
1799         * mmap.c: Likewise.
1801 2012-09-17  Ian Lance Taylor  <iant@google.com>
1803         PR bootstrap/54611
1804         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
1805         parameter.
1807 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
1809         PR bootstrap/54611
1810         * nounwind.c (backtrace_simple): Add state parameter.
1812 2012-09-17  Ian Lance Taylor  <iant@google.com>
1814         PR bootstrap/54609
1815         * unknown.c (unknown_fileline): Add state parameter, remove
1816         fileline_data parameter, name error_callback parameter.
1817         (backtrace_initialize): Add state parameter.
1819 2012-09-17  Ian Lance Taylor  <iant@google.com>
1821         * Initial implementation.
1823 Copyright (C) 2012-2022 Free Software Foundation, Inc.
1825 Copying and distribution of this file, with or without modification,
1826 are permitted in any medium without royalty provided the copyright
1827 notice and this notice are preserved.