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