2016-06-23 François Dumont <fdumont@gcc.gnu.org>
[official-gcc.git] / libbacktrace / ChangeLog
blobacc07047f6729cc578b55bec881acb8f8fd379ba
1 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
3         PR target/71161
4         * elf.c (phdr_callback) [__i386__]: Add
5         __attribute__((__force_align_arg_pointer__)).
7 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
9         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
10         avoid possible crash.
11         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
12         missing debug info anymore.
14 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
16         * mmap.c (MAP_FAILED): Define if not defined.
18 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
20         Update copyright years.
22 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
24         * configure.ac: Specify that DJGPP do not have mmap
25         even when sys/mman.h exists.
26         * configure: Regenerate
28 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
30         PR libgfortran/68115
31         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
32         * configure: Regenerate.
33         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
34         to void.
36 2015-09-17  Ian Lance Taylor  <iant@google.com>
38         * posix.c (backtrace_open): Cast second argument of open() to int.
40 2015-09-11  Ian Lance Taylor  <iant@google.com>
42         * Makefile.am (backtrace.lo): Depend on internal.h.
43         (sort.lo, stest.lo): Add explicit dependencies.
44         * Makefile.in: Rebuild.
46 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
48         * backtrace.c: #include <sys/types.h>.
50 2015-09-08  Ian Lance Taylor  <iant@google.com>
52         PR other/67457
53         * backtrace.c: #include "internal.h".
54         (struct backtrace_data): Add can_alloc field.
55         (unwind): If can_alloc is false, don't try to get file/line
56         information.
57         (backtrace_full): Set can_alloc field in bdata.
58         * alloc.c (backtrace_alloc): Don't call error_callback if it is
59         NULL.
60         * mmap.c (backtrace_alloc): Likewise.
61         * internal.h: Update comments for backtrace_alloc and
62         backtrace_free.
64 2015-09-08  Ian Lance Taylor  <iant@google.com>
66         PR other/67457
67         * mmap.c (backtrace_alloc): Correct test for mmap failure.
69 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
71         * configure.ac: For spu-*-* targets, set have_fcntl to no.
72         * configure: Regenerate.
74 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
76         * configure.ac: Remove [disable-shared] argument to LT_INIT.
77         Remove setting PIC_FLAG when building as target library.
78         * configure: Regenerate.
80 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
82         * configure.ac: Only compile with -fPIC if the target
83         supports it.
84         * configure: Regenerate.
86 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
88         * configure.ac: Set have_mmap to no on spu-*-* targets.
89         * configure: Regenerate.
91 2015-08-13  Ian Lance Taylor  <iant@google.com>
93         * dwarf.c (read_function_entry): Add vec_inlined parameter.
94         Change all callers.
96 2015-06-11  Martin Sebor  <msebor@redhat.com>
98         PR sanitizer/65479
99         * dwarf.c (struct line): Add new field idx.
100         (line_compare): Use it.
101         (add_line): Set it.
102         (read_line_info): Reset it.
104 2015-05-29  Tristan Gingold  <gingold@adacore.com>
106         * pecoff.c: New file.
107         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
108         * Makefile.in: Regenerate.
109         * filetype.awk: Detect pecoff.
110         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
111         Add pecoff.
112         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
113         true.
114         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
115         * configure: Regenerate.
116         * pecoff.c: New file.
118 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
120         * Makefile.in: Regenerated with automake-1.11.6.
121         * aclocal.m4: Likewise.
122         * configure: Likewise.
124 2015-01-24  Matthias Klose  <doko@ubuntu.com>
126         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
127         * configure: Regenerate.
129 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
131         Update copyright years.
133 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
135         PR bootstrap/63784
136         * configure: Regenerated.
138 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
140         * ChangeLog.jit: New.
142 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
144         PR target/63610
145         * configure: Regenerate.
147 2014-10-23  Ian Lance Taylor  <iant@google.com>
149         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
150         Fix to return void *.
152 2014-05-08  Ian Lance Taylor  <iant@google.com>
154         * mmap.c (backtrace_free): If freeing a large aligned block of
155         memory, call munmap rather than holding onto it.
156         (backtrace_vector_grow): When growing a vector, double the number
157         of pages requested.  When releasing the old version of a grown
158         vector, pass the correct size to backtrace_free.
160 2014-03-07  Ian Lance Taylor  <iant@google.com>
162         * sort.c (backtrace_qsort): Use middle element as pivot.
164 2014-03-06  Ian Lance Taylor  <iant@google.com>
166         * sort.c: New file.
167         * stest.c: New file.
168         * internal.h (backtrace_qsort): Declare.
169         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
170         (read_line_info, read_function_entry): Likewise.
171         (read_function_info, build_dwarf_data): Likewise.
172         * elf.c (elf_initialize_syminfo): Likewise.
173         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
174         (stest_SOURCES, stest_LDADD): Define.
175         (check_PROGRAMS): Add stest.
177 2014-02-07  Misty De Meo  <misty@brew.sh>
179         PR target/58710
180         * configure.ac: Use AC_LINK_IFELSE in check for
181         _Unwind_GetIPInfo.
182         * configure: Regenerate.
184 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
186         Update copyright years
188 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
190         * elf.c (ET_DYN): Undefine and define again.
191         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
192         return early -1 without closing the descriptor.
193         (struct phdr_data): Add exe_descriptor.
194         (phdr_callback): If pd->exe_descriptor is not -1, for very first
195         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
196         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
197         call to elf_add.
198         (backtrace_initialize): Adjust call to elf_add.  If it returns
199         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
201 2013-12-05  Ian Lance Taylor  <iant@google.com>
203         * alloc.c (backtrace_vector_finish): Add error_callback and data
204         parameters.  Call backtrace_vector_release.  Return address base.
205         * mmap.c (backtrace_vector_finish): Add error_callback and data
206         parameters.  Return address base.
207         * dwarf.c (read_function_info): Get new address base from
208         backtrace_vector_finish.
209         * internal.h (backtrace_vector_finish): Update declaration.
211 2013-11-27  Ian Lance Taylor  <iant@google.com>
213         * dwarf.c (find_address_ranges): New static function, broken out
214         of build_address_map.
215         (build_address_map): Call it.
216         * btest.c (check): Check for missing filename or function, rather
217         than crashing.
218         (f3): Check that enough frames were returned.
220 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
222         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
223         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
224         last argument.
225         * btest.c (struct symdata): Add size field.
226         (callback_three): Add symsize argument.  Copy it to the data->size
227         field.
228         (f23): Set symdata.size to 0.
229         (test5): Likewise.  If sizeof (int) > 1, lookup address of
230         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
231         values.
233         * atomic.c: Include sys/types.h.
235 2013-11-18  Ian Lance Taylor  <iant@google.com>
237         * configure.ac: Check for support of __atomic extensions.
238         * internal.h: Declare or #define atomic functions for use in
239         backtrace code.
240         * atomic.c: New file.
241         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
242         (dwarf_fileline, backtrace_dwarf_add): Likewise.
243         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
244         (backtrace_initialize): Likewise.
245         * fileline.c (fileline_initialize): Likewise.
246         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
247         * configure, config.h.in, Makefile.in: Rebuild.
249 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
251         * elf.c (SHN_UNDEF): Define.
252         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
253         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
254         (elf_add): Adjust caller.
256         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
258 2013-11-16  Ian Lance Taylor  <iant@google.com>
260         * backtrace.h (backtrace_create_state): Correct comment about
261         threading.
263 2013-11-15  Ian Lance Taylor  <iant@google.com>
265         * backtrace.h (backtrace_syminfo): Update comment and parameter
266         name to take any address, not just a PC value.
267         * elf.c (STT_OBJECT): Define.
268         (elf_nosyms): Rename parameter pc to addr.
269         (elf_symbol_search): Rename local variable pc to addr.
270         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
271         (elf_syminfo): Rename parameter pc to addr.
272         * btest.c (global): New global variable.
273         (test5): New test.
274         (main): Call test5.
276 2013-10-17  Ian Lance Taylor  <iant@google.com>
278         * elf.c (elf_add): Don't get the wrong offsets if a debug section
279         is missing.
281 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
283         * configure.ac: Add --enable-host-shared, setting up
284         pre-existing PIC_FLAG variable within Makefile.am et al.
285         * configure: Regenerate.
287 2013-09-20  Alan Modra  <amodra@gmail.com>
289         * configure: Regenerate.
291 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
293         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
295 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
297         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
298         dl_iterate_phdr callbacks.
300 2013-03-25  Ian Lance Taylor  <iant@google.com>
302         * alloc.c: #include <sys/types.h>.
303         * mmap.c: Likewise.
305 2013-01-31  Ian Lance Taylor  <iant@google.com>
307         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
308         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
310 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
312         PR other/56076
313         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
314         attribute was not seen.
316 2013-01-16  Ian Lance Taylor  <iant@google.com>
318         * dwarf.c (struct unit): Add filename and abs_filename fields.
319         (build_address_map): Set new fields when reading unit.
320         (dwarf_lookup_pc): If we don't find an entry in the line table,
321         just return the main file name.
323 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
325         Update copyright years.
327 2013-01-01  Ian Lance Taylor  <iant@google.com>
329         PR bootstrap/54834
330         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
331         $(MULTIBUILDTOP)/../../gcc/include.
332         * Makefile.in: Rebuild.
334 2013-01-01  Ian Lance Taylor  <iant@google.com>
336         PR other/55536
337         * mmap.c (backtrace_alloc): Don't call sync functions if not
338         threaded.
339         (backtrace_free): Likewise.
341 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
343         * mmapio.c: Define MAP_FAILED if not defined.
345 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
347         PR bootstrap/54926
348         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
349         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
350         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
351         accepts it.
352         * Makefile.in: Regenerated.
353         * configure: Regenerated.
355 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
357         PR bootstrap/54926
358         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
359         * Makefile.in: Regenerated.
361 2012-11-20  Ian Lance Taylor  <iant@google.com>
363         * dwarf.c (read_attribute): Always clear val.
365 2012-11-13  Ian Lance Taylor  <iant@google.com>
367         PR other/55312
368         * configure.ac: Only add -Werror if building a target library.
369         * configure: Rebuild.
371 2012-11-12  Ian Lance Taylor  <iant@google.com>
372             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
373             Gerald Pfeifer  <gerald@pfeifer.com>
375         * configure.ac: Check for getexecname.
376         * fileline.c: #include <errno.h>.  Define getexecname if not
377         available.
378         (fileline_initialize): Try to find the executable in a few
379         different ways.
380         * print.c (error_callback): Only print the filename if it came
381         from the backtrace state.
382         * configure, config.h.in: Rebuild.
384 2012-10-29  Ian Lance Taylor  <iant@google.com>
386         * mmap.c (backtrace_vector_release): Correct last patch: add
387         aligned, not size.
389 2012-10-29  Ian Lance Taylor  <iant@google.com>
391         * mmap.c (backtrace_vector_release): Make sure freed block is
392         aligned on 8-byte boundary.
394 2012-10-26  Ian Lance Taylor  <iant@google.com>
396         PR other/55087
397         * posix.c (backtrace_open): Add does_not_exist parameter.
398         * elf.c (phdr_callback): Do not warn if shared library could not
399         be opened.
400         * fileline.c (fileline_initialize): Update calls to
401         backtrace_open.
402         * internal.h (backtrace_open): Update declaration.
404 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
406         PR target/55061
407         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
408         * configure: Regenerate.
410 2012-10-24  Ian Lance Taylor  <iant@google.com>
412         PR target/55061
413         * configure.ac: Check whether -funwind-tables option works.
414         * configure: Rebuild.
416 2012-10-11  Ian Lance Taylor  <iant@google.com>
418         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
419         * configure: Rebuild.
421 2012-10-10  Ian Lance Taylor  <iant@google.com>
423         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
424         lower case.
426 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
428         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
430 2012-10-09  Ian Lance Taylor  <iant@google.com>
432         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
433         (backtrace_dwarf_add): Likewise.
435 2012-10-09  Ian Lance Taylor  <iant@google.com>
437         Add support for tracing through shared libraries.
438         * configure.ac: Check for link.h and dl_iterate_phdr.
439         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
440         ELF macros before #defining them.
441         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
442         dl_iterate_phdr.
443         (struct elf_syminfo_data): Add next field.
444         (elf_initialize_syminfo): Initialize next field.
445         (elf_add_syminfo_data): New static function.
446         (elf_add): New static function, broken out of
447         backtrace_initialize.  Call backtrace_dwarf_add instead of
448         backtrace_dwarf_initialize.
449         (struct phdr_data): Define.
450         (phdr_callback): New static function.
451         (backtrace_initialize): Call elf_add.
452         * dwarf.c (struct dwarf_data): Add next and base_address fields.
453         (add_unit_addr): Add base_address parameter.  Change all callers.
454         (add_unit_ranges, build_address_map): Likewise.
455         (add_line): Add ddata parameter.  Change all callers.
456         (read_line_program, add_function_range): Likewise.
457         (dwarf_lookup_pc): New static function, broken out of
458         dwarf_fileline.
459         (dwarf_fileline): Call dwarf_lookup_pc.
460         (build_dwarf_data): New static function.
461         (backtrace_dwarf_add): New function.
462         (backtrace_dwarf_initialize): Remove.
463         * internal.h (backtrace_dwarf_initialize): Don't declare.
464         (backtrace_dwarf_add): Declare.
465         * configure, config.h.in: Rebuild.
467 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
469         * btest.c (f23): Avoid uninitialized variable warning.
471 2012-10-04  Ian Lance Taylor  <iant@google.com>
473         * dwarf.c: If the system header files do not declare strnlen,
474         provide our own version.
476 2012-10-03  Ian Lance Taylor  <iant@google.com>
478         * dwarf.c (read_uleb128): Fix overflow test.
479         (read_sleb128): Likewise.
480         (build_address_map): Don't change unit_buf.start.
482 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
484         PR other/54761
485         * configure.ac (EXTRA_FLAGS): New.
486         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
487         * configure, Makefile.in: Regenerate.
489 2012-09-29  Ian Lance Taylor  <iant@google.com>
491         PR other/54749
492         * fileline.c (fileline_initialize): Pass errnum as -1 when
493         reporting that we could not read executable information after a
494         previous failure.
496 2012-09-27  Ian Lance Taylor  <iant@google.com>
498         PR bootstrap/54732
499         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
500         * Makefile.am: Add dependencies for all objects.
501         * configure, aclocal.m4, Makefile.in: Rebuild.
503 2012-09-27  Ian Lance Taylor  <iant@google.com>
505         PR other/54726
506         * elf.c (backtrace_initialize): Set *fileln_fn, not
507         state->fileln_fn.
509 2012-09-19  Ian Lance Taylor  <iant@google.com>
511         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
512         as a target library.
513         * configure: Rebuild.
515 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
516             Ian Lance Taylor  <iant@google.com>
518         * configure.ac (GCC_HEADER_STDINT): Invoke.
519         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
520         * btest.c: Don't include <stdint.h>.
521         * dwarf.c: Likewise.
522         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
524 2012-09-18  Ian Lance Taylor  <iant@google.com>
526         PR bootstrap/54623
527         * Makefile.am (AM_CPPFLAGS): Define.
528         (AM_CFLAGS): Remove -I options.
529         * Makefile.in: Rebuild.
531 2012-09-18  Ian Lance Taylor  <iant@google.com>
533         * posix.c (O_BINARY): Define if not defined.
534         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
535         HAVE_FCNTL is defined.
536         * configure.ac: Test for the fcntl function.
537         * configure, config.h.in: Rebuild.
539 2012-09-18  Ian Lance Taylor  <iant@google.com>
541         * btest.c (test1, test2, test3, test4): Add the unused attribute.
543 2012-09-18  Ian Lance Taylor  <iant@google.com>
545         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
547 2012-09-18  Ian Lance Taylor  <iant@google.com>
549         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
550         * mmapio.c: Don't define _GNU_SOURCE.
551         * configure, config.h.in: Rebuild.
553 2012-09-18  Ian Lance Taylor  <iant@google.com>
555         * configure.ac: Check whether strnlen is declared.
556         * dwarf.c: Declare strnlen if not declared.
557         * configure, config.h.in: Rebuild.
559 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
561         * fileline.c: Include <stdlib.h>.
562         * mmap.c: Likewise.
564 2012-09-17  Ian Lance Taylor  <iant@google.com>
566         PR bootstrap/54611
567         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
568         parameter.
570 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
572         PR bootstrap/54611
573         * nounwind.c (backtrace_simple): Add state parameter.
575 2012-09-17  Ian Lance Taylor  <iant@google.com>
577         PR bootstrap/54609
578         * unknown.c (unknown_fileline): Add state parameter, remove
579         fileline_data parameter, name error_callback parameter.
580         (backtrace_initialize): Add state parameter.
582 2012-09-17  Ian Lance Taylor  <iant@google.com>
584         * Initial implementation.
586 Copyright (C) 2012-2016 Free Software Foundation, Inc.
588 Copying and distribution of this file, with or without modification,
589 are permitted in any medium without royalty provided the copyright
590 notice and this notice are preserved.