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