Skip gcc.dg/guality/example.c on hppa-linux.
[official-gcc.git] / libbacktrace / ChangeLog
blob072b2fe3f924c61d118c5d3d0a981ce9f14b15bf
1 2021-12-28  Francois-Xavier Coudert  <fxcoudert@gmail.com>
3         PR libbacktrace/103822
4         * Makefile.am: Fix newline.
5         * Makefile.in: Regenerate.
7 2021-11-12  Martin Liska  <mliska@suse.cz>
9         PR libbacktrace/103167
10         * elf.c (elf_uncompress_lzma_block): Cast to unsigned int.
11         (elf_uncompress_lzma): Likewise.
12         * xztest.c (test_samples): memcpy only if v > 0.
14 2021-10-22  Martin Liska  <mliska@suse.cz>
16         PR testsuite/102742
17         * btest.c (MIN_DESCRIPTOR): New.
18         (MAX_DESCRIPTOR): Likewise.
19         (check_available_files): Likewise.
20         (check_open_files): Check only file descriptors that
21         were not available at the entry.
22         (main): Call check_available_files.
24 2021-08-13  Sergei Trofimovich  <siarheit@google.com>
26         * install-debuginfo-for-buildid.sh.in: Force non-localized readelf
27         output with LANG=C.
29 2021-06-28  ClĂ©ment Chigot  <clement.chigot@atos.net>
31         * xcoff.c (SSUBTYP_DWRNGES): New define.
32         (xcoff_add): Use correct XCOFF DWARF section subtype
33         for DEBUG_RANGES. Remove lineoff workaround.
34         Adjust base_address.
35         (xcoff_initialize_syminfo): Adapt to new base_address.
36         (xcoff_lookup_pc): Likewise.
37         (xcoff_initialize_fileline): Likewise.
39 2021-05-03  H.J. Lu  <hjl.tools@gmail.com>
41         PR bootstrap/99703
42         * configure: Regenerated.
44 2021-03-03  Ian Lance Taylor  <iant@golang.org>
46         * dwarf.c (read_line_program): Don't special case file 0.
47         (read_function_entry): Likewise.
49 2021-03-02  Ian Lance Taylor  <iant@golang.org>
51         PR libbacktrace/98818
52         * dwarf.c (dwarf_buf_error): Add errnum parameter.  Change all
53         callers.
54         * backtrace.h: Update backtrace_error_callback comment.
56 2021-02-12  Ian Lance Taylor  <iant@golang.org>
58         * configure.ac: Check for objcopy --add-gnu-debuglink by using
59         objcopy --help.
60         * configure: Regenerate
62 2021-01-18  Ian Lance Taylor  <iant@golang.org>
64         * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info.
65         * Makefile.in: Regenerate.
66         * configure: Regenerate.
68 2021-01-18  Ian Lance Taylor  <iant@golang.org>
70         PR debug/98716
71         * dwarf.c (read_v2_paths): Allocate zero entry for dirs and
72         filenames.
73         (read_line_program): Remove parameter u, change caller.  Don't
74         subtract one from dirs and filenames index.
75         (read_function_entry): Don't subtract one from filenames index.
77 2021-01-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>
79         * configure: Re-generate.
81 2020-12-05  Iain Sandoe  <iain@sandoe.co.uk>
83         PR target/97865
84         * configure: Regenerate.
86 2020-12-02  Ian Lance Taylor  <iant@golang.org>
88         * dwarf.c (resolve_string): Use > rather than >= to check whether
89         string index extends past buffer.
90         (resolve_addr_index): Similarly for address index.
92 2020-11-29  John David Anglin  <danglin@gcc.gnu.org>
94         * configure: Regenerate.
96 2020-10-20  Ian Lance Taylor  <iant@golang.org>
98         * internal.h (ATTRIBUTE_FALLTHROUGH): Define.
99         * elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH.
101 2020-09-28  Ian Lance Taylor  <iant@golang.org>
103         PR libbacktrace/97082
104         * Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL.
105         * Makefile.in: Regenerate.
107 2020-09-28  Ian Lance Taylor  <iant@golang.org>
109         PR libbacktrace/97227
110         * configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL.
111         * Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL.
112         * configure: Regenerate.
113         * Makefile.in: Regenerate.
115 2020-09-23  Ian Lance Taylor  <iant@golang.org>
117         * dwarf.c (report_inlined_functions): Handle PC == -1 and PC ==
118         p->low.
119         (dwarf_lookup_pc): Likewise.
121 2020-09-17  Ian Lance Taylor  <iant@golang.org>
123         PR libbacktrace/97080
124         * fileline.c (backtrace_syminfo_to_full_callback): New function.
125         (backtrace_syminfo_to_full_error_callback): New function.
126         * elf.c (elf_nodebug): Call syminfo_fn if possible.
127         * internal.h (struct backtrace_call_full): Define.
128         (backtrace_syminfo_to_full_callback): Declare.
129         (backtrace_syminfo_to_full_error_callback): Declare.
130         * mtest.c (f3): Only check all[i] if data.index permits.
132 2020-09-16  Iain Sandoe  <iain@sandoe.co.uk>
134         * macho.c (MACH_O_CPU_TYPE_PPC): New.
135         (MACH_O_CPU_TYPE_PPC64): New.
136         Add compile-tests for powerpc to the Mach-O variants.
138 2020-09-14  Ian Lance Taylor  <iant@golang.org>
140         PR libbacktrace/93608
141         Add support for MiniDebugInfo.
142         * elf.c (struct elf_view): Define.  Replace most uses of
143         backtrace_view with elf_view.
144         (elf_get_view): New static functions.  Replace most calls of
145         backtrace_get_view with elf_get_view.
146         (elf_release_view): New static functions.  Replace most calls of
147         backtrace_release_view with elf_release_view.
148         (elf_uncompress_failed): Rename from elf_zlib_failed.  Change all
149         callers.
150         (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define.
151         (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define.
152         (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define.
153         (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define.
154         (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define.
155         (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define.
156         (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define.
157         (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define.
158         (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define.
159         (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define.
160         (LZMA_PROB_DIST_ALIGN_LEN): Define.
161         (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define.
162         (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define.
163         (LZMA_PROB_MATCH_LEN_LOW_LEN): Define.
164         (LZMA_PROB_MATCH_LEN_MID_LEN): Define.
165         (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define.
166         (LZMA_PROB_REP_LEN_CHOICE_LEN): Define.
167         (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define.
168         (LZMA_PROB_REP_LEN_LOW_LEN): Define.
169         (LZMA_PROB_REP_LEN_MID_LEN): Define.
170         (LZMA_PROB_REP_LEN_HIGH_LEN): Define.
171         (LZMA_PROB_LITERAL_LEN): Define.
172         (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define.
173         (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define.
174         (LZMA_PROB_IS_REP2_OFFSET): Define.
175         (LZMA_PROB_IS_REP0_LONG_OFFSET): Define.
176         (LZMA_PROB_DIST_SLOT_OFFSET): Define.
177         (LZMA_PROB_DIST_SPECIAL_OFFSET): Define.
178         (LZMA_PROB_DIST_ALIGN_OFFSET): Define.
179         (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define.
180         (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define.
181         (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define.
182         (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define.
183         (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define.
184         (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define.
185         (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define.
186         (LZMA_PROB_REP_LEN_LOW_OFFSET): Define.
187         (LZMA_PROB_REP_LEN_MID_OFFSET): Define.
188         (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define.
189         (LZMA_PROB_LITERAL_OFFSET): Define.
190         (LZMA_PROB_TOTAL_COUNT): Define.
191         (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define.
192         (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define.
193         (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define.
194         (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define.
195         (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define.
196         (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define.
197         (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define.
198         (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define.
199         (elf_lzma_varint): New static function.
200         (elf_lzma_range_normalize): New static function.
201         (elf_lzma_bit, elf_lzma_integer): New static functions.
202         (elf_lzma_reverse_integer): New static function.
203         (elf_lzma_len, elf_uncompress_lzma_block): New static functions.
204         (elf_uncompress_lzma): New static function.
205         (backtrace_uncompress_lzma): New function.
206         (elf_add): Add memory and memory_size parameters.  Change all
207         callers.  Look for .gnu_debugdata section, and, if found,
208         decompress it and use it for symbols and debug info.  Permit the
209         descriptor parameter to be -1.
210         * internal.h (backtrace_uncompress_lzma): Declare.
211         * mtest.c: New file.
212         * xztest.c: New file.
213         * configure.ac: Check for nm, xz, and comm programs.  Check for
214         liblzma library.
215         (HAVE_MINIDEBUG): Define.
216         * Makefile.am (mtest_SOURCES): Define.
217         (mtest_CFLAGS, mtest_LDADD): Define.
218         (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG.
219         (%_minidebug): New pattern rule, if HAVE_MINIDEBUG.
220         (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define.
221         (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define
222         (xztest_alloc_LDADD): Define.
223         (BUILDTESTS): Add mtest, xztest, xztest_alloc.
224         (CLEANFILES): Add files created by minidebug pattern.
225         (btest.lo): Correct INCDIR reference.
226         (mtest.lo, xztest.lo, ztest.lo): New targets.
227         * configure: Regenerate.
228         * config.h.in: Regenerate.
229         * Makefile.in: Regenerate.
231 2020-09-09  Ian Lance Taylor  <iant@golang.org>
233         * pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
234         (coff_add): Determine and pass is_64.
236 2020-09-09  Ian Lance Taylor  <iant@golang.org>
238         PR libbacktrace/96973
239         * fileline.c (macho_get_executable_path): New static function.
240         (fileline_initialize): Call macho_get_executable_path.
242 2020-09-09  Ian Lance Taylor  <iant@golang.org>
244         * dwarf.c (function_addrs_search): Compare against the next entry
245         low address, not the high address.
246         (unit_addrs_search): Likewise.
247         (build_address_map): Add a trailing unit_addrs.
248         (read_function_entry): Add a trailing function_addrs.
249         (read_function_info): Likewise.
250         (report_inlined_functions): Search backward for function_addrs
251         match.
252         (dwarf_lookup_pc): Search backward for unit_addrs and
253         function_addrs matches.
255 2020-09-08  Ian Lance Taylor  <iant@golang.org>
257         * simple.c (simple_unwind): Correct comment spelling.
259 2020-09-08  Ian Lance Taylor  <iant@golang.org>
261         * macho.c (macho_add_dsym): Make space for '/' in dsym.  Use
262         correct length when freeing diralc.
264 2020-09-08  Ian Lance Taylor  <iant@golang.org>
266         PR libbacktrace/96973
267         * macho.c (macho_add_fat): Correctly swap 32-bit file offset.
269 2020-09-08  Ian Lance Taylor  <iant@golang.org>
271         PR libbacktrace/96971
272         * filetype.awk: Only match magic number at start of line.
274 2020-08-24  Ian Lance Taylor  <iant@golang.org>
276         * macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
277         (MACH_O_MH_CIGAM_FAT_64): Define.
278         (struct macho_fat_arch_64): Define.
279         (macho_add_fat): Add and use is_64 parameter.
280         (macho_add): Recognize 64-bit fat files.
282 2020-07-30  H.J. Lu  <hjl.tools@gmail.com>
284         PR bootstrap/96202
285         * configure: Regenerated.
287 2020-07-08  Ian Lance Taylor  <iant@golang.org>
289         * configure.ac: Test linker support for DWARF5
290         * configure: Regenerate
292 2020-05-29  H.J. Lu  <hjl.tools@gmail.com>
294         PR bootstrap/95413
295         * configure: Regenerated.
297 2020-05-15  H.J. Lu  <hongjiu.lu@intel.com>
299         PR bootstrap/95147
300         * configure: Regenerated.
302 2020-05-14  H.J. Lu  <hongjiu.lu@intel.com>
304         * configure: Regenerated.
306 2020-05-13  Ian Lance Taylor  <iant@golang.org>
308         * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
310 2020-05-13  Ian Lance Taylor  <iant@golang.org>
312         PR go/95061
313         * posix.c (backtrace_open): Treat EACCESS like ENOENT.
315 2020-05-12  H.J. Lu  <hongjiu.lu@intel.com>
317         * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
318         * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
319         AC_SUBST(CET_HOST_FLAGS).  Clear CET_HOST_FLAGS if jit isn't
320         enabled.
321         * Makefile.in: Regenerated.
322         * configure: Likewise.
324 2020-05-11  Ian Lance Taylor  <iant@golang.org>
326         PR libbacktrace/95012
327         * configure.ac: Check for getpagesize declaration.
328         * mmap.c: Declare getpagesize if necessary.
329         * mmapio.c: Likewise.
330         * configure: Regenerate.
331         * config.h.in: Regenerate.
332         * Makefile.in: Regenerate.
334 2020-05-09  Roland McGrath  <mcgrathr@google.com>
336         * elf.c (elf_add): Bail early if there are no section headers at all.
338 2020-05-09  Ian Lance Taylor  <iant@golang.org>
340         * elf.c (elf_add): Don't free strtab if an error occurs after
341         recording symbol information.
343 2020-05-09  Ian Lance Taylor  <iant@golang.org>
345         PR libbacktrace/88745
346         * macho.c: New file.
347         * filetype.awk: Recognize Mach-O files.
348         * Makefile.am (FORMAT_FILES): Add macho.c.
349         (check_DATA): New variable.  Set to .dSYM if HAVE_DSYMUTIL.
350         (%.dSYM): New pattern target.
351         (test_macho_SOURCES, test_macho_CFLAGS): New targets.
352         (test_macho_LDADD): New target.
353         (BUILDTESTS): Add test_macho.
354         (macho.lo): Add dependencies.
355         * configure.ac: Recognize macho file type.  Check for
356         mach-o/dyld.h.  Don't try to run objcopy if we don't find it.
357         Look for dsymutil and define a HAVE_DSYMUTIL conditional.
358         * Makefile.in: Regenerate.
359         * configure: Regenerate.
360         * config.h.in: Regenerate.
362 2020-05-09  Ian Lance Taylor  <iant@golang.org>
364         * read.c (backtrace_get_view): Support short read.
366 2020-05-09  Ian Lance Taylor  <iant@golang.org>
368         * elf.c (elf_add): If debug sections are very large or far apart,
369         read them individually rather than as a single view.
371 2020-05-08  Ian Lance Taylor  <iant@golang.org>
373         * fileline.c (sysctl_exec_name): New static function.
374         (sysctl_exec_name1): New macro or static function.
375         (sysctl_exec_name2): Likewise.
376         (fileline_initialize): Try sysctl_exec_name[12].
377         * configure.ac: Check for sysctl args to fetch executable name.
378         * configure: Regenerate.
379         * config.h.in: Regenerate.
381 2020-02-15  Ian Lance Taylor  <iant@golang.org>
383         * ztest.c (test_large): Update file to current libgo test file.
385 2020-02-03  Ian Lance Taylor  <iant@golang.org>
387         * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
388         (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
389         (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
390         (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
391         (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
392         (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
393         (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
394         (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
395         (stest_alloc_CFLAGS): Likewise.
396         * Makefile.in: Regenerate.
397         * ztest.c (error_callback_compress): Mark vdata unused.
398         (test_large): Add casts to avoid warnings.
400 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
402         Update copyright years.
404 2019-12-13  Ian Lance Taylor  <iant@golang.org>
406         Add DWARF 5 support.
407         * dwarf.c (struct attr): Add val field.
408         (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
409         ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
410         (struct line_header): Add addrsize field.
411         (struct line_header_format): Define.
412         (struct unit): Add str_offsets_base, addr_base, and rnglists_base
413         fields.
414         (read_uint24): New static function.
415         (read_attribute): Add implicit_val parameter.  Replace dwarf_str
416         and dwarf_str_size parameters with dwarf_sections parameter.  Add
417         support for new DWARF 5 forms.  Change all callers.
418         (resolve_string): New static function.
419         (resolve_addr_index): Likewise.
420         (read_abbrevs): Support DW_FORM_implicit_const.
421         (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
422         and ranges_is_index fields.
423         (update_pcrange): Support DWARF 5 encodings.
424         (add_high_low_range): New static function, split out of
425         add_ranges.
426         (add_ranges_from_ranges): Likewise.
427         (add_ranges_from_rnglists): New static function.
428         (add_ranges): Just call new helper functions.
429         (find_address_ranges): Use resolve_string for strings, after
430         reading all attributes.  Handle new DWARF 5 attributes.
431         (build_address_map): Support DWARF 5 compilation units.
432         (read_v2_paths): New static function, split out of
433         read_line_header.
434         (read_lnct): New static function.
435         (read_line_header_format_entries): Likewise.
436         (read_line_header): Add ddata parameter.  Support DWARF 5 line
437         headers.  Call new helper functions.  Change all callers.
438         (read_line_program): Use addrsize from line program header.  Don't
439         special case directory index 0 for DWARF 5.
440         (read_referenced_name): Use resolve_string.
441         (read_function_entry): Handle DWARF 5 encodings.  Use
442         resolve_string.
443         * internal.h (enum dwarf_section): Add DEBUG_ADDR,
444         DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
445         * elf.c (dwarf_section_names): Add new section names.
446         * pecoff.c (dwarf_section_names): Likewise.
447         * xcoff.c (xcoff_add): Clear dwarf_sections before setting
448         fields.
449         * configure.ac: Define HAVE_DWARF5 automake conditional.
450         * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
451         (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
452         (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
453         (dwarf5_alloc_LDADD): Likewise.
454         (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
455         (CLEANFILES, clean-local): Define.
457 2019-12-08  Ian Lance Taylor  <iant@golang.org>
459         * dwarf.c (struct pcrange): Define.
460         (update_pcrange, add_ranges): New static functions.
461         (add_unit_addr): Change signature to work with add_ranges.  Don't
462         add base_address here.
463         (add_unit_ranges): Remove.
464         (find_address_ranges): Replace str/ranges parameters with
465         dwarf_sections.  Use update_pcrange and add_ranges.  Change all
466         callers.
467         (add_function_range): Change signature to work with add_ranges.
468         Don't add base_address here.
469         (add_function_ranges): Remove.
470         (read_function_entry): Use update_pcrange and add_ranges.
472 2019-12-04  Ian Lance Taylor  <iant@golang.org>
474         * edtest.c (test1): Add noclone attribute.
476 2019-12-04  Ian Lance Taylor  <iant@golang.org>
478         * internal.h (enum dwarf_section): Define.
479         (struct dwarf_sections): Define.
480         (backtrace_dwarf_add): Update declaration to replace specific
481         section parameters with dwarf_sections parameter.
482         * dwarf.c (struct dwarf_data): Replace specific section fields
483         with dwarf_sections field.
484         (read_attribute): Use dwarf_sections with altlink.
485         (build_address_map): Replace specific section parameters with
486         dwarf_sections parameter.  Change all callers.
487         (read_line_info): Use dwarf_sections with ddata.
488         (read_referenced_name): Likewise.
489         (add_function_ranges): Likewise.
490         (read_function_entry): Likewise.
491         (read_function_info): Likewise.
492         (build_dwarf_data): Replace specific section parameters with
493         dwarf_sections parameter.  Change all callers.
494         (backtrace_dwarf_add): Likewise.
495         * elf.c (enum debug_section): Remove.
496         (dwarf_section_names): Remove .zdebug names.
497         (elf_add): Track zsections separately.  Build dwarf_sections.
498         * pecoff.c (enum debug_section): Remove.
499         (struct debug_section_info): Remove data field.
500         (coff_add): Build dwarf_sections.
501         * xcoff.c (enum dwarf_section): Remove.  Replace DWSECT_xxx
502         references with DEBUG_xxx references.
503         (xcoff_add): Build dwarf_sections.
505 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
507         * configure: Regenerate.
509 2019-09-26  Ian Lance Taylor  <iant@golang.org>
511         PR libbacktrace/91908
512         * pecoff.c (backtrace_initialize): Explicitly cast unchecked
513         __sync_bool_compare_and_swap to void.
514         * xcoff.c (backtrace_initialize): Likewise.
516 2019-09-03  Ulrich Weigand  <uweigand@de.ibm.com>
518         * configure.ac: Remove references to spu.
519         * configure: Regenerate.
521 2019-05-24  Clement Chigot  <clement.chigot@atos.net>
523         * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
524         test_elf_64.
525         * Makefile.in: Regenerate.
527 2019-05-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
529         * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
530         handling.
531         * configure: Regenerate.
533 2019-03-11  Ian Lance Taylor  <iant@golang.org>
535         PR libbacktrace/89669
536         * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
537         HAVE_ELF.
538         * Makefile.in: Regenerate.
540 2019-02-26  Tom de Vries  <tdevries@suse.de>
542         * btest.c (test5): Allow global.* as minimal symbol name for global.
544 2019-02-26  Tom de Vries  <tdevries@suse.de>
546         * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
547         * Makefile.in: Regenerate.
549 2019-02-12  Tom de Vries  <tdevries@suse.de>
551         PR libbacktrace/81983
552         * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
554 2019-02-10  Tom de Vries  <tdevries@suse.de>
556         * Makefile.am (BUILDTESTS): Add btest_lto.
557         * Makefile.in: Regenerate.
558         * btest.c (test1, f2, f3, test3, f22, f23): Declare with
559         __attribute__((noclone)).
561 2019-02-08  Tom de Vries  <tdevries@suse.de>
563         * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
564         * print.c (backtrace_print): Same.
565         * simple.c (backtrace_simple): Same.
567 2019-02-08  Tom de Vries  <tdevries@suse.de>
569         PR libbacktrace/78063
570         * dwarf.c (build_address_map): Keep all parsed units.
571         (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
573 2019-01-31  Tom de Vries  <tdevries@suse.de>
575         PR libbacktrace/89136
576         * elf.c (elf_add): Read build-id if with_buildid_data.  Fix
577         'debugaltlink_name_len =+ 1'.
579 2019-01-29  Tom de Vries  <tdevries@suse.de>
581         * install-debuginfo-for-buildid.sh.in: New script.
582         * Makefile.am (check_PROGRAMS): Add b2test and b3test.
583         (TESTS): Add b2test_buildid and b3test_dwz_buildid.
584         * Makefile.in: Regenerate.
585         * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
586         (READELF): Set with AC_CHECK_PROG.
587         (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
588         * configure: Regenerate.
589         * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
590         (elf_open_debugfile_by_buildid): ... here.
592 2019-01-29  Tom de Vries  <tdevries@suse.de>
594         * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
595         allocfail.
596         (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
597         (check_PROGRAMS): Add BUILDTESTS.
598         * Makefile.in: Regenerate.
600 2019-01-28  Tom de Vries  <tdevries@suse.de>
602         * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
603         Use $< to access prerequisite.
604         * Makefile.in: Regenerate.
606 2019-01-25  Nathan Sidwell  <nathan@acm.org>
608         * elf.c (elf_add): Pass "" filename to recursive call with
609         separated debug.
611 2019-01-25  Tom de Vries  <tdevries@suse.de>
613         * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
614         filename == "".
615         * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
616         * Makefile.in: Regenerate.
618 2019-01-25  Tom de Vries  <tdevries@suse.de>
620         * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
621         (TESTS): Rename dtest to btest_gnudebuglink.
622         * Makefile.in: Regenerate.
624 2019-01-23  Tom de Vries  <tdevries@suse.de>
626         * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
627         (units_search, find_unit): Use size_t for offset.
628         (build_address_map): Use size_t for unit_offset.
630 2019-01-20  Gerald Pfeifer  <gerald@pfeifer.com>
632         * allocfail.c (main): Increase portability of printf statement.
634 2019-01-18  Ian Lance Taylor  <iant@golang.org>
636         PR libbacktrace/88890
637         * mmapio.c (backtrace_get_view): Change size parameter to
638         uint64_t.  Check that value fits in size_t.
639         * read.c (backtrace_get_view): Likewise.
640         * internal.h (backtrace_get_view): Update declaration.
641         * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
643 2019-01-17  Tom de Vries  <tdevries@suse.de>
645         PR libbacktrace/82857
646         * configure.ac (DWZ): Set with AC_CHECK_PROG.
647         (HAVE_DWZ): Set with AM_CONDITIONAL.
648         * configure: Regenerate.
649         * Makefile.am (TESTS): Add btest_dwz.
650         * Makefile.in: Regenerate.
652 2019-01-17  Tom de Vries  <tdevries@suse.de>
654         PR libbacktrace/82857
655         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
656         (read_attribute): Handle DW_FORM_GNU_ref_alt using
657         ATTR_VAL_REF_ALT_INFO.
658         (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
660 2019-01-17  Tom de Vries  <tdevries@suse.de>
662         * dwarf.c (struct unit): Add low_offset and high_offset fields.
663         (struct unit_vector): New type.
664         (struct dwarf_data): Add units and units_counts fields.
665         (find_unit): New function.
666         (find_address_ranges): Add and handle unit_tag parameter.
667         (build_address_map): Add and handle units_vec parameter.
668         (build_dwarf_data): Pass units_vec to build_address_map.  Store resulting
669         units vector.
671 2019-01-17  Tom de Vries  <tdevries@suse.de>
673         PR libbacktrace/82857
674         * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
675         using altlink.
677 2019-01-17  Tom de Vries  <tdevries@suse.de>
679         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
680         (read_attribute): Add altlink parameter.  Handle missing altlink for
681         DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
682         (find_address_ranges, build_address_map, build_dwarf_data): Add and
683         handle altlink parameter.
684         (read_referenced_name, read_function_entry): Add argument to
685         read_attribute call.
687 2019-01-17  Tom de Vries  <tdevries@suse.de>
689         * dwarf.c (struct dwarf_data): Add altlink field.
690         (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
691         * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
692         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
693         * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
694         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
695         * xcoff.c (xcoff_add): Same.
697 2019-01-17  Tom de Vries  <tdevries@suse.de>
699         * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
700         * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
701         * elf.c (elf_add): Add and handle fileline_entry parameter.  Add
702         argument to backtrace_dwarf_add call.
703         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
704         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
705         * xcoff.c (xcoff_add): Same.
707 2019-01-17  Tom de Vries  <tdevries@suse.de>
709         * elf.c (elf_add): Add and handle with_buildid_data and
710         with_buildid_size parameters.  Handle .gnu_debugaltlink section.
711         (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
713 2019-01-16  Tom de Vries  <tdevries@suse.de>
715         * dwarf.c (read_referenced_name_from_attr): New function.  Factor out
716         of ...
717         (read_referenced_name): ... here, and ...
718         (read_function_entry): ... here.
720 2019-01-16  Tom de Vries  <tdevries@suse.de>
722         * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
723         name.
724         (read_function_entry): Same.  Don't allow name found via
725         DW_AT_abstract_origin or case DW_AT_specification to override linkage
726         name.
728 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
730         PR other/16615
732         * backtrace.h: Mechanically replace "can not" with "cannot".
734 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
736         Update copyright years.
738 2018-12-29  Gerald Pfeifer  <gerald@pfeifer.com>
740         * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
741         in sed pattern.
742         * Makefile.in: Regenerate.
744 2018-12-28  Tom de Vries  <tdevries@suse.de>
746         * dwarf.c (build_address_map): Reuse unused units.
748 2018-12-28  Tom de Vries  <tdevries@suse.de>
750         * dwarf.c (build_address_map): Simplify by removing local variable
751         abbrevs.
753 2018-12-28  Ian Lance Taylor  <iant@golang.org>
754             Tom de Vries  <tdevries@suse.de>
756         PR libbacktrace/88063
757         * dwarf.c (free_unit_addrs_vector): Remove.
758         (build_address_map): Keep track of allocated units in vector.  Free
759         allocated units and corresponding abbrevs upon failure.  Remove now
760         redundant call to free_unit_addrs_vector.  Free addrs vector upon
761         failure.  Free allocated unit vector.
763 2018-12-28  Tom de Vries  <tdevries@suse.de>
765         * dwarf.c (build_address_map): Free addrs vector upon failure.
767 2018-12-14  Tom de Vries  <tdevries@suse.de>
769         PR testsuite/88491
770         * allocfail.sh: Remove "set -o pipefail".
772 2018-12-12  Tom de Vries  <tdevries@suse.de>
774         * Makefile.am (TESTS): Add allocfail.sh.
775         (check_PROGRAMS): Add allocfail.
776         * Makefile.in: Regenerate.
777         * instrumented_alloc.c: New file.  Redefine malloc and realloc.
778         Include alloc.c.
779         * allocfail.c: New file.
780         * allocfail.sh: New file.
782 2018-11-30  Tom de Vries  <tdevries@suse.de>
784         * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
785         test_xcoff_64, test_pecoff and test_unknown.
786         * Makefile.in: Regenerate.
787         * test_format.c: New file.
789 2018-11-30  Tom de Vries  <tdevries@suse.de>
791         * Makefile.am : Add _with_alloc version for each test in
792         check_PROGRAMS.
793         * Makefile.in: Regenerate.
795 2018-11-30  Tom de Vries  <tdevries@suse.de>
797         * internal.h (backtrace_vector_free): New static inline fuction,
798         factored out of ...
799         * dwarf.c (read_line_info): ... here.
801 2018-11-28  Tom de Vries  <tdevries@suse.de>
803         * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
804         failure.
806 2018-11-27  Tom de Vries  <tdevries@suse.de>
808         * mmap.c (backtrace_vector_release): Same.
809         * unittest.c (test1): Add check.
811 2018-11-27  Tom de Vries  <tdevries@suse.de>
813         * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
814         instead of realloc.
815         * Makefile.am (check_PROGRAMS): Add unittest.
816         * Makefile.in: Regenerate.
817         * unittest.c: New file.
819 2018-11-22  Tom de Vries  <tdevries@suse.de>
821         * dwarf.c (read_initial_length): Factor out of ...
822         (build_address_map, read_line_info): ... here.
824 2018-11-21  Tom de Vries  <tdevries@suse.de>
826         * dwarf.c (read_string): Factor out of ...
827         (read_attribute, read_line_header, read_line_program): ... here.
829 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
831         PR bootstrap/82856
832         * Makefile.am: Include multilib.am.
833         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
834         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
836 2018-10-05  Ian Lance Taylor  <iant@golang.org>
838         PR libbacktrace/87529
839         * backtrace.h: Document that backtrace_create_state should be
840         called only once.
842 2018-08-05 Iain Buclaw  <ibuclaw@gdcproject.org>
844         * configure.ac: Move define of HAVE_ZLIB into check for -lz.
845         * Makefile.in: Regenerate.
846         * config.h.in: Likewise.
847         * configure: Likewise.
849 2018-08-01  Tony Reix  <tony.reix@atos.net>
851         * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
852         (struct xcoff_func, struct xcoff_func_vector): New structs.
853         (xcoff_syminfo): Drop leading dot from symbol name.
854         (xcoff_line_compare, xcoff_line_search): Remove.
855         (xcoff_func_compare, xcoff_func_search): New static functions.
856         (xcoff_lookup_pc): Search function table.
857         (xcoff_add_line, xcoff_process_linenos): Remove.
858         (xcoff_initialize_fileline): Build function table.
860 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
862         PR other/86198
863         * elf.c (elf_add): Increase ".note.gnu.build-id" section size
864         checking up to 36 bytes.
866 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
868         * configure: Regenerated.
870 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
872         * configure: Regenerated.
874 2018-04-17  Ian Lance Taylor  <iant@golang.org>
876         * backtrace.c: Revert last two changes.  Don't call mmap
877         directly.
879 2018-04-17  Ian Lance Taylor  <iant@golang.org>
881         * backtrace.c: Include backtrace-supported.h before checking
882         BACKTRACE_USES_MALLOC.
884 2018-04-17  Ian Lance Taylor  <iant@golang.org>
886         * backtrace.c (backtrace_full): When testing whether we can
887         allocate memory, call mmap directly, and munmap the memory.
889 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
891         PR other/85161
892         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
893         big endian, only use 32-bit loads if endianity macros are predefined
894         and indicate big or little endian.
896 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
898         PR target/84148
899         * configure: Regenerate.
901 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
903         PR other/82368
904         * elf.c (SHT_PROGBITS): Undefine and define.
906 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
908         PR other/82368
909         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
910         (struct elf_ppc64_opd_data): New type.
911         (elf_initialize_syminfo): Add opd argument, handle symbols
912         pointing into the PowerPC64 ELFv1 .opd section.
913         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
914         to structure with .opd data to elf_initialize_syminfo.
916 2018-01-31  Ian Lance Taylor  <iant@golang.org>
918         * elf.c (elf_add): Close descriptor if we use a debugfile.
919         * btest.c (check_open_files): New static function.
920         (main): Call check_open_files.
922 2018-01-25  Ian Lance Taylor  <iant@golang.org>
924         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
925         desired CRC is zero.
926         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
928 2018-01-25  Ian Lance Taylor  <iant@golang.org>
930         * pecoff.c (coff_add): Only release syms_view if it is valid.
932 2018-01-25  Ian Lance Taylor  <iant@golang.org>
934         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
936 2018-01-24  Ian Lance Taylor  <iant@golang.org>
938         * pecoff.c (coff_add): Use coff_read4, not memcpy.
940 2018-01-24  Ian Lance Taylor  <iant@golang.org>
942         PR other/68239
943         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
944         on the free list.
946 2018-01-19  Tony Reix  <tony.reix@atos.net>
948         * xcoff.c (xcoff_incl_compare): New function.
949         (xcoff_incl_search): New function.
950         (xcoff_process_linenos): Use bsearch to find include file.
951         (xcoff_initialize_fileline): Sort include file information.
953 2018-01-16  Ian Lance Taylor  <iant@golang.org>
955         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
956         288.
957         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
958         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
959         (elf_zlib_default_table): Update.
960         (elf_zlib_default_dist_table): New static array.
961         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
962         for block type 1.
963         * ztest.c (struct zlib_test): Add uncompressed_len.
964         (tests): Initialize uncompressed_len field.  Add new test case.
965         (test_samples): Use uncompressed_len field.
967 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
969         Update copyright years.
971 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
973         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
974         * aclocal.m4: Regenerate.
975         * Makefile.in: Likewise.
976         * configure: Likewise.
978 2017-10-06  Ian Lance Taylor  <iant@golang.org>
980         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
981         zlib uncompress function.
983 2017-10-05  Ian Lance Taylor  <iant@golang.org>
985         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
986         Read a four byte integer.
987         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
988         boundary before ever calling elf_zlib_fetch.
989         * ztest.c (test_large): Simplify print statements a bit.
991 2017-10-02  Ian Lance Taylor  <iant@golang.org>
993         * ztest.c: #include <errno.h>.
994         (TEST_TIMING): Don't define, don't test.
995         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
996         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
997         (ZLIB_CLOCK_GETTIME_ARG): Define.
998         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
999         * Makefile.am: Likewise.
1000         * configure, Makefile.in: Rebuild.
1002 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
1004         PR other/67165
1005         * Makefile.am: Append the content of clock_gettime_link to
1006         ztest_LDADD.
1007         * configure.ac: Test for the case that clock_gettime is in librt.
1008         * Makefile.in: Regenerate.
1009         * configure: Likewise.
1011         PR other/67165
1012         * configure.ac: Check for clock_gettime.
1013         * config.h.in: Regenerate.
1014         * configure: Likewise.
1015         * ztest.c (average_time, test_large): Conditionalize test timing
1016         on clock_gettime availability.
1018 2017-09-29  Tony Reix  <tony.reix@atos.net>
1020         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
1021         (STYP_DWARF, SSUBTYP_DW*): Define.
1022         (enum dwarf_section): Define.
1023         (struct dwsect_info): Define.
1024         (xcoff_add): Look for DWARF sections, pass them to
1025         backtrace_dwarf_add.
1027 2017-09-28  Ian Lance Taylor  <iant@golang.org>
1029         PR other/67165
1030         * elf.c (__builtin_prefetch): Define if not __GNUC__.
1031         (unlikely): Define.
1032         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
1033         (b_elf_chdr): Define type.
1034         (enum debug_section): Add ZDEBUG_xxx values.
1035         (debug_section_names): Add names for new sections.
1036         (struct debug_section_info): Add compressed field.
1037         (elf_zlib_failed, elf_zlib_fetch): New static functions.
1038         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
1039         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
1040         (HUFFMAN_SECONDARY_SHIFT): Define.
1041         (ZDEBUG_TABLE_SIZE): Define.
1042         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
1043         (final_next_secondary): New static variable if
1044         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
1045         (elf_zlib_inflate_table): New static function.
1046         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
1047         function to produce fixed Huffman table.
1048         (elf_zlib_default_table): New static variable.
1049         (elf_zlib_inflate): New static function.
1050         (elf_zlib_verify_checksum): Likewise.
1051         (elf_zlib_inflate_and_verify): Likewise.
1052         (elf_uncompress_zdebug): Likewise.
1053         (elf_uncompress_chdr): Likewise.
1054         (backtrace_uncompress_zdebug): New extern function.
1055         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
1056         sections, and uncompress them.
1057         * internal.h (backtrace_compress_zdebug): Declare.
1058         * ztest.c: New file.
1059         * configure.ac: Check for -lz and check whether the linker
1060         supports --compress-debug-sections.
1061         * Makefile.am (ztest_SOURCES): New variable.
1062         (ztest_CFLAGS, ztest_LDADD): New variables.
1063         (check_PROGRAMS): Add ztest.
1064         (ctestg_SOURCES): New variable.
1065         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
1066         (ctesta_SOURCES): New variable.
1067         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
1068         (check_PROGRAMS): Add ctestg and ctesta.
1069         * configure, config.h.in, Makefile.in: Rebuild.
1071 2017-09-22  Ian Lance Taylor  <iant@golang.org>
1073         PR sanitizer/77631
1074         * configure.ac: Check for lstat and readlink.
1075         * elf.c (lstat, readlink): Provide dummy versions if real versions
1076         are not available.
1077         * configure, config.h.in: Rebuild.
1079 2017-09-21  Ian Lance Taylor  <iant@google.com>
1081         PR go/82284
1082         * elf.c (backtrace_initialize): Set pd.exe_filename.
1084 2017-09-20  Ian Lance Taylor  <iant@golang.org>
1085             Denis Khalikov  <d.khalikov@partner.samsung.com>
1087         PR sanitizer/77631
1088         Support for external debug info.
1089         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
1090         (S_ISLNK): Define if not defined.
1091         (xstrnlen): Define if strnlen is not available.
1092         (b_elf_note): Define type.
1093         (NT_GNU_BUILD_ID): Define macro.
1094         (elf_crc32, elf_crc32_file): New static functions.
1095         (elf_is_symlink, elf_readlink): New static functions.
1096         (elf_open_debugfile_by_buildid): New static function.
1097         (elf_try_debugfile): New static function.
1098         (elf_find_debugfile_by_debuglink): New static function.
1099         (elf_open_debugfile_by_debuglink): New static function.
1100         (elf_add): Add filename and debuginfo parameters.  Adjust all
1101         callers.  Look for external debug info notes, and try to fetch
1102         debug info from external file.
1103         (struct phdr_data): Add exe_filename field.
1104         (phdr_callback): Pass filename to elf_add.
1105         (backtrace_initialize): Add filename parameter.
1106         * internal.h (backtrace_initialize): Add filename parameter.
1107         * fileline.c (fileline_initialize): Pass filename to
1108         backtrace_initialize.
1109         * pecoff.c (fileline_initialize): Add unused filename parameter.
1110         * unknown.c (fileline_initialize): Likewise.
1111         * xcoff.c (fileline_initialize): Likewise.
1112         * configure.ac: Check for objcopy --add-gnu-debuglink.
1113         * Makefile.am (dtest): New test target.
1114         * configure, Makefile.in: Rebuild.
1116 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
1118         PR other/81096
1119         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
1120         * Makefile.in: Regenerate.
1122 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
1124         PR other/81096
1125         * libbacktrace/Makefile.in
1126         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
1128 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
1130         PR bootstrap/81638
1131         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
1133 2017-07-28  Tony Reix  <tony.reix@atos.net>
1135         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
1137 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1139         * fileline.c (fileline_initialize): Print pid_t as long.
1141 2017-07-26  Tony Reix  <tony.reix@atos.net>
1143         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
1144         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
1145         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
1146         * configure, config.h.in: Regenerate.
1148 2017-07-21  Tony Reix  <tony.reix@atos.net>
1150         * filetype.awk: Add AIX XCOFF type detection.
1151         * configure.ac: Recognize xcoff format.
1152         * Makefile.am (FORMAT_FILES): Add xcoff.c.
1153         * fileline.c: Include <unistd.h>.
1154         (fileline_initialize): Add case for AIX procfs.
1155         * xcoff.c: New file.
1156         * configure, Makefile.in: Rebuild.
1158 2017-06-21  Richard Biener  <rguenther@suse.de>
1160         * configure.ac: Add AC_SYS_LARGEFILE.
1161         * config.h.in: Regenerate.
1162         * configure: Likewise.
1164 2017-06-11  Ian Lance Taylor  <iant@golang.org>
1166         * elf.c (backtrace_initialize): Always set *fileline_fn.
1167         * ttest.c: New file.
1168         * btest.c: Move support functions into testlib.c.  Change calls to
1169         check to pass file name.
1170         * testlib.c: New file, copied from (part of) btest.c.
1171         * testlib.h: New file, declarations for testlib.c.
1172         * edtest.c: Use testlib.h and testlib.c.
1173         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
1174         * Makefile.am (btest_SOURCES): Add testlib.c.
1175         (edtest_SOURCES): Likewise.
1176         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
1177         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
1178         * configure, Makefile.in: Rebuild.
1180 2017-05-19  Than McIntosh  <thanm@google.com>
1182         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
1183         (read_line_header): Don't allocate dirs if dirs_count == 0.
1184         * edtest.c: New file.
1185         * edtest2.c: New file.
1186         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
1187         (check_PROGRAMS): Add edtest.
1188         (edtest2_build.c, gen_edtest2_build): New targets.
1189         * Makefile.in: Rebuild.
1191 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
1193         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
1194         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
1196 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1198         Update copyright years.
1200 2016-11-15  Matthias Klose  <doko@ubuntu.com>
1202         * configure: Regenerate.
1204 2016-09-11  Carlos Liam  <carlos@aarzee.me>
1206         * all: Remove meaningless trailing whitespace.
1208 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
1210         PR target/71161
1211         * elf.c (phdr_callback) [__i386__]: Add
1212         __attribute__((__force_align_arg_pointer__)).
1214 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
1216         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
1217         avoid possible crash.
1218         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
1219         missing debug info anymore.
1221 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
1223         * mmap.c (MAP_FAILED): Define if not defined.
1225 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
1227         Update copyright years.
1229 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
1231         * configure.ac: Specify that DJGPP do not have mmap
1232         even when sys/mman.h exists.
1233         * configure: Regenerate
1235 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
1237         PR libgfortran/68115
1238         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
1239         * configure: Regenerate.
1240         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
1241         to void.
1243 2015-09-17  Ian Lance Taylor  <iant@google.com>
1245         * posix.c (backtrace_open): Cast second argument of open() to int.
1247 2015-09-11  Ian Lance Taylor  <iant@google.com>
1249         * Makefile.am (backtrace.lo): Depend on internal.h.
1250         (sort.lo, stest.lo): Add explicit dependencies.
1251         * Makefile.in: Rebuild.
1253 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
1255         * backtrace.c: #include <sys/types.h>.
1257 2015-09-08  Ian Lance Taylor  <iant@google.com>
1259         PR other/67457
1260         * backtrace.c: #include "internal.h".
1261         (struct backtrace_data): Add can_alloc field.
1262         (unwind): If can_alloc is false, don't try to get file/line
1263         information.
1264         (backtrace_full): Set can_alloc field in bdata.
1265         * alloc.c (backtrace_alloc): Don't call error_callback if it is
1266         NULL.
1267         * mmap.c (backtrace_alloc): Likewise.
1268         * internal.h: Update comments for backtrace_alloc and
1269         backtrace_free.
1271 2015-09-08  Ian Lance Taylor  <iant@google.com>
1273         PR other/67457
1274         * mmap.c (backtrace_alloc): Correct test for mmap failure.
1276 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1278         * configure.ac: For spu-*-* targets, set have_fcntl to no.
1279         * configure: Regenerate.
1281 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1283         * configure.ac: Remove [disable-shared] argument to LT_INIT.
1284         Remove setting PIC_FLAG when building as target library.
1285         * configure: Regenerate.
1287 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
1289         * configure.ac: Only compile with -fPIC if the target
1290         supports it.
1291         * configure: Regenerate.
1293 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1295         * configure.ac: Set have_mmap to no on spu-*-* targets.
1296         * configure: Regenerate.
1298 2015-08-13  Ian Lance Taylor  <iant@google.com>
1300         * dwarf.c (read_function_entry): Add vec_inlined parameter.
1301         Change all callers.
1303 2015-06-11  Martin Sebor  <msebor@redhat.com>
1305         PR sanitizer/65479
1306         * dwarf.c (struct line): Add new field idx.
1307         (line_compare): Use it.
1308         (add_line): Set it.
1309         (read_line_info): Reset it.
1311 2015-05-29  Tristan Gingold  <gingold@adacore.com>
1313         * pecoff.c: New file.
1314         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1315         * Makefile.in: Regenerate.
1316         * filetype.awk: Detect pecoff.
1317         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1318         Add pecoff.
1319         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1320         true.
1321         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1322         * configure: Regenerate.
1323         * pecoff.c: New file.
1325 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
1327         * Makefile.in: Regenerated with automake-1.11.6.
1328         * aclocal.m4: Likewise.
1329         * configure: Likewise.
1331 2015-01-24  Matthias Klose  <doko@ubuntu.com>
1333         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1334         * configure: Regenerate.
1336 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
1338         Update copyright years.
1340 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1342         PR bootstrap/63784
1343         * configure: Regenerated.
1345 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
1347         * ChangeLog.jit: New.
1349 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1351         PR target/63610
1352         * configure: Regenerate.
1354 2014-10-23  Ian Lance Taylor  <iant@google.com>
1356         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1357         Fix to return void *.
1359 2014-05-08  Ian Lance Taylor  <iant@google.com>
1361         * mmap.c (backtrace_free): If freeing a large aligned block of
1362         memory, call munmap rather than holding onto it.
1363         (backtrace_vector_grow): When growing a vector, double the number
1364         of pages requested.  When releasing the old version of a grown
1365         vector, pass the correct size to backtrace_free.
1367 2014-03-07  Ian Lance Taylor  <iant@google.com>
1369         * sort.c (backtrace_qsort): Use middle element as pivot.
1371 2014-03-06  Ian Lance Taylor  <iant@google.com>
1373         * sort.c: New file.
1374         * stest.c: New file.
1375         * internal.h (backtrace_qsort): Declare.
1376         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1377         (read_line_info, read_function_entry): Likewise.
1378         (read_function_info, build_dwarf_data): Likewise.
1379         * elf.c (elf_initialize_syminfo): Likewise.
1380         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1381         (stest_SOURCES, stest_LDADD): Define.
1382         (check_PROGRAMS): Add stest.
1384 2014-02-07  Misty De Meo  <misty@brew.sh>
1386         PR target/58710
1387         * configure.ac: Use AC_LINK_IFELSE in check for
1388         _Unwind_GetIPInfo.
1389         * configure: Regenerate.
1391 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1393         Update copyright years
1395 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
1397         * elf.c (ET_DYN): Undefine and define again.
1398         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1399         return early -1 without closing the descriptor.
1400         (struct phdr_data): Add exe_descriptor.
1401         (phdr_callback): If pd->exe_descriptor is not -1, for very first
1402         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1403         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
1404         call to elf_add.
1405         (backtrace_initialize): Adjust call to elf_add.  If it returns
1406         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1408 2013-12-05  Ian Lance Taylor  <iant@google.com>
1410         * alloc.c (backtrace_vector_finish): Add error_callback and data
1411         parameters.  Call backtrace_vector_release.  Return address base.
1412         * mmap.c (backtrace_vector_finish): Add error_callback and data
1413         parameters.  Return address base.
1414         * dwarf.c (read_function_info): Get new address base from
1415         backtrace_vector_finish.
1416         * internal.h (backtrace_vector_finish): Update declaration.
1418 2013-11-27  Ian Lance Taylor  <iant@google.com>
1420         * dwarf.c (find_address_ranges): New static function, broken out
1421         of build_address_map.
1422         (build_address_map): Call it.
1423         * btest.c (check): Check for missing filename or function, rather
1424         than crashing.
1425         (f3): Check that enough frames were returned.
1427 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
1429         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1430         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1431         last argument.
1432         * btest.c (struct symdata): Add size field.
1433         (callback_three): Add symsize argument.  Copy it to the data->size
1434         field.
1435         (f23): Set symdata.size to 0.
1436         (test5): Likewise.  If sizeof (int) > 1, lookup address of
1437         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
1438         values.
1440         * atomic.c: Include sys/types.h.
1442 2013-11-18  Ian Lance Taylor  <iant@google.com>
1444         * configure.ac: Check for support of __atomic extensions.
1445         * internal.h: Declare or #define atomic functions for use in
1446         backtrace code.
1447         * atomic.c: New file.
1448         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1449         (dwarf_fileline, backtrace_dwarf_add): Likewise.
1450         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1451         (backtrace_initialize): Likewise.
1452         * fileline.c (fileline_initialize): Likewise.
1453         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1454         * configure, config.h.in, Makefile.in: Rebuild.
1456 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
1458         * elf.c (SHN_UNDEF): Define.
1459         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
1460         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
1461         (elf_add): Adjust caller.
1463         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1465 2013-11-16  Ian Lance Taylor  <iant@google.com>
1467         * backtrace.h (backtrace_create_state): Correct comment about
1468         threading.
1470 2013-11-15  Ian Lance Taylor  <iant@google.com>
1472         * backtrace.h (backtrace_syminfo): Update comment and parameter
1473         name to take any address, not just a PC value.
1474         * elf.c (STT_OBJECT): Define.
1475         (elf_nosyms): Rename parameter pc to addr.
1476         (elf_symbol_search): Rename local variable pc to addr.
1477         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1478         (elf_syminfo): Rename parameter pc to addr.
1479         * btest.c (global): New global variable.
1480         (test5): New test.
1481         (main): Call test5.
1483 2013-10-17  Ian Lance Taylor  <iant@google.com>
1485         * elf.c (elf_add): Don't get the wrong offsets if a debug section
1486         is missing.
1488 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
1490         * configure.ac: Add --enable-host-shared, setting up
1491         pre-existing PIC_FLAG variable within Makefile.am et al.
1492         * configure: Regenerate.
1494 2013-09-20  Alan Modra  <amodra@gmail.com>
1496         * configure: Regenerate.
1498 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1500         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1502 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1504         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1505         dl_iterate_phdr callbacks.
1507 2013-03-25  Ian Lance Taylor  <iant@google.com>
1509         * alloc.c: #include <sys/types.h>.
1510         * mmap.c: Likewise.
1512 2013-01-31  Ian Lance Taylor  <iant@google.com>
1514         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1515         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1517 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
1519         PR other/56076
1520         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1521         attribute was not seen.
1523 2013-01-16  Ian Lance Taylor  <iant@google.com>
1525         * dwarf.c (struct unit): Add filename and abs_filename fields.
1526         (build_address_map): Set new fields when reading unit.
1527         (dwarf_lookup_pc): If we don't find an entry in the line table,
1528         just return the main file name.
1530 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
1532         Update copyright years.
1534 2013-01-01  Ian Lance Taylor  <iant@google.com>
1536         PR bootstrap/54834
1537         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1538         $(MULTIBUILDTOP)/../../gcc/include.
1539         * Makefile.in: Rebuild.
1541 2013-01-01  Ian Lance Taylor  <iant@google.com>
1543         PR other/55536
1544         * mmap.c (backtrace_alloc): Don't call sync functions if not
1545         threaded.
1546         (backtrace_free): Likewise.
1548 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1550         * mmapio.c: Define MAP_FAILED if not defined.
1552 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
1554         PR bootstrap/54926
1555         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1556         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1557         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1558         accepts it.
1559         * Makefile.in: Regenerated.
1560         * configure: Regenerated.
1562 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
1564         PR bootstrap/54926
1565         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1566         * Makefile.in: Regenerated.
1568 2012-11-20  Ian Lance Taylor  <iant@google.com>
1570         * dwarf.c (read_attribute): Always clear val.
1572 2012-11-13  Ian Lance Taylor  <iant@google.com>
1574         PR other/55312
1575         * configure.ac: Only add -Werror if building a target library.
1576         * configure: Rebuild.
1578 2012-11-12  Ian Lance Taylor  <iant@google.com>
1579             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1580             Gerald Pfeifer  <gerald@pfeifer.com>
1582         * configure.ac: Check for getexecname.
1583         * fileline.c: #include <errno.h>.  Define getexecname if not
1584         available.
1585         (fileline_initialize): Try to find the executable in a few
1586         different ways.
1587         * print.c (error_callback): Only print the filename if it came
1588         from the backtrace state.
1589         * configure, config.h.in: Rebuild.
1591 2012-10-29  Ian Lance Taylor  <iant@google.com>
1593         * mmap.c (backtrace_vector_release): Correct last patch: add
1594         aligned, not size.
1596 2012-10-29  Ian Lance Taylor  <iant@google.com>
1598         * mmap.c (backtrace_vector_release): Make sure freed block is
1599         aligned on 8-byte boundary.
1601 2012-10-26  Ian Lance Taylor  <iant@google.com>
1603         PR other/55087
1604         * posix.c (backtrace_open): Add does_not_exist parameter.
1605         * elf.c (phdr_callback): Do not warn if shared library could not
1606         be opened.
1607         * fileline.c (fileline_initialize): Update calls to
1608         backtrace_open.
1609         * internal.h (backtrace_open): Update declaration.
1611 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
1613         PR target/55061
1614         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1615         * configure: Regenerate.
1617 2012-10-24  Ian Lance Taylor  <iant@google.com>
1619         PR target/55061
1620         * configure.ac: Check whether -funwind-tables option works.
1621         * configure: Rebuild.
1623 2012-10-11  Ian Lance Taylor  <iant@google.com>
1625         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1626         * configure: Rebuild.
1628 2012-10-10  Ian Lance Taylor  <iant@google.com>
1630         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1631         lower case.
1633 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
1635         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1637 2012-10-09  Ian Lance Taylor  <iant@google.com>
1639         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1640         (backtrace_dwarf_add): Likewise.
1642 2012-10-09  Ian Lance Taylor  <iant@google.com>
1644         Add support for tracing through shared libraries.
1645         * configure.ac: Check for link.h and dl_iterate_phdr.
1646         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
1647         ELF macros before #defining them.
1648         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1649         dl_iterate_phdr.
1650         (struct elf_syminfo_data): Add next field.
1651         (elf_initialize_syminfo): Initialize next field.
1652         (elf_add_syminfo_data): New static function.
1653         (elf_add): New static function, broken out of
1654         backtrace_initialize.  Call backtrace_dwarf_add instead of
1655         backtrace_dwarf_initialize.
1656         (struct phdr_data): Define.
1657         (phdr_callback): New static function.
1658         (backtrace_initialize): Call elf_add.
1659         * dwarf.c (struct dwarf_data): Add next and base_address fields.
1660         (add_unit_addr): Add base_address parameter.  Change all callers.
1661         (add_unit_ranges, build_address_map): Likewise.
1662         (add_line): Add ddata parameter.  Change all callers.
1663         (read_line_program, add_function_range): Likewise.
1664         (dwarf_lookup_pc): New static function, broken out of
1665         dwarf_fileline.
1666         (dwarf_fileline): Call dwarf_lookup_pc.
1667         (build_dwarf_data): New static function.
1668         (backtrace_dwarf_add): New function.
1669         (backtrace_dwarf_initialize): Remove.
1670         * internal.h (backtrace_dwarf_initialize): Don't declare.
1671         (backtrace_dwarf_add): Declare.
1672         * configure, config.h.in: Rebuild.
1674 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
1676         * btest.c (f23): Avoid uninitialized variable warning.
1678 2012-10-04  Ian Lance Taylor  <iant@google.com>
1680         * dwarf.c: If the system header files do not declare strnlen,
1681         provide our own version.
1683 2012-10-03  Ian Lance Taylor  <iant@google.com>
1685         * dwarf.c (read_uleb128): Fix overflow test.
1686         (read_sleb128): Likewise.
1687         (build_address_map): Don't change unit_buf.start.
1689 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
1691         PR other/54761
1692         * configure.ac (EXTRA_FLAGS): New.
1693         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1694         * configure, Makefile.in: Regenerate.
1696 2012-09-29  Ian Lance Taylor  <iant@google.com>
1698         PR other/54749
1699         * fileline.c (fileline_initialize): Pass errnum as -1 when
1700         reporting that we could not read executable information after a
1701         previous failure.
1703 2012-09-27  Ian Lance Taylor  <iant@google.com>
1705         PR bootstrap/54732
1706         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1707         * Makefile.am: Add dependencies for all objects.
1708         * configure, aclocal.m4, Makefile.in: Rebuild.
1710 2012-09-27  Ian Lance Taylor  <iant@google.com>
1712         PR other/54726
1713         * elf.c (backtrace_initialize): Set *fileln_fn, not
1714         state->fileln_fn.
1716 2012-09-19  Ian Lance Taylor  <iant@google.com>
1718         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1719         as a target library.
1720         * configure: Rebuild.
1722 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1723             Ian Lance Taylor  <iant@google.com>
1725         * configure.ac (GCC_HEADER_STDINT): Invoke.
1726         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1727         * btest.c: Don't include <stdint.h>.
1728         * dwarf.c: Likewise.
1729         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1731 2012-09-18  Ian Lance Taylor  <iant@google.com>
1733         PR bootstrap/54623
1734         * Makefile.am (AM_CPPFLAGS): Define.
1735         (AM_CFLAGS): Remove -I options.
1736         * Makefile.in: Rebuild.
1738 2012-09-18  Ian Lance Taylor  <iant@google.com>
1740         * posix.c (O_BINARY): Define if not defined.
1741         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
1742         HAVE_FCNTL is defined.
1743         * configure.ac: Test for the fcntl function.
1744         * configure, config.h.in: Rebuild.
1746 2012-09-18  Ian Lance Taylor  <iant@google.com>
1748         * btest.c (test1, test2, test3, test4): Add the unused attribute.
1750 2012-09-18  Ian Lance Taylor  <iant@google.com>
1752         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1754 2012-09-18  Ian Lance Taylor  <iant@google.com>
1756         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1757         * mmapio.c: Don't define _GNU_SOURCE.
1758         * configure, config.h.in: Rebuild.
1760 2012-09-18  Ian Lance Taylor  <iant@google.com>
1762         * configure.ac: Check whether strnlen is declared.
1763         * dwarf.c: Declare strnlen if not declared.
1764         * configure, config.h.in: Rebuild.
1766 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1768         * fileline.c: Include <stdlib.h>.
1769         * mmap.c: Likewise.
1771 2012-09-17  Ian Lance Taylor  <iant@google.com>
1773         PR bootstrap/54611
1774         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
1775         parameter.
1777 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
1779         PR bootstrap/54611
1780         * nounwind.c (backtrace_simple): Add state parameter.
1782 2012-09-17  Ian Lance Taylor  <iant@google.com>
1784         PR bootstrap/54609
1785         * unknown.c (unknown_fileline): Add state parameter, remove
1786         fileline_data parameter, name error_callback parameter.
1787         (backtrace_initialize): Add state parameter.
1789 2012-09-17  Ian Lance Taylor  <iant@google.com>
1791         * Initial implementation.
1793 Copyright (C) 2012-2021 Free Software Foundation, Inc.
1795 Copying and distribution of this file, with or without modification,
1796 are permitted in any medium without royalty provided the copyright
1797 notice and this notice are preserved.