[PR67828] don't unswitch on default defs of non-parms
[official-gcc.git] / libbacktrace / ChangeLog
blob3d8d71cfda8b56658ba62ce4c2a6682c59e2e881
1 2015-09-17  Ian Lance Taylor  <iant@google.com>
3         * posix.c (backtrace_open): Cast second argument of open() to int.
5 2015-09-11  Ian Lance Taylor  <iant@google.com>
7         * Makefile.am (backtrace.lo): Depend on internal.h.
8         (sort.lo, stest.lo): Add explicit dependencies.
9         * Makefile.in: Rebuild.
11 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
13         * backtrace.c: #include <sys/types.h>.
15 2015-09-08  Ian Lance Taylor  <iant@google.com>
17         PR other/67457
18         * backtrace.c: #include "internal.h".
19         (struct backtrace_data): Add can_alloc field.
20         (unwind): If can_alloc is false, don't try to get file/line
21         information.
22         (backtrace_full): Set can_alloc field in bdata.
23         * alloc.c (backtrace_alloc): Don't call error_callback if it is
24         NULL.
25         * mmap.c (backtrace_alloc): Likewise.
26         * internal.h: Update comments for backtrace_alloc and
27         backtrace_free.
29 2015-09-08  Ian Lance Taylor  <iant@google.com>
31         PR other/67457
32         * mmap.c (backtrace_alloc): Correct test for mmap failure.
34 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
36         * configure.ac: For spu-*-* targets, set have_fcntl to no.
37         * configure: Regenerate.
39 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
41         * configure.ac: Remove [disable-shared] argument to LT_INIT.
42         Remove setting PIC_FLAG when building as target library.
43         * configure: Regenerate.
45 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
47         * configure.ac: Only compile with -fPIC if the target
48         supports it.
49         * configure: Regenerate.
51 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
53         * configure.ac: Set have_mmap to no on spu-*-* targets.
54         * configure: Regenerate.
56 2015-08-13  Ian Lance Taylor  <iant@google.com>
58         * dwarf.c (read_function_entry): Add vec_inlined parameter.
59         Change all callers.
61 2015-06-11  Martin Sebor  <msebor@redhat.com>
63         PR sanitizer/65479
64         * dwarf.c (struct line): Add new field idx.
65         (line_compare): Use it.
66         (add_line): Set it.
67         (read_line_info): Reset it.
69 2015-05-29  Tristan Gingold  <gingold@adacore.com>
71         * pecoff.c: New file.
72         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
73         * Makefile.in: Regenerate.
74         * filetype.awk: Detect pecoff.
75         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
76         Add pecoff.
77         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
78         true.
79         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
80         * configure: Regenerate.
81         * pecoff.c: New file.
83 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
85         * Makefile.in: Regenerated with automake-1.11.6.
86         * aclocal.m4: Likewise.
87         * configure: Likewise.
89 2015-01-24  Matthias Klose  <doko@ubuntu.com>
91         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
92         * configure: Regenerate.
94 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
96         Update copyright years.
98 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
100         PR bootstrap/63784
101         * configure: Regenerated.
103 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
105         * ChangeLog.jit: New.
107 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
109         PR target/63610
110         * configure: Regenerate.
112 2014-10-23  Ian Lance Taylor  <iant@google.com>
114         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
115         Fix to return void *.
117 2014-05-08  Ian Lance Taylor  <iant@google.com>
119         * mmap.c (backtrace_free): If freeing a large aligned block of
120         memory, call munmap rather than holding onto it.
121         (backtrace_vector_grow): When growing a vector, double the number
122         of pages requested.  When releasing the old version of a grown
123         vector, pass the correct size to backtrace_free.
125 2014-03-07  Ian Lance Taylor  <iant@google.com>
127         * sort.c (backtrace_qsort): Use middle element as pivot.
129 2014-03-06  Ian Lance Taylor  <iant@google.com>
131         * sort.c: New file.
132         * stest.c: New file.
133         * internal.h (backtrace_qsort): Declare.
134         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
135         (read_line_info, read_function_entry): Likewise.
136         (read_function_info, build_dwarf_data): Likewise.
137         * elf.c (elf_initialize_syminfo): Likewise.
138         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
139         (stest_SOURCES, stest_LDADD): Define.
140         (check_PROGRAMS): Add stest.
142 2014-02-07  Misty De Meo  <misty@brew.sh>
144         PR target/58710
145         * configure.ac: Use AC_LINK_IFELSE in check for
146         _Unwind_GetIPInfo.
147         * configure: Regenerate.
149 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
151         Update copyright years
153 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
155         * elf.c (ET_DYN): Undefine and define again.
156         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
157         return early -1 without closing the descriptor.
158         (struct phdr_data): Add exe_descriptor.
159         (phdr_callback): If pd->exe_descriptor is not -1, for very first
160         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
161         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
162         call to elf_add.
163         (backtrace_initialize): Adjust call to elf_add.  If it returns
164         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
166 2013-12-05  Ian Lance Taylor  <iant@google.com>
168         * alloc.c (backtrace_vector_finish): Add error_callback and data
169         parameters.  Call backtrace_vector_release.  Return address base.
170         * mmap.c (backtrace_vector_finish): Add error_callback and data
171         parameters.  Return address base.
172         * dwarf.c (read_function_info): Get new address base from
173         backtrace_vector_finish.
174         * internal.h (backtrace_vector_finish): Update declaration.
176 2013-11-27  Ian Lance Taylor  <iant@google.com>
178         * dwarf.c (find_address_ranges): New static function, broken out
179         of build_address_map.
180         (build_address_map): Call it.
181         * btest.c (check): Check for missing filename or function, rather
182         than crashing.
183         (f3): Check that enough frames were returned.
185 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
187         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
188         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
189         last argument.
190         * btest.c (struct symdata): Add size field.
191         (callback_three): Add symsize argument.  Copy it to the data->size
192         field.
193         (f23): Set symdata.size to 0.
194         (test5): Likewise.  If sizeof (int) > 1, lookup address of
195         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
196         values.
198         * atomic.c: Include sys/types.h.
200 2013-11-18  Ian Lance Taylor  <iant@google.com>
202         * configure.ac: Check for support of __atomic extensions.
203         * internal.h: Declare or #define atomic functions for use in
204         backtrace code.
205         * atomic.c: New file.
206         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
207         (dwarf_fileline, backtrace_dwarf_add): Likewise.
208         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
209         (backtrace_initialize): Likewise.
210         * fileline.c (fileline_initialize): Likewise.
211         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
212         * configure, config.h.in, Makefile.in: Rebuild.
214 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
216         * elf.c (SHN_UNDEF): Define.
217         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
218         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
219         (elf_add): Adjust caller.
221         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
223 2013-11-16  Ian Lance Taylor  <iant@google.com>
225         * backtrace.h (backtrace_create_state): Correct comment about
226         threading.
228 2013-11-15  Ian Lance Taylor  <iant@google.com>
230         * backtrace.h (backtrace_syminfo): Update comment and parameter
231         name to take any address, not just a PC value.
232         * elf.c (STT_OBJECT): Define.
233         (elf_nosyms): Rename parameter pc to addr.
234         (elf_symbol_search): Rename local variable pc to addr.
235         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
236         (elf_syminfo): Rename parameter pc to addr.
237         * btest.c (global): New global variable.
238         (test5): New test.
239         (main): Call test5.
241 2013-10-17  Ian Lance Taylor  <iant@google.com>
243         * elf.c (elf_add): Don't get the wrong offsets if a debug section
244         is missing.
246 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
248         * configure.ac: Add --enable-host-shared, setting up
249         pre-existing PIC_FLAG variable within Makefile.am et al.
250         * configure: Regenerate.
252 2013-09-20  Alan Modra  <amodra@gmail.com>
254         * configure: Regenerate.
256 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
258         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
260 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
262         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
263         dl_iterate_phdr callbacks.
265 2013-03-25  Ian Lance Taylor  <iant@google.com>
267         * alloc.c: #include <sys/types.h>.
268         * mmap.c: Likewise.
270 2013-01-31  Ian Lance Taylor  <iant@google.com>
272         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
273         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
275 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
277         PR other/56076
278         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
279         attribute was not seen.
281 2013-01-16  Ian Lance Taylor  <iant@google.com>
283         * dwarf.c (struct unit): Add filename and abs_filename fields.
284         (build_address_map): Set new fields when reading unit.
285         (dwarf_lookup_pc): If we don't find an entry in the line table,
286         just return the main file name.
288 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
290         Update copyright years.
292 2013-01-01  Ian Lance Taylor  <iant@google.com>
294         PR bootstrap/54834
295         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
296         $(MULTIBUILDTOP)/../../gcc/include.
297         * Makefile.in: Rebuild.
299 2013-01-01  Ian Lance Taylor  <iant@google.com>
301         PR other/55536
302         * mmap.c (backtrace_alloc): Don't call sync functions if not
303         threaded.
304         (backtrace_free): Likewise.
306 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
308         * mmapio.c: Define MAP_FAILED if not defined.
310 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
312         PR bootstrap/54926
313         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
314         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
315         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
316         accepts it.
317         * Makefile.in: Regenerated.
318         * configure: Regenerated.
320 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
322         PR bootstrap/54926
323         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
324         * Makefile.in: Regenerated.
326 2012-11-20  Ian Lance Taylor  <iant@google.com>
328         * dwarf.c (read_attribute): Always clear val.
330 2012-11-13  Ian Lance Taylor  <iant@google.com>
332         PR other/55312
333         * configure.ac: Only add -Werror if building a target library.
334         * configure: Rebuild.
336 2012-11-12  Ian Lance Taylor  <iant@google.com>
337             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
338             Gerald Pfeifer  <gerald@pfeifer.com>
340         * configure.ac: Check for getexecname.
341         * fileline.c: #include <errno.h>.  Define getexecname if not
342         available.
343         (fileline_initialize): Try to find the executable in a few
344         different ways.
345         * print.c (error_callback): Only print the filename if it came
346         from the backtrace state.
347         * configure, config.h.in: Rebuild.
349 2012-10-29  Ian Lance Taylor  <iant@google.com>
351         * mmap.c (backtrace_vector_release): Correct last patch: add
352         aligned, not size.
354 2012-10-29  Ian Lance Taylor  <iant@google.com>
356         * mmap.c (backtrace_vector_release): Make sure freed block is
357         aligned on 8-byte boundary.
359 2012-10-26  Ian Lance Taylor  <iant@google.com>
361         PR other/55087
362         * posix.c (backtrace_open): Add does_not_exist parameter.
363         * elf.c (phdr_callback): Do not warn if shared library could not
364         be opened.
365         * fileline.c (fileline_initialize): Update calls to
366         backtrace_open.
367         * internal.h (backtrace_open): Update declaration.
369 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
371         PR target/55061
372         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
373         * configure: Regenerate.
375 2012-10-24  Ian Lance Taylor  <iant@google.com>
377         PR target/55061
378         * configure.ac: Check whether -funwind-tables option works.
379         * configure: Rebuild.
381 2012-10-11  Ian Lance Taylor  <iant@google.com>
383         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
384         * configure: Rebuild.
386 2012-10-10  Ian Lance Taylor  <iant@google.com>
388         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
389         lower case.
391 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
393         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
395 2012-10-09  Ian Lance Taylor  <iant@google.com>
397         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
398         (backtrace_dwarf_add): Likewise.
400 2012-10-09  Ian Lance Taylor  <iant@google.com>
402         Add support for tracing through shared libraries.
403         * configure.ac: Check for link.h and dl_iterate_phdr.
404         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
405         ELF macros before #defining them.
406         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
407         dl_iterate_phdr.
408         (struct elf_syminfo_data): Add next field.
409         (elf_initialize_syminfo): Initialize next field.
410         (elf_add_syminfo_data): New static function.
411         (elf_add): New static function, broken out of
412         backtrace_initialize.  Call backtrace_dwarf_add instead of
413         backtrace_dwarf_initialize.
414         (struct phdr_data): Define.
415         (phdr_callback): New static function.
416         (backtrace_initialize): Call elf_add.
417         * dwarf.c (struct dwarf_data): Add next and base_address fields.
418         (add_unit_addr): Add base_address parameter.  Change all callers.
419         (add_unit_ranges, build_address_map): Likewise.
420         (add_line): Add ddata parameter.  Change all callers.
421         (read_line_program, add_function_range): Likewise.
422         (dwarf_lookup_pc): New static function, broken out of
423         dwarf_fileline.
424         (dwarf_fileline): Call dwarf_lookup_pc.
425         (build_dwarf_data): New static function.
426         (backtrace_dwarf_add): New function.
427         (backtrace_dwarf_initialize): Remove.
428         * internal.h (backtrace_dwarf_initialize): Don't declare.
429         (backtrace_dwarf_add): Declare.
430         * configure, config.h.in: Rebuild.
432 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
434         * btest.c (f23): Avoid uninitialized variable warning.
436 2012-10-04  Ian Lance Taylor  <iant@google.com>
438         * dwarf.c: If the system header files do not declare strnlen,
439         provide our own version.
441 2012-10-03  Ian Lance Taylor  <iant@google.com>
443         * dwarf.c (read_uleb128): Fix overflow test.
444         (read_sleb128): Likewise.
445         (build_address_map): Don't change unit_buf.start.
447 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
449         PR other/54761
450         * configure.ac (EXTRA_FLAGS): New.
451         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
452         * configure, Makefile.in: Regenerate.
454 2012-09-29  Ian Lance Taylor  <iant@google.com>
456         PR other/54749
457         * fileline.c (fileline_initialize): Pass errnum as -1 when
458         reporting that we could not read executable information after a
459         previous failure.
461 2012-09-27  Ian Lance Taylor  <iant@google.com>
463         PR bootstrap/54732
464         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
465         * Makefile.am: Add dependencies for all objects.
466         * configure, aclocal.m4, Makefile.in: Rebuild.
468 2012-09-27  Ian Lance Taylor  <iant@google.com>
470         PR other/54726
471         * elf.c (backtrace_initialize): Set *fileln_fn, not
472         state->fileln_fn.
474 2012-09-19  Ian Lance Taylor  <iant@google.com>
476         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
477         as a target library.
478         * configure: Rebuild.
480 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
481             Ian Lance Taylor  <iant@google.com>
483         * configure.ac (GCC_HEADER_STDINT): Invoke.
484         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
485         * btest.c: Don't include <stdint.h>.
486         * dwarf.c: Likewise.
487         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
489 2012-09-18  Ian Lance Taylor  <iant@google.com>
491         PR bootstrap/54623
492         * Makefile.am (AM_CPPFLAGS): Define.
493         (AM_CFLAGS): Remove -I options.
494         * Makefile.in: Rebuild.
496 2012-09-18  Ian Lance Taylor  <iant@google.com>
498         * posix.c (O_BINARY): Define if not defined.
499         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
500         HAVE_FCNTL is defined.
501         * configure.ac: Test for the fcntl function.
502         * configure, config.h.in: Rebuild.
504 2012-09-18  Ian Lance Taylor  <iant@google.com>
506         * btest.c (test1, test2, test3, test4): Add the unused attribute.
508 2012-09-18  Ian Lance Taylor  <iant@google.com>
510         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
512 2012-09-18  Ian Lance Taylor  <iant@google.com>
514         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
515         * mmapio.c: Don't define _GNU_SOURCE.
516         * configure, config.h.in: Rebuild.
518 2012-09-18  Ian Lance Taylor  <iant@google.com>
520         * configure.ac: Check whether strnlen is declared.
521         * dwarf.c: Declare strnlen if not declared.
522         * configure, config.h.in: Rebuild.
524 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
526         * fileline.c: Include <stdlib.h>.
527         * mmap.c: Likewise.
529 2012-09-17  Ian Lance Taylor  <iant@google.com>
531         PR bootstrap/54611
532         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
533         parameter.
535 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
537         PR bootstrap/54611
538         * nounwind.c (backtrace_simple): Add state parameter.
540 2012-09-17  Ian Lance Taylor  <iant@google.com>
542         PR bootstrap/54609
543         * unknown.c (unknown_fileline): Add state parameter, remove
544         fileline_data parameter, name error_callback parameter.
545         (backtrace_initialize): Add state parameter.
547 2012-09-17  Ian Lance Taylor  <iant@google.com>
549         * Initial implementation.