2018-10-14 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / libbacktrace / ChangeLog
blob75745aa1796a0457a3e32813e1f00d424d817afd
1 2018-10-05  Ian Lance Taylor  <iant@golang.org>
3         PR libbacktrace/87529
4         * backtrace.h: Document that backtrace_create_state should be
5         called only once.
7 2018-08-05 Iain Buclaw  <ibuclaw@gdcproject.org>
9         * configure.ac: Move define of HAVE_ZLIB into check for -lz.
10         * Makefile.in: Regenerate.
11         * config.h.in: Likewise.
12         * configure: Likewise.
14 2018-08-01  Tony Reix  <tony.reix@atos.net>
16         * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
17         (struct xcoff_func, struct xcoff_func_vector): New structs.
18         (xcoff_syminfo): Drop leading dot from symbol name.
19         (xcoff_line_compare, xcoff_line_search): Remove.
20         (xcoff_func_compare, xcoff_func_search): New static functions.
21         (xcoff_lookup_pc): Search function table.
22         (xcoff_add_line, xcoff_process_linenos): Remove.
23         (xcoff_initialize_fileline): Build function table.
25 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
27         PR other/86198
28         * elf.c (elf_add): Increase ".note.gnu.build-id" section size
29         checking up to 36 bytes.
31 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
33         * configure: Regenerated.
35 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
37         * configure: Regenerated.
39 2018-04-17  Ian Lance Taylor  <iant@golang.org>
41         * backtrace.c: Revert last two changes.  Don't call mmap
42         directly.
44 2018-04-17  Ian Lance Taylor  <iant@golang.org>
46         * backtrace.c: Include backtrace-supported.h before checking
47         BACKTRACE_USES_MALLOC.
49 2018-04-17  Ian Lance Taylor  <iant@golang.org>
51         * backtrace.c (backtrace_full): When testing whether we can
52         allocate memory, call mmap directly, and munmap the memory.
54 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
56         PR other/85161
57         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
58         big endian, only use 32-bit loads if endianity macros are predefined
59         and indicate big or little endian.
61 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
63         PR target/84148
64         * configure: Regenerate.
66 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
68         PR other/82368
69         * elf.c (SHT_PROGBITS): Undefine and define.
71 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
73         PR other/82368
74         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
75         (struct elf_ppc64_opd_data): New type.
76         (elf_initialize_syminfo): Add opd argument, handle symbols
77         pointing into the PowerPC64 ELFv1 .opd section.
78         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
79         to structure with .opd data to elf_initialize_syminfo.
81 2018-01-31  Ian Lance Taylor  <iant@golang.org>
83         * elf.c (elf_add): Close descriptor if we use a debugfile.
84         * btest.c (check_open_files): New static function.
85         (main): Call check_open_files.
87 2018-01-25  Ian Lance Taylor  <iant@golang.org>
89         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
90         desired CRC is zero.
91         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
93 2018-01-25  Ian Lance Taylor  <iant@golang.org>
95         * pecoff.c (coff_add): Only release syms_view if it is valid.
97 2018-01-25  Ian Lance Taylor  <iant@golang.org>
99         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
101 2018-01-24  Ian Lance Taylor  <iant@golang.org>
103         * pecoff.c (coff_add): Use coff_read4, not memcpy.
105 2018-01-24  Ian Lance Taylor  <iant@golang.org>
107         PR other/68239
108         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
109         on the free list.
111 2018-01-19  Tony Reix  <tony.reix@atos.net>
113         * xcoff.c (xcoff_incl_compare): New function.
114         (xcoff_incl_search): New function.
115         (xcoff_process_linenos): Use bsearch to find include file.
116         (xcoff_initialize_fileline): Sort include file information.
118 2018-01-16  Ian Lance Taylor  <iant@golang.org>
120         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
121         288.
122         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
123         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
124         (elf_zlib_default_table): Update.
125         (elf_zlib_default_dist_table): New static array.
126         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
127         for block type 1.
128         * ztest.c (struct zlib_test): Add uncompressed_len.
129         (tests): Initialize uncompressed_len field.  Add new test case.
130         (test_samples): Use uncompressed_len field.
132 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
134         Update copyright years.
136 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
138         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
139         * aclocal.m4: Regenerate.
140         * Makefile.in: Likewise.
141         * configure: Likewise.
143 2017-10-06  Ian Lance Taylor  <iant@golang.org>
145         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
146         zlib uncompress function.
148 2017-10-05  Ian Lance Taylor  <iant@golang.org>
150         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
151         Read a four byte integer.
152         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
153         boundary before ever calling elf_zlib_fetch.
154         * ztest.c (test_large): Simplify print statements a bit.
156 2017-10-02  Ian Lance Taylor  <iant@golang.org>
158         * ztest.c: #include <errno.h>.
159         (TEST_TIMING): Don't define, don't test.
160         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
161         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
162         (ZLIB_CLOCK_GETTIME_ARG): Define.
163         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
164         * Makefile.am: Likewise.
165         * configure, Makefile.in: Rebuild.
167 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
169         PR other/67165
170         * Makefile.am: Append the content of clock_gettime_link to
171         ztest_LDADD.
172         * configure.ac: Test for the case that clock_gettime is in librt.
173         * Makefile.in: Regenerate.
174         * configure: Likewise.
176         PR other/67165
177         * configure.ac: Check for clock_gettime.
178         * config.h.in: Regenerate.
179         * configure: Likewise.
180         * ztest.c (average_time, test_large): Conditionalize test timing
181         on clock_gettime availability.
183 2017-09-29  Tony Reix  <tony.reix@atos.net>
185         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
186         (STYP_DWARF, SSUBTYP_DW*): Define.
187         (enum dwarf_section): Define.
188         (struct dwsect_info): Define.
189         (xcoff_add): Look for DWARF sections, pass them to
190         backtrace_dwarf_add.
192 2017-09-28  Ian Lance Taylor  <iant@golang.org>
194         PR other/67165
195         * elf.c (__builtin_prefetch): Define if not __GNUC__.
196         (unlikely): Define.
197         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
198         (b_elf_chdr): Define type.
199         (enum debug_section): Add ZDEBUG_xxx values.
200         (debug_section_names): Add names for new sections.
201         (struct debug_section_info): Add compressed field.
202         (elf_zlib_failed, elf_zlib_fetch): New static functions.
203         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
204         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
205         (HUFFMAN_SECONDARY_SHIFT): Define.
206         (ZDEBUG_TABLE_SIZE): Define.
207         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
208         (final_next_secondary): New static variable if
209         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
210         (elf_zlib_inflate_table): New static function.
211         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
212         function to produce fixed Huffman table.
213         (elf_zlib_default_table): New static variable.
214         (elf_zlib_inflate): New static function.
215         (elf_zlib_verify_checksum): Likewise.
216         (elf_zlib_inflate_and_verify): Likewise.
217         (elf_uncompress_zdebug): Likewise.
218         (elf_uncompress_chdr): Likewise.
219         (backtrace_uncompress_zdebug): New extern function.
220         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
221         sections, and uncompress them.
222         * internal.h (backtrace_compress_zdebug): Declare.
223         * ztest.c: New file.
224         * configure.ac: Check for -lz and check whether the linker
225         supports --compress-debug-sections.
226         * Makefile.am (ztest_SOURCES): New variable.
227         (ztest_CFLAGS, ztest_LDADD): New variables.
228         (check_PROGRAMS): Add ztest.
229         (ctestg_SOURCES): New variable.
230         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
231         (ctesta_SOURCES): New variable.
232         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
233         (check_PROGRAMS): Add ctestg and ctesta.
234         * configure, config.h.in, Makefile.in: Rebuild.
236 2017-09-22  Ian Lance Taylor  <iant@golang.org>
238         PR sanitizer/77631
239         * configure.ac: Check for lstat and readlink.
240         * elf.c (lstat, readlink): Provide dummy versions if real versions
241         are not available.
242         * configure, config.h.in: Rebuild.
244 2017-09-21  Ian Lance Taylor  <iant@google.com>
246         PR go/82284
247         * elf.c (backtrace_initialize): Set pd.exe_filename.
249 2017-09-20  Ian Lance Taylor  <iant@golang.org>
250             Denis Khalikov  <d.khalikov@partner.samsung.com>
252         PR sanitizer/77631
253         Support for external debug info.
254         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
255         (S_ISLNK): Define if not defined.
256         (xstrnlen): Define if strnlen is not available.
257         (b_elf_note): Define type.
258         (NT_GNU_BUILD_ID): Define macro.
259         (elf_crc32, elf_crc32_file): New static functions.
260         (elf_is_symlink, elf_readlink): New static functions.
261         (elf_open_debugfile_by_buildid): New static function.
262         (elf_try_debugfile): New static function.
263         (elf_find_debugfile_by_debuglink): New static function.
264         (elf_open_debugfile_by_debuglink): New static function.
265         (elf_add): Add filename and debuginfo parameters.  Adjust all
266         callers.  Look for external debug info notes, and try to fetch
267         debug info from external file.
268         (struct phdr_data): Add exe_filename field.
269         (phdr_callback): Pass filename to elf_add.
270         (backtrace_initialize): Add filename parameter.
271         * internal.h (backtrace_initialize): Add filename parameter.
272         * fileline.c (fileline_initialize): Pass filename to
273         backtrace_initialize.
274         * pecoff.c (fileline_initialize): Add unused filename parameter.
275         * unknown.c (fileline_initialize): Likewise.
276         * xcoff.c (fileline_initialize): Likewise.
277         * configure.ac: Check for objcopy --add-gnu-debuglink.
278         * Makefile.am (dtest): New test target.
279         * configure, Makefile.in: Rebuild.
281 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
283         PR other/81096
284         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
285         * Makefile.in: Regenerate.
287 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
289         PR other/81096
290         * libbacktrace/Makefile.in
291         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
293 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
295         PR bootstrap/81638
296         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
298 2017-07-28  Tony Reix  <tony.reix@atos.net>
300         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
302 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
304         * fileline.c (fileline_initialize): Print pid_t as long.
306 2017-07-26  Tony Reix  <tony.reix@atos.net>
308         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
309         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
310         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
311         * configure, config.h.in: Regenerate.
313 2017-07-21  Tony Reix  <tony.reix@atos.net>
315         * filetype.awk: Add AIX XCOFF type detection.
316         * configure.ac: Recognize xcoff format.
317         * Makefile.am (FORMAT_FILES): Add xcoff.c.
318         * fileline.c: Include <unistd.h>.
319         (fileline_initialize): Add case for AIX procfs.
320         * xcoff.c: New file.
321         * configure, Makefile.in: Rebuild.
323 2017-06-21  Richard Biener  <rguenther@suse.de>
325         * configure.ac: Add AC_SYS_LARGEFILE.
326         * config.h.in: Regenerate.
327         * configure: Likewise.
329 2017-06-11  Ian Lance Taylor  <iant@golang.org>
331         * elf.c (backtrace_initialize): Always set *fileline_fn.
332         * ttest.c: New file.
333         * btest.c: Move support functions into testlib.c.  Change calls to
334         check to pass file name.
335         * testlib.c: New file, copied from (part of) btest.c.
336         * testlib.h: New file, declarations for testlib.c.
337         * edtest.c: Use testlib.h and testlib.c.
338         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
339         * Makefile.am (btest_SOURCES): Add testlib.c.
340         (edtest_SOURCES): Likewise.
341         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
342         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
343         * configure, Makefile.in: Rebuild.
345 2017-05-19  Than McIntosh  <thanm@google.com>
347         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
348         (read_line_header): Don't allocate dirs if dirs_count == 0.
349         * edtest.c: New file.
350         * edtest2.c: New file.
351         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
352         (check_PROGRAMS): Add edtest.
353         (edtest2_build.c, gen_edtest2_build): New targets.
354         * Makefile.in: Rebuild.
356 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
358         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
359         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
361 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
363         Update copyright years.
365 2016-11-15  Matthias Klose  <doko@ubuntu.com>
367         * configure: Regenerate.
369 2016-09-11  Carlos Liam  <carlos@aarzee.me>
371         * all: Remove meaningless trailing whitespace.
373 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
375         PR target/71161
376         * elf.c (phdr_callback) [__i386__]: Add
377         __attribute__((__force_align_arg_pointer__)).
379 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
381         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
382         avoid possible crash.
383         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
384         missing debug info anymore.
386 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
388         * mmap.c (MAP_FAILED): Define if not defined.
390 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
392         Update copyright years.
394 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
396         * configure.ac: Specify that DJGPP do not have mmap
397         even when sys/mman.h exists.
398         * configure: Regenerate
400 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
402         PR libgfortran/68115
403         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
404         * configure: Regenerate.
405         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
406         to void.
408 2015-09-17  Ian Lance Taylor  <iant@google.com>
410         * posix.c (backtrace_open): Cast second argument of open() to int.
412 2015-09-11  Ian Lance Taylor  <iant@google.com>
414         * Makefile.am (backtrace.lo): Depend on internal.h.
415         (sort.lo, stest.lo): Add explicit dependencies.
416         * Makefile.in: Rebuild.
418 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
420         * backtrace.c: #include <sys/types.h>.
422 2015-09-08  Ian Lance Taylor  <iant@google.com>
424         PR other/67457
425         * backtrace.c: #include "internal.h".
426         (struct backtrace_data): Add can_alloc field.
427         (unwind): If can_alloc is false, don't try to get file/line
428         information.
429         (backtrace_full): Set can_alloc field in bdata.
430         * alloc.c (backtrace_alloc): Don't call error_callback if it is
431         NULL.
432         * mmap.c (backtrace_alloc): Likewise.
433         * internal.h: Update comments for backtrace_alloc and
434         backtrace_free.
436 2015-09-08  Ian Lance Taylor  <iant@google.com>
438         PR other/67457
439         * mmap.c (backtrace_alloc): Correct test for mmap failure.
441 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
443         * configure.ac: For spu-*-* targets, set have_fcntl to no.
444         * configure: Regenerate.
446 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
448         * configure.ac: Remove [disable-shared] argument to LT_INIT.
449         Remove setting PIC_FLAG when building as target library.
450         * configure: Regenerate.
452 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
454         * configure.ac: Only compile with -fPIC if the target
455         supports it.
456         * configure: Regenerate.
458 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
460         * configure.ac: Set have_mmap to no on spu-*-* targets.
461         * configure: Regenerate.
463 2015-08-13  Ian Lance Taylor  <iant@google.com>
465         * dwarf.c (read_function_entry): Add vec_inlined parameter.
466         Change all callers.
468 2015-06-11  Martin Sebor  <msebor@redhat.com>
470         PR sanitizer/65479
471         * dwarf.c (struct line): Add new field idx.
472         (line_compare): Use it.
473         (add_line): Set it.
474         (read_line_info): Reset it.
476 2015-05-29  Tristan Gingold  <gingold@adacore.com>
478         * pecoff.c: New file.
479         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
480         * Makefile.in: Regenerate.
481         * filetype.awk: Detect pecoff.
482         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
483         Add pecoff.
484         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
485         true.
486         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
487         * configure: Regenerate.
488         * pecoff.c: New file.
490 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
492         * Makefile.in: Regenerated with automake-1.11.6.
493         * aclocal.m4: Likewise.
494         * configure: Likewise.
496 2015-01-24  Matthias Klose  <doko@ubuntu.com>
498         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
499         * configure: Regenerate.
501 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
503         Update copyright years.
505 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
507         PR bootstrap/63784
508         * configure: Regenerated.
510 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
512         * ChangeLog.jit: New.
514 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
516         PR target/63610
517         * configure: Regenerate.
519 2014-10-23  Ian Lance Taylor  <iant@google.com>
521         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
522         Fix to return void *.
524 2014-05-08  Ian Lance Taylor  <iant@google.com>
526         * mmap.c (backtrace_free): If freeing a large aligned block of
527         memory, call munmap rather than holding onto it.
528         (backtrace_vector_grow): When growing a vector, double the number
529         of pages requested.  When releasing the old version of a grown
530         vector, pass the correct size to backtrace_free.
532 2014-03-07  Ian Lance Taylor  <iant@google.com>
534         * sort.c (backtrace_qsort): Use middle element as pivot.
536 2014-03-06  Ian Lance Taylor  <iant@google.com>
538         * sort.c: New file.
539         * stest.c: New file.
540         * internal.h (backtrace_qsort): Declare.
541         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
542         (read_line_info, read_function_entry): Likewise.
543         (read_function_info, build_dwarf_data): Likewise.
544         * elf.c (elf_initialize_syminfo): Likewise.
545         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
546         (stest_SOURCES, stest_LDADD): Define.
547         (check_PROGRAMS): Add stest.
549 2014-02-07  Misty De Meo  <misty@brew.sh>
551         PR target/58710
552         * configure.ac: Use AC_LINK_IFELSE in check for
553         _Unwind_GetIPInfo.
554         * configure: Regenerate.
556 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
558         Update copyright years
560 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
562         * elf.c (ET_DYN): Undefine and define again.
563         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
564         return early -1 without closing the descriptor.
565         (struct phdr_data): Add exe_descriptor.
566         (phdr_callback): If pd->exe_descriptor is not -1, for very first
567         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
568         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
569         call to elf_add.
570         (backtrace_initialize): Adjust call to elf_add.  If it returns
571         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
573 2013-12-05  Ian Lance Taylor  <iant@google.com>
575         * alloc.c (backtrace_vector_finish): Add error_callback and data
576         parameters.  Call backtrace_vector_release.  Return address base.
577         * mmap.c (backtrace_vector_finish): Add error_callback and data
578         parameters.  Return address base.
579         * dwarf.c (read_function_info): Get new address base from
580         backtrace_vector_finish.
581         * internal.h (backtrace_vector_finish): Update declaration.
583 2013-11-27  Ian Lance Taylor  <iant@google.com>
585         * dwarf.c (find_address_ranges): New static function, broken out
586         of build_address_map.
587         (build_address_map): Call it.
588         * btest.c (check): Check for missing filename or function, rather
589         than crashing.
590         (f3): Check that enough frames were returned.
592 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
594         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
595         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
596         last argument.
597         * btest.c (struct symdata): Add size field.
598         (callback_three): Add symsize argument.  Copy it to the data->size
599         field.
600         (f23): Set symdata.size to 0.
601         (test5): Likewise.  If sizeof (int) > 1, lookup address of
602         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
603         values.
605         * atomic.c: Include sys/types.h.
607 2013-11-18  Ian Lance Taylor  <iant@google.com>
609         * configure.ac: Check for support of __atomic extensions.
610         * internal.h: Declare or #define atomic functions for use in
611         backtrace code.
612         * atomic.c: New file.
613         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
614         (dwarf_fileline, backtrace_dwarf_add): Likewise.
615         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
616         (backtrace_initialize): Likewise.
617         * fileline.c (fileline_initialize): Likewise.
618         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
619         * configure, config.h.in, Makefile.in: Rebuild.
621 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
623         * elf.c (SHN_UNDEF): Define.
624         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
625         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
626         (elf_add): Adjust caller.
628         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
630 2013-11-16  Ian Lance Taylor  <iant@google.com>
632         * backtrace.h (backtrace_create_state): Correct comment about
633         threading.
635 2013-11-15  Ian Lance Taylor  <iant@google.com>
637         * backtrace.h (backtrace_syminfo): Update comment and parameter
638         name to take any address, not just a PC value.
639         * elf.c (STT_OBJECT): Define.
640         (elf_nosyms): Rename parameter pc to addr.
641         (elf_symbol_search): Rename local variable pc to addr.
642         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
643         (elf_syminfo): Rename parameter pc to addr.
644         * btest.c (global): New global variable.
645         (test5): New test.
646         (main): Call test5.
648 2013-10-17  Ian Lance Taylor  <iant@google.com>
650         * elf.c (elf_add): Don't get the wrong offsets if a debug section
651         is missing.
653 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
655         * configure.ac: Add --enable-host-shared, setting up
656         pre-existing PIC_FLAG variable within Makefile.am et al.
657         * configure: Regenerate.
659 2013-09-20  Alan Modra  <amodra@gmail.com>
661         * configure: Regenerate.
663 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
665         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
667 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
669         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
670         dl_iterate_phdr callbacks.
672 2013-03-25  Ian Lance Taylor  <iant@google.com>
674         * alloc.c: #include <sys/types.h>.
675         * mmap.c: Likewise.
677 2013-01-31  Ian Lance Taylor  <iant@google.com>
679         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
680         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
682 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
684         PR other/56076
685         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
686         attribute was not seen.
688 2013-01-16  Ian Lance Taylor  <iant@google.com>
690         * dwarf.c (struct unit): Add filename and abs_filename fields.
691         (build_address_map): Set new fields when reading unit.
692         (dwarf_lookup_pc): If we don't find an entry in the line table,
693         just return the main file name.
695 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
697         Update copyright years.
699 2013-01-01  Ian Lance Taylor  <iant@google.com>
701         PR bootstrap/54834
702         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
703         $(MULTIBUILDTOP)/../../gcc/include.
704         * Makefile.in: Rebuild.
706 2013-01-01  Ian Lance Taylor  <iant@google.com>
708         PR other/55536
709         * mmap.c (backtrace_alloc): Don't call sync functions if not
710         threaded.
711         (backtrace_free): Likewise.
713 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
715         * mmapio.c: Define MAP_FAILED if not defined.
717 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
719         PR bootstrap/54926
720         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
721         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
722         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
723         accepts it.
724         * Makefile.in: Regenerated.
725         * configure: Regenerated.
727 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
729         PR bootstrap/54926
730         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
731         * Makefile.in: Regenerated.
733 2012-11-20  Ian Lance Taylor  <iant@google.com>
735         * dwarf.c (read_attribute): Always clear val.
737 2012-11-13  Ian Lance Taylor  <iant@google.com>
739         PR other/55312
740         * configure.ac: Only add -Werror if building a target library.
741         * configure: Rebuild.
743 2012-11-12  Ian Lance Taylor  <iant@google.com>
744             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
745             Gerald Pfeifer  <gerald@pfeifer.com>
747         * configure.ac: Check for getexecname.
748         * fileline.c: #include <errno.h>.  Define getexecname if not
749         available.
750         (fileline_initialize): Try to find the executable in a few
751         different ways.
752         * print.c (error_callback): Only print the filename if it came
753         from the backtrace state.
754         * configure, config.h.in: Rebuild.
756 2012-10-29  Ian Lance Taylor  <iant@google.com>
758         * mmap.c (backtrace_vector_release): Correct last patch: add
759         aligned, not size.
761 2012-10-29  Ian Lance Taylor  <iant@google.com>
763         * mmap.c (backtrace_vector_release): Make sure freed block is
764         aligned on 8-byte boundary.
766 2012-10-26  Ian Lance Taylor  <iant@google.com>
768         PR other/55087
769         * posix.c (backtrace_open): Add does_not_exist parameter.
770         * elf.c (phdr_callback): Do not warn if shared library could not
771         be opened.
772         * fileline.c (fileline_initialize): Update calls to
773         backtrace_open.
774         * internal.h (backtrace_open): Update declaration.
776 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
778         PR target/55061
779         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
780         * configure: Regenerate.
782 2012-10-24  Ian Lance Taylor  <iant@google.com>
784         PR target/55061
785         * configure.ac: Check whether -funwind-tables option works.
786         * configure: Rebuild.
788 2012-10-11  Ian Lance Taylor  <iant@google.com>
790         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
791         * configure: Rebuild.
793 2012-10-10  Ian Lance Taylor  <iant@google.com>
795         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
796         lower case.
798 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
800         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
802 2012-10-09  Ian Lance Taylor  <iant@google.com>
804         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
805         (backtrace_dwarf_add): Likewise.
807 2012-10-09  Ian Lance Taylor  <iant@google.com>
809         Add support for tracing through shared libraries.
810         * configure.ac: Check for link.h and dl_iterate_phdr.
811         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
812         ELF macros before #defining them.
813         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
814         dl_iterate_phdr.
815         (struct elf_syminfo_data): Add next field.
816         (elf_initialize_syminfo): Initialize next field.
817         (elf_add_syminfo_data): New static function.
818         (elf_add): New static function, broken out of
819         backtrace_initialize.  Call backtrace_dwarf_add instead of
820         backtrace_dwarf_initialize.
821         (struct phdr_data): Define.
822         (phdr_callback): New static function.
823         (backtrace_initialize): Call elf_add.
824         * dwarf.c (struct dwarf_data): Add next and base_address fields.
825         (add_unit_addr): Add base_address parameter.  Change all callers.
826         (add_unit_ranges, build_address_map): Likewise.
827         (add_line): Add ddata parameter.  Change all callers.
828         (read_line_program, add_function_range): Likewise.
829         (dwarf_lookup_pc): New static function, broken out of
830         dwarf_fileline.
831         (dwarf_fileline): Call dwarf_lookup_pc.
832         (build_dwarf_data): New static function.
833         (backtrace_dwarf_add): New function.
834         (backtrace_dwarf_initialize): Remove.
835         * internal.h (backtrace_dwarf_initialize): Don't declare.
836         (backtrace_dwarf_add): Declare.
837         * configure, config.h.in: Rebuild.
839 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
841         * btest.c (f23): Avoid uninitialized variable warning.
843 2012-10-04  Ian Lance Taylor  <iant@google.com>
845         * dwarf.c: If the system header files do not declare strnlen,
846         provide our own version.
848 2012-10-03  Ian Lance Taylor  <iant@google.com>
850         * dwarf.c (read_uleb128): Fix overflow test.
851         (read_sleb128): Likewise.
852         (build_address_map): Don't change unit_buf.start.
854 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
856         PR other/54761
857         * configure.ac (EXTRA_FLAGS): New.
858         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
859         * configure, Makefile.in: Regenerate.
861 2012-09-29  Ian Lance Taylor  <iant@google.com>
863         PR other/54749
864         * fileline.c (fileline_initialize): Pass errnum as -1 when
865         reporting that we could not read executable information after a
866         previous failure.
868 2012-09-27  Ian Lance Taylor  <iant@google.com>
870         PR bootstrap/54732
871         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
872         * Makefile.am: Add dependencies for all objects.
873         * configure, aclocal.m4, Makefile.in: Rebuild.
875 2012-09-27  Ian Lance Taylor  <iant@google.com>
877         PR other/54726
878         * elf.c (backtrace_initialize): Set *fileln_fn, not
879         state->fileln_fn.
881 2012-09-19  Ian Lance Taylor  <iant@google.com>
883         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
884         as a target library.
885         * configure: Rebuild.
887 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
888             Ian Lance Taylor  <iant@google.com>
890         * configure.ac (GCC_HEADER_STDINT): Invoke.
891         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
892         * btest.c: Don't include <stdint.h>.
893         * dwarf.c: Likewise.
894         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
896 2012-09-18  Ian Lance Taylor  <iant@google.com>
898         PR bootstrap/54623
899         * Makefile.am (AM_CPPFLAGS): Define.
900         (AM_CFLAGS): Remove -I options.
901         * Makefile.in: Rebuild.
903 2012-09-18  Ian Lance Taylor  <iant@google.com>
905         * posix.c (O_BINARY): Define if not defined.
906         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
907         HAVE_FCNTL is defined.
908         * configure.ac: Test for the fcntl function.
909         * configure, config.h.in: Rebuild.
911 2012-09-18  Ian Lance Taylor  <iant@google.com>
913         * btest.c (test1, test2, test3, test4): Add the unused attribute.
915 2012-09-18  Ian Lance Taylor  <iant@google.com>
917         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
919 2012-09-18  Ian Lance Taylor  <iant@google.com>
921         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
922         * mmapio.c: Don't define _GNU_SOURCE.
923         * configure, config.h.in: Rebuild.
925 2012-09-18  Ian Lance Taylor  <iant@google.com>
927         * configure.ac: Check whether strnlen is declared.
928         * dwarf.c: Declare strnlen if not declared.
929         * configure, config.h.in: Rebuild.
931 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
933         * fileline.c: Include <stdlib.h>.
934         * mmap.c: Likewise.
936 2012-09-17  Ian Lance Taylor  <iant@google.com>
938         PR bootstrap/54611
939         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
940         parameter.
942 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
944         PR bootstrap/54611
945         * nounwind.c (backtrace_simple): Add state parameter.
947 2012-09-17  Ian Lance Taylor  <iant@google.com>
949         PR bootstrap/54609
950         * unknown.c (unknown_fileline): Add state parameter, remove
951         fileline_data parameter, name error_callback parameter.
952         (backtrace_initialize): Add state parameter.
954 2012-09-17  Ian Lance Taylor  <iant@google.com>
956         * Initial implementation.
958 Copyright (C) 2012-2018 Free Software Foundation, Inc.
960 Copying and distribution of this file, with or without modification,
961 are permitted in any medium without royalty provided the copyright
962 notice and this notice are preserved.