libstdc++: Define __cpp_lib_three_way_comparison conditionally
[official-gcc.git] / libbacktrace / ChangeLog
blob5a0fa2985272b044731aec6b6fdf4417676c71c6
1 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
3         Update copyright years.
5 2019-12-13  Ian Lance Taylor  <iant@golang.org>
7         Add DWARF 5 support.
8         * dwarf.c (struct attr): Add val field.
9         (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
10         ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
11         (struct line_header): Add addrsize field.
12         (struct line_header_format): Define.
13         (struct unit): Add str_offsets_base, addr_base, and rnglists_base
14         fields.
15         (read_uint24): New static function.
16         (read_attribute): Add implicit_val parameter.  Replace dwarf_str
17         and dwarf_str_size parameters with dwarf_sections parameter.  Add
18         support for new DWARF 5 forms.  Change all callers.
19         (resolve_string): New static function.
20         (resolve_addr_index): Likewise.
21         (read_abbrevs): Support DW_FORM_implicit_const.
22         (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
23         and ranges_is_index fields.
24         (update_pcrange): Support DWARF 5 encodings.
25         (add_high_low_range): New static function, split out of
26         add_ranges.
27         (add_ranges_from_ranges): Likewise.
28         (add_ranges_from_rnglists): New static function.
29         (add_ranges): Just call new helper functions.
30         (find_address_ranges): Use resolve_string for strings, after
31         reading all attributes.  Handle new DWARF 5 attributes.
32         (build_address_map): Support DWARF 5 compilation units.
33         (read_v2_paths): New static function, split out of
34         read_line_header.
35         (read_lnct): New static function.
36         (read_line_header_format_entries): Likewise.
37         (read_line_header): Add ddata parameter.  Support DWARF 5 line
38         headers.  Call new helper functions.  Change all callers.
39         (read_line_program): Use addrsize from line program header.  Don't
40         special case directory index 0 for DWARF 5.
41         (read_referenced_name): Use resolve_string.
42         (read_function_entry): Handle DWARF 5 encodings.  Use
43         resolve_string.
44         * internal.h (enum dwarf_section): Add DEBUG_ADDR,
45         DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
46         * elf.c (dwarf_section_names): Add new section names.
47         * pecoff.c (dwarf_section_names): Likewise.
48         * xcoff.c (xcoff_add): Clear dwarf_sections before setting
49         fields.
50         * configure.ac: Define HAVE_DWARF5 automake conditional.
51         * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
52         (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
53         (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
54         (dwarf5_alloc_LDADD): Likewise.
55         (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
56         (CLEANFILES, clean-local): Define.
58 2019-12-08  Ian Lance Taylor  <iant@golang.org>
60         * dwarf.c (struct pcrange): Define.
61         (update_pcrange, add_ranges): New static functions.
62         (add_unit_addr): Change signature to work with add_ranges.  Don't
63         add base_address here.
64         (add_unit_ranges): Remove.
65         (find_address_ranges): Replace str/ranges parameters with
66         dwarf_sections.  Use update_pcrange and add_ranges.  Change all
67         callers.
68         (add_function_range): Change signature to work with add_ranges.
69         Don't add base_address here.
70         (add_function_ranges): Remove.
71         (read_function_entry): Use update_pcrange and add_ranges.
73 2019-12-04  Ian Lance Taylor  <iant@golang.org>
75         * edtest.c (test1): Add noclone attribute.
77 2019-12-04  Ian Lance Taylor  <iant@golang.org>
79         * internal.h (enum dwarf_section): Define.
80         (struct dwarf_sections): Define.
81         (backtrace_dwarf_add): Update declaration to replace specific
82         section parameters with dwarf_sections parameter.
83         * dwarf.c (struct dwarf_data): Replace specific section fields
84         with dwarf_sections field.
85         (read_attribute): Use dwarf_sections with altlink.
86         (build_address_map): Replace specific section parameters with
87         dwarf_sections parameter.  Change all callers.
88         (read_line_info): Use dwarf_sections with ddata.
89         (read_referenced_name): Likewise.
90         (add_function_ranges): Likewise.
91         (read_function_entry): Likewise.
92         (read_function_info): Likewise.
93         (build_dwarf_data): Replace specific section parameters with
94         dwarf_sections parameter.  Change all callers.
95         (backtrace_dwarf_add): Likewise.
96         * elf.c (enum debug_section): Remove.
97         (dwarf_section_names): Remove .zdebug names.
98         (elf_add): Track zsections separately.  Build dwarf_sections.
99         * pecoff.c (enum debug_section): Remove.
100         (struct debug_section_info): Remove data field.
101         (coff_add): Build dwarf_sections.
102         * xcoff.c (enum dwarf_section): Remove.  Replace DWSECT_xxx
103         references with DEBUG_xxx references.
104         (xcoff_add): Build dwarf_sections.
106 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
108         * configure: Regenerate.
110 2019-09-26  Ian Lance Taylor  <iant@golang.org>
112         PR libbacktrace/91908
113         * pecoff.c (backtrace_initialize): Explicitly cast unchecked
114         __sync_bool_compare_and_swap to void.
115         * xcoff.c (backtrace_initialize): Likewise.
117 2019-09-03  Ulrich Weigand  <uweigand@de.ibm.com>
119         * configure.ac: Remove references to spu.
120         * configure: Regenerate.
122 2019-05-24  Clement Chigot  <clement.chigot@atos.net>
124         * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
125         test_elf_64.
126         * Makefile.in: Regenerate.
128 2019-05-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
130         * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
131         handling.
132         * configure: Regenerate.
134 2019-03-11  Ian Lance Taylor  <iant@golang.org>
136         PR libbacktrace/89669
137         * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
138         HAVE_ELF.
139         * Makefile.in: Regenerate.
141 2019-02-26  Tom de Vries  <tdevries@suse.de>
143         * btest.c (test5): Allow global.* as minimal symbol name for global.
145 2019-02-26  Tom de Vries  <tdevries@suse.de>
147         * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
148         * Makefile.in: Regenerate.
150 2019-02-12  Tom de Vries  <tdevries@suse.de>
152         PR libbacktrace/81983
153         * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
155 2019-02-10  Tom de Vries  <tdevries@suse.de>
157         * Makefile.am (BUILDTESTS): Add btest_lto.
158         * Makefile.in: Regenerate.
159         * btest.c (test1, f2, f3, test3, f22, f23): Declare with
160         __attribute__((noclone)).
162 2019-02-08  Tom de Vries  <tdevries@suse.de>
164         * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
165         * print.c (backtrace_print): Same.
166         * simple.c (backtrace_simple): Same.
168 2019-02-08  Tom de Vries  <tdevries@suse.de>
170         PR libbacktrace/78063
171         * dwarf.c (build_address_map): Keep all parsed units.
172         (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
174 2019-01-31  Tom de Vries  <tdevries@suse.de>
176         PR libbacktrace/89136
177         * elf.c (elf_add): Read build-id if with_buildid_data.  Fix
178         'debugaltlink_name_len =+ 1'.
180 2019-01-29  Tom de Vries  <tdevries@suse.de>
182         * install-debuginfo-for-buildid.sh.in: New script.
183         * Makefile.am (check_PROGRAMS): Add b2test and b3test.
184         (TESTS): Add b2test_buildid and b3test_dwz_buildid.
185         * Makefile.in: Regenerate.
186         * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
187         (READELF): Set with AC_CHECK_PROG.
188         (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
189         * configure: Regenerate.
190         * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
191         (elf_open_debugfile_by_buildid): ... here.
193 2019-01-29  Tom de Vries  <tdevries@suse.de>
195         * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
196         allocfail.
197         (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
198         (check_PROGRAMS): Add BUILDTESTS.
199         * Makefile.in: Regenerate.
201 2019-01-28  Tom de Vries  <tdevries@suse.de>
203         * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
204         Use $< to access prerequisite.
205         * Makefile.in: Regenerate.
207 2019-01-25  Nathan Sidwell  <nathan@acm.org>
209         * elf.c (elf_add): Pass "" filename to recursive call with
210         separated debug.
212 2019-01-25  Tom de Vries  <tdevries@suse.de>
214         * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
215         filename == "".
216         * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
217         * Makefile.in: Regenerate.
219 2019-01-25  Tom de Vries  <tdevries@suse.de>
221         * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
222         (TESTS): Rename dtest to btest_gnudebuglink.
223         * Makefile.in: Regenerate.
225 2019-01-23  Tom de Vries  <tdevries@suse.de>
227         * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
228         (units_search, find_unit): Use size_t for offset.
229         (build_address_map): Use size_t for unit_offset.
231 2019-01-20  Gerald Pfeifer  <gerald@pfeifer.com>
233         * allocfail.c (main): Increase portability of printf statement.
235 2019-01-18  Ian Lance Taylor  <iant@golang.org>
237         PR libbacktrace/88890
238         * mmapio.c (backtrace_get_view): Change size parameter to
239         uint64_t.  Check that value fits in size_t.
240         * read.c (backtrace_get_view): Likewise.
241         * internal.h (backtrace_get_view): Update declaration.
242         * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
244 2019-01-17  Tom de Vries  <tdevries@suse.de>
246         PR libbacktrace/82857
247         * configure.ac (DWZ): Set with AC_CHECK_PROG.
248         (HAVE_DWZ): Set with AM_CONDITIONAL.
249         * configure: Regenerate.
250         * Makefile.am (TESTS): Add btest_dwz.
251         * Makefile.in: Regenerate.
253 2019-01-17  Tom de Vries  <tdevries@suse.de>
255         PR libbacktrace/82857
256         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
257         (read_attribute): Handle DW_FORM_GNU_ref_alt using
258         ATTR_VAL_REF_ALT_INFO.
259         (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
261 2019-01-17  Tom de Vries  <tdevries@suse.de>
263         * dwarf.c (struct unit): Add low_offset and high_offset fields.
264         (struct unit_vector): New type.
265         (struct dwarf_data): Add units and units_counts fields.
266         (find_unit): New function.
267         (find_address_ranges): Add and handle unit_tag parameter.
268         (build_address_map): Add and handle units_vec parameter.
269         (build_dwarf_data): Pass units_vec to build_address_map.  Store resulting
270         units vector.
272 2019-01-17  Tom de Vries  <tdevries@suse.de>
274         PR libbacktrace/82857
275         * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
276         using altlink.
278 2019-01-17  Tom de Vries  <tdevries@suse.de>
280         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
281         (read_attribute): Add altlink parameter.  Handle missing altlink for
282         DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
283         (find_address_ranges, build_address_map, build_dwarf_data): Add and
284         handle altlink parameter.
285         (read_referenced_name, read_function_entry): Add argument to
286         read_attribute call.
288 2019-01-17  Tom de Vries  <tdevries@suse.de>
290         * dwarf.c (struct dwarf_data): Add altlink field.
291         (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
292         * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
293         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
294         * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
295         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
296         * xcoff.c (xcoff_add): Same.
298 2019-01-17  Tom de Vries  <tdevries@suse.de>
300         * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
301         * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
302         * elf.c (elf_add): Add and handle fileline_entry parameter.  Add
303         argument to backtrace_dwarf_add call.
304         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
305         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
306         * xcoff.c (xcoff_add): Same.
308 2019-01-17  Tom de Vries  <tdevries@suse.de>
310         * elf.c (elf_add): Add and handle with_buildid_data and
311         with_buildid_size parameters.  Handle .gnu_debugaltlink section.
312         (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
314 2019-01-16  Tom de Vries  <tdevries@suse.de>
316         * dwarf.c (read_referenced_name_from_attr): New function.  Factor out
317         of ...
318         (read_referenced_name): ... here, and ...
319         (read_function_entry): ... here.
321 2019-01-16  Tom de Vries  <tdevries@suse.de>
323         * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
324         name.
325         (read_function_entry): Same.  Don't allow name found via
326         DW_AT_abstract_origin or case DW_AT_specification to override linkage
327         name.
329 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
331         PR other/16615
333         * backtrace.h: Mechanically replace "can not" with "cannot".
335 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
337         Update copyright years.
339 2018-12-29  Gerald Pfeifer  <gerald@pfeifer.com>
341         * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
342         in sed pattern.
343         * Makefile.in: Regenerate.
345 2018-12-28  Tom de Vries  <tdevries@suse.de>
347         * dwarf.c (build_address_map): Reuse unused units.
349 2018-12-28  Tom de Vries  <tdevries@suse.de>
351         * dwarf.c (build_address_map): Simplify by removing local variable
352         abbrevs.
354 2018-12-28  Ian Lance Taylor  <iant@golang.org>
355             Tom de Vries  <tdevries@suse.de>
357         PR libbacktrace/88063
358         * dwarf.c (free_unit_addrs_vector): Remove.
359         (build_address_map): Keep track of allocated units in vector.  Free
360         allocated units and corresponding abbrevs upon failure.  Remove now
361         redundant call to free_unit_addrs_vector.  Free addrs vector upon
362         failure.  Free allocated unit vector.
364 2018-12-28  Tom de Vries  <tdevries@suse.de>
366         * dwarf.c (build_address_map): Free addrs vector upon failure.
368 2018-12-14  Tom de Vries  <tdevries@suse.de>
370         PR testsuite/88491
371         * allocfail.sh: Remove "set -o pipefail".
373 2018-12-12  Tom de Vries  <tdevries@suse.de>
375         * Makefile.am (TESTS): Add allocfail.sh.
376         (check_PROGRAMS): Add allocfail.
377         * Makefile.in: Regenerate.
378         * instrumented_alloc.c: New file.  Redefine malloc and realloc.
379         Include alloc.c.
380         * allocfail.c: New file.
381         * allocfail.sh: New file.
383 2018-11-30  Tom de Vries  <tdevries@suse.de>
385         * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
386         test_xcoff_64, test_pecoff and test_unknown.
387         * Makefile.in: Regenerate.
388         * test_format.c: New file.
390 2018-11-30  Tom de Vries  <tdevries@suse.de>
392         * Makefile.am : Add _with_alloc version for each test in
393         check_PROGRAMS.
394         * Makefile.in: Regenerate.
396 2018-11-30  Tom de Vries  <tdevries@suse.de>
398         * internal.h (backtrace_vector_free): New static inline fuction,
399         factored out of ...
400         * dwarf.c (read_line_info): ... here.
402 2018-11-28  Tom de Vries  <tdevries@suse.de>
404         * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
405         failure.
407 2018-11-27  Tom de Vries  <tdevries@suse.de>
409         * mmap.c (backtrace_vector_release): Same.
410         * unittest.c (test1): Add check.
412 2018-11-27  Tom de Vries  <tdevries@suse.de>
414         * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
415         instead of realloc.
416         * Makefile.am (check_PROGRAMS): Add unittest.
417         * Makefile.in: Regenerate.
418         * unittest.c: New file.
420 2018-11-22  Tom de Vries  <tdevries@suse.de>
422         * dwarf.c (read_initial_length): Factor out of ...
423         (build_address_map, read_line_info): ... here.
425 2018-11-21  Tom de Vries  <tdevries@suse.de>
427         * dwarf.c (read_string): Factor out of ...
428         (read_attribute, read_line_header, read_line_program): ... here.
430 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
432         PR bootstrap/82856
433         * Makefile.am: Include multilib.am.
434         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
435         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
437 2018-10-05  Ian Lance Taylor  <iant@golang.org>
439         PR libbacktrace/87529
440         * backtrace.h: Document that backtrace_create_state should be
441         called only once.
443 2018-08-05 Iain Buclaw  <ibuclaw@gdcproject.org>
445         * configure.ac: Move define of HAVE_ZLIB into check for -lz.
446         * Makefile.in: Regenerate.
447         * config.h.in: Likewise.
448         * configure: Likewise.
450 2018-08-01  Tony Reix  <tony.reix@atos.net>
452         * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
453         (struct xcoff_func, struct xcoff_func_vector): New structs.
454         (xcoff_syminfo): Drop leading dot from symbol name.
455         (xcoff_line_compare, xcoff_line_search): Remove.
456         (xcoff_func_compare, xcoff_func_search): New static functions.
457         (xcoff_lookup_pc): Search function table.
458         (xcoff_add_line, xcoff_process_linenos): Remove.
459         (xcoff_initialize_fileline): Build function table.
461 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
463         PR other/86198
464         * elf.c (elf_add): Increase ".note.gnu.build-id" section size
465         checking up to 36 bytes.
467 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
469         * configure: Regenerated.
471 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
473         * configure: Regenerated.
475 2018-04-17  Ian Lance Taylor  <iant@golang.org>
477         * backtrace.c: Revert last two changes.  Don't call mmap
478         directly.
480 2018-04-17  Ian Lance Taylor  <iant@golang.org>
482         * backtrace.c: Include backtrace-supported.h before checking
483         BACKTRACE_USES_MALLOC.
485 2018-04-17  Ian Lance Taylor  <iant@golang.org>
487         * backtrace.c (backtrace_full): When testing whether we can
488         allocate memory, call mmap directly, and munmap the memory.
490 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
492         PR other/85161
493         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
494         big endian, only use 32-bit loads if endianity macros are predefined
495         and indicate big or little endian.
497 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
499         PR target/84148
500         * configure: Regenerate.
502 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
504         PR other/82368
505         * elf.c (SHT_PROGBITS): Undefine and define.
507 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
509         PR other/82368
510         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
511         (struct elf_ppc64_opd_data): New type.
512         (elf_initialize_syminfo): Add opd argument, handle symbols
513         pointing into the PowerPC64 ELFv1 .opd section.
514         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
515         to structure with .opd data to elf_initialize_syminfo.
517 2018-01-31  Ian Lance Taylor  <iant@golang.org>
519         * elf.c (elf_add): Close descriptor if we use a debugfile.
520         * btest.c (check_open_files): New static function.
521         (main): Call check_open_files.
523 2018-01-25  Ian Lance Taylor  <iant@golang.org>
525         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
526         desired CRC is zero.
527         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
529 2018-01-25  Ian Lance Taylor  <iant@golang.org>
531         * pecoff.c (coff_add): Only release syms_view if it is valid.
533 2018-01-25  Ian Lance Taylor  <iant@golang.org>
535         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
537 2018-01-24  Ian Lance Taylor  <iant@golang.org>
539         * pecoff.c (coff_add): Use coff_read4, not memcpy.
541 2018-01-24  Ian Lance Taylor  <iant@golang.org>
543         PR other/68239
544         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
545         on the free list.
547 2018-01-19  Tony Reix  <tony.reix@atos.net>
549         * xcoff.c (xcoff_incl_compare): New function.
550         (xcoff_incl_search): New function.
551         (xcoff_process_linenos): Use bsearch to find include file.
552         (xcoff_initialize_fileline): Sort include file information.
554 2018-01-16  Ian Lance Taylor  <iant@golang.org>
556         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
557         288.
558         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
559         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
560         (elf_zlib_default_table): Update.
561         (elf_zlib_default_dist_table): New static array.
562         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
563         for block type 1.
564         * ztest.c (struct zlib_test): Add uncompressed_len.
565         (tests): Initialize uncompressed_len field.  Add new test case.
566         (test_samples): Use uncompressed_len field.
568 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
570         Update copyright years.
572 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
574         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
575         * aclocal.m4: Regenerate.
576         * Makefile.in: Likewise.
577         * configure: Likewise.
579 2017-10-06  Ian Lance Taylor  <iant@golang.org>
581         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
582         zlib uncompress function.
584 2017-10-05  Ian Lance Taylor  <iant@golang.org>
586         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
587         Read a four byte integer.
588         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
589         boundary before ever calling elf_zlib_fetch.
590         * ztest.c (test_large): Simplify print statements a bit.
592 2017-10-02  Ian Lance Taylor  <iant@golang.org>
594         * ztest.c: #include <errno.h>.
595         (TEST_TIMING): Don't define, don't test.
596         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
597         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
598         (ZLIB_CLOCK_GETTIME_ARG): Define.
599         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
600         * Makefile.am: Likewise.
601         * configure, Makefile.in: Rebuild.
603 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
605         PR other/67165
606         * Makefile.am: Append the content of clock_gettime_link to
607         ztest_LDADD.
608         * configure.ac: Test for the case that clock_gettime is in librt.
609         * Makefile.in: Regenerate.
610         * configure: Likewise.
612         PR other/67165
613         * configure.ac: Check for clock_gettime.
614         * config.h.in: Regenerate.
615         * configure: Likewise.
616         * ztest.c (average_time, test_large): Conditionalize test timing
617         on clock_gettime availability.
619 2017-09-29  Tony Reix  <tony.reix@atos.net>
621         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
622         (STYP_DWARF, SSUBTYP_DW*): Define.
623         (enum dwarf_section): Define.
624         (struct dwsect_info): Define.
625         (xcoff_add): Look for DWARF sections, pass them to
626         backtrace_dwarf_add.
628 2017-09-28  Ian Lance Taylor  <iant@golang.org>
630         PR other/67165
631         * elf.c (__builtin_prefetch): Define if not __GNUC__.
632         (unlikely): Define.
633         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
634         (b_elf_chdr): Define type.
635         (enum debug_section): Add ZDEBUG_xxx values.
636         (debug_section_names): Add names for new sections.
637         (struct debug_section_info): Add compressed field.
638         (elf_zlib_failed, elf_zlib_fetch): New static functions.
639         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
640         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
641         (HUFFMAN_SECONDARY_SHIFT): Define.
642         (ZDEBUG_TABLE_SIZE): Define.
643         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
644         (final_next_secondary): New static variable if
645         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
646         (elf_zlib_inflate_table): New static function.
647         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
648         function to produce fixed Huffman table.
649         (elf_zlib_default_table): New static variable.
650         (elf_zlib_inflate): New static function.
651         (elf_zlib_verify_checksum): Likewise.
652         (elf_zlib_inflate_and_verify): Likewise.
653         (elf_uncompress_zdebug): Likewise.
654         (elf_uncompress_chdr): Likewise.
655         (backtrace_uncompress_zdebug): New extern function.
656         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
657         sections, and uncompress them.
658         * internal.h (backtrace_compress_zdebug): Declare.
659         * ztest.c: New file.
660         * configure.ac: Check for -lz and check whether the linker
661         supports --compress-debug-sections.
662         * Makefile.am (ztest_SOURCES): New variable.
663         (ztest_CFLAGS, ztest_LDADD): New variables.
664         (check_PROGRAMS): Add ztest.
665         (ctestg_SOURCES): New variable.
666         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
667         (ctesta_SOURCES): New variable.
668         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
669         (check_PROGRAMS): Add ctestg and ctesta.
670         * configure, config.h.in, Makefile.in: Rebuild.
672 2017-09-22  Ian Lance Taylor  <iant@golang.org>
674         PR sanitizer/77631
675         * configure.ac: Check for lstat and readlink.
676         * elf.c (lstat, readlink): Provide dummy versions if real versions
677         are not available.
678         * configure, config.h.in: Rebuild.
680 2017-09-21  Ian Lance Taylor  <iant@google.com>
682         PR go/82284
683         * elf.c (backtrace_initialize): Set pd.exe_filename.
685 2017-09-20  Ian Lance Taylor  <iant@golang.org>
686             Denis Khalikov  <d.khalikov@partner.samsung.com>
688         PR sanitizer/77631
689         Support for external debug info.
690         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
691         (S_ISLNK): Define if not defined.
692         (xstrnlen): Define if strnlen is not available.
693         (b_elf_note): Define type.
694         (NT_GNU_BUILD_ID): Define macro.
695         (elf_crc32, elf_crc32_file): New static functions.
696         (elf_is_symlink, elf_readlink): New static functions.
697         (elf_open_debugfile_by_buildid): New static function.
698         (elf_try_debugfile): New static function.
699         (elf_find_debugfile_by_debuglink): New static function.
700         (elf_open_debugfile_by_debuglink): New static function.
701         (elf_add): Add filename and debuginfo parameters.  Adjust all
702         callers.  Look for external debug info notes, and try to fetch
703         debug info from external file.
704         (struct phdr_data): Add exe_filename field.
705         (phdr_callback): Pass filename to elf_add.
706         (backtrace_initialize): Add filename parameter.
707         * internal.h (backtrace_initialize): Add filename parameter.
708         * fileline.c (fileline_initialize): Pass filename to
709         backtrace_initialize.
710         * pecoff.c (fileline_initialize): Add unused filename parameter.
711         * unknown.c (fileline_initialize): Likewise.
712         * xcoff.c (fileline_initialize): Likewise.
713         * configure.ac: Check for objcopy --add-gnu-debuglink.
714         * Makefile.am (dtest): New test target.
715         * configure, Makefile.in: Rebuild.
717 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
719         PR other/81096
720         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
721         * Makefile.in: Regenerate.
723 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
725         PR other/81096
726         * libbacktrace/Makefile.in
727         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
729 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
731         PR bootstrap/81638
732         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
734 2017-07-28  Tony Reix  <tony.reix@atos.net>
736         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
738 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
740         * fileline.c (fileline_initialize): Print pid_t as long.
742 2017-07-26  Tony Reix  <tony.reix@atos.net>
744         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
745         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
746         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
747         * configure, config.h.in: Regenerate.
749 2017-07-21  Tony Reix  <tony.reix@atos.net>
751         * filetype.awk: Add AIX XCOFF type detection.
752         * configure.ac: Recognize xcoff format.
753         * Makefile.am (FORMAT_FILES): Add xcoff.c.
754         * fileline.c: Include <unistd.h>.
755         (fileline_initialize): Add case for AIX procfs.
756         * xcoff.c: New file.
757         * configure, Makefile.in: Rebuild.
759 2017-06-21  Richard Biener  <rguenther@suse.de>
761         * configure.ac: Add AC_SYS_LARGEFILE.
762         * config.h.in: Regenerate.
763         * configure: Likewise.
765 2017-06-11  Ian Lance Taylor  <iant@golang.org>
767         * elf.c (backtrace_initialize): Always set *fileline_fn.
768         * ttest.c: New file.
769         * btest.c: Move support functions into testlib.c.  Change calls to
770         check to pass file name.
771         * testlib.c: New file, copied from (part of) btest.c.
772         * testlib.h: New file, declarations for testlib.c.
773         * edtest.c: Use testlib.h and testlib.c.
774         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
775         * Makefile.am (btest_SOURCES): Add testlib.c.
776         (edtest_SOURCES): Likewise.
777         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
778         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
779         * configure, Makefile.in: Rebuild.
781 2017-05-19  Than McIntosh  <thanm@google.com>
783         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
784         (read_line_header): Don't allocate dirs if dirs_count == 0.
785         * edtest.c: New file.
786         * edtest2.c: New file.
787         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
788         (check_PROGRAMS): Add edtest.
789         (edtest2_build.c, gen_edtest2_build): New targets.
790         * Makefile.in: Rebuild.
792 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
794         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
795         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
797 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
799         Update copyright years.
801 2016-11-15  Matthias Klose  <doko@ubuntu.com>
803         * configure: Regenerate.
805 2016-09-11  Carlos Liam  <carlos@aarzee.me>
807         * all: Remove meaningless trailing whitespace.
809 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
811         PR target/71161
812         * elf.c (phdr_callback) [__i386__]: Add
813         __attribute__((__force_align_arg_pointer__)).
815 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
817         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
818         avoid possible crash.
819         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
820         missing debug info anymore.
822 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
824         * mmap.c (MAP_FAILED): Define if not defined.
826 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
828         Update copyright years.
830 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
832         * configure.ac: Specify that DJGPP do not have mmap
833         even when sys/mman.h exists.
834         * configure: Regenerate
836 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
838         PR libgfortran/68115
839         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
840         * configure: Regenerate.
841         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
842         to void.
844 2015-09-17  Ian Lance Taylor  <iant@google.com>
846         * posix.c (backtrace_open): Cast second argument of open() to int.
848 2015-09-11  Ian Lance Taylor  <iant@google.com>
850         * Makefile.am (backtrace.lo): Depend on internal.h.
851         (sort.lo, stest.lo): Add explicit dependencies.
852         * Makefile.in: Rebuild.
854 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
856         * backtrace.c: #include <sys/types.h>.
858 2015-09-08  Ian Lance Taylor  <iant@google.com>
860         PR other/67457
861         * backtrace.c: #include "internal.h".
862         (struct backtrace_data): Add can_alloc field.
863         (unwind): If can_alloc is false, don't try to get file/line
864         information.
865         (backtrace_full): Set can_alloc field in bdata.
866         * alloc.c (backtrace_alloc): Don't call error_callback if it is
867         NULL.
868         * mmap.c (backtrace_alloc): Likewise.
869         * internal.h: Update comments for backtrace_alloc and
870         backtrace_free.
872 2015-09-08  Ian Lance Taylor  <iant@google.com>
874         PR other/67457
875         * mmap.c (backtrace_alloc): Correct test for mmap failure.
877 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
879         * configure.ac: For spu-*-* targets, set have_fcntl to no.
880         * configure: Regenerate.
882 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
884         * configure.ac: Remove [disable-shared] argument to LT_INIT.
885         Remove setting PIC_FLAG when building as target library.
886         * configure: Regenerate.
888 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
890         * configure.ac: Only compile with -fPIC if the target
891         supports it.
892         * configure: Regenerate.
894 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
896         * configure.ac: Set have_mmap to no on spu-*-* targets.
897         * configure: Regenerate.
899 2015-08-13  Ian Lance Taylor  <iant@google.com>
901         * dwarf.c (read_function_entry): Add vec_inlined parameter.
902         Change all callers.
904 2015-06-11  Martin Sebor  <msebor@redhat.com>
906         PR sanitizer/65479
907         * dwarf.c (struct line): Add new field idx.
908         (line_compare): Use it.
909         (add_line): Set it.
910         (read_line_info): Reset it.
912 2015-05-29  Tristan Gingold  <gingold@adacore.com>
914         * pecoff.c: New file.
915         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
916         * Makefile.in: Regenerate.
917         * filetype.awk: Detect pecoff.
918         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
919         Add pecoff.
920         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
921         true.
922         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
923         * configure: Regenerate.
924         * pecoff.c: New file.
926 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
928         * Makefile.in: Regenerated with automake-1.11.6.
929         * aclocal.m4: Likewise.
930         * configure: Likewise.
932 2015-01-24  Matthias Klose  <doko@ubuntu.com>
934         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
935         * configure: Regenerate.
937 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
939         Update copyright years.
941 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
943         PR bootstrap/63784
944         * configure: Regenerated.
946 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
948         * ChangeLog.jit: New.
950 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
952         PR target/63610
953         * configure: Regenerate.
955 2014-10-23  Ian Lance Taylor  <iant@google.com>
957         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
958         Fix to return void *.
960 2014-05-08  Ian Lance Taylor  <iant@google.com>
962         * mmap.c (backtrace_free): If freeing a large aligned block of
963         memory, call munmap rather than holding onto it.
964         (backtrace_vector_grow): When growing a vector, double the number
965         of pages requested.  When releasing the old version of a grown
966         vector, pass the correct size to backtrace_free.
968 2014-03-07  Ian Lance Taylor  <iant@google.com>
970         * sort.c (backtrace_qsort): Use middle element as pivot.
972 2014-03-06  Ian Lance Taylor  <iant@google.com>
974         * sort.c: New file.
975         * stest.c: New file.
976         * internal.h (backtrace_qsort): Declare.
977         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
978         (read_line_info, read_function_entry): Likewise.
979         (read_function_info, build_dwarf_data): Likewise.
980         * elf.c (elf_initialize_syminfo): Likewise.
981         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
982         (stest_SOURCES, stest_LDADD): Define.
983         (check_PROGRAMS): Add stest.
985 2014-02-07  Misty De Meo  <misty@brew.sh>
987         PR target/58710
988         * configure.ac: Use AC_LINK_IFELSE in check for
989         _Unwind_GetIPInfo.
990         * configure: Regenerate.
992 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
994         Update copyright years
996 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
998         * elf.c (ET_DYN): Undefine and define again.
999         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1000         return early -1 without closing the descriptor.
1001         (struct phdr_data): Add exe_descriptor.
1002         (phdr_callback): If pd->exe_descriptor is not -1, for very first
1003         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1004         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
1005         call to elf_add.
1006         (backtrace_initialize): Adjust call to elf_add.  If it returns
1007         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1009 2013-12-05  Ian Lance Taylor  <iant@google.com>
1011         * alloc.c (backtrace_vector_finish): Add error_callback and data
1012         parameters.  Call backtrace_vector_release.  Return address base.
1013         * mmap.c (backtrace_vector_finish): Add error_callback and data
1014         parameters.  Return address base.
1015         * dwarf.c (read_function_info): Get new address base from
1016         backtrace_vector_finish.
1017         * internal.h (backtrace_vector_finish): Update declaration.
1019 2013-11-27  Ian Lance Taylor  <iant@google.com>
1021         * dwarf.c (find_address_ranges): New static function, broken out
1022         of build_address_map.
1023         (build_address_map): Call it.
1024         * btest.c (check): Check for missing filename or function, rather
1025         than crashing.
1026         (f3): Check that enough frames were returned.
1028 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
1030         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1031         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1032         last argument.
1033         * btest.c (struct symdata): Add size field.
1034         (callback_three): Add symsize argument.  Copy it to the data->size
1035         field.
1036         (f23): Set symdata.size to 0.
1037         (test5): Likewise.  If sizeof (int) > 1, lookup address of
1038         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
1039         values.
1041         * atomic.c: Include sys/types.h.
1043 2013-11-18  Ian Lance Taylor  <iant@google.com>
1045         * configure.ac: Check for support of __atomic extensions.
1046         * internal.h: Declare or #define atomic functions for use in
1047         backtrace code.
1048         * atomic.c: New file.
1049         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1050         (dwarf_fileline, backtrace_dwarf_add): Likewise.
1051         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1052         (backtrace_initialize): Likewise.
1053         * fileline.c (fileline_initialize): Likewise.
1054         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1055         * configure, config.h.in, Makefile.in: Rebuild.
1057 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
1059         * elf.c (SHN_UNDEF): Define.
1060         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
1061         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
1062         (elf_add): Adjust caller.
1064         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1066 2013-11-16  Ian Lance Taylor  <iant@google.com>
1068         * backtrace.h (backtrace_create_state): Correct comment about
1069         threading.
1071 2013-11-15  Ian Lance Taylor  <iant@google.com>
1073         * backtrace.h (backtrace_syminfo): Update comment and parameter
1074         name to take any address, not just a PC value.
1075         * elf.c (STT_OBJECT): Define.
1076         (elf_nosyms): Rename parameter pc to addr.
1077         (elf_symbol_search): Rename local variable pc to addr.
1078         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1079         (elf_syminfo): Rename parameter pc to addr.
1080         * btest.c (global): New global variable.
1081         (test5): New test.
1082         (main): Call test5.
1084 2013-10-17  Ian Lance Taylor  <iant@google.com>
1086         * elf.c (elf_add): Don't get the wrong offsets if a debug section
1087         is missing.
1089 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
1091         * configure.ac: Add --enable-host-shared, setting up
1092         pre-existing PIC_FLAG variable within Makefile.am et al.
1093         * configure: Regenerate.
1095 2013-09-20  Alan Modra  <amodra@gmail.com>
1097         * configure: Regenerate.
1099 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1101         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1103 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1105         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1106         dl_iterate_phdr callbacks.
1108 2013-03-25  Ian Lance Taylor  <iant@google.com>
1110         * alloc.c: #include <sys/types.h>.
1111         * mmap.c: Likewise.
1113 2013-01-31  Ian Lance Taylor  <iant@google.com>
1115         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1116         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1118 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
1120         PR other/56076
1121         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1122         attribute was not seen.
1124 2013-01-16  Ian Lance Taylor  <iant@google.com>
1126         * dwarf.c (struct unit): Add filename and abs_filename fields.
1127         (build_address_map): Set new fields when reading unit.
1128         (dwarf_lookup_pc): If we don't find an entry in the line table,
1129         just return the main file name.
1131 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
1133         Update copyright years.
1135 2013-01-01  Ian Lance Taylor  <iant@google.com>
1137         PR bootstrap/54834
1138         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1139         $(MULTIBUILDTOP)/../../gcc/include.
1140         * Makefile.in: Rebuild.
1142 2013-01-01  Ian Lance Taylor  <iant@google.com>
1144         PR other/55536
1145         * mmap.c (backtrace_alloc): Don't call sync functions if not
1146         threaded.
1147         (backtrace_free): Likewise.
1149 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1151         * mmapio.c: Define MAP_FAILED if not defined.
1153 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
1155         PR bootstrap/54926
1156         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1157         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1158         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1159         accepts it.
1160         * Makefile.in: Regenerated.
1161         * configure: Regenerated.
1163 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
1165         PR bootstrap/54926
1166         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1167         * Makefile.in: Regenerated.
1169 2012-11-20  Ian Lance Taylor  <iant@google.com>
1171         * dwarf.c (read_attribute): Always clear val.
1173 2012-11-13  Ian Lance Taylor  <iant@google.com>
1175         PR other/55312
1176         * configure.ac: Only add -Werror if building a target library.
1177         * configure: Rebuild.
1179 2012-11-12  Ian Lance Taylor  <iant@google.com>
1180             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1181             Gerald Pfeifer  <gerald@pfeifer.com>
1183         * configure.ac: Check for getexecname.
1184         * fileline.c: #include <errno.h>.  Define getexecname if not
1185         available.
1186         (fileline_initialize): Try to find the executable in a few
1187         different ways.
1188         * print.c (error_callback): Only print the filename if it came
1189         from the backtrace state.
1190         * configure, config.h.in: Rebuild.
1192 2012-10-29  Ian Lance Taylor  <iant@google.com>
1194         * mmap.c (backtrace_vector_release): Correct last patch: add
1195         aligned, not size.
1197 2012-10-29  Ian Lance Taylor  <iant@google.com>
1199         * mmap.c (backtrace_vector_release): Make sure freed block is
1200         aligned on 8-byte boundary.
1202 2012-10-26  Ian Lance Taylor  <iant@google.com>
1204         PR other/55087
1205         * posix.c (backtrace_open): Add does_not_exist parameter.
1206         * elf.c (phdr_callback): Do not warn if shared library could not
1207         be opened.
1208         * fileline.c (fileline_initialize): Update calls to
1209         backtrace_open.
1210         * internal.h (backtrace_open): Update declaration.
1212 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
1214         PR target/55061
1215         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1216         * configure: Regenerate.
1218 2012-10-24  Ian Lance Taylor  <iant@google.com>
1220         PR target/55061
1221         * configure.ac: Check whether -funwind-tables option works.
1222         * configure: Rebuild.
1224 2012-10-11  Ian Lance Taylor  <iant@google.com>
1226         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1227         * configure: Rebuild.
1229 2012-10-10  Ian Lance Taylor  <iant@google.com>
1231         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1232         lower case.
1234 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
1236         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1238 2012-10-09  Ian Lance Taylor  <iant@google.com>
1240         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1241         (backtrace_dwarf_add): Likewise.
1243 2012-10-09  Ian Lance Taylor  <iant@google.com>
1245         Add support for tracing through shared libraries.
1246         * configure.ac: Check for link.h and dl_iterate_phdr.
1247         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
1248         ELF macros before #defining them.
1249         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1250         dl_iterate_phdr.
1251         (struct elf_syminfo_data): Add next field.
1252         (elf_initialize_syminfo): Initialize next field.
1253         (elf_add_syminfo_data): New static function.
1254         (elf_add): New static function, broken out of
1255         backtrace_initialize.  Call backtrace_dwarf_add instead of
1256         backtrace_dwarf_initialize.
1257         (struct phdr_data): Define.
1258         (phdr_callback): New static function.
1259         (backtrace_initialize): Call elf_add.
1260         * dwarf.c (struct dwarf_data): Add next and base_address fields.
1261         (add_unit_addr): Add base_address parameter.  Change all callers.
1262         (add_unit_ranges, build_address_map): Likewise.
1263         (add_line): Add ddata parameter.  Change all callers.
1264         (read_line_program, add_function_range): Likewise.
1265         (dwarf_lookup_pc): New static function, broken out of
1266         dwarf_fileline.
1267         (dwarf_fileline): Call dwarf_lookup_pc.
1268         (build_dwarf_data): New static function.
1269         (backtrace_dwarf_add): New function.
1270         (backtrace_dwarf_initialize): Remove.
1271         * internal.h (backtrace_dwarf_initialize): Don't declare.
1272         (backtrace_dwarf_add): Declare.
1273         * configure, config.h.in: Rebuild.
1275 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
1277         * btest.c (f23): Avoid uninitialized variable warning.
1279 2012-10-04  Ian Lance Taylor  <iant@google.com>
1281         * dwarf.c: If the system header files do not declare strnlen,
1282         provide our own version.
1284 2012-10-03  Ian Lance Taylor  <iant@google.com>
1286         * dwarf.c (read_uleb128): Fix overflow test.
1287         (read_sleb128): Likewise.
1288         (build_address_map): Don't change unit_buf.start.
1290 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
1292         PR other/54761
1293         * configure.ac (EXTRA_FLAGS): New.
1294         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1295         * configure, Makefile.in: Regenerate.
1297 2012-09-29  Ian Lance Taylor  <iant@google.com>
1299         PR other/54749
1300         * fileline.c (fileline_initialize): Pass errnum as -1 when
1301         reporting that we could not read executable information after a
1302         previous failure.
1304 2012-09-27  Ian Lance Taylor  <iant@google.com>
1306         PR bootstrap/54732
1307         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1308         * Makefile.am: Add dependencies for all objects.
1309         * configure, aclocal.m4, Makefile.in: Rebuild.
1311 2012-09-27  Ian Lance Taylor  <iant@google.com>
1313         PR other/54726
1314         * elf.c (backtrace_initialize): Set *fileln_fn, not
1315         state->fileln_fn.
1317 2012-09-19  Ian Lance Taylor  <iant@google.com>
1319         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1320         as a target library.
1321         * configure: Rebuild.
1323 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1324             Ian Lance Taylor  <iant@google.com>
1326         * configure.ac (GCC_HEADER_STDINT): Invoke.
1327         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1328         * btest.c: Don't include <stdint.h>.
1329         * dwarf.c: Likewise.
1330         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1332 2012-09-18  Ian Lance Taylor  <iant@google.com>
1334         PR bootstrap/54623
1335         * Makefile.am (AM_CPPFLAGS): Define.
1336         (AM_CFLAGS): Remove -I options.
1337         * Makefile.in: Rebuild.
1339 2012-09-18  Ian Lance Taylor  <iant@google.com>
1341         * posix.c (O_BINARY): Define if not defined.
1342         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
1343         HAVE_FCNTL is defined.
1344         * configure.ac: Test for the fcntl function.
1345         * configure, config.h.in: Rebuild.
1347 2012-09-18  Ian Lance Taylor  <iant@google.com>
1349         * btest.c (test1, test2, test3, test4): Add the unused attribute.
1351 2012-09-18  Ian Lance Taylor  <iant@google.com>
1353         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1355 2012-09-18  Ian Lance Taylor  <iant@google.com>
1357         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1358         * mmapio.c: Don't define _GNU_SOURCE.
1359         * configure, config.h.in: Rebuild.
1361 2012-09-18  Ian Lance Taylor  <iant@google.com>
1363         * configure.ac: Check whether strnlen is declared.
1364         * dwarf.c: Declare strnlen if not declared.
1365         * configure, config.h.in: Rebuild.
1367 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1369         * fileline.c: Include <stdlib.h>.
1370         * mmap.c: Likewise.
1372 2012-09-17  Ian Lance Taylor  <iant@google.com>
1374         PR bootstrap/54611
1375         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
1376         parameter.
1378 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
1380         PR bootstrap/54611
1381         * nounwind.c (backtrace_simple): Add state parameter.
1383 2012-09-17  Ian Lance Taylor  <iant@google.com>
1385         PR bootstrap/54609
1386         * unknown.c (unknown_fileline): Add state parameter, remove
1387         fileline_data parameter, name error_callback parameter.
1388         (backtrace_initialize): Add state parameter.
1390 2012-09-17  Ian Lance Taylor  <iant@google.com>
1392         * Initial implementation.
1394 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1396 Copying and distribution of this file, with or without modification,
1397 are permitted in any medium without royalty provided the copyright
1398 notice and this notice are preserved.