Update ChangeLog and version files for release
[official-gcc.git] / libbacktrace / ChangeLog
blob5667e71bbe447a208233b16dda650b28c8a16195
1 2022-06-28  Release Manager
3         * GCC 10.4.0 released.
5 2021-04-08  Release Manager
7         * GCC 10.3.0 released.
9 2021-01-03  Iain Sandoe  <iain@sandoe.co.uk>
10             Jakub Jelinek   <jakub@redhat.com>
12         PR target/97865
13         * configure: Regenerate.
15 2020-07-23  Release Manager
17         * GCC 10.2.0 released.
19 2020-07-08  Ian Lance Taylor  <iant@golang.org>
21         * configure.ac: Test linker support for DWARF5
22         * configure: Regenerate
24 2020-05-07  Release Manager
26         * GCC 10.1.0 released.
28 2020-02-15  Ian Lance Taylor  <iant@golang.org>
30         * ztest.c (test_large): Update file to current libgo test file.
32 2020-02-03  Ian Lance Taylor  <iant@golang.org>
34         * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
35         (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
36         (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
37         (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
38         (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
39         (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
40         (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
41         (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
42         (stest_alloc_CFLAGS): Likewise.
43         * Makefile.in: Regenerate.
44         * ztest.c (error_callback_compress): Mark vdata unused.
45         (test_large): Add casts to avoid warnings.
47 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
49         Update copyright years.
51 2019-12-13  Ian Lance Taylor  <iant@golang.org>
53         Add DWARF 5 support.
54         * dwarf.c (struct attr): Add val field.
55         (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
56         ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
57         (struct line_header): Add addrsize field.
58         (struct line_header_format): Define.
59         (struct unit): Add str_offsets_base, addr_base, and rnglists_base
60         fields.
61         (read_uint24): New static function.
62         (read_attribute): Add implicit_val parameter.  Replace dwarf_str
63         and dwarf_str_size parameters with dwarf_sections parameter.  Add
64         support for new DWARF 5 forms.  Change all callers.
65         (resolve_string): New static function.
66         (resolve_addr_index): Likewise.
67         (read_abbrevs): Support DW_FORM_implicit_const.
68         (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
69         and ranges_is_index fields.
70         (update_pcrange): Support DWARF 5 encodings.
71         (add_high_low_range): New static function, split out of
72         add_ranges.
73         (add_ranges_from_ranges): Likewise.
74         (add_ranges_from_rnglists): New static function.
75         (add_ranges): Just call new helper functions.
76         (find_address_ranges): Use resolve_string for strings, after
77         reading all attributes.  Handle new DWARF 5 attributes.
78         (build_address_map): Support DWARF 5 compilation units.
79         (read_v2_paths): New static function, split out of
80         read_line_header.
81         (read_lnct): New static function.
82         (read_line_header_format_entries): Likewise.
83         (read_line_header): Add ddata parameter.  Support DWARF 5 line
84         headers.  Call new helper functions.  Change all callers.
85         (read_line_program): Use addrsize from line program header.  Don't
86         special case directory index 0 for DWARF 5.
87         (read_referenced_name): Use resolve_string.
88         (read_function_entry): Handle DWARF 5 encodings.  Use
89         resolve_string.
90         * internal.h (enum dwarf_section): Add DEBUG_ADDR,
91         DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
92         * elf.c (dwarf_section_names): Add new section names.
93         * pecoff.c (dwarf_section_names): Likewise.
94         * xcoff.c (xcoff_add): Clear dwarf_sections before setting
95         fields.
96         * configure.ac: Define HAVE_DWARF5 automake conditional.
97         * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
98         (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
99         (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
100         (dwarf5_alloc_LDADD): Likewise.
101         (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
102         (CLEANFILES, clean-local): Define.
104 2019-12-08  Ian Lance Taylor  <iant@golang.org>
106         * dwarf.c (struct pcrange): Define.
107         (update_pcrange, add_ranges): New static functions.
108         (add_unit_addr): Change signature to work with add_ranges.  Don't
109         add base_address here.
110         (add_unit_ranges): Remove.
111         (find_address_ranges): Replace str/ranges parameters with
112         dwarf_sections.  Use update_pcrange and add_ranges.  Change all
113         callers.
114         (add_function_range): Change signature to work with add_ranges.
115         Don't add base_address here.
116         (add_function_ranges): Remove.
117         (read_function_entry): Use update_pcrange and add_ranges.
119 2019-12-04  Ian Lance Taylor  <iant@golang.org>
121         * edtest.c (test1): Add noclone attribute.
123 2019-12-04  Ian Lance Taylor  <iant@golang.org>
125         * internal.h (enum dwarf_section): Define.
126         (struct dwarf_sections): Define.
127         (backtrace_dwarf_add): Update declaration to replace specific
128         section parameters with dwarf_sections parameter.
129         * dwarf.c (struct dwarf_data): Replace specific section fields
130         with dwarf_sections field.
131         (read_attribute): Use dwarf_sections with altlink.
132         (build_address_map): Replace specific section parameters with
133         dwarf_sections parameter.  Change all callers.
134         (read_line_info): Use dwarf_sections with ddata.
135         (read_referenced_name): Likewise.
136         (add_function_ranges): Likewise.
137         (read_function_entry): Likewise.
138         (read_function_info): Likewise.
139         (build_dwarf_data): Replace specific section parameters with
140         dwarf_sections parameter.  Change all callers.
141         (backtrace_dwarf_add): Likewise.
142         * elf.c (enum debug_section): Remove.
143         (dwarf_section_names): Remove .zdebug names.
144         (elf_add): Track zsections separately.  Build dwarf_sections.
145         * pecoff.c (enum debug_section): Remove.
146         (struct debug_section_info): Remove data field.
147         (coff_add): Build dwarf_sections.
148         * xcoff.c (enum dwarf_section): Remove.  Replace DWSECT_xxx
149         references with DEBUG_xxx references.
150         (xcoff_add): Build dwarf_sections.
152 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
154         * configure: Regenerate.
156 2019-09-26  Ian Lance Taylor  <iant@golang.org>
158         PR libbacktrace/91908
159         * pecoff.c (backtrace_initialize): Explicitly cast unchecked
160         __sync_bool_compare_and_swap to void.
161         * xcoff.c (backtrace_initialize): Likewise.
163 2019-09-03  Ulrich Weigand  <uweigand@de.ibm.com>
165         * configure.ac: Remove references to spu.
166         * configure: Regenerate.
168 2019-05-24  Clement Chigot  <clement.chigot@atos.net>
170         * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
171         test_elf_64.
172         * Makefile.in: Regenerate.
174 2019-05-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
176         * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
177         handling.
178         * configure: Regenerate.
180 2019-03-11  Ian Lance Taylor  <iant@golang.org>
182         PR libbacktrace/89669
183         * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
184         HAVE_ELF.
185         * Makefile.in: Regenerate.
187 2019-02-26  Tom de Vries  <tdevries@suse.de>
189         * btest.c (test5): Allow global.* as minimal symbol name for global.
191 2019-02-26  Tom de Vries  <tdevries@suse.de>
193         * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
194         * Makefile.in: Regenerate.
196 2019-02-12  Tom de Vries  <tdevries@suse.de>
198         PR libbacktrace/81983
199         * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
201 2019-02-10  Tom de Vries  <tdevries@suse.de>
203         * Makefile.am (BUILDTESTS): Add btest_lto.
204         * Makefile.in: Regenerate.
205         * btest.c (test1, f2, f3, test3, f22, f23): Declare with
206         __attribute__((noclone)).
208 2019-02-08  Tom de Vries  <tdevries@suse.de>
210         * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
211         * print.c (backtrace_print): Same.
212         * simple.c (backtrace_simple): Same.
214 2019-02-08  Tom de Vries  <tdevries@suse.de>
216         PR libbacktrace/78063
217         * dwarf.c (build_address_map): Keep all parsed units.
218         (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
220 2019-01-31  Tom de Vries  <tdevries@suse.de>
222         PR libbacktrace/89136
223         * elf.c (elf_add): Read build-id if with_buildid_data.  Fix
224         'debugaltlink_name_len =+ 1'.
226 2019-01-29  Tom de Vries  <tdevries@suse.de>
228         * install-debuginfo-for-buildid.sh.in: New script.
229         * Makefile.am (check_PROGRAMS): Add b2test and b3test.
230         (TESTS): Add b2test_buildid and b3test_dwz_buildid.
231         * Makefile.in: Regenerate.
232         * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
233         (READELF): Set with AC_CHECK_PROG.
234         (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
235         * configure: Regenerate.
236         * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
237         (elf_open_debugfile_by_buildid): ... here.
239 2019-01-29  Tom de Vries  <tdevries@suse.de>
241         * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
242         allocfail.
243         (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
244         (check_PROGRAMS): Add BUILDTESTS.
245         * Makefile.in: Regenerate.
247 2019-01-28  Tom de Vries  <tdevries@suse.de>
249         * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
250         Use $< to access prerequisite.
251         * Makefile.in: Regenerate.
253 2019-01-25  Nathan Sidwell  <nathan@acm.org>
255         * elf.c (elf_add): Pass "" filename to recursive call with
256         separated debug.
258 2019-01-25  Tom de Vries  <tdevries@suse.de>
260         * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
261         filename == "".
262         * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
263         * Makefile.in: Regenerate.
265 2019-01-25  Tom de Vries  <tdevries@suse.de>
267         * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
268         (TESTS): Rename dtest to btest_gnudebuglink.
269         * Makefile.in: Regenerate.
271 2019-01-23  Tom de Vries  <tdevries@suse.de>
273         * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
274         (units_search, find_unit): Use size_t for offset.
275         (build_address_map): Use size_t for unit_offset.
277 2019-01-20  Gerald Pfeifer  <gerald@pfeifer.com>
279         * allocfail.c (main): Increase portability of printf statement.
281 2019-01-18  Ian Lance Taylor  <iant@golang.org>
283         PR libbacktrace/88890
284         * mmapio.c (backtrace_get_view): Change size parameter to
285         uint64_t.  Check that value fits in size_t.
286         * read.c (backtrace_get_view): Likewise.
287         * internal.h (backtrace_get_view): Update declaration.
288         * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
290 2019-01-17  Tom de Vries  <tdevries@suse.de>
292         PR libbacktrace/82857
293         * configure.ac (DWZ): Set with AC_CHECK_PROG.
294         (HAVE_DWZ): Set with AM_CONDITIONAL.
295         * configure: Regenerate.
296         * Makefile.am (TESTS): Add btest_dwz.
297         * Makefile.in: Regenerate.
299 2019-01-17  Tom de Vries  <tdevries@suse.de>
301         PR libbacktrace/82857
302         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
303         (read_attribute): Handle DW_FORM_GNU_ref_alt using
304         ATTR_VAL_REF_ALT_INFO.
305         (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
307 2019-01-17  Tom de Vries  <tdevries@suse.de>
309         * dwarf.c (struct unit): Add low_offset and high_offset fields.
310         (struct unit_vector): New type.
311         (struct dwarf_data): Add units and units_counts fields.
312         (find_unit): New function.
313         (find_address_ranges): Add and handle unit_tag parameter.
314         (build_address_map): Add and handle units_vec parameter.
315         (build_dwarf_data): Pass units_vec to build_address_map.  Store resulting
316         units vector.
318 2019-01-17  Tom de Vries  <tdevries@suse.de>
320         PR libbacktrace/82857
321         * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
322         using altlink.
324 2019-01-17  Tom de Vries  <tdevries@suse.de>
326         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
327         (read_attribute): Add altlink parameter.  Handle missing altlink for
328         DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
329         (find_address_ranges, build_address_map, build_dwarf_data): Add and
330         handle altlink parameter.
331         (read_referenced_name, read_function_entry): Add argument to
332         read_attribute call.
334 2019-01-17  Tom de Vries  <tdevries@suse.de>
336         * dwarf.c (struct dwarf_data): Add altlink field.
337         (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
338         * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
339         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
340         * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
341         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
342         * xcoff.c (xcoff_add): Same.
344 2019-01-17  Tom de Vries  <tdevries@suse.de>
346         * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
347         * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
348         * elf.c (elf_add): Add and handle fileline_entry parameter.  Add
349         argument to backtrace_dwarf_add call.
350         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
351         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
352         * xcoff.c (xcoff_add): Same.
354 2019-01-17  Tom de Vries  <tdevries@suse.de>
356         * elf.c (elf_add): Add and handle with_buildid_data and
357         with_buildid_size parameters.  Handle .gnu_debugaltlink section.
358         (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
360 2019-01-16  Tom de Vries  <tdevries@suse.de>
362         * dwarf.c (read_referenced_name_from_attr): New function.  Factor out
363         of ...
364         (read_referenced_name): ... here, and ...
365         (read_function_entry): ... here.
367 2019-01-16  Tom de Vries  <tdevries@suse.de>
369         * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
370         name.
371         (read_function_entry): Same.  Don't allow name found via
372         DW_AT_abstract_origin or case DW_AT_specification to override linkage
373         name.
375 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
377         PR other/16615
379         * backtrace.h: Mechanically replace "can not" with "cannot".
381 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
383         Update copyright years.
385 2018-12-29  Gerald Pfeifer  <gerald@pfeifer.com>
387         * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
388         in sed pattern.
389         * Makefile.in: Regenerate.
391 2018-12-28  Tom de Vries  <tdevries@suse.de>
393         * dwarf.c (build_address_map): Reuse unused units.
395 2018-12-28  Tom de Vries  <tdevries@suse.de>
397         * dwarf.c (build_address_map): Simplify by removing local variable
398         abbrevs.
400 2018-12-28  Ian Lance Taylor  <iant@golang.org>
401             Tom de Vries  <tdevries@suse.de>
403         PR libbacktrace/88063
404         * dwarf.c (free_unit_addrs_vector): Remove.
405         (build_address_map): Keep track of allocated units in vector.  Free
406         allocated units and corresponding abbrevs upon failure.  Remove now
407         redundant call to free_unit_addrs_vector.  Free addrs vector upon
408         failure.  Free allocated unit vector.
410 2018-12-28  Tom de Vries  <tdevries@suse.de>
412         * dwarf.c (build_address_map): Free addrs vector upon failure.
414 2018-12-14  Tom de Vries  <tdevries@suse.de>
416         PR testsuite/88491
417         * allocfail.sh: Remove "set -o pipefail".
419 2018-12-12  Tom de Vries  <tdevries@suse.de>
421         * Makefile.am (TESTS): Add allocfail.sh.
422         (check_PROGRAMS): Add allocfail.
423         * Makefile.in: Regenerate.
424         * instrumented_alloc.c: New file.  Redefine malloc and realloc.
425         Include alloc.c.
426         * allocfail.c: New file.
427         * allocfail.sh: New file.
429 2018-11-30  Tom de Vries  <tdevries@suse.de>
431         * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
432         test_xcoff_64, test_pecoff and test_unknown.
433         * Makefile.in: Regenerate.
434         * test_format.c: New file.
436 2018-11-30  Tom de Vries  <tdevries@suse.de>
438         * Makefile.am : Add _with_alloc version for each test in
439         check_PROGRAMS.
440         * Makefile.in: Regenerate.
442 2018-11-30  Tom de Vries  <tdevries@suse.de>
444         * internal.h (backtrace_vector_free): New static inline fuction,
445         factored out of ...
446         * dwarf.c (read_line_info): ... here.
448 2018-11-28  Tom de Vries  <tdevries@suse.de>
450         * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
451         failure.
453 2018-11-27  Tom de Vries  <tdevries@suse.de>
455         * mmap.c (backtrace_vector_release): Same.
456         * unittest.c (test1): Add check.
458 2018-11-27  Tom de Vries  <tdevries@suse.de>
460         * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
461         instead of realloc.
462         * Makefile.am (check_PROGRAMS): Add unittest.
463         * Makefile.in: Regenerate.
464         * unittest.c: New file.
466 2018-11-22  Tom de Vries  <tdevries@suse.de>
468         * dwarf.c (read_initial_length): Factor out of ...
469         (build_address_map, read_line_info): ... here.
471 2018-11-21  Tom de Vries  <tdevries@suse.de>
473         * dwarf.c (read_string): Factor out of ...
474         (read_attribute, read_line_header, read_line_program): ... here.
476 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
478         PR bootstrap/82856
479         * Makefile.am: Include multilib.am.
480         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
481         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
483 2018-10-05  Ian Lance Taylor  <iant@golang.org>
485         PR libbacktrace/87529
486         * backtrace.h: Document that backtrace_create_state should be
487         called only once.
489 2018-08-05 Iain Buclaw  <ibuclaw@gdcproject.org>
491         * configure.ac: Move define of HAVE_ZLIB into check for -lz.
492         * Makefile.in: Regenerate.
493         * config.h.in: Likewise.
494         * configure: Likewise.
496 2018-08-01  Tony Reix  <tony.reix@atos.net>
498         * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
499         (struct xcoff_func, struct xcoff_func_vector): New structs.
500         (xcoff_syminfo): Drop leading dot from symbol name.
501         (xcoff_line_compare, xcoff_line_search): Remove.
502         (xcoff_func_compare, xcoff_func_search): New static functions.
503         (xcoff_lookup_pc): Search function table.
504         (xcoff_add_line, xcoff_process_linenos): Remove.
505         (xcoff_initialize_fileline): Build function table.
507 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
509         PR other/86198
510         * elf.c (elf_add): Increase ".note.gnu.build-id" section size
511         checking up to 36 bytes.
513 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
515         * configure: Regenerated.
517 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
519         * configure: Regenerated.
521 2018-04-17  Ian Lance Taylor  <iant@golang.org>
523         * backtrace.c: Revert last two changes.  Don't call mmap
524         directly.
526 2018-04-17  Ian Lance Taylor  <iant@golang.org>
528         * backtrace.c: Include backtrace-supported.h before checking
529         BACKTRACE_USES_MALLOC.
531 2018-04-17  Ian Lance Taylor  <iant@golang.org>
533         * backtrace.c (backtrace_full): When testing whether we can
534         allocate memory, call mmap directly, and munmap the memory.
536 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
538         PR other/85161
539         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
540         big endian, only use 32-bit loads if endianity macros are predefined
541         and indicate big or little endian.
543 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
545         PR target/84148
546         * configure: Regenerate.
548 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
550         PR other/82368
551         * elf.c (SHT_PROGBITS): Undefine and define.
553 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
555         PR other/82368
556         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
557         (struct elf_ppc64_opd_data): New type.
558         (elf_initialize_syminfo): Add opd argument, handle symbols
559         pointing into the PowerPC64 ELFv1 .opd section.
560         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
561         to structure with .opd data to elf_initialize_syminfo.
563 2018-01-31  Ian Lance Taylor  <iant@golang.org>
565         * elf.c (elf_add): Close descriptor if we use a debugfile.
566         * btest.c (check_open_files): New static function.
567         (main): Call check_open_files.
569 2018-01-25  Ian Lance Taylor  <iant@golang.org>
571         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
572         desired CRC is zero.
573         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
575 2018-01-25  Ian Lance Taylor  <iant@golang.org>
577         * pecoff.c (coff_add): Only release syms_view if it is valid.
579 2018-01-25  Ian Lance Taylor  <iant@golang.org>
581         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
583 2018-01-24  Ian Lance Taylor  <iant@golang.org>
585         * pecoff.c (coff_add): Use coff_read4, not memcpy.
587 2018-01-24  Ian Lance Taylor  <iant@golang.org>
589         PR other/68239
590         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
591         on the free list.
593 2018-01-19  Tony Reix  <tony.reix@atos.net>
595         * xcoff.c (xcoff_incl_compare): New function.
596         (xcoff_incl_search): New function.
597         (xcoff_process_linenos): Use bsearch to find include file.
598         (xcoff_initialize_fileline): Sort include file information.
600 2018-01-16  Ian Lance Taylor  <iant@golang.org>
602         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
603         288.
604         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
605         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
606         (elf_zlib_default_table): Update.
607         (elf_zlib_default_dist_table): New static array.
608         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
609         for block type 1.
610         * ztest.c (struct zlib_test): Add uncompressed_len.
611         (tests): Initialize uncompressed_len field.  Add new test case.
612         (test_samples): Use uncompressed_len field.
614 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
616         Update copyright years.
618 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
620         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
621         * aclocal.m4: Regenerate.
622         * Makefile.in: Likewise.
623         * configure: Likewise.
625 2017-10-06  Ian Lance Taylor  <iant@golang.org>
627         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
628         zlib uncompress function.
630 2017-10-05  Ian Lance Taylor  <iant@golang.org>
632         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
633         Read a four byte integer.
634         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
635         boundary before ever calling elf_zlib_fetch.
636         * ztest.c (test_large): Simplify print statements a bit.
638 2017-10-02  Ian Lance Taylor  <iant@golang.org>
640         * ztest.c: #include <errno.h>.
641         (TEST_TIMING): Don't define, don't test.
642         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
643         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
644         (ZLIB_CLOCK_GETTIME_ARG): Define.
645         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
646         * Makefile.am: Likewise.
647         * configure, Makefile.in: Rebuild.
649 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
651         PR other/67165
652         * Makefile.am: Append the content of clock_gettime_link to
653         ztest_LDADD.
654         * configure.ac: Test for the case that clock_gettime is in librt.
655         * Makefile.in: Regenerate.
656         * configure: Likewise.
658         PR other/67165
659         * configure.ac: Check for clock_gettime.
660         * config.h.in: Regenerate.
661         * configure: Likewise.
662         * ztest.c (average_time, test_large): Conditionalize test timing
663         on clock_gettime availability.
665 2017-09-29  Tony Reix  <tony.reix@atos.net>
667         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
668         (STYP_DWARF, SSUBTYP_DW*): Define.
669         (enum dwarf_section): Define.
670         (struct dwsect_info): Define.
671         (xcoff_add): Look for DWARF sections, pass them to
672         backtrace_dwarf_add.
674 2017-09-28  Ian Lance Taylor  <iant@golang.org>
676         PR other/67165
677         * elf.c (__builtin_prefetch): Define if not __GNUC__.
678         (unlikely): Define.
679         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
680         (b_elf_chdr): Define type.
681         (enum debug_section): Add ZDEBUG_xxx values.
682         (debug_section_names): Add names for new sections.
683         (struct debug_section_info): Add compressed field.
684         (elf_zlib_failed, elf_zlib_fetch): New static functions.
685         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
686         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
687         (HUFFMAN_SECONDARY_SHIFT): Define.
688         (ZDEBUG_TABLE_SIZE): Define.
689         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
690         (final_next_secondary): New static variable if
691         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
692         (elf_zlib_inflate_table): New static function.
693         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
694         function to produce fixed Huffman table.
695         (elf_zlib_default_table): New static variable.
696         (elf_zlib_inflate): New static function.
697         (elf_zlib_verify_checksum): Likewise.
698         (elf_zlib_inflate_and_verify): Likewise.
699         (elf_uncompress_zdebug): Likewise.
700         (elf_uncompress_chdr): Likewise.
701         (backtrace_uncompress_zdebug): New extern function.
702         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
703         sections, and uncompress them.
704         * internal.h (backtrace_compress_zdebug): Declare.
705         * ztest.c: New file.
706         * configure.ac: Check for -lz and check whether the linker
707         supports --compress-debug-sections.
708         * Makefile.am (ztest_SOURCES): New variable.
709         (ztest_CFLAGS, ztest_LDADD): New variables.
710         (check_PROGRAMS): Add ztest.
711         (ctestg_SOURCES): New variable.
712         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
713         (ctesta_SOURCES): New variable.
714         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
715         (check_PROGRAMS): Add ctestg and ctesta.
716         * configure, config.h.in, Makefile.in: Rebuild.
718 2017-09-22  Ian Lance Taylor  <iant@golang.org>
720         PR sanitizer/77631
721         * configure.ac: Check for lstat and readlink.
722         * elf.c (lstat, readlink): Provide dummy versions if real versions
723         are not available.
724         * configure, config.h.in: Rebuild.
726 2017-09-21  Ian Lance Taylor  <iant@google.com>
728         PR go/82284
729         * elf.c (backtrace_initialize): Set pd.exe_filename.
731 2017-09-20  Ian Lance Taylor  <iant@golang.org>
732             Denis Khalikov  <d.khalikov@partner.samsung.com>
734         PR sanitizer/77631
735         Support for external debug info.
736         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
737         (S_ISLNK): Define if not defined.
738         (xstrnlen): Define if strnlen is not available.
739         (b_elf_note): Define type.
740         (NT_GNU_BUILD_ID): Define macro.
741         (elf_crc32, elf_crc32_file): New static functions.
742         (elf_is_symlink, elf_readlink): New static functions.
743         (elf_open_debugfile_by_buildid): New static function.
744         (elf_try_debugfile): New static function.
745         (elf_find_debugfile_by_debuglink): New static function.
746         (elf_open_debugfile_by_debuglink): New static function.
747         (elf_add): Add filename and debuginfo parameters.  Adjust all
748         callers.  Look for external debug info notes, and try to fetch
749         debug info from external file.
750         (struct phdr_data): Add exe_filename field.
751         (phdr_callback): Pass filename to elf_add.
752         (backtrace_initialize): Add filename parameter.
753         * internal.h (backtrace_initialize): Add filename parameter.
754         * fileline.c (fileline_initialize): Pass filename to
755         backtrace_initialize.
756         * pecoff.c (fileline_initialize): Add unused filename parameter.
757         * unknown.c (fileline_initialize): Likewise.
758         * xcoff.c (fileline_initialize): Likewise.
759         * configure.ac: Check for objcopy --add-gnu-debuglink.
760         * Makefile.am (dtest): New test target.
761         * configure, Makefile.in: Rebuild.
763 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
765         PR other/81096
766         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
767         * Makefile.in: Regenerate.
769 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
771         PR other/81096
772         * libbacktrace/Makefile.in
773         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
775 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
777         PR bootstrap/81638
778         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
780 2017-07-28  Tony Reix  <tony.reix@atos.net>
782         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
784 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
786         * fileline.c (fileline_initialize): Print pid_t as long.
788 2017-07-26  Tony Reix  <tony.reix@atos.net>
790         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
791         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
792         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
793         * configure, config.h.in: Regenerate.
795 2017-07-21  Tony Reix  <tony.reix@atos.net>
797         * filetype.awk: Add AIX XCOFF type detection.
798         * configure.ac: Recognize xcoff format.
799         * Makefile.am (FORMAT_FILES): Add xcoff.c.
800         * fileline.c: Include <unistd.h>.
801         (fileline_initialize): Add case for AIX procfs.
802         * xcoff.c: New file.
803         * configure, Makefile.in: Rebuild.
805 2017-06-21  Richard Biener  <rguenther@suse.de>
807         * configure.ac: Add AC_SYS_LARGEFILE.
808         * config.h.in: Regenerate.
809         * configure: Likewise.
811 2017-06-11  Ian Lance Taylor  <iant@golang.org>
813         * elf.c (backtrace_initialize): Always set *fileline_fn.
814         * ttest.c: New file.
815         * btest.c: Move support functions into testlib.c.  Change calls to
816         check to pass file name.
817         * testlib.c: New file, copied from (part of) btest.c.
818         * testlib.h: New file, declarations for testlib.c.
819         * edtest.c: Use testlib.h and testlib.c.
820         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
821         * Makefile.am (btest_SOURCES): Add testlib.c.
822         (edtest_SOURCES): Likewise.
823         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
824         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
825         * configure, Makefile.in: Rebuild.
827 2017-05-19  Than McIntosh  <thanm@google.com>
829         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
830         (read_line_header): Don't allocate dirs if dirs_count == 0.
831         * edtest.c: New file.
832         * edtest2.c: New file.
833         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
834         (check_PROGRAMS): Add edtest.
835         (edtest2_build.c, gen_edtest2_build): New targets.
836         * Makefile.in: Rebuild.
838 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
840         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
841         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
843 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
845         Update copyright years.
847 2016-11-15  Matthias Klose  <doko@ubuntu.com>
849         * configure: Regenerate.
851 2016-09-11  Carlos Liam  <carlos@aarzee.me>
853         * all: Remove meaningless trailing whitespace.
855 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
857         PR target/71161
858         * elf.c (phdr_callback) [__i386__]: Add
859         __attribute__((__force_align_arg_pointer__)).
861 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
863         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
864         avoid possible crash.
865         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
866         missing debug info anymore.
868 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
870         * mmap.c (MAP_FAILED): Define if not defined.
872 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
874         Update copyright years.
876 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
878         * configure.ac: Specify that DJGPP do not have mmap
879         even when sys/mman.h exists.
880         * configure: Regenerate
882 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
884         PR libgfortran/68115
885         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
886         * configure: Regenerate.
887         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
888         to void.
890 2015-09-17  Ian Lance Taylor  <iant@google.com>
892         * posix.c (backtrace_open): Cast second argument of open() to int.
894 2015-09-11  Ian Lance Taylor  <iant@google.com>
896         * Makefile.am (backtrace.lo): Depend on internal.h.
897         (sort.lo, stest.lo): Add explicit dependencies.
898         * Makefile.in: Rebuild.
900 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
902         * backtrace.c: #include <sys/types.h>.
904 2015-09-08  Ian Lance Taylor  <iant@google.com>
906         PR other/67457
907         * backtrace.c: #include "internal.h".
908         (struct backtrace_data): Add can_alloc field.
909         (unwind): If can_alloc is false, don't try to get file/line
910         information.
911         (backtrace_full): Set can_alloc field in bdata.
912         * alloc.c (backtrace_alloc): Don't call error_callback if it is
913         NULL.
914         * mmap.c (backtrace_alloc): Likewise.
915         * internal.h: Update comments for backtrace_alloc and
916         backtrace_free.
918 2015-09-08  Ian Lance Taylor  <iant@google.com>
920         PR other/67457
921         * mmap.c (backtrace_alloc): Correct test for mmap failure.
923 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
925         * configure.ac: For spu-*-* targets, set have_fcntl to no.
926         * configure: Regenerate.
928 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
930         * configure.ac: Remove [disable-shared] argument to LT_INIT.
931         Remove setting PIC_FLAG when building as target library.
932         * configure: Regenerate.
934 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
936         * configure.ac: Only compile with -fPIC if the target
937         supports it.
938         * configure: Regenerate.
940 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
942         * configure.ac: Set have_mmap to no on spu-*-* targets.
943         * configure: Regenerate.
945 2015-08-13  Ian Lance Taylor  <iant@google.com>
947         * dwarf.c (read_function_entry): Add vec_inlined parameter.
948         Change all callers.
950 2015-06-11  Martin Sebor  <msebor@redhat.com>
952         PR sanitizer/65479
953         * dwarf.c (struct line): Add new field idx.
954         (line_compare): Use it.
955         (add_line): Set it.
956         (read_line_info): Reset it.
958 2015-05-29  Tristan Gingold  <gingold@adacore.com>
960         * pecoff.c: New file.
961         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
962         * Makefile.in: Regenerate.
963         * filetype.awk: Detect pecoff.
964         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
965         Add pecoff.
966         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
967         true.
968         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
969         * configure: Regenerate.
970         * pecoff.c: New file.
972 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
974         * Makefile.in: Regenerated with automake-1.11.6.
975         * aclocal.m4: Likewise.
976         * configure: Likewise.
978 2015-01-24  Matthias Klose  <doko@ubuntu.com>
980         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
981         * configure: Regenerate.
983 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
985         Update copyright years.
987 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
989         PR bootstrap/63784
990         * configure: Regenerated.
992 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
994         * ChangeLog.jit: New.
996 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
998         PR target/63610
999         * configure: Regenerate.
1001 2014-10-23  Ian Lance Taylor  <iant@google.com>
1003         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1004         Fix to return void *.
1006 2014-05-08  Ian Lance Taylor  <iant@google.com>
1008         * mmap.c (backtrace_free): If freeing a large aligned block of
1009         memory, call munmap rather than holding onto it.
1010         (backtrace_vector_grow): When growing a vector, double the number
1011         of pages requested.  When releasing the old version of a grown
1012         vector, pass the correct size to backtrace_free.
1014 2014-03-07  Ian Lance Taylor  <iant@google.com>
1016         * sort.c (backtrace_qsort): Use middle element as pivot.
1018 2014-03-06  Ian Lance Taylor  <iant@google.com>
1020         * sort.c: New file.
1021         * stest.c: New file.
1022         * internal.h (backtrace_qsort): Declare.
1023         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1024         (read_line_info, read_function_entry): Likewise.
1025         (read_function_info, build_dwarf_data): Likewise.
1026         * elf.c (elf_initialize_syminfo): Likewise.
1027         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1028         (stest_SOURCES, stest_LDADD): Define.
1029         (check_PROGRAMS): Add stest.
1031 2014-02-07  Misty De Meo  <misty@brew.sh>
1033         PR target/58710
1034         * configure.ac: Use AC_LINK_IFELSE in check for
1035         _Unwind_GetIPInfo.
1036         * configure: Regenerate.
1038 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1040         Update copyright years
1042 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
1044         * elf.c (ET_DYN): Undefine and define again.
1045         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1046         return early -1 without closing the descriptor.
1047         (struct phdr_data): Add exe_descriptor.
1048         (phdr_callback): If pd->exe_descriptor is not -1, for very first
1049         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1050         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
1051         call to elf_add.
1052         (backtrace_initialize): Adjust call to elf_add.  If it returns
1053         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1055 2013-12-05  Ian Lance Taylor  <iant@google.com>
1057         * alloc.c (backtrace_vector_finish): Add error_callback and data
1058         parameters.  Call backtrace_vector_release.  Return address base.
1059         * mmap.c (backtrace_vector_finish): Add error_callback and data
1060         parameters.  Return address base.
1061         * dwarf.c (read_function_info): Get new address base from
1062         backtrace_vector_finish.
1063         * internal.h (backtrace_vector_finish): Update declaration.
1065 2013-11-27  Ian Lance Taylor  <iant@google.com>
1067         * dwarf.c (find_address_ranges): New static function, broken out
1068         of build_address_map.
1069         (build_address_map): Call it.
1070         * btest.c (check): Check for missing filename or function, rather
1071         than crashing.
1072         (f3): Check that enough frames were returned.
1074 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
1076         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1077         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1078         last argument.
1079         * btest.c (struct symdata): Add size field.
1080         (callback_three): Add symsize argument.  Copy it to the data->size
1081         field.
1082         (f23): Set symdata.size to 0.
1083         (test5): Likewise.  If sizeof (int) > 1, lookup address of
1084         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
1085         values.
1087         * atomic.c: Include sys/types.h.
1089 2013-11-18  Ian Lance Taylor  <iant@google.com>
1091         * configure.ac: Check for support of __atomic extensions.
1092         * internal.h: Declare or #define atomic functions for use in
1093         backtrace code.
1094         * atomic.c: New file.
1095         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1096         (dwarf_fileline, backtrace_dwarf_add): Likewise.
1097         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1098         (backtrace_initialize): Likewise.
1099         * fileline.c (fileline_initialize): Likewise.
1100         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1101         * configure, config.h.in, Makefile.in: Rebuild.
1103 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
1105         * elf.c (SHN_UNDEF): Define.
1106         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
1107         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
1108         (elf_add): Adjust caller.
1110         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1112 2013-11-16  Ian Lance Taylor  <iant@google.com>
1114         * backtrace.h (backtrace_create_state): Correct comment about
1115         threading.
1117 2013-11-15  Ian Lance Taylor  <iant@google.com>
1119         * backtrace.h (backtrace_syminfo): Update comment and parameter
1120         name to take any address, not just a PC value.
1121         * elf.c (STT_OBJECT): Define.
1122         (elf_nosyms): Rename parameter pc to addr.
1123         (elf_symbol_search): Rename local variable pc to addr.
1124         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1125         (elf_syminfo): Rename parameter pc to addr.
1126         * btest.c (global): New global variable.
1127         (test5): New test.
1128         (main): Call test5.
1130 2013-10-17  Ian Lance Taylor  <iant@google.com>
1132         * elf.c (elf_add): Don't get the wrong offsets if a debug section
1133         is missing.
1135 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
1137         * configure.ac: Add --enable-host-shared, setting up
1138         pre-existing PIC_FLAG variable within Makefile.am et al.
1139         * configure: Regenerate.
1141 2013-09-20  Alan Modra  <amodra@gmail.com>
1143         * configure: Regenerate.
1145 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1147         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1149 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1151         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1152         dl_iterate_phdr callbacks.
1154 2013-03-25  Ian Lance Taylor  <iant@google.com>
1156         * alloc.c: #include <sys/types.h>.
1157         * mmap.c: Likewise.
1159 2013-01-31  Ian Lance Taylor  <iant@google.com>
1161         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1162         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1164 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
1166         PR other/56076
1167         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1168         attribute was not seen.
1170 2013-01-16  Ian Lance Taylor  <iant@google.com>
1172         * dwarf.c (struct unit): Add filename and abs_filename fields.
1173         (build_address_map): Set new fields when reading unit.
1174         (dwarf_lookup_pc): If we don't find an entry in the line table,
1175         just return the main file name.
1177 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
1179         Update copyright years.
1181 2013-01-01  Ian Lance Taylor  <iant@google.com>
1183         PR bootstrap/54834
1184         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1185         $(MULTIBUILDTOP)/../../gcc/include.
1186         * Makefile.in: Rebuild.
1188 2013-01-01  Ian Lance Taylor  <iant@google.com>
1190         PR other/55536
1191         * mmap.c (backtrace_alloc): Don't call sync functions if not
1192         threaded.
1193         (backtrace_free): Likewise.
1195 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1197         * mmapio.c: Define MAP_FAILED if not defined.
1199 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
1201         PR bootstrap/54926
1202         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1203         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1204         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1205         accepts it.
1206         * Makefile.in: Regenerated.
1207         * configure: Regenerated.
1209 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
1211         PR bootstrap/54926
1212         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1213         * Makefile.in: Regenerated.
1215 2012-11-20  Ian Lance Taylor  <iant@google.com>
1217         * dwarf.c (read_attribute): Always clear val.
1219 2012-11-13  Ian Lance Taylor  <iant@google.com>
1221         PR other/55312
1222         * configure.ac: Only add -Werror if building a target library.
1223         * configure: Rebuild.
1225 2012-11-12  Ian Lance Taylor  <iant@google.com>
1226             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1227             Gerald Pfeifer  <gerald@pfeifer.com>
1229         * configure.ac: Check for getexecname.
1230         * fileline.c: #include <errno.h>.  Define getexecname if not
1231         available.
1232         (fileline_initialize): Try to find the executable in a few
1233         different ways.
1234         * print.c (error_callback): Only print the filename if it came
1235         from the backtrace state.
1236         * configure, config.h.in: Rebuild.
1238 2012-10-29  Ian Lance Taylor  <iant@google.com>
1240         * mmap.c (backtrace_vector_release): Correct last patch: add
1241         aligned, not size.
1243 2012-10-29  Ian Lance Taylor  <iant@google.com>
1245         * mmap.c (backtrace_vector_release): Make sure freed block is
1246         aligned on 8-byte boundary.
1248 2012-10-26  Ian Lance Taylor  <iant@google.com>
1250         PR other/55087
1251         * posix.c (backtrace_open): Add does_not_exist parameter.
1252         * elf.c (phdr_callback): Do not warn if shared library could not
1253         be opened.
1254         * fileline.c (fileline_initialize): Update calls to
1255         backtrace_open.
1256         * internal.h (backtrace_open): Update declaration.
1258 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
1260         PR target/55061
1261         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1262         * configure: Regenerate.
1264 2012-10-24  Ian Lance Taylor  <iant@google.com>
1266         PR target/55061
1267         * configure.ac: Check whether -funwind-tables option works.
1268         * configure: Rebuild.
1270 2012-10-11  Ian Lance Taylor  <iant@google.com>
1272         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1273         * configure: Rebuild.
1275 2012-10-10  Ian Lance Taylor  <iant@google.com>
1277         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1278         lower case.
1280 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
1282         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1284 2012-10-09  Ian Lance Taylor  <iant@google.com>
1286         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1287         (backtrace_dwarf_add): Likewise.
1289 2012-10-09  Ian Lance Taylor  <iant@google.com>
1291         Add support for tracing through shared libraries.
1292         * configure.ac: Check for link.h and dl_iterate_phdr.
1293         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
1294         ELF macros before #defining them.
1295         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1296         dl_iterate_phdr.
1297         (struct elf_syminfo_data): Add next field.
1298         (elf_initialize_syminfo): Initialize next field.
1299         (elf_add_syminfo_data): New static function.
1300         (elf_add): New static function, broken out of
1301         backtrace_initialize.  Call backtrace_dwarf_add instead of
1302         backtrace_dwarf_initialize.
1303         (struct phdr_data): Define.
1304         (phdr_callback): New static function.
1305         (backtrace_initialize): Call elf_add.
1306         * dwarf.c (struct dwarf_data): Add next and base_address fields.
1307         (add_unit_addr): Add base_address parameter.  Change all callers.
1308         (add_unit_ranges, build_address_map): Likewise.
1309         (add_line): Add ddata parameter.  Change all callers.
1310         (read_line_program, add_function_range): Likewise.
1311         (dwarf_lookup_pc): New static function, broken out of
1312         dwarf_fileline.
1313         (dwarf_fileline): Call dwarf_lookup_pc.
1314         (build_dwarf_data): New static function.
1315         (backtrace_dwarf_add): New function.
1316         (backtrace_dwarf_initialize): Remove.
1317         * internal.h (backtrace_dwarf_initialize): Don't declare.
1318         (backtrace_dwarf_add): Declare.
1319         * configure, config.h.in: Rebuild.
1321 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
1323         * btest.c (f23): Avoid uninitialized variable warning.
1325 2012-10-04  Ian Lance Taylor  <iant@google.com>
1327         * dwarf.c: If the system header files do not declare strnlen,
1328         provide our own version.
1330 2012-10-03  Ian Lance Taylor  <iant@google.com>
1332         * dwarf.c (read_uleb128): Fix overflow test.
1333         (read_sleb128): Likewise.
1334         (build_address_map): Don't change unit_buf.start.
1336 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
1338         PR other/54761
1339         * configure.ac (EXTRA_FLAGS): New.
1340         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1341         * configure, Makefile.in: Regenerate.
1343 2012-09-29  Ian Lance Taylor  <iant@google.com>
1345         PR other/54749
1346         * fileline.c (fileline_initialize): Pass errnum as -1 when
1347         reporting that we could not read executable information after a
1348         previous failure.
1350 2012-09-27  Ian Lance Taylor  <iant@google.com>
1352         PR bootstrap/54732
1353         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1354         * Makefile.am: Add dependencies for all objects.
1355         * configure, aclocal.m4, Makefile.in: Rebuild.
1357 2012-09-27  Ian Lance Taylor  <iant@google.com>
1359         PR other/54726
1360         * elf.c (backtrace_initialize): Set *fileln_fn, not
1361         state->fileln_fn.
1363 2012-09-19  Ian Lance Taylor  <iant@google.com>
1365         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1366         as a target library.
1367         * configure: Rebuild.
1369 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1370             Ian Lance Taylor  <iant@google.com>
1372         * configure.ac (GCC_HEADER_STDINT): Invoke.
1373         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1374         * btest.c: Don't include <stdint.h>.
1375         * dwarf.c: Likewise.
1376         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1378 2012-09-18  Ian Lance Taylor  <iant@google.com>
1380         PR bootstrap/54623
1381         * Makefile.am (AM_CPPFLAGS): Define.
1382         (AM_CFLAGS): Remove -I options.
1383         * Makefile.in: Rebuild.
1385 2012-09-18  Ian Lance Taylor  <iant@google.com>
1387         * posix.c (O_BINARY): Define if not defined.
1388         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
1389         HAVE_FCNTL is defined.
1390         * configure.ac: Test for the fcntl function.
1391         * configure, config.h.in: Rebuild.
1393 2012-09-18  Ian Lance Taylor  <iant@google.com>
1395         * btest.c (test1, test2, test3, test4): Add the unused attribute.
1397 2012-09-18  Ian Lance Taylor  <iant@google.com>
1399         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1401 2012-09-18  Ian Lance Taylor  <iant@google.com>
1403         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1404         * mmapio.c: Don't define _GNU_SOURCE.
1405         * configure, config.h.in: Rebuild.
1407 2012-09-18  Ian Lance Taylor  <iant@google.com>
1409         * configure.ac: Check whether strnlen is declared.
1410         * dwarf.c: Declare strnlen if not declared.
1411         * configure, config.h.in: Rebuild.
1413 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1415         * fileline.c: Include <stdlib.h>.
1416         * mmap.c: Likewise.
1418 2012-09-17  Ian Lance Taylor  <iant@google.com>
1420         PR bootstrap/54611
1421         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
1422         parameter.
1424 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
1426         PR bootstrap/54611
1427         * nounwind.c (backtrace_simple): Add state parameter.
1429 2012-09-17  Ian Lance Taylor  <iant@google.com>
1431         PR bootstrap/54609
1432         * unknown.c (unknown_fileline): Add state parameter, remove
1433         fileline_data parameter, name error_callback parameter.
1434         (backtrace_initialize): Add state parameter.
1436 2012-09-17  Ian Lance Taylor  <iant@google.com>
1438         * Initial implementation.
1440 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1442 Copying and distribution of this file, with or without modification,
1443 are permitted in any medium without royalty provided the copyright
1444 notice and this notice are preserved.