Fix __iosfail_type_info hack to work on darwin
[official-gcc.git] / libbacktrace / ChangeLog
blob85c8742b8a8fe7608617c06c40c4515921d881a9
1 2018-04-04  Jakub Jelinek  <jakub@redhat.com>
3         PR other/85161
4         * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
5         big endian, only use 32-bit loads if endianity macros are predefined
6         and indicate big or little endian.
8 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10         PR target/84148
11         * configure: Regenerate.
13 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
15         PR other/82368
16         * elf.c (SHT_PROGBITS): Undefine and define.
18 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
20         PR other/82368
21         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
22         (struct elf_ppc64_opd_data): New type.
23         (elf_initialize_syminfo): Add opd argument, handle symbols
24         pointing into the PowerPC64 ELFv1 .opd section.
25         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
26         to structure with .opd data to elf_initialize_syminfo.
28 2018-01-31  Ian Lance Taylor  <iant@golang.org>
30         * elf.c (elf_add): Close descriptor if we use a debugfile.
31         * btest.c (check_open_files): New static function.
32         (main): Call check_open_files.
34 2018-01-25  Ian Lance Taylor  <iant@golang.org>
36         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
37         desired CRC is zero.
38         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
40 2018-01-25  Ian Lance Taylor  <iant@golang.org>
42         * pecoff.c (coff_add): Only release syms_view if it is valid.
44 2018-01-25  Ian Lance Taylor  <iant@golang.org>
46         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
48 2018-01-24  Ian Lance Taylor  <iant@golang.org>
50         * pecoff.c (coff_add): Use coff_read4, not memcpy.
52 2018-01-24  Ian Lance Taylor  <iant@golang.org>
54         PR other/68239
55         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
56         on the free list.
58 2018-01-19  Tony Reix  <tony.reix@atos.net>
60         * xcoff.c (xcoff_incl_compare): New function.
61         (xcoff_incl_search): New function.
62         (xcoff_process_linenos): Use bsearch to find include file.
63         (xcoff_initialize_fileline): Sort include file information.
65 2018-01-16  Ian Lance Taylor  <iant@golang.org>
67         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
68         288.
69         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
70         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
71         (elf_zlib_default_table): Update.
72         (elf_zlib_default_dist_table): New static array.
73         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
74         for block type 1.
75         * ztest.c (struct zlib_test): Add uncompressed_len.
76         (tests): Initialize uncompressed_len field.  Add new test case.
77         (test_samples): Use uncompressed_len field.
79 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
81         Update copyright years.
83 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
85         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
86         * aclocal.m4: Regenerate.
87         * Makefile.in: Likewise.
88         * configure: Likewise.
90 2017-10-06  Ian Lance Taylor  <iant@golang.org>
92         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
93         zlib uncompress function.
95 2017-10-05  Ian Lance Taylor  <iant@golang.org>
97         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
98         Read a four byte integer.
99         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
100         boundary before ever calling elf_zlib_fetch.
101         * ztest.c (test_large): Simplify print statements a bit.
103 2017-10-02  Ian Lance Taylor  <iant@golang.org>
105         * ztest.c: #include <errno.h>.
106         (TEST_TIMING): Don't define, don't test.
107         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
108         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
109         (ZLIB_CLOCK_GETTIME_ARG): Define.
110         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
111         * Makefile.am: Likewise.
112         * configure, Makefile.in: Rebuild.
114 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
116         PR other/67165
117         * Makefile.am: Append the content of clock_gettime_link to
118         ztest_LDADD.
119         * configure.ac: Test for the case that clock_gettime is in librt.
120         * Makefile.in: Regenerate.
121         * configure: Likewise.
123         PR other/67165
124         * configure.ac: Check for clock_gettime.
125         * config.h.in: Regenerate.
126         * configure: Likewise.
127         * ztest.c (average_time, test_large): Conditionalize test timing
128         on clock_gettime availability.
130 2017-09-29  Tony Reix  <tony.reix@atos.net>
132         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
133         (STYP_DWARF, SSUBTYP_DW*): Define.
134         (enum dwarf_section): Define.
135         (struct dwsect_info): Define.
136         (xcoff_add): Look for DWARF sections, pass them to
137         backtrace_dwarf_add.
139 2017-09-28  Ian Lance Taylor  <iant@golang.org>
141         PR other/67165
142         * elf.c (__builtin_prefetch): Define if not __GNUC__.
143         (unlikely): Define.
144         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
145         (b_elf_chdr): Define type.
146         (enum debug_section): Add ZDEBUG_xxx values.
147         (debug_section_names): Add names for new sections.
148         (struct debug_section_info): Add compressed field.
149         (elf_zlib_failed, elf_zlib_fetch): New static functions.
150         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
151         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
152         (HUFFMAN_SECONDARY_SHIFT): Define.
153         (ZDEBUG_TABLE_SIZE): Define.
154         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
155         (final_next_secondary): New static variable if
156         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
157         (elf_zlib_inflate_table): New static function.
158         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
159         function to produce fixed Huffman table.
160         (elf_zlib_default_table): New static variable.
161         (elf_zlib_inflate): New static function.
162         (elf_zlib_verify_checksum): Likewise.
163         (elf_zlib_inflate_and_verify): Likewise.
164         (elf_uncompress_zdebug): Likewise.
165         (elf_uncompress_chdr): Likewise.
166         (backtrace_uncompress_zdebug): New extern function.
167         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
168         sections, and uncompress them.
169         * internal.h (backtrace_compress_zdebug): Declare.
170         * ztest.c: New file.
171         * configure.ac: Check for -lz and check whether the linker
172         supports --compress-debug-sections.
173         * Makefile.am (ztest_SOURCES): New variable.
174         (ztest_CFLAGS, ztest_LDADD): New variables.
175         (check_PROGRAMS): Add ztest.
176         (ctestg_SOURCES): New variable.
177         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
178         (ctesta_SOURCES): New variable.
179         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
180         (check_PROGRAMS): Add ctestg and ctesta.
181         * configure, config.h.in, Makefile.in: Rebuild.
183 2017-09-22  Ian Lance Taylor  <iant@golang.org>
185         PR sanitizer/77631
186         * configure.ac: Check for lstat and readlink.
187         * elf.c (lstat, readlink): Provide dummy versions if real versions
188         are not available.
189         * configure, config.h.in: Rebuild.
191 2017-09-21  Ian Lance Taylor  <iant@google.com>
193         PR go/82284
194         * elf.c (backtrace_initialize): Set pd.exe_filename.
196 2017-09-20  Ian Lance Taylor  <iant@golang.org>
197             Denis Khalikov  <d.khalikov@partner.samsung.com>
199         PR sanitizer/77631
200         Support for external debug info.
201         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
202         (S_ISLNK): Define if not defined.
203         (xstrnlen): Define if strnlen is not available.
204         (b_elf_note): Define type.
205         (NT_GNU_BUILD_ID): Define macro.
206         (elf_crc32, elf_crc32_file): New static functions.
207         (elf_is_symlink, elf_readlink): New static functions.
208         (elf_open_debugfile_by_buildid): New static function.
209         (elf_try_debugfile): New static function.
210         (elf_find_debugfile_by_debuglink): New static function.
211         (elf_open_debugfile_by_debuglink): New static function.
212         (elf_add): Add filename and debuginfo parameters.  Adjust all
213         callers.  Look for external debug info notes, and try to fetch
214         debug info from external file.
215         (struct phdr_data): Add exe_filename field.
216         (phdr_callback): Pass filename to elf_add.
217         (backtrace_initialize): Add filename parameter.
218         * internal.h (backtrace_initialize): Add filename parameter.
219         * fileline.c (fileline_initialize): Pass filename to
220         backtrace_initialize.
221         * pecoff.c (fileline_initialize): Add unused filename parameter.
222         * unknown.c (fileline_initialize): Likewise.
223         * xcoff.c (fileline_initialize): Likewise.
224         * configure.ac: Check for objcopy --add-gnu-debuglink.
225         * Makefile.am (dtest): New test target.
226         * configure, Makefile.in: Rebuild.
228 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
230         PR other/81096
231         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
232         * Makefile.in: Regenerate.
234 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
236         PR other/81096
237         * libbacktrace/Makefile.in
238         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
240 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
242         PR bootstrap/81638
243         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
245 2017-07-28  Tony Reix  <tony.reix@atos.net>
247         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
249 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
251         * fileline.c (fileline_initialize): Print pid_t as long.
253 2017-07-26  Tony Reix  <tony.reix@atos.net>
255         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
256         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
257         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
258         * configure, config.h.in: Regenerate.
260 2017-07-21  Tony Reix  <tony.reix@atos.net>
262         * filetype.awk: Add AIX XCOFF type detection.
263         * configure.ac: Recognize xcoff format.
264         * Makefile.am (FORMAT_FILES): Add xcoff.c.
265         * fileline.c: Include <unistd.h>.
266         (fileline_initialize): Add case for AIX procfs.
267         * xcoff.c: New file.
268         * configure, Makefile.in: Rebuild.
270 2017-06-21  Richard Biener  <rguenther@suse.de>
272         * configure.ac: Add AC_SYS_LARGEFILE.
273         * config.h.in: Regenerate.
274         * configure: Likewise.
276 2017-06-11  Ian Lance Taylor  <iant@golang.org>
278         * elf.c (backtrace_initialize): Always set *fileline_fn.
279         * ttest.c: New file.
280         * btest.c: Move support functions into testlib.c.  Change calls to
281         check to pass file name.
282         * testlib.c: New file, copied from (part of) btest.c.
283         * testlib.h: New file, declarations for testlib.c.
284         * edtest.c: Use testlib.h and testlib.c.
285         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
286         * Makefile.am (btest_SOURCES): Add testlib.c.
287         (edtest_SOURCES): Likewise.
288         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
289         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
290         * configure, Makefile.in: Rebuild.
292 2017-05-19  Than McIntosh  <thanm@google.com>
294         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
295         (read_line_header): Don't allocate dirs if dirs_count == 0.
296         * edtest.c: New file.
297         * edtest2.c: New file.
298         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
299         (check_PROGRAMS): Add edtest.
300         (edtest2_build.c, gen_edtest2_build): New targets.
301         * Makefile.in: Rebuild.
303 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
305         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
306         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
308 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
310         Update copyright years.
312 2016-11-15  Matthias Klose  <doko@ubuntu.com>
314         * configure: Regenerate.
316 2016-09-11  Carlos Liam  <carlos@aarzee.me>
318         * all: Remove meaningless trailing whitespace.
320 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
322         PR target/71161
323         * elf.c (phdr_callback) [__i386__]: Add
324         __attribute__((__force_align_arg_pointer__)).
326 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
328         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
329         avoid possible crash.
330         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
331         missing debug info anymore.
333 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
335         * mmap.c (MAP_FAILED): Define if not defined.
337 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
339         Update copyright years.
341 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
343         * configure.ac: Specify that DJGPP do not have mmap
344         even when sys/mman.h exists.
345         * configure: Regenerate
347 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
349         PR libgfortran/68115
350         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
351         * configure: Regenerate.
352         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
353         to void.
355 2015-09-17  Ian Lance Taylor  <iant@google.com>
357         * posix.c (backtrace_open): Cast second argument of open() to int.
359 2015-09-11  Ian Lance Taylor  <iant@google.com>
361         * Makefile.am (backtrace.lo): Depend on internal.h.
362         (sort.lo, stest.lo): Add explicit dependencies.
363         * Makefile.in: Rebuild.
365 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
367         * backtrace.c: #include <sys/types.h>.
369 2015-09-08  Ian Lance Taylor  <iant@google.com>
371         PR other/67457
372         * backtrace.c: #include "internal.h".
373         (struct backtrace_data): Add can_alloc field.
374         (unwind): If can_alloc is false, don't try to get file/line
375         information.
376         (backtrace_full): Set can_alloc field in bdata.
377         * alloc.c (backtrace_alloc): Don't call error_callback if it is
378         NULL.
379         * mmap.c (backtrace_alloc): Likewise.
380         * internal.h: Update comments for backtrace_alloc and
381         backtrace_free.
383 2015-09-08  Ian Lance Taylor  <iant@google.com>
385         PR other/67457
386         * mmap.c (backtrace_alloc): Correct test for mmap failure.
388 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
390         * configure.ac: For spu-*-* targets, set have_fcntl to no.
391         * configure: Regenerate.
393 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
395         * configure.ac: Remove [disable-shared] argument to LT_INIT.
396         Remove setting PIC_FLAG when building as target library.
397         * configure: Regenerate.
399 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
401         * configure.ac: Only compile with -fPIC if the target
402         supports it.
403         * configure: Regenerate.
405 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
407         * configure.ac: Set have_mmap to no on spu-*-* targets.
408         * configure: Regenerate.
410 2015-08-13  Ian Lance Taylor  <iant@google.com>
412         * dwarf.c (read_function_entry): Add vec_inlined parameter.
413         Change all callers.
415 2015-06-11  Martin Sebor  <msebor@redhat.com>
417         PR sanitizer/65479
418         * dwarf.c (struct line): Add new field idx.
419         (line_compare): Use it.
420         (add_line): Set it.
421         (read_line_info): Reset it.
423 2015-05-29  Tristan Gingold  <gingold@adacore.com>
425         * pecoff.c: New file.
426         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
427         * Makefile.in: Regenerate.
428         * filetype.awk: Detect pecoff.
429         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
430         Add pecoff.
431         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
432         true.
433         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
434         * configure: Regenerate.
435         * pecoff.c: New file.
437 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
439         * Makefile.in: Regenerated with automake-1.11.6.
440         * aclocal.m4: Likewise.
441         * configure: Likewise.
443 2015-01-24  Matthias Klose  <doko@ubuntu.com>
445         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
446         * configure: Regenerate.
448 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
450         Update copyright years.
452 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
454         PR bootstrap/63784
455         * configure: Regenerated.
457 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
459         * ChangeLog.jit: New.
461 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
463         PR target/63610
464         * configure: Regenerate.
466 2014-10-23  Ian Lance Taylor  <iant@google.com>
468         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
469         Fix to return void *.
471 2014-05-08  Ian Lance Taylor  <iant@google.com>
473         * mmap.c (backtrace_free): If freeing a large aligned block of
474         memory, call munmap rather than holding onto it.
475         (backtrace_vector_grow): When growing a vector, double the number
476         of pages requested.  When releasing the old version of a grown
477         vector, pass the correct size to backtrace_free.
479 2014-03-07  Ian Lance Taylor  <iant@google.com>
481         * sort.c (backtrace_qsort): Use middle element as pivot.
483 2014-03-06  Ian Lance Taylor  <iant@google.com>
485         * sort.c: New file.
486         * stest.c: New file.
487         * internal.h (backtrace_qsort): Declare.
488         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
489         (read_line_info, read_function_entry): Likewise.
490         (read_function_info, build_dwarf_data): Likewise.
491         * elf.c (elf_initialize_syminfo): Likewise.
492         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
493         (stest_SOURCES, stest_LDADD): Define.
494         (check_PROGRAMS): Add stest.
496 2014-02-07  Misty De Meo  <misty@brew.sh>
498         PR target/58710
499         * configure.ac: Use AC_LINK_IFELSE in check for
500         _Unwind_GetIPInfo.
501         * configure: Regenerate.
503 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
505         Update copyright years
507 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
509         * elf.c (ET_DYN): Undefine and define again.
510         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
511         return early -1 without closing the descriptor.
512         (struct phdr_data): Add exe_descriptor.
513         (phdr_callback): If pd->exe_descriptor is not -1, for very first
514         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
515         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
516         call to elf_add.
517         (backtrace_initialize): Adjust call to elf_add.  If it returns
518         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
520 2013-12-05  Ian Lance Taylor  <iant@google.com>
522         * alloc.c (backtrace_vector_finish): Add error_callback and data
523         parameters.  Call backtrace_vector_release.  Return address base.
524         * mmap.c (backtrace_vector_finish): Add error_callback and data
525         parameters.  Return address base.
526         * dwarf.c (read_function_info): Get new address base from
527         backtrace_vector_finish.
528         * internal.h (backtrace_vector_finish): Update declaration.
530 2013-11-27  Ian Lance Taylor  <iant@google.com>
532         * dwarf.c (find_address_ranges): New static function, broken out
533         of build_address_map.
534         (build_address_map): Call it.
535         * btest.c (check): Check for missing filename or function, rather
536         than crashing.
537         (f3): Check that enough frames were returned.
539 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
541         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
542         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
543         last argument.
544         * btest.c (struct symdata): Add size field.
545         (callback_three): Add symsize argument.  Copy it to the data->size
546         field.
547         (f23): Set symdata.size to 0.
548         (test5): Likewise.  If sizeof (int) > 1, lookup address of
549         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
550         values.
552         * atomic.c: Include sys/types.h.
554 2013-11-18  Ian Lance Taylor  <iant@google.com>
556         * configure.ac: Check for support of __atomic extensions.
557         * internal.h: Declare or #define atomic functions for use in
558         backtrace code.
559         * atomic.c: New file.
560         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
561         (dwarf_fileline, backtrace_dwarf_add): Likewise.
562         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
563         (backtrace_initialize): Likewise.
564         * fileline.c (fileline_initialize): Likewise.
565         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
566         * configure, config.h.in, Makefile.in: Rebuild.
568 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
570         * elf.c (SHN_UNDEF): Define.
571         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
572         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
573         (elf_add): Adjust caller.
575         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
577 2013-11-16  Ian Lance Taylor  <iant@google.com>
579         * backtrace.h (backtrace_create_state): Correct comment about
580         threading.
582 2013-11-15  Ian Lance Taylor  <iant@google.com>
584         * backtrace.h (backtrace_syminfo): Update comment and parameter
585         name to take any address, not just a PC value.
586         * elf.c (STT_OBJECT): Define.
587         (elf_nosyms): Rename parameter pc to addr.
588         (elf_symbol_search): Rename local variable pc to addr.
589         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
590         (elf_syminfo): Rename parameter pc to addr.
591         * btest.c (global): New global variable.
592         (test5): New test.
593         (main): Call test5.
595 2013-10-17  Ian Lance Taylor  <iant@google.com>
597         * elf.c (elf_add): Don't get the wrong offsets if a debug section
598         is missing.
600 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
602         * configure.ac: Add --enable-host-shared, setting up
603         pre-existing PIC_FLAG variable within Makefile.am et al.
604         * configure: Regenerate.
606 2013-09-20  Alan Modra  <amodra@gmail.com>
608         * configure: Regenerate.
610 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
612         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
614 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
616         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
617         dl_iterate_phdr callbacks.
619 2013-03-25  Ian Lance Taylor  <iant@google.com>
621         * alloc.c: #include <sys/types.h>.
622         * mmap.c: Likewise.
624 2013-01-31  Ian Lance Taylor  <iant@google.com>
626         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
627         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
629 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
631         PR other/56076
632         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
633         attribute was not seen.
635 2013-01-16  Ian Lance Taylor  <iant@google.com>
637         * dwarf.c (struct unit): Add filename and abs_filename fields.
638         (build_address_map): Set new fields when reading unit.
639         (dwarf_lookup_pc): If we don't find an entry in the line table,
640         just return the main file name.
642 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
644         Update copyright years.
646 2013-01-01  Ian Lance Taylor  <iant@google.com>
648         PR bootstrap/54834
649         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
650         $(MULTIBUILDTOP)/../../gcc/include.
651         * Makefile.in: Rebuild.
653 2013-01-01  Ian Lance Taylor  <iant@google.com>
655         PR other/55536
656         * mmap.c (backtrace_alloc): Don't call sync functions if not
657         threaded.
658         (backtrace_free): Likewise.
660 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
662         * mmapio.c: Define MAP_FAILED if not defined.
664 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
666         PR bootstrap/54926
667         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
668         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
669         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
670         accepts it.
671         * Makefile.in: Regenerated.
672         * configure: Regenerated.
674 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
676         PR bootstrap/54926
677         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
678         * Makefile.in: Regenerated.
680 2012-11-20  Ian Lance Taylor  <iant@google.com>
682         * dwarf.c (read_attribute): Always clear val.
684 2012-11-13  Ian Lance Taylor  <iant@google.com>
686         PR other/55312
687         * configure.ac: Only add -Werror if building a target library.
688         * configure: Rebuild.
690 2012-11-12  Ian Lance Taylor  <iant@google.com>
691             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
692             Gerald Pfeifer  <gerald@pfeifer.com>
694         * configure.ac: Check for getexecname.
695         * fileline.c: #include <errno.h>.  Define getexecname if not
696         available.
697         (fileline_initialize): Try to find the executable in a few
698         different ways.
699         * print.c (error_callback): Only print the filename if it came
700         from the backtrace state.
701         * configure, config.h.in: Rebuild.
703 2012-10-29  Ian Lance Taylor  <iant@google.com>
705         * mmap.c (backtrace_vector_release): Correct last patch: add
706         aligned, not size.
708 2012-10-29  Ian Lance Taylor  <iant@google.com>
710         * mmap.c (backtrace_vector_release): Make sure freed block is
711         aligned on 8-byte boundary.
713 2012-10-26  Ian Lance Taylor  <iant@google.com>
715         PR other/55087
716         * posix.c (backtrace_open): Add does_not_exist parameter.
717         * elf.c (phdr_callback): Do not warn if shared library could not
718         be opened.
719         * fileline.c (fileline_initialize): Update calls to
720         backtrace_open.
721         * internal.h (backtrace_open): Update declaration.
723 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
725         PR target/55061
726         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
727         * configure: Regenerate.
729 2012-10-24  Ian Lance Taylor  <iant@google.com>
731         PR target/55061
732         * configure.ac: Check whether -funwind-tables option works.
733         * configure: Rebuild.
735 2012-10-11  Ian Lance Taylor  <iant@google.com>
737         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
738         * configure: Rebuild.
740 2012-10-10  Ian Lance Taylor  <iant@google.com>
742         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
743         lower case.
745 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
747         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
749 2012-10-09  Ian Lance Taylor  <iant@google.com>
751         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
752         (backtrace_dwarf_add): Likewise.
754 2012-10-09  Ian Lance Taylor  <iant@google.com>
756         Add support for tracing through shared libraries.
757         * configure.ac: Check for link.h and dl_iterate_phdr.
758         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
759         ELF macros before #defining them.
760         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
761         dl_iterate_phdr.
762         (struct elf_syminfo_data): Add next field.
763         (elf_initialize_syminfo): Initialize next field.
764         (elf_add_syminfo_data): New static function.
765         (elf_add): New static function, broken out of
766         backtrace_initialize.  Call backtrace_dwarf_add instead of
767         backtrace_dwarf_initialize.
768         (struct phdr_data): Define.
769         (phdr_callback): New static function.
770         (backtrace_initialize): Call elf_add.
771         * dwarf.c (struct dwarf_data): Add next and base_address fields.
772         (add_unit_addr): Add base_address parameter.  Change all callers.
773         (add_unit_ranges, build_address_map): Likewise.
774         (add_line): Add ddata parameter.  Change all callers.
775         (read_line_program, add_function_range): Likewise.
776         (dwarf_lookup_pc): New static function, broken out of
777         dwarf_fileline.
778         (dwarf_fileline): Call dwarf_lookup_pc.
779         (build_dwarf_data): New static function.
780         (backtrace_dwarf_add): New function.
781         (backtrace_dwarf_initialize): Remove.
782         * internal.h (backtrace_dwarf_initialize): Don't declare.
783         (backtrace_dwarf_add): Declare.
784         * configure, config.h.in: Rebuild.
786 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
788         * btest.c (f23): Avoid uninitialized variable warning.
790 2012-10-04  Ian Lance Taylor  <iant@google.com>
792         * dwarf.c: If the system header files do not declare strnlen,
793         provide our own version.
795 2012-10-03  Ian Lance Taylor  <iant@google.com>
797         * dwarf.c (read_uleb128): Fix overflow test.
798         (read_sleb128): Likewise.
799         (build_address_map): Don't change unit_buf.start.
801 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
803         PR other/54761
804         * configure.ac (EXTRA_FLAGS): New.
805         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
806         * configure, Makefile.in: Regenerate.
808 2012-09-29  Ian Lance Taylor  <iant@google.com>
810         PR other/54749
811         * fileline.c (fileline_initialize): Pass errnum as -1 when
812         reporting that we could not read executable information after a
813         previous failure.
815 2012-09-27  Ian Lance Taylor  <iant@google.com>
817         PR bootstrap/54732
818         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
819         * Makefile.am: Add dependencies for all objects.
820         * configure, aclocal.m4, Makefile.in: Rebuild.
822 2012-09-27  Ian Lance Taylor  <iant@google.com>
824         PR other/54726
825         * elf.c (backtrace_initialize): Set *fileln_fn, not
826         state->fileln_fn.
828 2012-09-19  Ian Lance Taylor  <iant@google.com>
830         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
831         as a target library.
832         * configure: Rebuild.
834 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
835             Ian Lance Taylor  <iant@google.com>
837         * configure.ac (GCC_HEADER_STDINT): Invoke.
838         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
839         * btest.c: Don't include <stdint.h>.
840         * dwarf.c: Likewise.
841         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
843 2012-09-18  Ian Lance Taylor  <iant@google.com>
845         PR bootstrap/54623
846         * Makefile.am (AM_CPPFLAGS): Define.
847         (AM_CFLAGS): Remove -I options.
848         * Makefile.in: Rebuild.
850 2012-09-18  Ian Lance Taylor  <iant@google.com>
852         * posix.c (O_BINARY): Define if not defined.
853         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
854         HAVE_FCNTL is defined.
855         * configure.ac: Test for the fcntl function.
856         * configure, config.h.in: Rebuild.
858 2012-09-18  Ian Lance Taylor  <iant@google.com>
860         * btest.c (test1, test2, test3, test4): Add the unused attribute.
862 2012-09-18  Ian Lance Taylor  <iant@google.com>
864         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
866 2012-09-18  Ian Lance Taylor  <iant@google.com>
868         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
869         * mmapio.c: Don't define _GNU_SOURCE.
870         * configure, config.h.in: Rebuild.
872 2012-09-18  Ian Lance Taylor  <iant@google.com>
874         * configure.ac: Check whether strnlen is declared.
875         * dwarf.c: Declare strnlen if not declared.
876         * configure, config.h.in: Rebuild.
878 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
880         * fileline.c: Include <stdlib.h>.
881         * mmap.c: Likewise.
883 2012-09-17  Ian Lance Taylor  <iant@google.com>
885         PR bootstrap/54611
886         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
887         parameter.
889 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
891         PR bootstrap/54611
892         * nounwind.c (backtrace_simple): Add state parameter.
894 2012-09-17  Ian Lance Taylor  <iant@google.com>
896         PR bootstrap/54609
897         * unknown.c (unknown_fileline): Add state parameter, remove
898         fileline_data parameter, name error_callback parameter.
899         (backtrace_initialize): Add state parameter.
901 2012-09-17  Ian Lance Taylor  <iant@google.com>
903         * Initial implementation.
905 Copyright (C) 2012-2018 Free Software Foundation, Inc.
907 Copying and distribution of this file, with or without modification,
908 are permitted in any medium without royalty provided the copyright
909 notice and this notice are preserved.