* tree-vect-data-refs.c (compare_tree): Rename and move ...
[official-gcc.git] / libbacktrace / ChangeLog
blob60a2f0f99dd9de4402e0b4ea13c1bf76d61e63bc
1 2017-05-19  Than McIntosh  <thanm@google.com>
3         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
4         (read_line_header): Don't allocate dirs if dirs_count == 0.
5         * edtest.c: New file.
6         * edtest2.c: New file.
7         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
8         (check_PROGRAMS): Add edtest.
9         (edtest2_build.c, gen_edtest2_build): New targets.
10         * Makefile.in: Rebuild.
12 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
14         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
15         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
17 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
19         Update copyright years.
21 2016-11-15  Matthias Klose  <doko@ubuntu.com>
23         * configure: Regenerate.
25 2016-09-11  Carlos Liam  <carlos@aarzee.me>
27         * all: Remove meaningless trailing whitespace.
29 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
31         PR target/71161
32         * elf.c (phdr_callback) [__i386__]: Add
33         __attribute__((__force_align_arg_pointer__)).
35 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
37         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
38         avoid possible crash.
39         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
40         missing debug info anymore.
42 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
44         * mmap.c (MAP_FAILED): Define if not defined.
46 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
48         Update copyright years.
50 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
52         * configure.ac: Specify that DJGPP do not have mmap
53         even when sys/mman.h exists.
54         * configure: Regenerate
56 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
58         PR libgfortran/68115
59         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
60         * configure: Regenerate.
61         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
62         to void.
64 2015-09-17  Ian Lance Taylor  <iant@google.com>
66         * posix.c (backtrace_open): Cast second argument of open() to int.
68 2015-09-11  Ian Lance Taylor  <iant@google.com>
70         * Makefile.am (backtrace.lo): Depend on internal.h.
71         (sort.lo, stest.lo): Add explicit dependencies.
72         * Makefile.in: Rebuild.
74 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
76         * backtrace.c: #include <sys/types.h>.
78 2015-09-08  Ian Lance Taylor  <iant@google.com>
80         PR other/67457
81         * backtrace.c: #include "internal.h".
82         (struct backtrace_data): Add can_alloc field.
83         (unwind): If can_alloc is false, don't try to get file/line
84         information.
85         (backtrace_full): Set can_alloc field in bdata.
86         * alloc.c (backtrace_alloc): Don't call error_callback if it is
87         NULL.
88         * mmap.c (backtrace_alloc): Likewise.
89         * internal.h: Update comments for backtrace_alloc and
90         backtrace_free.
92 2015-09-08  Ian Lance Taylor  <iant@google.com>
94         PR other/67457
95         * mmap.c (backtrace_alloc): Correct test for mmap failure.
97 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
99         * configure.ac: For spu-*-* targets, set have_fcntl to no.
100         * configure: Regenerate.
102 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
104         * configure.ac: Remove [disable-shared] argument to LT_INIT.
105         Remove setting PIC_FLAG when building as target library.
106         * configure: Regenerate.
108 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
110         * configure.ac: Only compile with -fPIC if the target
111         supports it.
112         * configure: Regenerate.
114 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
116         * configure.ac: Set have_mmap to no on spu-*-* targets.
117         * configure: Regenerate.
119 2015-08-13  Ian Lance Taylor  <iant@google.com>
121         * dwarf.c (read_function_entry): Add vec_inlined parameter.
122         Change all callers.
124 2015-06-11  Martin Sebor  <msebor@redhat.com>
126         PR sanitizer/65479
127         * dwarf.c (struct line): Add new field idx.
128         (line_compare): Use it.
129         (add_line): Set it.
130         (read_line_info): Reset it.
132 2015-05-29  Tristan Gingold  <gingold@adacore.com>
134         * pecoff.c: New file.
135         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
136         * Makefile.in: Regenerate.
137         * filetype.awk: Detect pecoff.
138         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
139         Add pecoff.
140         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
141         true.
142         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
143         * configure: Regenerate.
144         * pecoff.c: New file.
146 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
148         * Makefile.in: Regenerated with automake-1.11.6.
149         * aclocal.m4: Likewise.
150         * configure: Likewise.
152 2015-01-24  Matthias Klose  <doko@ubuntu.com>
154         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
155         * configure: Regenerate.
157 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
159         Update copyright years.
161 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
163         PR bootstrap/63784
164         * configure: Regenerated.
166 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
168         * ChangeLog.jit: New.
170 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
172         PR target/63610
173         * configure: Regenerate.
175 2014-10-23  Ian Lance Taylor  <iant@google.com>
177         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
178         Fix to return void *.
180 2014-05-08  Ian Lance Taylor  <iant@google.com>
182         * mmap.c (backtrace_free): If freeing a large aligned block of
183         memory, call munmap rather than holding onto it.
184         (backtrace_vector_grow): When growing a vector, double the number
185         of pages requested.  When releasing the old version of a grown
186         vector, pass the correct size to backtrace_free.
188 2014-03-07  Ian Lance Taylor  <iant@google.com>
190         * sort.c (backtrace_qsort): Use middle element as pivot.
192 2014-03-06  Ian Lance Taylor  <iant@google.com>
194         * sort.c: New file.
195         * stest.c: New file.
196         * internal.h (backtrace_qsort): Declare.
197         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
198         (read_line_info, read_function_entry): Likewise.
199         (read_function_info, build_dwarf_data): Likewise.
200         * elf.c (elf_initialize_syminfo): Likewise.
201         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
202         (stest_SOURCES, stest_LDADD): Define.
203         (check_PROGRAMS): Add stest.
205 2014-02-07  Misty De Meo  <misty@brew.sh>
207         PR target/58710
208         * configure.ac: Use AC_LINK_IFELSE in check for
209         _Unwind_GetIPInfo.
210         * configure: Regenerate.
212 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
214         Update copyright years
216 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
218         * elf.c (ET_DYN): Undefine and define again.
219         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
220         return early -1 without closing the descriptor.
221         (struct phdr_data): Add exe_descriptor.
222         (phdr_callback): If pd->exe_descriptor is not -1, for very first
223         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
224         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
225         call to elf_add.
226         (backtrace_initialize): Adjust call to elf_add.  If it returns
227         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
229 2013-12-05  Ian Lance Taylor  <iant@google.com>
231         * alloc.c (backtrace_vector_finish): Add error_callback and data
232         parameters.  Call backtrace_vector_release.  Return address base.
233         * mmap.c (backtrace_vector_finish): Add error_callback and data
234         parameters.  Return address base.
235         * dwarf.c (read_function_info): Get new address base from
236         backtrace_vector_finish.
237         * internal.h (backtrace_vector_finish): Update declaration.
239 2013-11-27  Ian Lance Taylor  <iant@google.com>
241         * dwarf.c (find_address_ranges): New static function, broken out
242         of build_address_map.
243         (build_address_map): Call it.
244         * btest.c (check): Check for missing filename or function, rather
245         than crashing.
246         (f3): Check that enough frames were returned.
248 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
250         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
251         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
252         last argument.
253         * btest.c (struct symdata): Add size field.
254         (callback_three): Add symsize argument.  Copy it to the data->size
255         field.
256         (f23): Set symdata.size to 0.
257         (test5): Likewise.  If sizeof (int) > 1, lookup address of
258         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
259         values.
261         * atomic.c: Include sys/types.h.
263 2013-11-18  Ian Lance Taylor  <iant@google.com>
265         * configure.ac: Check for support of __atomic extensions.
266         * internal.h: Declare or #define atomic functions for use in
267         backtrace code.
268         * atomic.c: New file.
269         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
270         (dwarf_fileline, backtrace_dwarf_add): Likewise.
271         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
272         (backtrace_initialize): Likewise.
273         * fileline.c (fileline_initialize): Likewise.
274         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
275         * configure, config.h.in, Makefile.in: Rebuild.
277 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
279         * elf.c (SHN_UNDEF): Define.
280         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
281         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
282         (elf_add): Adjust caller.
284         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
286 2013-11-16  Ian Lance Taylor  <iant@google.com>
288         * backtrace.h (backtrace_create_state): Correct comment about
289         threading.
291 2013-11-15  Ian Lance Taylor  <iant@google.com>
293         * backtrace.h (backtrace_syminfo): Update comment and parameter
294         name to take any address, not just a PC value.
295         * elf.c (STT_OBJECT): Define.
296         (elf_nosyms): Rename parameter pc to addr.
297         (elf_symbol_search): Rename local variable pc to addr.
298         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
299         (elf_syminfo): Rename parameter pc to addr.
300         * btest.c (global): New global variable.
301         (test5): New test.
302         (main): Call test5.
304 2013-10-17  Ian Lance Taylor  <iant@google.com>
306         * elf.c (elf_add): Don't get the wrong offsets if a debug section
307         is missing.
309 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
311         * configure.ac: Add --enable-host-shared, setting up
312         pre-existing PIC_FLAG variable within Makefile.am et al.
313         * configure: Regenerate.
315 2013-09-20  Alan Modra  <amodra@gmail.com>
317         * configure: Regenerate.
319 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
321         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
323 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
325         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
326         dl_iterate_phdr callbacks.
328 2013-03-25  Ian Lance Taylor  <iant@google.com>
330         * alloc.c: #include <sys/types.h>.
331         * mmap.c: Likewise.
333 2013-01-31  Ian Lance Taylor  <iant@google.com>
335         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
336         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
338 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
340         PR other/56076
341         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
342         attribute was not seen.
344 2013-01-16  Ian Lance Taylor  <iant@google.com>
346         * dwarf.c (struct unit): Add filename and abs_filename fields.
347         (build_address_map): Set new fields when reading unit.
348         (dwarf_lookup_pc): If we don't find an entry in the line table,
349         just return the main file name.
351 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
353         Update copyright years.
355 2013-01-01  Ian Lance Taylor  <iant@google.com>
357         PR bootstrap/54834
358         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
359         $(MULTIBUILDTOP)/../../gcc/include.
360         * Makefile.in: Rebuild.
362 2013-01-01  Ian Lance Taylor  <iant@google.com>
364         PR other/55536
365         * mmap.c (backtrace_alloc): Don't call sync functions if not
366         threaded.
367         (backtrace_free): Likewise.
369 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
371         * mmapio.c: Define MAP_FAILED if not defined.
373 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
375         PR bootstrap/54926
376         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
377         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
378         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
379         accepts it.
380         * Makefile.in: Regenerated.
381         * configure: Regenerated.
383 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
385         PR bootstrap/54926
386         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
387         * Makefile.in: Regenerated.
389 2012-11-20  Ian Lance Taylor  <iant@google.com>
391         * dwarf.c (read_attribute): Always clear val.
393 2012-11-13  Ian Lance Taylor  <iant@google.com>
395         PR other/55312
396         * configure.ac: Only add -Werror if building a target library.
397         * configure: Rebuild.
399 2012-11-12  Ian Lance Taylor  <iant@google.com>
400             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
401             Gerald Pfeifer  <gerald@pfeifer.com>
403         * configure.ac: Check for getexecname.
404         * fileline.c: #include <errno.h>.  Define getexecname if not
405         available.
406         (fileline_initialize): Try to find the executable in a few
407         different ways.
408         * print.c (error_callback): Only print the filename if it came
409         from the backtrace state.
410         * configure, config.h.in: Rebuild.
412 2012-10-29  Ian Lance Taylor  <iant@google.com>
414         * mmap.c (backtrace_vector_release): Correct last patch: add
415         aligned, not size.
417 2012-10-29  Ian Lance Taylor  <iant@google.com>
419         * mmap.c (backtrace_vector_release): Make sure freed block is
420         aligned on 8-byte boundary.
422 2012-10-26  Ian Lance Taylor  <iant@google.com>
424         PR other/55087
425         * posix.c (backtrace_open): Add does_not_exist parameter.
426         * elf.c (phdr_callback): Do not warn if shared library could not
427         be opened.
428         * fileline.c (fileline_initialize): Update calls to
429         backtrace_open.
430         * internal.h (backtrace_open): Update declaration.
432 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
434         PR target/55061
435         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
436         * configure: Regenerate.
438 2012-10-24  Ian Lance Taylor  <iant@google.com>
440         PR target/55061
441         * configure.ac: Check whether -funwind-tables option works.
442         * configure: Rebuild.
444 2012-10-11  Ian Lance Taylor  <iant@google.com>
446         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
447         * configure: Rebuild.
449 2012-10-10  Ian Lance Taylor  <iant@google.com>
451         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
452         lower case.
454 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
456         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
458 2012-10-09  Ian Lance Taylor  <iant@google.com>
460         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
461         (backtrace_dwarf_add): Likewise.
463 2012-10-09  Ian Lance Taylor  <iant@google.com>
465         Add support for tracing through shared libraries.
466         * configure.ac: Check for link.h and dl_iterate_phdr.
467         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
468         ELF macros before #defining them.
469         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
470         dl_iterate_phdr.
471         (struct elf_syminfo_data): Add next field.
472         (elf_initialize_syminfo): Initialize next field.
473         (elf_add_syminfo_data): New static function.
474         (elf_add): New static function, broken out of
475         backtrace_initialize.  Call backtrace_dwarf_add instead of
476         backtrace_dwarf_initialize.
477         (struct phdr_data): Define.
478         (phdr_callback): New static function.
479         (backtrace_initialize): Call elf_add.
480         * dwarf.c (struct dwarf_data): Add next and base_address fields.
481         (add_unit_addr): Add base_address parameter.  Change all callers.
482         (add_unit_ranges, build_address_map): Likewise.
483         (add_line): Add ddata parameter.  Change all callers.
484         (read_line_program, add_function_range): Likewise.
485         (dwarf_lookup_pc): New static function, broken out of
486         dwarf_fileline.
487         (dwarf_fileline): Call dwarf_lookup_pc.
488         (build_dwarf_data): New static function.
489         (backtrace_dwarf_add): New function.
490         (backtrace_dwarf_initialize): Remove.
491         * internal.h (backtrace_dwarf_initialize): Don't declare.
492         (backtrace_dwarf_add): Declare.
493         * configure, config.h.in: Rebuild.
495 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
497         * btest.c (f23): Avoid uninitialized variable warning.
499 2012-10-04  Ian Lance Taylor  <iant@google.com>
501         * dwarf.c: If the system header files do not declare strnlen,
502         provide our own version.
504 2012-10-03  Ian Lance Taylor  <iant@google.com>
506         * dwarf.c (read_uleb128): Fix overflow test.
507         (read_sleb128): Likewise.
508         (build_address_map): Don't change unit_buf.start.
510 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
512         PR other/54761
513         * configure.ac (EXTRA_FLAGS): New.
514         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
515         * configure, Makefile.in: Regenerate.
517 2012-09-29  Ian Lance Taylor  <iant@google.com>
519         PR other/54749
520         * fileline.c (fileline_initialize): Pass errnum as -1 when
521         reporting that we could not read executable information after a
522         previous failure.
524 2012-09-27  Ian Lance Taylor  <iant@google.com>
526         PR bootstrap/54732
527         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
528         * Makefile.am: Add dependencies for all objects.
529         * configure, aclocal.m4, Makefile.in: Rebuild.
531 2012-09-27  Ian Lance Taylor  <iant@google.com>
533         PR other/54726
534         * elf.c (backtrace_initialize): Set *fileln_fn, not
535         state->fileln_fn.
537 2012-09-19  Ian Lance Taylor  <iant@google.com>
539         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
540         as a target library.
541         * configure: Rebuild.
543 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
544             Ian Lance Taylor  <iant@google.com>
546         * configure.ac (GCC_HEADER_STDINT): Invoke.
547         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
548         * btest.c: Don't include <stdint.h>.
549         * dwarf.c: Likewise.
550         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
552 2012-09-18  Ian Lance Taylor  <iant@google.com>
554         PR bootstrap/54623
555         * Makefile.am (AM_CPPFLAGS): Define.
556         (AM_CFLAGS): Remove -I options.
557         * Makefile.in: Rebuild.
559 2012-09-18  Ian Lance Taylor  <iant@google.com>
561         * posix.c (O_BINARY): Define if not defined.
562         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
563         HAVE_FCNTL is defined.
564         * configure.ac: Test for the fcntl function.
565         * configure, config.h.in: Rebuild.
567 2012-09-18  Ian Lance Taylor  <iant@google.com>
569         * btest.c (test1, test2, test3, test4): Add the unused attribute.
571 2012-09-18  Ian Lance Taylor  <iant@google.com>
573         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
575 2012-09-18  Ian Lance Taylor  <iant@google.com>
577         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
578         * mmapio.c: Don't define _GNU_SOURCE.
579         * configure, config.h.in: Rebuild.
581 2012-09-18  Ian Lance Taylor  <iant@google.com>
583         * configure.ac: Check whether strnlen is declared.
584         * dwarf.c: Declare strnlen if not declared.
585         * configure, config.h.in: Rebuild.
587 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
589         * fileline.c: Include <stdlib.h>.
590         * mmap.c: Likewise.
592 2012-09-17  Ian Lance Taylor  <iant@google.com>
594         PR bootstrap/54611
595         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
596         parameter.
598 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
600         PR bootstrap/54611
601         * nounwind.c (backtrace_simple): Add state parameter.
603 2012-09-17  Ian Lance Taylor  <iant@google.com>
605         PR bootstrap/54609
606         * unknown.c (unknown_fileline): Add state parameter, remove
607         fileline_data parameter, name error_callback parameter.
608         (backtrace_initialize): Add state parameter.
610 2012-09-17  Ian Lance Taylor  <iant@google.com>
612         * Initial implementation.
614 Copyright (C) 2012-2017 Free Software Foundation, Inc.
616 Copying and distribution of this file, with or without modification,
617 are permitted in any medium without royalty provided the copyright
618 notice and this notice are preserved.