PR rtl-optimization/88018
[official-gcc.git] / libbacktrace / ChangeLog
blobc142d212ebb3d16f0285c09df7cae38e8324cb93
1 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
3         PR bootstrap/82856
4         * Makefile.am: Include multilib.am.
5         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.
6         * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
8 2018-10-05  Ian Lance Taylor  <iant@golang.org>
10         PR libbacktrace/87529
11         * backtrace.h: Document that backtrace_create_state should be
12         called only once.
14 2018-08-05 Iain Buclaw  <ibuclaw@gdcproject.org>
16         * configure.ac: Move define of HAVE_ZLIB into check for -lz.
17         * Makefile.in: Regenerate.
18         * config.h.in: Likewise.
19         * configure: Likewise.
21 2018-08-01  Tony Reix  <tony.reix@atos.net>
23         * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
24         (struct xcoff_func, struct xcoff_func_vector): New structs.
25         (xcoff_syminfo): Drop leading dot from symbol name.
26         (xcoff_line_compare, xcoff_line_search): Remove.
27         (xcoff_func_compare, xcoff_func_search): New static functions.
28         (xcoff_lookup_pc): Search function table.
29         (xcoff_add_line, xcoff_process_linenos): Remove.
30         (xcoff_initialize_fileline): Build function table.
32 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
34         PR other/86198
35         * elf.c (elf_add): Increase ".note.gnu.build-id" section size
36         checking up to 36 bytes.
38 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
40         * configure: Regenerated.
42 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
44         * configure: Regenerated.
46 2018-04-17  Ian Lance Taylor  <iant@golang.org>
48         * backtrace.c: Revert last two changes.  Don't call mmap
49         directly.
51 2018-04-17  Ian Lance Taylor  <iant@golang.org>
53         * backtrace.c: Include backtrace-supported.h before checking
54         BACKTRACE_USES_MALLOC.
56 2018-04-17  Ian Lance Taylor  <iant@golang.org>
58         * backtrace.c (backtrace_full): When testing whether we can
59         allocate memory, call mmap directly, and munmap the memory.
61 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
63         PR other/85161
64         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
65         big endian, only use 32-bit loads if endianity macros are predefined
66         and indicate big or little endian.
68 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
70         PR target/84148
71         * configure: Regenerate.
73 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
75         PR other/82368
76         * elf.c (SHT_PROGBITS): Undefine and define.
78 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
80         PR other/82368
81         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
82         (struct elf_ppc64_opd_data): New type.
83         (elf_initialize_syminfo): Add opd argument, handle symbols
84         pointing into the PowerPC64 ELFv1 .opd section.
85         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
86         to structure with .opd data to elf_initialize_syminfo.
88 2018-01-31  Ian Lance Taylor  <iant@golang.org>
90         * elf.c (elf_add): Close descriptor if we use a debugfile.
91         * btest.c (check_open_files): New static function.
92         (main): Call check_open_files.
94 2018-01-25  Ian Lance Taylor  <iant@golang.org>
96         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
97         desired CRC is zero.
98         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
100 2018-01-25  Ian Lance Taylor  <iant@golang.org>
102         * pecoff.c (coff_add): Only release syms_view if it is valid.
104 2018-01-25  Ian Lance Taylor  <iant@golang.org>
106         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
108 2018-01-24  Ian Lance Taylor  <iant@golang.org>
110         * pecoff.c (coff_add): Use coff_read4, not memcpy.
112 2018-01-24  Ian Lance Taylor  <iant@golang.org>
114         PR other/68239
115         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
116         on the free list.
118 2018-01-19  Tony Reix  <tony.reix@atos.net>
120         * xcoff.c (xcoff_incl_compare): New function.
121         (xcoff_incl_search): New function.
122         (xcoff_process_linenos): Use bsearch to find include file.
123         (xcoff_initialize_fileline): Sort include file information.
125 2018-01-16  Ian Lance Taylor  <iant@golang.org>
127         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
128         288.
129         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
130         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
131         (elf_zlib_default_table): Update.
132         (elf_zlib_default_dist_table): New static array.
133         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
134         for block type 1.
135         * ztest.c (struct zlib_test): Add uncompressed_len.
136         (tests): Initialize uncompressed_len field.  Add new test case.
137         (test_samples): Use uncompressed_len field.
139 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
141         Update copyright years.
143 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
145         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
146         * aclocal.m4: Regenerate.
147         * Makefile.in: Likewise.
148         * configure: Likewise.
150 2017-10-06  Ian Lance Taylor  <iant@golang.org>
152         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
153         zlib uncompress function.
155 2017-10-05  Ian Lance Taylor  <iant@golang.org>
157         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
158         Read a four byte integer.
159         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
160         boundary before ever calling elf_zlib_fetch.
161         * ztest.c (test_large): Simplify print statements a bit.
163 2017-10-02  Ian Lance Taylor  <iant@golang.org>
165         * ztest.c: #include <errno.h>.
166         (TEST_TIMING): Don't define, don't test.
167         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
168         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
169         (ZLIB_CLOCK_GETTIME_ARG): Define.
170         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
171         * Makefile.am: Likewise.
172         * configure, Makefile.in: Rebuild.
174 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
176         PR other/67165
177         * Makefile.am: Append the content of clock_gettime_link to
178         ztest_LDADD.
179         * configure.ac: Test for the case that clock_gettime is in librt.
180         * Makefile.in: Regenerate.
181         * configure: Likewise.
183         PR other/67165
184         * configure.ac: Check for clock_gettime.
185         * config.h.in: Regenerate.
186         * configure: Likewise.
187         * ztest.c (average_time, test_large): Conditionalize test timing
188         on clock_gettime availability.
190 2017-09-29  Tony Reix  <tony.reix@atos.net>
192         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
193         (STYP_DWARF, SSUBTYP_DW*): Define.
194         (enum dwarf_section): Define.
195         (struct dwsect_info): Define.
196         (xcoff_add): Look for DWARF sections, pass them to
197         backtrace_dwarf_add.
199 2017-09-28  Ian Lance Taylor  <iant@golang.org>
201         PR other/67165
202         * elf.c (__builtin_prefetch): Define if not __GNUC__.
203         (unlikely): Define.
204         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
205         (b_elf_chdr): Define type.
206         (enum debug_section): Add ZDEBUG_xxx values.
207         (debug_section_names): Add names for new sections.
208         (struct debug_section_info): Add compressed field.
209         (elf_zlib_failed, elf_zlib_fetch): New static functions.
210         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
211         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
212         (HUFFMAN_SECONDARY_SHIFT): Define.
213         (ZDEBUG_TABLE_SIZE): Define.
214         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
215         (final_next_secondary): New static variable if
216         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
217         (elf_zlib_inflate_table): New static function.
218         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
219         function to produce fixed Huffman table.
220         (elf_zlib_default_table): New static variable.
221         (elf_zlib_inflate): New static function.
222         (elf_zlib_verify_checksum): Likewise.
223         (elf_zlib_inflate_and_verify): Likewise.
224         (elf_uncompress_zdebug): Likewise.
225         (elf_uncompress_chdr): Likewise.
226         (backtrace_uncompress_zdebug): New extern function.
227         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
228         sections, and uncompress them.
229         * internal.h (backtrace_compress_zdebug): Declare.
230         * ztest.c: New file.
231         * configure.ac: Check for -lz and check whether the linker
232         supports --compress-debug-sections.
233         * Makefile.am (ztest_SOURCES): New variable.
234         (ztest_CFLAGS, ztest_LDADD): New variables.
235         (check_PROGRAMS): Add ztest.
236         (ctestg_SOURCES): New variable.
237         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
238         (ctesta_SOURCES): New variable.
239         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
240         (check_PROGRAMS): Add ctestg and ctesta.
241         * configure, config.h.in, Makefile.in: Rebuild.
243 2017-09-22  Ian Lance Taylor  <iant@golang.org>
245         PR sanitizer/77631
246         * configure.ac: Check for lstat and readlink.
247         * elf.c (lstat, readlink): Provide dummy versions if real versions
248         are not available.
249         * configure, config.h.in: Rebuild.
251 2017-09-21  Ian Lance Taylor  <iant@google.com>
253         PR go/82284
254         * elf.c (backtrace_initialize): Set pd.exe_filename.
256 2017-09-20  Ian Lance Taylor  <iant@golang.org>
257             Denis Khalikov  <d.khalikov@partner.samsung.com>
259         PR sanitizer/77631
260         Support for external debug info.
261         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
262         (S_ISLNK): Define if not defined.
263         (xstrnlen): Define if strnlen is not available.
264         (b_elf_note): Define type.
265         (NT_GNU_BUILD_ID): Define macro.
266         (elf_crc32, elf_crc32_file): New static functions.
267         (elf_is_symlink, elf_readlink): New static functions.
268         (elf_open_debugfile_by_buildid): New static function.
269         (elf_try_debugfile): New static function.
270         (elf_find_debugfile_by_debuglink): New static function.
271         (elf_open_debugfile_by_debuglink): New static function.
272         (elf_add): Add filename and debuginfo parameters.  Adjust all
273         callers.  Look for external debug info notes, and try to fetch
274         debug info from external file.
275         (struct phdr_data): Add exe_filename field.
276         (phdr_callback): Pass filename to elf_add.
277         (backtrace_initialize): Add filename parameter.
278         * internal.h (backtrace_initialize): Add filename parameter.
279         * fileline.c (fileline_initialize): Pass filename to
280         backtrace_initialize.
281         * pecoff.c (fileline_initialize): Add unused filename parameter.
282         * unknown.c (fileline_initialize): Likewise.
283         * xcoff.c (fileline_initialize): Likewise.
284         * configure.ac: Check for objcopy --add-gnu-debuglink.
285         * Makefile.am (dtest): New test target.
286         * configure, Makefile.in: Rebuild.
288 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
290         PR other/81096
291         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
292         * Makefile.in: Regenerate.
294 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
296         PR other/81096
297         * libbacktrace/Makefile.in
298         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
300 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
302         PR bootstrap/81638
303         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
305 2017-07-28  Tony Reix  <tony.reix@atos.net>
307         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
309 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
311         * fileline.c (fileline_initialize): Print pid_t as long.
313 2017-07-26  Tony Reix  <tony.reix@atos.net>
315         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
316         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
317         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
318         * configure, config.h.in: Regenerate.
320 2017-07-21  Tony Reix  <tony.reix@atos.net>
322         * filetype.awk: Add AIX XCOFF type detection.
323         * configure.ac: Recognize xcoff format.
324         * Makefile.am (FORMAT_FILES): Add xcoff.c.
325         * fileline.c: Include <unistd.h>.
326         (fileline_initialize): Add case for AIX procfs.
327         * xcoff.c: New file.
328         * configure, Makefile.in: Rebuild.
330 2017-06-21  Richard Biener  <rguenther@suse.de>
332         * configure.ac: Add AC_SYS_LARGEFILE.
333         * config.h.in: Regenerate.
334         * configure: Likewise.
336 2017-06-11  Ian Lance Taylor  <iant@golang.org>
338         * elf.c (backtrace_initialize): Always set *fileline_fn.
339         * ttest.c: New file.
340         * btest.c: Move support functions into testlib.c.  Change calls to
341         check to pass file name.
342         * testlib.c: New file, copied from (part of) btest.c.
343         * testlib.h: New file, declarations for testlib.c.
344         * edtest.c: Use testlib.h and testlib.c.
345         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
346         * Makefile.am (btest_SOURCES): Add testlib.c.
347         (edtest_SOURCES): Likewise.
348         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
349         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
350         * configure, Makefile.in: Rebuild.
352 2017-05-19  Than McIntosh  <thanm@google.com>
354         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
355         (read_line_header): Don't allocate dirs if dirs_count == 0.
356         * edtest.c: New file.
357         * edtest2.c: New file.
358         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
359         (check_PROGRAMS): Add edtest.
360         (edtest2_build.c, gen_edtest2_build): New targets.
361         * Makefile.in: Rebuild.
363 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
365         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
366         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
368 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
370         Update copyright years.
372 2016-11-15  Matthias Klose  <doko@ubuntu.com>
374         * configure: Regenerate.
376 2016-09-11  Carlos Liam  <carlos@aarzee.me>
378         * all: Remove meaningless trailing whitespace.
380 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
382         PR target/71161
383         * elf.c (phdr_callback) [__i386__]: Add
384         __attribute__((__force_align_arg_pointer__)).
386 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
388         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
389         avoid possible crash.
390         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
391         missing debug info anymore.
393 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
395         * mmap.c (MAP_FAILED): Define if not defined.
397 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
399         Update copyright years.
401 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
403         * configure.ac: Specify that DJGPP do not have mmap
404         even when sys/mman.h exists.
405         * configure: Regenerate
407 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
409         PR libgfortran/68115
410         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
411         * configure: Regenerate.
412         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
413         to void.
415 2015-09-17  Ian Lance Taylor  <iant@google.com>
417         * posix.c (backtrace_open): Cast second argument of open() to int.
419 2015-09-11  Ian Lance Taylor  <iant@google.com>
421         * Makefile.am (backtrace.lo): Depend on internal.h.
422         (sort.lo, stest.lo): Add explicit dependencies.
423         * Makefile.in: Rebuild.
425 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
427         * backtrace.c: #include <sys/types.h>.
429 2015-09-08  Ian Lance Taylor  <iant@google.com>
431         PR other/67457
432         * backtrace.c: #include "internal.h".
433         (struct backtrace_data): Add can_alloc field.
434         (unwind): If can_alloc is false, don't try to get file/line
435         information.
436         (backtrace_full): Set can_alloc field in bdata.
437         * alloc.c (backtrace_alloc): Don't call error_callback if it is
438         NULL.
439         * mmap.c (backtrace_alloc): Likewise.
440         * internal.h: Update comments for backtrace_alloc and
441         backtrace_free.
443 2015-09-08  Ian Lance Taylor  <iant@google.com>
445         PR other/67457
446         * mmap.c (backtrace_alloc): Correct test for mmap failure.
448 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
450         * configure.ac: For spu-*-* targets, set have_fcntl to no.
451         * configure: Regenerate.
453 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
455         * configure.ac: Remove [disable-shared] argument to LT_INIT.
456         Remove setting PIC_FLAG when building as target library.
457         * configure: Regenerate.
459 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
461         * configure.ac: Only compile with -fPIC if the target
462         supports it.
463         * configure: Regenerate.
465 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
467         * configure.ac: Set have_mmap to no on spu-*-* targets.
468         * configure: Regenerate.
470 2015-08-13  Ian Lance Taylor  <iant@google.com>
472         * dwarf.c (read_function_entry): Add vec_inlined parameter.
473         Change all callers.
475 2015-06-11  Martin Sebor  <msebor@redhat.com>
477         PR sanitizer/65479
478         * dwarf.c (struct line): Add new field idx.
479         (line_compare): Use it.
480         (add_line): Set it.
481         (read_line_info): Reset it.
483 2015-05-29  Tristan Gingold  <gingold@adacore.com>
485         * pecoff.c: New file.
486         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
487         * Makefile.in: Regenerate.
488         * filetype.awk: Detect pecoff.
489         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
490         Add pecoff.
491         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
492         true.
493         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
494         * configure: Regenerate.
495         * pecoff.c: New file.
497 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
499         * Makefile.in: Regenerated with automake-1.11.6.
500         * aclocal.m4: Likewise.
501         * configure: Likewise.
503 2015-01-24  Matthias Klose  <doko@ubuntu.com>
505         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
506         * configure: Regenerate.
508 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
510         Update copyright years.
512 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
514         PR bootstrap/63784
515         * configure: Regenerated.
517 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
519         * ChangeLog.jit: New.
521 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
523         PR target/63610
524         * configure: Regenerate.
526 2014-10-23  Ian Lance Taylor  <iant@google.com>
528         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
529         Fix to return void *.
531 2014-05-08  Ian Lance Taylor  <iant@google.com>
533         * mmap.c (backtrace_free): If freeing a large aligned block of
534         memory, call munmap rather than holding onto it.
535         (backtrace_vector_grow): When growing a vector, double the number
536         of pages requested.  When releasing the old version of a grown
537         vector, pass the correct size to backtrace_free.
539 2014-03-07  Ian Lance Taylor  <iant@google.com>
541         * sort.c (backtrace_qsort): Use middle element as pivot.
543 2014-03-06  Ian Lance Taylor  <iant@google.com>
545         * sort.c: New file.
546         * stest.c: New file.
547         * internal.h (backtrace_qsort): Declare.
548         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
549         (read_line_info, read_function_entry): Likewise.
550         (read_function_info, build_dwarf_data): Likewise.
551         * elf.c (elf_initialize_syminfo): Likewise.
552         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
553         (stest_SOURCES, stest_LDADD): Define.
554         (check_PROGRAMS): Add stest.
556 2014-02-07  Misty De Meo  <misty@brew.sh>
558         PR target/58710
559         * configure.ac: Use AC_LINK_IFELSE in check for
560         _Unwind_GetIPInfo.
561         * configure: Regenerate.
563 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
565         Update copyright years
567 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
569         * elf.c (ET_DYN): Undefine and define again.
570         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
571         return early -1 without closing the descriptor.
572         (struct phdr_data): Add exe_descriptor.
573         (phdr_callback): If pd->exe_descriptor is not -1, for very first
574         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
575         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
576         call to elf_add.
577         (backtrace_initialize): Adjust call to elf_add.  If it returns
578         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
580 2013-12-05  Ian Lance Taylor  <iant@google.com>
582         * alloc.c (backtrace_vector_finish): Add error_callback and data
583         parameters.  Call backtrace_vector_release.  Return address base.
584         * mmap.c (backtrace_vector_finish): Add error_callback and data
585         parameters.  Return address base.
586         * dwarf.c (read_function_info): Get new address base from
587         backtrace_vector_finish.
588         * internal.h (backtrace_vector_finish): Update declaration.
590 2013-11-27  Ian Lance Taylor  <iant@google.com>
592         * dwarf.c (find_address_ranges): New static function, broken out
593         of build_address_map.
594         (build_address_map): Call it.
595         * btest.c (check): Check for missing filename or function, rather
596         than crashing.
597         (f3): Check that enough frames were returned.
599 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
601         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
602         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
603         last argument.
604         * btest.c (struct symdata): Add size field.
605         (callback_three): Add symsize argument.  Copy it to the data->size
606         field.
607         (f23): Set symdata.size to 0.
608         (test5): Likewise.  If sizeof (int) > 1, lookup address of
609         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
610         values.
612         * atomic.c: Include sys/types.h.
614 2013-11-18  Ian Lance Taylor  <iant@google.com>
616         * configure.ac: Check for support of __atomic extensions.
617         * internal.h: Declare or #define atomic functions for use in
618         backtrace code.
619         * atomic.c: New file.
620         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
621         (dwarf_fileline, backtrace_dwarf_add): Likewise.
622         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
623         (backtrace_initialize): Likewise.
624         * fileline.c (fileline_initialize): Likewise.
625         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
626         * configure, config.h.in, Makefile.in: Rebuild.
628 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
630         * elf.c (SHN_UNDEF): Define.
631         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
632         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
633         (elf_add): Adjust caller.
635         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
637 2013-11-16  Ian Lance Taylor  <iant@google.com>
639         * backtrace.h (backtrace_create_state): Correct comment about
640         threading.
642 2013-11-15  Ian Lance Taylor  <iant@google.com>
644         * backtrace.h (backtrace_syminfo): Update comment and parameter
645         name to take any address, not just a PC value.
646         * elf.c (STT_OBJECT): Define.
647         (elf_nosyms): Rename parameter pc to addr.
648         (elf_symbol_search): Rename local variable pc to addr.
649         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
650         (elf_syminfo): Rename parameter pc to addr.
651         * btest.c (global): New global variable.
652         (test5): New test.
653         (main): Call test5.
655 2013-10-17  Ian Lance Taylor  <iant@google.com>
657         * elf.c (elf_add): Don't get the wrong offsets if a debug section
658         is missing.
660 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
662         * configure.ac: Add --enable-host-shared, setting up
663         pre-existing PIC_FLAG variable within Makefile.am et al.
664         * configure: Regenerate.
666 2013-09-20  Alan Modra  <amodra@gmail.com>
668         * configure: Regenerate.
670 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
672         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
674 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
676         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
677         dl_iterate_phdr callbacks.
679 2013-03-25  Ian Lance Taylor  <iant@google.com>
681         * alloc.c: #include <sys/types.h>.
682         * mmap.c: Likewise.
684 2013-01-31  Ian Lance Taylor  <iant@google.com>
686         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
687         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
689 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
691         PR other/56076
692         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
693         attribute was not seen.
695 2013-01-16  Ian Lance Taylor  <iant@google.com>
697         * dwarf.c (struct unit): Add filename and abs_filename fields.
698         (build_address_map): Set new fields when reading unit.
699         (dwarf_lookup_pc): If we don't find an entry in the line table,
700         just return the main file name.
702 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
704         Update copyright years.
706 2013-01-01  Ian Lance Taylor  <iant@google.com>
708         PR bootstrap/54834
709         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
710         $(MULTIBUILDTOP)/../../gcc/include.
711         * Makefile.in: Rebuild.
713 2013-01-01  Ian Lance Taylor  <iant@google.com>
715         PR other/55536
716         * mmap.c (backtrace_alloc): Don't call sync functions if not
717         threaded.
718         (backtrace_free): Likewise.
720 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
722         * mmapio.c: Define MAP_FAILED if not defined.
724 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
726         PR bootstrap/54926
727         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
728         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
729         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
730         accepts it.
731         * Makefile.in: Regenerated.
732         * configure: Regenerated.
734 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
736         PR bootstrap/54926
737         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
738         * Makefile.in: Regenerated.
740 2012-11-20  Ian Lance Taylor  <iant@google.com>
742         * dwarf.c (read_attribute): Always clear val.
744 2012-11-13  Ian Lance Taylor  <iant@google.com>
746         PR other/55312
747         * configure.ac: Only add -Werror if building a target library.
748         * configure: Rebuild.
750 2012-11-12  Ian Lance Taylor  <iant@google.com>
751             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
752             Gerald Pfeifer  <gerald@pfeifer.com>
754         * configure.ac: Check for getexecname.
755         * fileline.c: #include <errno.h>.  Define getexecname if not
756         available.
757         (fileline_initialize): Try to find the executable in a few
758         different ways.
759         * print.c (error_callback): Only print the filename if it came
760         from the backtrace state.
761         * configure, config.h.in: Rebuild.
763 2012-10-29  Ian Lance Taylor  <iant@google.com>
765         * mmap.c (backtrace_vector_release): Correct last patch: add
766         aligned, not size.
768 2012-10-29  Ian Lance Taylor  <iant@google.com>
770         * mmap.c (backtrace_vector_release): Make sure freed block is
771         aligned on 8-byte boundary.
773 2012-10-26  Ian Lance Taylor  <iant@google.com>
775         PR other/55087
776         * posix.c (backtrace_open): Add does_not_exist parameter.
777         * elf.c (phdr_callback): Do not warn if shared library could not
778         be opened.
779         * fileline.c (fileline_initialize): Update calls to
780         backtrace_open.
781         * internal.h (backtrace_open): Update declaration.
783 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
785         PR target/55061
786         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
787         * configure: Regenerate.
789 2012-10-24  Ian Lance Taylor  <iant@google.com>
791         PR target/55061
792         * configure.ac: Check whether -funwind-tables option works.
793         * configure: Rebuild.
795 2012-10-11  Ian Lance Taylor  <iant@google.com>
797         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
798         * configure: Rebuild.
800 2012-10-10  Ian Lance Taylor  <iant@google.com>
802         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
803         lower case.
805 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
807         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
809 2012-10-09  Ian Lance Taylor  <iant@google.com>
811         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
812         (backtrace_dwarf_add): Likewise.
814 2012-10-09  Ian Lance Taylor  <iant@google.com>
816         Add support for tracing through shared libraries.
817         * configure.ac: Check for link.h and dl_iterate_phdr.
818         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
819         ELF macros before #defining them.
820         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
821         dl_iterate_phdr.
822         (struct elf_syminfo_data): Add next field.
823         (elf_initialize_syminfo): Initialize next field.
824         (elf_add_syminfo_data): New static function.
825         (elf_add): New static function, broken out of
826         backtrace_initialize.  Call backtrace_dwarf_add instead of
827         backtrace_dwarf_initialize.
828         (struct phdr_data): Define.
829         (phdr_callback): New static function.
830         (backtrace_initialize): Call elf_add.
831         * dwarf.c (struct dwarf_data): Add next and base_address fields.
832         (add_unit_addr): Add base_address parameter.  Change all callers.
833         (add_unit_ranges, build_address_map): Likewise.
834         (add_line): Add ddata parameter.  Change all callers.
835         (read_line_program, add_function_range): Likewise.
836         (dwarf_lookup_pc): New static function, broken out of
837         dwarf_fileline.
838         (dwarf_fileline): Call dwarf_lookup_pc.
839         (build_dwarf_data): New static function.
840         (backtrace_dwarf_add): New function.
841         (backtrace_dwarf_initialize): Remove.
842         * internal.h (backtrace_dwarf_initialize): Don't declare.
843         (backtrace_dwarf_add): Declare.
844         * configure, config.h.in: Rebuild.
846 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
848         * btest.c (f23): Avoid uninitialized variable warning.
850 2012-10-04  Ian Lance Taylor  <iant@google.com>
852         * dwarf.c: If the system header files do not declare strnlen,
853         provide our own version.
855 2012-10-03  Ian Lance Taylor  <iant@google.com>
857         * dwarf.c (read_uleb128): Fix overflow test.
858         (read_sleb128): Likewise.
859         (build_address_map): Don't change unit_buf.start.
861 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
863         PR other/54761
864         * configure.ac (EXTRA_FLAGS): New.
865         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
866         * configure, Makefile.in: Regenerate.
868 2012-09-29  Ian Lance Taylor  <iant@google.com>
870         PR other/54749
871         * fileline.c (fileline_initialize): Pass errnum as -1 when
872         reporting that we could not read executable information after a
873         previous failure.
875 2012-09-27  Ian Lance Taylor  <iant@google.com>
877         PR bootstrap/54732
878         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
879         * Makefile.am: Add dependencies for all objects.
880         * configure, aclocal.m4, Makefile.in: Rebuild.
882 2012-09-27  Ian Lance Taylor  <iant@google.com>
884         PR other/54726
885         * elf.c (backtrace_initialize): Set *fileln_fn, not
886         state->fileln_fn.
888 2012-09-19  Ian Lance Taylor  <iant@google.com>
890         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
891         as a target library.
892         * configure: Rebuild.
894 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
895             Ian Lance Taylor  <iant@google.com>
897         * configure.ac (GCC_HEADER_STDINT): Invoke.
898         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
899         * btest.c: Don't include <stdint.h>.
900         * dwarf.c: Likewise.
901         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
903 2012-09-18  Ian Lance Taylor  <iant@google.com>
905         PR bootstrap/54623
906         * Makefile.am (AM_CPPFLAGS): Define.
907         (AM_CFLAGS): Remove -I options.
908         * Makefile.in: Rebuild.
910 2012-09-18  Ian Lance Taylor  <iant@google.com>
912         * posix.c (O_BINARY): Define if not defined.
913         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
914         HAVE_FCNTL is defined.
915         * configure.ac: Test for the fcntl function.
916         * configure, config.h.in: Rebuild.
918 2012-09-18  Ian Lance Taylor  <iant@google.com>
920         * btest.c (test1, test2, test3, test4): Add the unused attribute.
922 2012-09-18  Ian Lance Taylor  <iant@google.com>
924         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
926 2012-09-18  Ian Lance Taylor  <iant@google.com>
928         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
929         * mmapio.c: Don't define _GNU_SOURCE.
930         * configure, config.h.in: Rebuild.
932 2012-09-18  Ian Lance Taylor  <iant@google.com>
934         * configure.ac: Check whether strnlen is declared.
935         * dwarf.c: Declare strnlen if not declared.
936         * configure, config.h.in: Rebuild.
938 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
940         * fileline.c: Include <stdlib.h>.
941         * mmap.c: Likewise.
943 2012-09-17  Ian Lance Taylor  <iant@google.com>
945         PR bootstrap/54611
946         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
947         parameter.
949 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
951         PR bootstrap/54611
952         * nounwind.c (backtrace_simple): Add state parameter.
954 2012-09-17  Ian Lance Taylor  <iant@google.com>
956         PR bootstrap/54609
957         * unknown.c (unknown_fileline): Add state parameter, remove
958         fileline_data parameter, name error_callback parameter.
959         (backtrace_initialize): Add state parameter.
961 2012-09-17  Ian Lance Taylor  <iant@google.com>
963         * Initial implementation.
965 Copyright (C) 2012-2018 Free Software Foundation, Inc.
967 Copying and distribution of this file, with or without modification,
968 are permitted in any medium without royalty provided the copyright
969 notice and this notice are preserved.