[AArch64] Fixup core tunings
[official-gcc.git] / libbacktrace / ChangeLog
blobb63d216c8c40d35a7e5eb7027c8a19efb34857e4
1 2019-12-13  Ian Lance Taylor  <iant@golang.org>
3         Add DWARF 5 support.
4         * dwarf.c (struct attr): Add val field.
5         (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
6         ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
7         (struct line_header): Add addrsize field.
8         (struct line_header_format): Define.
9         (struct unit): Add str_offsets_base, addr_base, and rnglists_base
10         fields.
11         (read_uint24): New static function.
12         (read_attribute): Add implicit_val parameter.  Replace dwarf_str
13         and dwarf_str_size parameters with dwarf_sections parameter.  Add
14         support for new DWARF 5 forms.  Change all callers.
15         (resolve_string): New static function.
16         (resolve_addr_index): Likewise.
17         (read_abbrevs): Support DW_FORM_implicit_const.
18         (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
19         and ranges_is_index fields.
20         (update_pcrange): Support DWARF 5 encodings.
21         (add_high_low_range): New static function, split out of
22         add_ranges.
23         (add_ranges_from_ranges): Likewise.
24         (add_ranges_from_rnglists): New static function.
25         (add_ranges): Just call new helper functions.
26         (find_address_ranges): Use resolve_string for strings, after
27         reading all attributes.  Handle new DWARF 5 attributes.
28         (build_address_map): Support DWARF 5 compilation units.
29         (read_v2_paths): New static function, split out of
30         read_line_header.
31         (read_lnct): New static function.
32         (read_line_header_format_entries): Likewise.
33         (read_line_header): Add ddata parameter.  Support DWARF 5 line
34         headers.  Call new helper functions.  Change all callers.
35         (read_line_program): Use addrsize from line program header.  Don't
36         special case directory index 0 for DWARF 5.
37         (read_referenced_name): Use resolve_string.
38         (read_function_entry): Handle DWARF 5 encodings.  Use
39         resolve_string.
40         * internal.h (enum dwarf_section): Add DEBUG_ADDR,
41         DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
42         * elf.c (dwarf_section_names): Add new section names.
43         * pecoff.c (dwarf_section_names): Likewise.
44         * xcoff.c (xcoff_add): Clear dwarf_sections before setting
45         fields.
46         * configure.ac: Define HAVE_DWARF5 automake conditional.
47         * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
48         (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
49         (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
50         (dwarf5_alloc_LDADD): Likewise.
51         (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
52         (CLEANFILES, clean-local): Define.
54 2019-12-08  Ian Lance Taylor  <iant@golang.org>
56         * dwarf.c (struct pcrange): Define.
57         (update_pcrange, add_ranges): New static functions.
58         (add_unit_addr): Change signature to work with add_ranges.  Don't
59         add base_address here.
60         (add_unit_ranges): Remove.
61         (find_address_ranges): Replace str/ranges parameters with
62         dwarf_sections.  Use update_pcrange and add_ranges.  Change all
63         callers.
64         (add_function_range): Change signature to work with add_ranges.
65         Don't add base_address here.
66         (add_function_ranges): Remove.
67         (read_function_entry): Use update_pcrange and add_ranges.
69 2019-12-04  Ian Lance Taylor  <iant@golang.org>
71         * edtest.c (test1): Add noclone attribute.
73 2019-12-04  Ian Lance Taylor  <iant@golang.org>
75         * internal.h (enum dwarf_section): Define.
76         (struct dwarf_sections): Define.
77         (backtrace_dwarf_add): Update declaration to replace specific
78         section parameters with dwarf_sections parameter.
79         * dwarf.c (struct dwarf_data): Replace specific section fields
80         with dwarf_sections field.
81         (read_attribute): Use dwarf_sections with altlink.
82         (build_address_map): Replace specific section parameters with
83         dwarf_sections parameter.  Change all callers.
84         (read_line_info): Use dwarf_sections with ddata.
85         (read_referenced_name): Likewise.
86         (add_function_ranges): Likewise.
87         (read_function_entry): Likewise.
88         (read_function_info): Likewise.
89         (build_dwarf_data): Replace specific section parameters with
90         dwarf_sections parameter.  Change all callers.
91         (backtrace_dwarf_add): Likewise.
92         * elf.c (enum debug_section): Remove.
93         (dwarf_section_names): Remove .zdebug names.
94         (elf_add): Track zsections separately.  Build dwarf_sections.
95         * pecoff.c (enum debug_section): Remove.
96         (struct debug_section_info): Remove data field.
97         (coff_add): Build dwarf_sections.
98         * xcoff.c (enum dwarf_section): Remove.  Replace DWSECT_xxx
99         references with DEBUG_xxx references.
100         (xcoff_add): Build dwarf_sections.
102 2019-09-27  Maciej W. Rozycki  <macro@wdc.com>
104         * configure: Regenerate.
106 2019-09-26  Ian Lance Taylor  <iant@golang.org>
108         PR libbacktrace/91908
109         * pecoff.c (backtrace_initialize): Explicitly cast unchecked
110         __sync_bool_compare_and_swap to void.
111         * xcoff.c (backtrace_initialize): Likewise.
113 2019-09-03  Ulrich Weigand  <uweigand@de.ibm.com>
115         * configure.ac: Remove references to spu.
116         * configure: Regenerate.
118 2019-05-24  Clement Chigot  <clement.chigot@atos.net>
120         * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
121         test_elf_64.
122         * Makefile.in: Regenerate.
124 2019-05-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
126         * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
127         handling.
128         * configure: Regenerate.
130 2019-03-11  Ian Lance Taylor  <iant@golang.org>
132         PR libbacktrace/89669
133         * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
134         HAVE_ELF.
135         * Makefile.in: Regenerate.
137 2019-02-26  Tom de Vries  <tdevries@suse.de>
139         * btest.c (test5): Allow global.* as minimal symbol name for global.
141 2019-02-26  Tom de Vries  <tdevries@suse.de>
143         * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
144         * Makefile.in: Regenerate.
146 2019-02-12  Tom de Vries  <tdevries@suse.de>
148         PR libbacktrace/81983
149         * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
151 2019-02-10  Tom de Vries  <tdevries@suse.de>
153         * Makefile.am (BUILDTESTS): Add btest_lto.
154         * Makefile.in: Regenerate.
155         * btest.c (test1, f2, f3, test3, f22, f23): Declare with
156         __attribute__((noclone)).
158 2019-02-08  Tom de Vries  <tdevries@suse.de>
160         * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
161         * print.c (backtrace_print): Same.
162         * simple.c (backtrace_simple): Same.
164 2019-02-08  Tom de Vries  <tdevries@suse.de>
166         PR libbacktrace/78063
167         * dwarf.c (build_address_map): Keep all parsed units.
168         (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
170 2019-01-31  Tom de Vries  <tdevries@suse.de>
172         PR libbacktrace/89136
173         * elf.c (elf_add): Read build-id if with_buildid_data.  Fix
174         'debugaltlink_name_len =+ 1'.
176 2019-01-29  Tom de Vries  <tdevries@suse.de>
178         * install-debuginfo-for-buildid.sh.in: New script.
179         * Makefile.am (check_PROGRAMS): Add b2test and b3test.
180         (TESTS): Add b2test_buildid and b3test_dwz_buildid.
181         * Makefile.in: Regenerate.
182         * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
183         (READELF): Set with AC_CHECK_PROG.
184         (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
185         * configure: Regenerate.
186         * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
187         (elf_open_debugfile_by_buildid): ... here.
189 2019-01-29  Tom de Vries  <tdevries@suse.de>
191         * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
192         allocfail.
193         (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
194         (check_PROGRAMS): Add BUILDTESTS.
195         * Makefile.in: Regenerate.
197 2019-01-28  Tom de Vries  <tdevries@suse.de>
199         * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
200         Use $< to access prerequisite.
201         * Makefile.in: Regenerate.
203 2019-01-25  Nathan Sidwell  <nathan@acm.org>
205         * elf.c (elf_add): Pass "" filename to recursive call with
206         separated debug.
208 2019-01-25  Tom de Vries  <tdevries@suse.de>
210         * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
211         filename == "".
212         * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
213         * Makefile.in: Regenerate.
215 2019-01-25  Tom de Vries  <tdevries@suse.de>
217         * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
218         (TESTS): Rename dtest to btest_gnudebuglink.
219         * Makefile.in: Regenerate.
221 2019-01-23  Tom de Vries  <tdevries@suse.de>
223         * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
224         (units_search, find_unit): Use size_t for offset.
225         (build_address_map): Use size_t for unit_offset.
227 2019-01-20  Gerald Pfeifer  <gerald@pfeifer.com>
229         * allocfail.c (main): Increase portability of printf statement.
231 2019-01-18  Ian Lance Taylor  <iant@golang.org>
233         PR libbacktrace/88890
234         * mmapio.c (backtrace_get_view): Change size parameter to
235         uint64_t.  Check that value fits in size_t.
236         * read.c (backtrace_get_view): Likewise.
237         * internal.h (backtrace_get_view): Update declaration.
238         * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
240 2019-01-17  Tom de Vries  <tdevries@suse.de>
242         PR libbacktrace/82857
243         * configure.ac (DWZ): Set with AC_CHECK_PROG.
244         (HAVE_DWZ): Set with AM_CONDITIONAL.
245         * configure: Regenerate.
246         * Makefile.am (TESTS): Add btest_dwz.
247         * Makefile.in: Regenerate.
249 2019-01-17  Tom de Vries  <tdevries@suse.de>
251         PR libbacktrace/82857
252         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
253         (read_attribute): Handle DW_FORM_GNU_ref_alt using
254         ATTR_VAL_REF_ALT_INFO.
255         (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
257 2019-01-17  Tom de Vries  <tdevries@suse.de>
259         * dwarf.c (struct unit): Add low_offset and high_offset fields.
260         (struct unit_vector): New type.
261         (struct dwarf_data): Add units and units_counts fields.
262         (find_unit): New function.
263         (find_address_ranges): Add and handle unit_tag parameter.
264         (build_address_map): Add and handle units_vec parameter.
265         (build_dwarf_data): Pass units_vec to build_address_map.  Store resulting
266         units vector.
268 2019-01-17  Tom de Vries  <tdevries@suse.de>
270         PR libbacktrace/82857
271         * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
272         using altlink.
274 2019-01-17  Tom de Vries  <tdevries@suse.de>
276         * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
277         (read_attribute): Add altlink parameter.  Handle missing altlink for
278         DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
279         (find_address_ranges, build_address_map, build_dwarf_data): Add and
280         handle altlink parameter.
281         (read_referenced_name, read_function_entry): Add argument to
282         read_attribute call.
284 2019-01-17  Tom de Vries  <tdevries@suse.de>
286         * dwarf.c (struct dwarf_data): Add altlink field.
287         (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
288         * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
289         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
290         * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
291         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
292         * xcoff.c (xcoff_add): Same.
294 2019-01-17  Tom de Vries  <tdevries@suse.de>
296         * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
297         * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
298         * elf.c (elf_add): Add and handle fileline_entry parameter.  Add
299         argument to backtrace_dwarf_add call.
300         (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
301         * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
302         * xcoff.c (xcoff_add): Same.
304 2019-01-17  Tom de Vries  <tdevries@suse.de>
306         * elf.c (elf_add): Add and handle with_buildid_data and
307         with_buildid_size parameters.  Handle .gnu_debugaltlink section.
308         (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
310 2019-01-16  Tom de Vries  <tdevries@suse.de>
312         * dwarf.c (read_referenced_name_from_attr): New function.  Factor out
313         of ...
314         (read_referenced_name): ... here, and ...
315         (read_function_entry): ... here.
317 2019-01-16  Tom de Vries  <tdevries@suse.de>
319         * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
320         name.
321         (read_function_entry): Same.  Don't allow name found via
322         DW_AT_abstract_origin or case DW_AT_specification to override linkage
323         name.
325 2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
327         PR other/16615
329         * backtrace.h: Mechanically replace "can not" with "cannot".
331 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
333         Update copyright years.
335 2018-12-29  Gerald Pfeifer  <gerald@pfeifer.com>
337         * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
338         in sed pattern.
339         * Makefile.in: Regenerate.
341 2018-12-28  Tom de Vries  <tdevries@suse.de>
343         * dwarf.c (build_address_map): Reuse unused units.
345 2018-12-28  Tom de Vries  <tdevries@suse.de>
347         * dwarf.c (build_address_map): Simplify by removing local variable
348         abbrevs.
350 2018-12-28  Ian Lance Taylor  <iant@golang.org>
351             Tom de Vries  <tdevries@suse.de>
353         PR libbacktrace/88063
354         * dwarf.c (free_unit_addrs_vector): Remove.
355         (build_address_map): Keep track of allocated units in vector.  Free
356         allocated units and corresponding abbrevs upon failure.  Remove now
357         redundant call to free_unit_addrs_vector.  Free addrs vector upon
358         failure.  Free allocated unit vector.
360 2018-12-28  Tom de Vries  <tdevries@suse.de>
362         * dwarf.c (build_address_map): Free addrs vector upon failure.
364 2018-12-14  Tom de Vries  <tdevries@suse.de>
366         PR testsuite/88491
367         * allocfail.sh: Remove "set -o pipefail".
369 2018-12-12  Tom de Vries  <tdevries@suse.de>
371         * Makefile.am (TESTS): Add allocfail.sh.
372         (check_PROGRAMS): Add allocfail.
373         * Makefile.in: Regenerate.
374         * instrumented_alloc.c: New file.  Redefine malloc and realloc.
375         Include alloc.c.
376         * allocfail.c: New file.
377         * allocfail.sh: New file.
379 2018-11-30  Tom de Vries  <tdevries@suse.de>
381         * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
382         test_xcoff_64, test_pecoff and test_unknown.
383         * Makefile.in: Regenerate.
384         * test_format.c: New file.
386 2018-11-30  Tom de Vries  <tdevries@suse.de>
388         * Makefile.am : Add _with_alloc version for each test in
389         check_PROGRAMS.
390         * Makefile.in: Regenerate.
392 2018-11-30  Tom de Vries  <tdevries@suse.de>
394         * internal.h (backtrace_vector_free): New static inline fuction,
395         factored out of ...
396         * dwarf.c (read_line_info): ... here.
398 2018-11-28  Tom de Vries  <tdevries@suse.de>
400         * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
401         failure.
403 2018-11-27  Tom de Vries  <tdevries@suse.de>
405         * mmap.c (backtrace_vector_release): Same.
406         * unittest.c (test1): Add check.
408 2018-11-27  Tom de Vries  <tdevries@suse.de>
410         * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
411         instead of realloc.
412         * Makefile.am (check_PROGRAMS): Add unittest.
413         * Makefile.in: Regenerate.
414         * unittest.c: New file.
416 2018-11-22  Tom de Vries  <tdevries@suse.de>
418         * dwarf.c (read_initial_length): Factor out of ...
419         (build_address_map, read_line_info): ... here.
421 2018-11-21  Tom de Vries  <tdevries@suse.de>
423         * dwarf.c (read_string): Factor out of ...
424         (read_attribute, read_line_header, read_line_program): ... here.
426 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
428         PR bootstrap/82856
429         * Makefile.am: Include multilib.am.
430         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
431         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
433 2018-10-05  Ian Lance Taylor  <iant@golang.org>
435         PR libbacktrace/87529
436         * backtrace.h: Document that backtrace_create_state should be
437         called only once.
439 2018-08-05 Iain Buclaw  <ibuclaw@gdcproject.org>
441         * configure.ac: Move define of HAVE_ZLIB into check for -lz.
442         * Makefile.in: Regenerate.
443         * config.h.in: Likewise.
444         * configure: Likewise.
446 2018-08-01  Tony Reix  <tony.reix@atos.net>
448         * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
449         (struct xcoff_func, struct xcoff_func_vector): New structs.
450         (xcoff_syminfo): Drop leading dot from symbol name.
451         (xcoff_line_compare, xcoff_line_search): Remove.
452         (xcoff_func_compare, xcoff_func_search): New static functions.
453         (xcoff_lookup_pc): Search function table.
454         (xcoff_add_line, xcoff_process_linenos): Remove.
455         (xcoff_initialize_fileline): Build function table.
457 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
459         PR other/86198
460         * elf.c (elf_add): Increase ".note.gnu.build-id" section size
461         checking up to 36 bytes.
463 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
465         * configure: Regenerated.
467 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
469         * configure: Regenerated.
471 2018-04-17  Ian Lance Taylor  <iant@golang.org>
473         * backtrace.c: Revert last two changes.  Don't call mmap
474         directly.
476 2018-04-17  Ian Lance Taylor  <iant@golang.org>
478         * backtrace.c: Include backtrace-supported.h before checking
479         BACKTRACE_USES_MALLOC.
481 2018-04-17  Ian Lance Taylor  <iant@golang.org>
483         * backtrace.c (backtrace_full): When testing whether we can
484         allocate memory, call mmap directly, and munmap the memory.
486 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
488         PR other/85161
489         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
490         big endian, only use 32-bit loads if endianity macros are predefined
491         and indicate big or little endian.
493 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
495         PR target/84148
496         * configure: Regenerate.
498 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
500         PR other/82368
501         * elf.c (SHT_PROGBITS): Undefine and define.
503 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
505         PR other/82368
506         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
507         (struct elf_ppc64_opd_data): New type.
508         (elf_initialize_syminfo): Add opd argument, handle symbols
509         pointing into the PowerPC64 ELFv1 .opd section.
510         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
511         to structure with .opd data to elf_initialize_syminfo.
513 2018-01-31  Ian Lance Taylor  <iant@golang.org>
515         * elf.c (elf_add): Close descriptor if we use a debugfile.
516         * btest.c (check_open_files): New static function.
517         (main): Call check_open_files.
519 2018-01-25  Ian Lance Taylor  <iant@golang.org>
521         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
522         desired CRC is zero.
523         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
525 2018-01-25  Ian Lance Taylor  <iant@golang.org>
527         * pecoff.c (coff_add): Only release syms_view if it is valid.
529 2018-01-25  Ian Lance Taylor  <iant@golang.org>
531         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
533 2018-01-24  Ian Lance Taylor  <iant@golang.org>
535         * pecoff.c (coff_add): Use coff_read4, not memcpy.
537 2018-01-24  Ian Lance Taylor  <iant@golang.org>
539         PR other/68239
540         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
541         on the free list.
543 2018-01-19  Tony Reix  <tony.reix@atos.net>
545         * xcoff.c (xcoff_incl_compare): New function.
546         (xcoff_incl_search): New function.
547         (xcoff_process_linenos): Use bsearch to find include file.
548         (xcoff_initialize_fileline): Sort include file information.
550 2018-01-16  Ian Lance Taylor  <iant@golang.org>
552         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
553         288.
554         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
555         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
556         (elf_zlib_default_table): Update.
557         (elf_zlib_default_dist_table): New static array.
558         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
559         for block type 1.
560         * ztest.c (struct zlib_test): Add uncompressed_len.
561         (tests): Initialize uncompressed_len field.  Add new test case.
562         (test_samples): Use uncompressed_len field.
564 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
566         Update copyright years.
568 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
570         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
571         * aclocal.m4: Regenerate.
572         * Makefile.in: Likewise.
573         * configure: Likewise.
575 2017-10-06  Ian Lance Taylor  <iant@golang.org>
577         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
578         zlib uncompress function.
580 2017-10-05  Ian Lance Taylor  <iant@golang.org>
582         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
583         Read a four byte integer.
584         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
585         boundary before ever calling elf_zlib_fetch.
586         * ztest.c (test_large): Simplify print statements a bit.
588 2017-10-02  Ian Lance Taylor  <iant@golang.org>
590         * ztest.c: #include <errno.h>.
591         (TEST_TIMING): Don't define, don't test.
592         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
593         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
594         (ZLIB_CLOCK_GETTIME_ARG): Define.
595         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
596         * Makefile.am: Likewise.
597         * configure, Makefile.in: Rebuild.
599 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
601         PR other/67165
602         * Makefile.am: Append the content of clock_gettime_link to
603         ztest_LDADD.
604         * configure.ac: Test for the case that clock_gettime is in librt.
605         * Makefile.in: Regenerate.
606         * configure: Likewise.
608         PR other/67165
609         * configure.ac: Check for clock_gettime.
610         * config.h.in: Regenerate.
611         * configure: Likewise.
612         * ztest.c (average_time, test_large): Conditionalize test timing
613         on clock_gettime availability.
615 2017-09-29  Tony Reix  <tony.reix@atos.net>
617         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
618         (STYP_DWARF, SSUBTYP_DW*): Define.
619         (enum dwarf_section): Define.
620         (struct dwsect_info): Define.
621         (xcoff_add): Look for DWARF sections, pass them to
622         backtrace_dwarf_add.
624 2017-09-28  Ian Lance Taylor  <iant@golang.org>
626         PR other/67165
627         * elf.c (__builtin_prefetch): Define if not __GNUC__.
628         (unlikely): Define.
629         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
630         (b_elf_chdr): Define type.
631         (enum debug_section): Add ZDEBUG_xxx values.
632         (debug_section_names): Add names for new sections.
633         (struct debug_section_info): Add compressed field.
634         (elf_zlib_failed, elf_zlib_fetch): New static functions.
635         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
636         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
637         (HUFFMAN_SECONDARY_SHIFT): Define.
638         (ZDEBUG_TABLE_SIZE): Define.
639         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
640         (final_next_secondary): New static variable if
641         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
642         (elf_zlib_inflate_table): New static function.
643         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
644         function to produce fixed Huffman table.
645         (elf_zlib_default_table): New static variable.
646         (elf_zlib_inflate): New static function.
647         (elf_zlib_verify_checksum): Likewise.
648         (elf_zlib_inflate_and_verify): Likewise.
649         (elf_uncompress_zdebug): Likewise.
650         (elf_uncompress_chdr): Likewise.
651         (backtrace_uncompress_zdebug): New extern function.
652         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
653         sections, and uncompress them.
654         * internal.h (backtrace_compress_zdebug): Declare.
655         * ztest.c: New file.
656         * configure.ac: Check for -lz and check whether the linker
657         supports --compress-debug-sections.
658         * Makefile.am (ztest_SOURCES): New variable.
659         (ztest_CFLAGS, ztest_LDADD): New variables.
660         (check_PROGRAMS): Add ztest.
661         (ctestg_SOURCES): New variable.
662         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
663         (ctesta_SOURCES): New variable.
664         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
665         (check_PROGRAMS): Add ctestg and ctesta.
666         * configure, config.h.in, Makefile.in: Rebuild.
668 2017-09-22  Ian Lance Taylor  <iant@golang.org>
670         PR sanitizer/77631
671         * configure.ac: Check for lstat and readlink.
672         * elf.c (lstat, readlink): Provide dummy versions if real versions
673         are not available.
674         * configure, config.h.in: Rebuild.
676 2017-09-21  Ian Lance Taylor  <iant@google.com>
678         PR go/82284
679         * elf.c (backtrace_initialize): Set pd.exe_filename.
681 2017-09-20  Ian Lance Taylor  <iant@golang.org>
682             Denis Khalikov  <d.khalikov@partner.samsung.com>
684         PR sanitizer/77631
685         Support for external debug info.
686         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
687         (S_ISLNK): Define if not defined.
688         (xstrnlen): Define if strnlen is not available.
689         (b_elf_note): Define type.
690         (NT_GNU_BUILD_ID): Define macro.
691         (elf_crc32, elf_crc32_file): New static functions.
692         (elf_is_symlink, elf_readlink): New static functions.
693         (elf_open_debugfile_by_buildid): New static function.
694         (elf_try_debugfile): New static function.
695         (elf_find_debugfile_by_debuglink): New static function.
696         (elf_open_debugfile_by_debuglink): New static function.
697         (elf_add): Add filename and debuginfo parameters.  Adjust all
698         callers.  Look for external debug info notes, and try to fetch
699         debug info from external file.
700         (struct phdr_data): Add exe_filename field.
701         (phdr_callback): Pass filename to elf_add.
702         (backtrace_initialize): Add filename parameter.
703         * internal.h (backtrace_initialize): Add filename parameter.
704         * fileline.c (fileline_initialize): Pass filename to
705         backtrace_initialize.
706         * pecoff.c (fileline_initialize): Add unused filename parameter.
707         * unknown.c (fileline_initialize): Likewise.
708         * xcoff.c (fileline_initialize): Likewise.
709         * configure.ac: Check for objcopy --add-gnu-debuglink.
710         * Makefile.am (dtest): New test target.
711         * configure, Makefile.in: Rebuild.
713 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
715         PR other/81096
716         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
717         * Makefile.in: Regenerate.
719 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
721         PR other/81096
722         * libbacktrace/Makefile.in
723         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
725 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
727         PR bootstrap/81638
728         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
730 2017-07-28  Tony Reix  <tony.reix@atos.net>
732         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
734 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
736         * fileline.c (fileline_initialize): Print pid_t as long.
738 2017-07-26  Tony Reix  <tony.reix@atos.net>
740         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
741         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
742         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
743         * configure, config.h.in: Regenerate.
745 2017-07-21  Tony Reix  <tony.reix@atos.net>
747         * filetype.awk: Add AIX XCOFF type detection.
748         * configure.ac: Recognize xcoff format.
749         * Makefile.am (FORMAT_FILES): Add xcoff.c.
750         * fileline.c: Include <unistd.h>.
751         (fileline_initialize): Add case for AIX procfs.
752         * xcoff.c: New file.
753         * configure, Makefile.in: Rebuild.
755 2017-06-21  Richard Biener  <rguenther@suse.de>
757         * configure.ac: Add AC_SYS_LARGEFILE.
758         * config.h.in: Regenerate.
759         * configure: Likewise.
761 2017-06-11  Ian Lance Taylor  <iant@golang.org>
763         * elf.c (backtrace_initialize): Always set *fileline_fn.
764         * ttest.c: New file.
765         * btest.c: Move support functions into testlib.c.  Change calls to
766         check to pass file name.
767         * testlib.c: New file, copied from (part of) btest.c.
768         * testlib.h: New file, declarations for testlib.c.
769         * edtest.c: Use testlib.h and testlib.c.
770         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
771         * Makefile.am (btest_SOURCES): Add testlib.c.
772         (edtest_SOURCES): Likewise.
773         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
774         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
775         * configure, Makefile.in: Rebuild.
777 2017-05-19  Than McIntosh  <thanm@google.com>
779         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
780         (read_line_header): Don't allocate dirs if dirs_count == 0.
781         * edtest.c: New file.
782         * edtest2.c: New file.
783         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
784         (check_PROGRAMS): Add edtest.
785         (edtest2_build.c, gen_edtest2_build): New targets.
786         * Makefile.in: Rebuild.
788 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
790         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
791         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
793 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
795         Update copyright years.
797 2016-11-15  Matthias Klose  <doko@ubuntu.com>
799         * configure: Regenerate.
801 2016-09-11  Carlos Liam  <carlos@aarzee.me>
803         * all: Remove meaningless trailing whitespace.
805 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
807         PR target/71161
808         * elf.c (phdr_callback) [__i386__]: Add
809         __attribute__((__force_align_arg_pointer__)).
811 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
813         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
814         avoid possible crash.
815         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
816         missing debug info anymore.
818 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
820         * mmap.c (MAP_FAILED): Define if not defined.
822 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
824         Update copyright years.
826 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
828         * configure.ac: Specify that DJGPP do not have mmap
829         even when sys/mman.h exists.
830         * configure: Regenerate
832 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
834         PR libgfortran/68115
835         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
836         * configure: Regenerate.
837         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
838         to void.
840 2015-09-17  Ian Lance Taylor  <iant@google.com>
842         * posix.c (backtrace_open): Cast second argument of open() to int.
844 2015-09-11  Ian Lance Taylor  <iant@google.com>
846         * Makefile.am (backtrace.lo): Depend on internal.h.
847         (sort.lo, stest.lo): Add explicit dependencies.
848         * Makefile.in: Rebuild.
850 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
852         * backtrace.c: #include <sys/types.h>.
854 2015-09-08  Ian Lance Taylor  <iant@google.com>
856         PR other/67457
857         * backtrace.c: #include "internal.h".
858         (struct backtrace_data): Add can_alloc field.
859         (unwind): If can_alloc is false, don't try to get file/line
860         information.
861         (backtrace_full): Set can_alloc field in bdata.
862         * alloc.c (backtrace_alloc): Don't call error_callback if it is
863         NULL.
864         * mmap.c (backtrace_alloc): Likewise.
865         * internal.h: Update comments for backtrace_alloc and
866         backtrace_free.
868 2015-09-08  Ian Lance Taylor  <iant@google.com>
870         PR other/67457
871         * mmap.c (backtrace_alloc): Correct test for mmap failure.
873 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
875         * configure.ac: For spu-*-* targets, set have_fcntl to no.
876         * configure: Regenerate.
878 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
880         * configure.ac: Remove [disable-shared] argument to LT_INIT.
881         Remove setting PIC_FLAG when building as target library.
882         * configure: Regenerate.
884 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
886         * configure.ac: Only compile with -fPIC if the target
887         supports it.
888         * configure: Regenerate.
890 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
892         * configure.ac: Set have_mmap to no on spu-*-* targets.
893         * configure: Regenerate.
895 2015-08-13  Ian Lance Taylor  <iant@google.com>
897         * dwarf.c (read_function_entry): Add vec_inlined parameter.
898         Change all callers.
900 2015-06-11  Martin Sebor  <msebor@redhat.com>
902         PR sanitizer/65479
903         * dwarf.c (struct line): Add new field idx.
904         (line_compare): Use it.
905         (add_line): Set it.
906         (read_line_info): Reset it.
908 2015-05-29  Tristan Gingold  <gingold@adacore.com>
910         * pecoff.c: New file.
911         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
912         * Makefile.in: Regenerate.
913         * filetype.awk: Detect pecoff.
914         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
915         Add pecoff.
916         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
917         true.
918         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
919         * configure: Regenerate.
920         * pecoff.c: New file.
922 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
924         * Makefile.in: Regenerated with automake-1.11.6.
925         * aclocal.m4: Likewise.
926         * configure: Likewise.
928 2015-01-24  Matthias Klose  <doko@ubuntu.com>
930         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
931         * configure: Regenerate.
933 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
935         Update copyright years.
937 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
939         PR bootstrap/63784
940         * configure: Regenerated.
942 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
944         * ChangeLog.jit: New.
946 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
948         PR target/63610
949         * configure: Regenerate.
951 2014-10-23  Ian Lance Taylor  <iant@google.com>
953         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
954         Fix to return void *.
956 2014-05-08  Ian Lance Taylor  <iant@google.com>
958         * mmap.c (backtrace_free): If freeing a large aligned block of
959         memory, call munmap rather than holding onto it.
960         (backtrace_vector_grow): When growing a vector, double the number
961         of pages requested.  When releasing the old version of a grown
962         vector, pass the correct size to backtrace_free.
964 2014-03-07  Ian Lance Taylor  <iant@google.com>
966         * sort.c (backtrace_qsort): Use middle element as pivot.
968 2014-03-06  Ian Lance Taylor  <iant@google.com>
970         * sort.c: New file.
971         * stest.c: New file.
972         * internal.h (backtrace_qsort): Declare.
973         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
974         (read_line_info, read_function_entry): Likewise.
975         (read_function_info, build_dwarf_data): Likewise.
976         * elf.c (elf_initialize_syminfo): Likewise.
977         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
978         (stest_SOURCES, stest_LDADD): Define.
979         (check_PROGRAMS): Add stest.
981 2014-02-07  Misty De Meo  <misty@brew.sh>
983         PR target/58710
984         * configure.ac: Use AC_LINK_IFELSE in check for
985         _Unwind_GetIPInfo.
986         * configure: Regenerate.
988 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
990         Update copyright years
992 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
994         * elf.c (ET_DYN): Undefine and define again.
995         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
996         return early -1 without closing the descriptor.
997         (struct phdr_data): Add exe_descriptor.
998         (phdr_callback): If pd->exe_descriptor is not -1, for very first
999         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1000         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
1001         call to elf_add.
1002         (backtrace_initialize): Adjust call to elf_add.  If it returns
1003         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1005 2013-12-05  Ian Lance Taylor  <iant@google.com>
1007         * alloc.c (backtrace_vector_finish): Add error_callback and data
1008         parameters.  Call backtrace_vector_release.  Return address base.
1009         * mmap.c (backtrace_vector_finish): Add error_callback and data
1010         parameters.  Return address base.
1011         * dwarf.c (read_function_info): Get new address base from
1012         backtrace_vector_finish.
1013         * internal.h (backtrace_vector_finish): Update declaration.
1015 2013-11-27  Ian Lance Taylor  <iant@google.com>
1017         * dwarf.c (find_address_ranges): New static function, broken out
1018         of build_address_map.
1019         (build_address_map): Call it.
1020         * btest.c (check): Check for missing filename or function, rather
1021         than crashing.
1022         (f3): Check that enough frames were returned.
1024 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
1026         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1027         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1028         last argument.
1029         * btest.c (struct symdata): Add size field.
1030         (callback_three): Add symsize argument.  Copy it to the data->size
1031         field.
1032         (f23): Set symdata.size to 0.
1033         (test5): Likewise.  If sizeof (int) > 1, lookup address of
1034         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
1035         values.
1037         * atomic.c: Include sys/types.h.
1039 2013-11-18  Ian Lance Taylor  <iant@google.com>
1041         * configure.ac: Check for support of __atomic extensions.
1042         * internal.h: Declare or #define atomic functions for use in
1043         backtrace code.
1044         * atomic.c: New file.
1045         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1046         (dwarf_fileline, backtrace_dwarf_add): Likewise.
1047         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1048         (backtrace_initialize): Likewise.
1049         * fileline.c (fileline_initialize): Likewise.
1050         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1051         * configure, config.h.in, Makefile.in: Rebuild.
1053 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
1055         * elf.c (SHN_UNDEF): Define.
1056         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
1057         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
1058         (elf_add): Adjust caller.
1060         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1062 2013-11-16  Ian Lance Taylor  <iant@google.com>
1064         * backtrace.h (backtrace_create_state): Correct comment about
1065         threading.
1067 2013-11-15  Ian Lance Taylor  <iant@google.com>
1069         * backtrace.h (backtrace_syminfo): Update comment and parameter
1070         name to take any address, not just a PC value.
1071         * elf.c (STT_OBJECT): Define.
1072         (elf_nosyms): Rename parameter pc to addr.
1073         (elf_symbol_search): Rename local variable pc to addr.
1074         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1075         (elf_syminfo): Rename parameter pc to addr.
1076         * btest.c (global): New global variable.
1077         (test5): New test.
1078         (main): Call test5.
1080 2013-10-17  Ian Lance Taylor  <iant@google.com>
1082         * elf.c (elf_add): Don't get the wrong offsets if a debug section
1083         is missing.
1085 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
1087         * configure.ac: Add --enable-host-shared, setting up
1088         pre-existing PIC_FLAG variable within Makefile.am et al.
1089         * configure: Regenerate.
1091 2013-09-20  Alan Modra  <amodra@gmail.com>
1093         * configure: Regenerate.
1095 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1097         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1099 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
1101         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1102         dl_iterate_phdr callbacks.
1104 2013-03-25  Ian Lance Taylor  <iant@google.com>
1106         * alloc.c: #include <sys/types.h>.
1107         * mmap.c: Likewise.
1109 2013-01-31  Ian Lance Taylor  <iant@google.com>
1111         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1112         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1114 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
1116         PR other/56076
1117         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1118         attribute was not seen.
1120 2013-01-16  Ian Lance Taylor  <iant@google.com>
1122         * dwarf.c (struct unit): Add filename and abs_filename fields.
1123         (build_address_map): Set new fields when reading unit.
1124         (dwarf_lookup_pc): If we don't find an entry in the line table,
1125         just return the main file name.
1127 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
1129         Update copyright years.
1131 2013-01-01  Ian Lance Taylor  <iant@google.com>
1133         PR bootstrap/54834
1134         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1135         $(MULTIBUILDTOP)/../../gcc/include.
1136         * Makefile.in: Rebuild.
1138 2013-01-01  Ian Lance Taylor  <iant@google.com>
1140         PR other/55536
1141         * mmap.c (backtrace_alloc): Don't call sync functions if not
1142         threaded.
1143         (backtrace_free): Likewise.
1145 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1147         * mmapio.c: Define MAP_FAILED if not defined.
1149 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
1151         PR bootstrap/54926
1152         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1153         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1154         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1155         accepts it.
1156         * Makefile.in: Regenerated.
1157         * configure: Regenerated.
1159 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
1161         PR bootstrap/54926
1162         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1163         * Makefile.in: Regenerated.
1165 2012-11-20  Ian Lance Taylor  <iant@google.com>
1167         * dwarf.c (read_attribute): Always clear val.
1169 2012-11-13  Ian Lance Taylor  <iant@google.com>
1171         PR other/55312
1172         * configure.ac: Only add -Werror if building a target library.
1173         * configure: Rebuild.
1175 2012-11-12  Ian Lance Taylor  <iant@google.com>
1176             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1177             Gerald Pfeifer  <gerald@pfeifer.com>
1179         * configure.ac: Check for getexecname.
1180         * fileline.c: #include <errno.h>.  Define getexecname if not
1181         available.
1182         (fileline_initialize): Try to find the executable in a few
1183         different ways.
1184         * print.c (error_callback): Only print the filename if it came
1185         from the backtrace state.
1186         * configure, config.h.in: Rebuild.
1188 2012-10-29  Ian Lance Taylor  <iant@google.com>
1190         * mmap.c (backtrace_vector_release): Correct last patch: add
1191         aligned, not size.
1193 2012-10-29  Ian Lance Taylor  <iant@google.com>
1195         * mmap.c (backtrace_vector_release): Make sure freed block is
1196         aligned on 8-byte boundary.
1198 2012-10-26  Ian Lance Taylor  <iant@google.com>
1200         PR other/55087
1201         * posix.c (backtrace_open): Add does_not_exist parameter.
1202         * elf.c (phdr_callback): Do not warn if shared library could not
1203         be opened.
1204         * fileline.c (fileline_initialize): Update calls to
1205         backtrace_open.
1206         * internal.h (backtrace_open): Update declaration.
1208 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
1210         PR target/55061
1211         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1212         * configure: Regenerate.
1214 2012-10-24  Ian Lance Taylor  <iant@google.com>
1216         PR target/55061
1217         * configure.ac: Check whether -funwind-tables option works.
1218         * configure: Rebuild.
1220 2012-10-11  Ian Lance Taylor  <iant@google.com>
1222         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1223         * configure: Rebuild.
1225 2012-10-10  Ian Lance Taylor  <iant@google.com>
1227         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1228         lower case.
1230 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
1232         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1234 2012-10-09  Ian Lance Taylor  <iant@google.com>
1236         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1237         (backtrace_dwarf_add): Likewise.
1239 2012-10-09  Ian Lance Taylor  <iant@google.com>
1241         Add support for tracing through shared libraries.
1242         * configure.ac: Check for link.h and dl_iterate_phdr.
1243         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
1244         ELF macros before #defining them.
1245         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1246         dl_iterate_phdr.
1247         (struct elf_syminfo_data): Add next field.
1248         (elf_initialize_syminfo): Initialize next field.
1249         (elf_add_syminfo_data): New static function.
1250         (elf_add): New static function, broken out of
1251         backtrace_initialize.  Call backtrace_dwarf_add instead of
1252         backtrace_dwarf_initialize.
1253         (struct phdr_data): Define.
1254         (phdr_callback): New static function.
1255         (backtrace_initialize): Call elf_add.
1256         * dwarf.c (struct dwarf_data): Add next and base_address fields.
1257         (add_unit_addr): Add base_address parameter.  Change all callers.
1258         (add_unit_ranges, build_address_map): Likewise.
1259         (add_line): Add ddata parameter.  Change all callers.
1260         (read_line_program, add_function_range): Likewise.
1261         (dwarf_lookup_pc): New static function, broken out of
1262         dwarf_fileline.
1263         (dwarf_fileline): Call dwarf_lookup_pc.
1264         (build_dwarf_data): New static function.
1265         (backtrace_dwarf_add): New function.
1266         (backtrace_dwarf_initialize): Remove.
1267         * internal.h (backtrace_dwarf_initialize): Don't declare.
1268         (backtrace_dwarf_add): Declare.
1269         * configure, config.h.in: Rebuild.
1271 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
1273         * btest.c (f23): Avoid uninitialized variable warning.
1275 2012-10-04  Ian Lance Taylor  <iant@google.com>
1277         * dwarf.c: If the system header files do not declare strnlen,
1278         provide our own version.
1280 2012-10-03  Ian Lance Taylor  <iant@google.com>
1282         * dwarf.c (read_uleb128): Fix overflow test.
1283         (read_sleb128): Likewise.
1284         (build_address_map): Don't change unit_buf.start.
1286 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
1288         PR other/54761
1289         * configure.ac (EXTRA_FLAGS): New.
1290         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1291         * configure, Makefile.in: Regenerate.
1293 2012-09-29  Ian Lance Taylor  <iant@google.com>
1295         PR other/54749
1296         * fileline.c (fileline_initialize): Pass errnum as -1 when
1297         reporting that we could not read executable information after a
1298         previous failure.
1300 2012-09-27  Ian Lance Taylor  <iant@google.com>
1302         PR bootstrap/54732
1303         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1304         * Makefile.am: Add dependencies for all objects.
1305         * configure, aclocal.m4, Makefile.in: Rebuild.
1307 2012-09-27  Ian Lance Taylor  <iant@google.com>
1309         PR other/54726
1310         * elf.c (backtrace_initialize): Set *fileln_fn, not
1311         state->fileln_fn.
1313 2012-09-19  Ian Lance Taylor  <iant@google.com>
1315         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1316         as a target library.
1317         * configure: Rebuild.
1319 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1320             Ian Lance Taylor  <iant@google.com>
1322         * configure.ac (GCC_HEADER_STDINT): Invoke.
1323         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1324         * btest.c: Don't include <stdint.h>.
1325         * dwarf.c: Likewise.
1326         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1328 2012-09-18  Ian Lance Taylor  <iant@google.com>
1330         PR bootstrap/54623
1331         * Makefile.am (AM_CPPFLAGS): Define.
1332         (AM_CFLAGS): Remove -I options.
1333         * Makefile.in: Rebuild.
1335 2012-09-18  Ian Lance Taylor  <iant@google.com>
1337         * posix.c (O_BINARY): Define if not defined.
1338         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
1339         HAVE_FCNTL is defined.
1340         * configure.ac: Test for the fcntl function.
1341         * configure, config.h.in: Rebuild.
1343 2012-09-18  Ian Lance Taylor  <iant@google.com>
1345         * btest.c (test1, test2, test3, test4): Add the unused attribute.
1347 2012-09-18  Ian Lance Taylor  <iant@google.com>
1349         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1351 2012-09-18  Ian Lance Taylor  <iant@google.com>
1353         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1354         * mmapio.c: Don't define _GNU_SOURCE.
1355         * configure, config.h.in: Rebuild.
1357 2012-09-18  Ian Lance Taylor  <iant@google.com>
1359         * configure.ac: Check whether strnlen is declared.
1360         * dwarf.c: Declare strnlen if not declared.
1361         * configure, config.h.in: Rebuild.
1363 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1365         * fileline.c: Include <stdlib.h>.
1366         * mmap.c: Likewise.
1368 2012-09-17  Ian Lance Taylor  <iant@google.com>
1370         PR bootstrap/54611
1371         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
1372         parameter.
1374 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
1376         PR bootstrap/54611
1377         * nounwind.c (backtrace_simple): Add state parameter.
1379 2012-09-17  Ian Lance Taylor  <iant@google.com>
1381         PR bootstrap/54609
1382         * unknown.c (unknown_fileline): Add state parameter, remove
1383         fileline_data parameter, name error_callback parameter.
1384         (backtrace_initialize): Add state parameter.
1386 2012-09-17  Ian Lance Taylor  <iant@google.com>
1388         * Initial implementation.
1390 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1392 Copying and distribution of this file, with or without modification,
1393 are permitted in any medium without royalty provided the copyright
1394 notice and this notice are preserved.