2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / libbacktrace / ChangeLog
blobc01c7d826a9e59cb3e9c0ee5c6e0d6c04da8e61e
1 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3         * configure: Regenerated.
5 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7         * configure: Regenerated.
9 2018-04-17  Ian Lance Taylor  <iant@golang.org>
11         * backtrace.c: Revert last two changes.  Don't call mmap
12         directly.
14 2018-04-17  Ian Lance Taylor  <iant@golang.org>
16         * backtrace.c: Include backtrace-supported.h before checking
17         BACKTRACE_USES_MALLOC.
19 2018-04-17  Ian Lance Taylor  <iant@golang.org>
21         * backtrace.c (backtrace_full): When testing whether we can
22         allocate memory, call mmap directly, and munmap the memory.
24 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
26         PR other/85161
27         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
28         big endian, only use 32-bit loads if endianity macros are predefined
29         and indicate big or little endian.
31 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
33         PR target/84148
34         * configure: Regenerate.
36 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
38         PR other/82368
39         * elf.c (SHT_PROGBITS): Undefine and define.
41 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
43         PR other/82368
44         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
45         (struct elf_ppc64_opd_data): New type.
46         (elf_initialize_syminfo): Add opd argument, handle symbols
47         pointing into the PowerPC64 ELFv1 .opd section.
48         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
49         to structure with .opd data to elf_initialize_syminfo.
51 2018-01-31  Ian Lance Taylor  <iant@golang.org>
53         * elf.c (elf_add): Close descriptor if we use a debugfile.
54         * btest.c (check_open_files): New static function.
55         (main): Call check_open_files.
57 2018-01-25  Ian Lance Taylor  <iant@golang.org>
59         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
60         desired CRC is zero.
61         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
63 2018-01-25  Ian Lance Taylor  <iant@golang.org>
65         * pecoff.c (coff_add): Only release syms_view if it is valid.
67 2018-01-25  Ian Lance Taylor  <iant@golang.org>
69         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
71 2018-01-24  Ian Lance Taylor  <iant@golang.org>
73         * pecoff.c (coff_add): Use coff_read4, not memcpy.
75 2018-01-24  Ian Lance Taylor  <iant@golang.org>
77         PR other/68239
78         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
79         on the free list.
81 2018-01-19  Tony Reix  <tony.reix@atos.net>
83         * xcoff.c (xcoff_incl_compare): New function.
84         (xcoff_incl_search): New function.
85         (xcoff_process_linenos): Use bsearch to find include file.
86         (xcoff_initialize_fileline): Sort include file information.
88 2018-01-16  Ian Lance Taylor  <iant@golang.org>
90         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
91         288.
92         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
93         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
94         (elf_zlib_default_table): Update.
95         (elf_zlib_default_dist_table): New static array.
96         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
97         for block type 1.
98         * ztest.c (struct zlib_test): Add uncompressed_len.
99         (tests): Initialize uncompressed_len field.  Add new test case.
100         (test_samples): Use uncompressed_len field.
102 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
104         Update copyright years.
106 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
108         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
109         * aclocal.m4: Regenerate.
110         * Makefile.in: Likewise.
111         * configure: Likewise.
113 2017-10-06  Ian Lance Taylor  <iant@golang.org>
115         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
116         zlib uncompress function.
118 2017-10-05  Ian Lance Taylor  <iant@golang.org>
120         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
121         Read a four byte integer.
122         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
123         boundary before ever calling elf_zlib_fetch.
124         * ztest.c (test_large): Simplify print statements a bit.
126 2017-10-02  Ian Lance Taylor  <iant@golang.org>
128         * ztest.c: #include <errno.h>.
129         (TEST_TIMING): Don't define, don't test.
130         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
131         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
132         (ZLIB_CLOCK_GETTIME_ARG): Define.
133         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
134         * Makefile.am: Likewise.
135         * configure, Makefile.in: Rebuild.
137 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
139         PR other/67165
140         * Makefile.am: Append the content of clock_gettime_link to
141         ztest_LDADD.
142         * configure.ac: Test for the case that clock_gettime is in librt.
143         * Makefile.in: Regenerate.
144         * configure: Likewise.
146         PR other/67165
147         * configure.ac: Check for clock_gettime.
148         * config.h.in: Regenerate.
149         * configure: Likewise.
150         * ztest.c (average_time, test_large): Conditionalize test timing
151         on clock_gettime availability.
153 2017-09-29  Tony Reix  <tony.reix@atos.net>
155         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
156         (STYP_DWARF, SSUBTYP_DW*): Define.
157         (enum dwarf_section): Define.
158         (struct dwsect_info): Define.
159         (xcoff_add): Look for DWARF sections, pass them to
160         backtrace_dwarf_add.
162 2017-09-28  Ian Lance Taylor  <iant@golang.org>
164         PR other/67165
165         * elf.c (__builtin_prefetch): Define if not __GNUC__.
166         (unlikely): Define.
167         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
168         (b_elf_chdr): Define type.
169         (enum debug_section): Add ZDEBUG_xxx values.
170         (debug_section_names): Add names for new sections.
171         (struct debug_section_info): Add compressed field.
172         (elf_zlib_failed, elf_zlib_fetch): New static functions.
173         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
174         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
175         (HUFFMAN_SECONDARY_SHIFT): Define.
176         (ZDEBUG_TABLE_SIZE): Define.
177         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
178         (final_next_secondary): New static variable if
179         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
180         (elf_zlib_inflate_table): New static function.
181         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
182         function to produce fixed Huffman table.
183         (elf_zlib_default_table): New static variable.
184         (elf_zlib_inflate): New static function.
185         (elf_zlib_verify_checksum): Likewise.
186         (elf_zlib_inflate_and_verify): Likewise.
187         (elf_uncompress_zdebug): Likewise.
188         (elf_uncompress_chdr): Likewise.
189         (backtrace_uncompress_zdebug): New extern function.
190         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
191         sections, and uncompress them.
192         * internal.h (backtrace_compress_zdebug): Declare.
193         * ztest.c: New file.
194         * configure.ac: Check for -lz and check whether the linker
195         supports --compress-debug-sections.
196         * Makefile.am (ztest_SOURCES): New variable.
197         (ztest_CFLAGS, ztest_LDADD): New variables.
198         (check_PROGRAMS): Add ztest.
199         (ctestg_SOURCES): New variable.
200         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
201         (ctesta_SOURCES): New variable.
202         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
203         (check_PROGRAMS): Add ctestg and ctesta.
204         * configure, config.h.in, Makefile.in: Rebuild.
206 2017-09-22  Ian Lance Taylor  <iant@golang.org>
208         PR sanitizer/77631
209         * configure.ac: Check for lstat and readlink.
210         * elf.c (lstat, readlink): Provide dummy versions if real versions
211         are not available.
212         * configure, config.h.in: Rebuild.
214 2017-09-21  Ian Lance Taylor  <iant@google.com>
216         PR go/82284
217         * elf.c (backtrace_initialize): Set pd.exe_filename.
219 2017-09-20  Ian Lance Taylor  <iant@golang.org>
220             Denis Khalikov  <d.khalikov@partner.samsung.com>
222         PR sanitizer/77631
223         Support for external debug info.
224         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
225         (S_ISLNK): Define if not defined.
226         (xstrnlen): Define if strnlen is not available.
227         (b_elf_note): Define type.
228         (NT_GNU_BUILD_ID): Define macro.
229         (elf_crc32, elf_crc32_file): New static functions.
230         (elf_is_symlink, elf_readlink): New static functions.
231         (elf_open_debugfile_by_buildid): New static function.
232         (elf_try_debugfile): New static function.
233         (elf_find_debugfile_by_debuglink): New static function.
234         (elf_open_debugfile_by_debuglink): New static function.
235         (elf_add): Add filename and debuginfo parameters.  Adjust all
236         callers.  Look for external debug info notes, and try to fetch
237         debug info from external file.
238         (struct phdr_data): Add exe_filename field.
239         (phdr_callback): Pass filename to elf_add.
240         (backtrace_initialize): Add filename parameter.
241         * internal.h (backtrace_initialize): Add filename parameter.
242         * fileline.c (fileline_initialize): Pass filename to
243         backtrace_initialize.
244         * pecoff.c (fileline_initialize): Add unused filename parameter.
245         * unknown.c (fileline_initialize): Likewise.
246         * xcoff.c (fileline_initialize): Likewise.
247         * configure.ac: Check for objcopy --add-gnu-debuglink.
248         * Makefile.am (dtest): New test target.
249         * configure, Makefile.in: Rebuild.
251 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
253         PR other/81096
254         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
255         * Makefile.in: Regenerate.
257 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
259         PR other/81096
260         * libbacktrace/Makefile.in
261         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
263 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
265         PR bootstrap/81638
266         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
268 2017-07-28  Tony Reix  <tony.reix@atos.net>
270         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
272 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
274         * fileline.c (fileline_initialize): Print pid_t as long.
276 2017-07-26  Tony Reix  <tony.reix@atos.net>
278         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
279         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
280         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
281         * configure, config.h.in: Regenerate.
283 2017-07-21  Tony Reix  <tony.reix@atos.net>
285         * filetype.awk: Add AIX XCOFF type detection.
286         * configure.ac: Recognize xcoff format.
287         * Makefile.am (FORMAT_FILES): Add xcoff.c.
288         * fileline.c: Include <unistd.h>.
289         (fileline_initialize): Add case for AIX procfs.
290         * xcoff.c: New file.
291         * configure, Makefile.in: Rebuild.
293 2017-06-21  Richard Biener  <rguenther@suse.de>
295         * configure.ac: Add AC_SYS_LARGEFILE.
296         * config.h.in: Regenerate.
297         * configure: Likewise.
299 2017-06-11  Ian Lance Taylor  <iant@golang.org>
301         * elf.c (backtrace_initialize): Always set *fileline_fn.
302         * ttest.c: New file.
303         * btest.c: Move support functions into testlib.c.  Change calls to
304         check to pass file name.
305         * testlib.c: New file, copied from (part of) btest.c.
306         * testlib.h: New file, declarations for testlib.c.
307         * edtest.c: Use testlib.h and testlib.c.
308         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
309         * Makefile.am (btest_SOURCES): Add testlib.c.
310         (edtest_SOURCES): Likewise.
311         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
312         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
313         * configure, Makefile.in: Rebuild.
315 2017-05-19  Than McIntosh  <thanm@google.com>
317         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
318         (read_line_header): Don't allocate dirs if dirs_count == 0.
319         * edtest.c: New file.
320         * edtest2.c: New file.
321         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
322         (check_PROGRAMS): Add edtest.
323         (edtest2_build.c, gen_edtest2_build): New targets.
324         * Makefile.in: Rebuild.
326 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
328         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
329         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
331 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
333         Update copyright years.
335 2016-11-15  Matthias Klose  <doko@ubuntu.com>
337         * configure: Regenerate.
339 2016-09-11  Carlos Liam  <carlos@aarzee.me>
341         * all: Remove meaningless trailing whitespace.
343 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
345         PR target/71161
346         * elf.c (phdr_callback) [__i386__]: Add
347         __attribute__((__force_align_arg_pointer__)).
349 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
351         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
352         avoid possible crash.
353         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
354         missing debug info anymore.
356 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
358         * mmap.c (MAP_FAILED): Define if not defined.
360 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
362         Update copyright years.
364 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
366         * configure.ac: Specify that DJGPP do not have mmap
367         even when sys/mman.h exists.
368         * configure: Regenerate
370 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
372         PR libgfortran/68115
373         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
374         * configure: Regenerate.
375         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
376         to void.
378 2015-09-17  Ian Lance Taylor  <iant@google.com>
380         * posix.c (backtrace_open): Cast second argument of open() to int.
382 2015-09-11  Ian Lance Taylor  <iant@google.com>
384         * Makefile.am (backtrace.lo): Depend on internal.h.
385         (sort.lo, stest.lo): Add explicit dependencies.
386         * Makefile.in: Rebuild.
388 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
390         * backtrace.c: #include <sys/types.h>.
392 2015-09-08  Ian Lance Taylor  <iant@google.com>
394         PR other/67457
395         * backtrace.c: #include "internal.h".
396         (struct backtrace_data): Add can_alloc field.
397         (unwind): If can_alloc is false, don't try to get file/line
398         information.
399         (backtrace_full): Set can_alloc field in bdata.
400         * alloc.c (backtrace_alloc): Don't call error_callback if it is
401         NULL.
402         * mmap.c (backtrace_alloc): Likewise.
403         * internal.h: Update comments for backtrace_alloc and
404         backtrace_free.
406 2015-09-08  Ian Lance Taylor  <iant@google.com>
408         PR other/67457
409         * mmap.c (backtrace_alloc): Correct test for mmap failure.
411 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
413         * configure.ac: For spu-*-* targets, set have_fcntl to no.
414         * configure: Regenerate.
416 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
418         * configure.ac: Remove [disable-shared] argument to LT_INIT.
419         Remove setting PIC_FLAG when building as target library.
420         * configure: Regenerate.
422 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
424         * configure.ac: Only compile with -fPIC if the target
425         supports it.
426         * configure: Regenerate.
428 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
430         * configure.ac: Set have_mmap to no on spu-*-* targets.
431         * configure: Regenerate.
433 2015-08-13  Ian Lance Taylor  <iant@google.com>
435         * dwarf.c (read_function_entry): Add vec_inlined parameter.
436         Change all callers.
438 2015-06-11  Martin Sebor  <msebor@redhat.com>
440         PR sanitizer/65479
441         * dwarf.c (struct line): Add new field idx.
442         (line_compare): Use it.
443         (add_line): Set it.
444         (read_line_info): Reset it.
446 2015-05-29  Tristan Gingold  <gingold@adacore.com>
448         * pecoff.c: New file.
449         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
450         * Makefile.in: Regenerate.
451         * filetype.awk: Detect pecoff.
452         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
453         Add pecoff.
454         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
455         true.
456         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
457         * configure: Regenerate.
458         * pecoff.c: New file.
460 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
462         * Makefile.in: Regenerated with automake-1.11.6.
463         * aclocal.m4: Likewise.
464         * configure: Likewise.
466 2015-01-24  Matthias Klose  <doko@ubuntu.com>
468         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
469         * configure: Regenerate.
471 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
473         Update copyright years.
475 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
477         PR bootstrap/63784
478         * configure: Regenerated.
480 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
482         * ChangeLog.jit: New.
484 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
486         PR target/63610
487         * configure: Regenerate.
489 2014-10-23  Ian Lance Taylor  <iant@google.com>
491         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
492         Fix to return void *.
494 2014-05-08  Ian Lance Taylor  <iant@google.com>
496         * mmap.c (backtrace_free): If freeing a large aligned block of
497         memory, call munmap rather than holding onto it.
498         (backtrace_vector_grow): When growing a vector, double the number
499         of pages requested.  When releasing the old version of a grown
500         vector, pass the correct size to backtrace_free.
502 2014-03-07  Ian Lance Taylor  <iant@google.com>
504         * sort.c (backtrace_qsort): Use middle element as pivot.
506 2014-03-06  Ian Lance Taylor  <iant@google.com>
508         * sort.c: New file.
509         * stest.c: New file.
510         * internal.h (backtrace_qsort): Declare.
511         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
512         (read_line_info, read_function_entry): Likewise.
513         (read_function_info, build_dwarf_data): Likewise.
514         * elf.c (elf_initialize_syminfo): Likewise.
515         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
516         (stest_SOURCES, stest_LDADD): Define.
517         (check_PROGRAMS): Add stest.
519 2014-02-07  Misty De Meo  <misty@brew.sh>
521         PR target/58710
522         * configure.ac: Use AC_LINK_IFELSE in check for
523         _Unwind_GetIPInfo.
524         * configure: Regenerate.
526 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
528         Update copyright years
530 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
532         * elf.c (ET_DYN): Undefine and define again.
533         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
534         return early -1 without closing the descriptor.
535         (struct phdr_data): Add exe_descriptor.
536         (phdr_callback): If pd->exe_descriptor is not -1, for very first
537         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
538         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
539         call to elf_add.
540         (backtrace_initialize): Adjust call to elf_add.  If it returns
541         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
543 2013-12-05  Ian Lance Taylor  <iant@google.com>
545         * alloc.c (backtrace_vector_finish): Add error_callback and data
546         parameters.  Call backtrace_vector_release.  Return address base.
547         * mmap.c (backtrace_vector_finish): Add error_callback and data
548         parameters.  Return address base.
549         * dwarf.c (read_function_info): Get new address base from
550         backtrace_vector_finish.
551         * internal.h (backtrace_vector_finish): Update declaration.
553 2013-11-27  Ian Lance Taylor  <iant@google.com>
555         * dwarf.c (find_address_ranges): New static function, broken out
556         of build_address_map.
557         (build_address_map): Call it.
558         * btest.c (check): Check for missing filename or function, rather
559         than crashing.
560         (f3): Check that enough frames were returned.
562 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
564         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
565         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
566         last argument.
567         * btest.c (struct symdata): Add size field.
568         (callback_three): Add symsize argument.  Copy it to the data->size
569         field.
570         (f23): Set symdata.size to 0.
571         (test5): Likewise.  If sizeof (int) > 1, lookup address of
572         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
573         values.
575         * atomic.c: Include sys/types.h.
577 2013-11-18  Ian Lance Taylor  <iant@google.com>
579         * configure.ac: Check for support of __atomic extensions.
580         * internal.h: Declare or #define atomic functions for use in
581         backtrace code.
582         * atomic.c: New file.
583         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
584         (dwarf_fileline, backtrace_dwarf_add): Likewise.
585         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
586         (backtrace_initialize): Likewise.
587         * fileline.c (fileline_initialize): Likewise.
588         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
589         * configure, config.h.in, Makefile.in: Rebuild.
591 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
593         * elf.c (SHN_UNDEF): Define.
594         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
595         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
596         (elf_add): Adjust caller.
598         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
600 2013-11-16  Ian Lance Taylor  <iant@google.com>
602         * backtrace.h (backtrace_create_state): Correct comment about
603         threading.
605 2013-11-15  Ian Lance Taylor  <iant@google.com>
607         * backtrace.h (backtrace_syminfo): Update comment and parameter
608         name to take any address, not just a PC value.
609         * elf.c (STT_OBJECT): Define.
610         (elf_nosyms): Rename parameter pc to addr.
611         (elf_symbol_search): Rename local variable pc to addr.
612         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
613         (elf_syminfo): Rename parameter pc to addr.
614         * btest.c (global): New global variable.
615         (test5): New test.
616         (main): Call test5.
618 2013-10-17  Ian Lance Taylor  <iant@google.com>
620         * elf.c (elf_add): Don't get the wrong offsets if a debug section
621         is missing.
623 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
625         * configure.ac: Add --enable-host-shared, setting up
626         pre-existing PIC_FLAG variable within Makefile.am et al.
627         * configure: Regenerate.
629 2013-09-20  Alan Modra  <amodra@gmail.com>
631         * configure: Regenerate.
633 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
635         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
637 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
639         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
640         dl_iterate_phdr callbacks.
642 2013-03-25  Ian Lance Taylor  <iant@google.com>
644         * alloc.c: #include <sys/types.h>.
645         * mmap.c: Likewise.
647 2013-01-31  Ian Lance Taylor  <iant@google.com>
649         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
650         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
652 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
654         PR other/56076
655         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
656         attribute was not seen.
658 2013-01-16  Ian Lance Taylor  <iant@google.com>
660         * dwarf.c (struct unit): Add filename and abs_filename fields.
661         (build_address_map): Set new fields when reading unit.
662         (dwarf_lookup_pc): If we don't find an entry in the line table,
663         just return the main file name.
665 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
667         Update copyright years.
669 2013-01-01  Ian Lance Taylor  <iant@google.com>
671         PR bootstrap/54834
672         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
673         $(MULTIBUILDTOP)/../../gcc/include.
674         * Makefile.in: Rebuild.
676 2013-01-01  Ian Lance Taylor  <iant@google.com>
678         PR other/55536
679         * mmap.c (backtrace_alloc): Don't call sync functions if not
680         threaded.
681         (backtrace_free): Likewise.
683 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
685         * mmapio.c: Define MAP_FAILED if not defined.
687 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
689         PR bootstrap/54926
690         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
691         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
692         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
693         accepts it.
694         * Makefile.in: Regenerated.
695         * configure: Regenerated.
697 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
699         PR bootstrap/54926
700         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
701         * Makefile.in: Regenerated.
703 2012-11-20  Ian Lance Taylor  <iant@google.com>
705         * dwarf.c (read_attribute): Always clear val.
707 2012-11-13  Ian Lance Taylor  <iant@google.com>
709         PR other/55312
710         * configure.ac: Only add -Werror if building a target library.
711         * configure: Rebuild.
713 2012-11-12  Ian Lance Taylor  <iant@google.com>
714             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
715             Gerald Pfeifer  <gerald@pfeifer.com>
717         * configure.ac: Check for getexecname.
718         * fileline.c: #include <errno.h>.  Define getexecname if not
719         available.
720         (fileline_initialize): Try to find the executable in a few
721         different ways.
722         * print.c (error_callback): Only print the filename if it came
723         from the backtrace state.
724         * configure, config.h.in: Rebuild.
726 2012-10-29  Ian Lance Taylor  <iant@google.com>
728         * mmap.c (backtrace_vector_release): Correct last patch: add
729         aligned, not size.
731 2012-10-29  Ian Lance Taylor  <iant@google.com>
733         * mmap.c (backtrace_vector_release): Make sure freed block is
734         aligned on 8-byte boundary.
736 2012-10-26  Ian Lance Taylor  <iant@google.com>
738         PR other/55087
739         * posix.c (backtrace_open): Add does_not_exist parameter.
740         * elf.c (phdr_callback): Do not warn if shared library could not
741         be opened.
742         * fileline.c (fileline_initialize): Update calls to
743         backtrace_open.
744         * internal.h (backtrace_open): Update declaration.
746 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
748         PR target/55061
749         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
750         * configure: Regenerate.
752 2012-10-24  Ian Lance Taylor  <iant@google.com>
754         PR target/55061
755         * configure.ac: Check whether -funwind-tables option works.
756         * configure: Rebuild.
758 2012-10-11  Ian Lance Taylor  <iant@google.com>
760         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
761         * configure: Rebuild.
763 2012-10-10  Ian Lance Taylor  <iant@google.com>
765         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
766         lower case.
768 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
770         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
772 2012-10-09  Ian Lance Taylor  <iant@google.com>
774         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
775         (backtrace_dwarf_add): Likewise.
777 2012-10-09  Ian Lance Taylor  <iant@google.com>
779         Add support for tracing through shared libraries.
780         * configure.ac: Check for link.h and dl_iterate_phdr.
781         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
782         ELF macros before #defining them.
783         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
784         dl_iterate_phdr.
785         (struct elf_syminfo_data): Add next field.
786         (elf_initialize_syminfo): Initialize next field.
787         (elf_add_syminfo_data): New static function.
788         (elf_add): New static function, broken out of
789         backtrace_initialize.  Call backtrace_dwarf_add instead of
790         backtrace_dwarf_initialize.
791         (struct phdr_data): Define.
792         (phdr_callback): New static function.
793         (backtrace_initialize): Call elf_add.
794         * dwarf.c (struct dwarf_data): Add next and base_address fields.
795         (add_unit_addr): Add base_address parameter.  Change all callers.
796         (add_unit_ranges, build_address_map): Likewise.
797         (add_line): Add ddata parameter.  Change all callers.
798         (read_line_program, add_function_range): Likewise.
799         (dwarf_lookup_pc): New static function, broken out of
800         dwarf_fileline.
801         (dwarf_fileline): Call dwarf_lookup_pc.
802         (build_dwarf_data): New static function.
803         (backtrace_dwarf_add): New function.
804         (backtrace_dwarf_initialize): Remove.
805         * internal.h (backtrace_dwarf_initialize): Don't declare.
806         (backtrace_dwarf_add): Declare.
807         * configure, config.h.in: Rebuild.
809 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
811         * btest.c (f23): Avoid uninitialized variable warning.
813 2012-10-04  Ian Lance Taylor  <iant@google.com>
815         * dwarf.c: If the system header files do not declare strnlen,
816         provide our own version.
818 2012-10-03  Ian Lance Taylor  <iant@google.com>
820         * dwarf.c (read_uleb128): Fix overflow test.
821         (read_sleb128): Likewise.
822         (build_address_map): Don't change unit_buf.start.
824 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
826         PR other/54761
827         * configure.ac (EXTRA_FLAGS): New.
828         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
829         * configure, Makefile.in: Regenerate.
831 2012-09-29  Ian Lance Taylor  <iant@google.com>
833         PR other/54749
834         * fileline.c (fileline_initialize): Pass errnum as -1 when
835         reporting that we could not read executable information after a
836         previous failure.
838 2012-09-27  Ian Lance Taylor  <iant@google.com>
840         PR bootstrap/54732
841         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
842         * Makefile.am: Add dependencies for all objects.
843         * configure, aclocal.m4, Makefile.in: Rebuild.
845 2012-09-27  Ian Lance Taylor  <iant@google.com>
847         PR other/54726
848         * elf.c (backtrace_initialize): Set *fileln_fn, not
849         state->fileln_fn.
851 2012-09-19  Ian Lance Taylor  <iant@google.com>
853         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
854         as a target library.
855         * configure: Rebuild.
857 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
858             Ian Lance Taylor  <iant@google.com>
860         * configure.ac (GCC_HEADER_STDINT): Invoke.
861         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
862         * btest.c: Don't include <stdint.h>.
863         * dwarf.c: Likewise.
864         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
866 2012-09-18  Ian Lance Taylor  <iant@google.com>
868         PR bootstrap/54623
869         * Makefile.am (AM_CPPFLAGS): Define.
870         (AM_CFLAGS): Remove -I options.
871         * Makefile.in: Rebuild.
873 2012-09-18  Ian Lance Taylor  <iant@google.com>
875         * posix.c (O_BINARY): Define if not defined.
876         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
877         HAVE_FCNTL is defined.
878         * configure.ac: Test for the fcntl function.
879         * configure, config.h.in: Rebuild.
881 2012-09-18  Ian Lance Taylor  <iant@google.com>
883         * btest.c (test1, test2, test3, test4): Add the unused attribute.
885 2012-09-18  Ian Lance Taylor  <iant@google.com>
887         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
889 2012-09-18  Ian Lance Taylor  <iant@google.com>
891         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
892         * mmapio.c: Don't define _GNU_SOURCE.
893         * configure, config.h.in: Rebuild.
895 2012-09-18  Ian Lance Taylor  <iant@google.com>
897         * configure.ac: Check whether strnlen is declared.
898         * dwarf.c: Declare strnlen if not declared.
899         * configure, config.h.in: Rebuild.
901 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
903         * fileline.c: Include <stdlib.h>.
904         * mmap.c: Likewise.
906 2012-09-17  Ian Lance Taylor  <iant@google.com>
908         PR bootstrap/54611
909         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
910         parameter.
912 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
914         PR bootstrap/54611
915         * nounwind.c (backtrace_simple): Add state parameter.
917 2012-09-17  Ian Lance Taylor  <iant@google.com>
919         PR bootstrap/54609
920         * unknown.c (unknown_fileline): Add state parameter, remove
921         fileline_data parameter, name error_callback parameter.
922         (backtrace_initialize): Add state parameter.
924 2012-09-17  Ian Lance Taylor  <iant@google.com>
926         * Initial implementation.
928 Copyright (C) 2012-2018 Free Software Foundation, Inc.
930 Copying and distribution of this file, with or without modification,
931 are permitted in any medium without royalty provided the copyright
932 notice and this notice are preserved.