libcpp:
[official-gcc.git] / libbacktrace / ChangeLog
blobd043761bbe7732c4adf303e29190f174bbb159ed
1 2015-06-11  Martin Sebor  <msebor@redhat.com>
3         PR sanitizer/65479
4         * dwarf.c (struct line): Add new field idx.
5         (line_compare): Use it.
6         (add_line): Set it.
7         (read_line_info): Reset it.
9 2015-05-29  Tristan Gingold  <gingold@adacore.com>
11         * pecoff.c: New file.
12         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
13         * Makefile.in: Regenerate.
14         * filetype.awk: Detect pecoff.
15         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
16         Add pecoff.
17         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
18         true.
19         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
20         * configure: Regenerate.
21         * pecoff.c: New file.
23 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
25         * Makefile.in: Regenerated with automake-1.11.6.
26         * aclocal.m4: Likewise.
27         * configure: Likewise.
29 2015-01-24  Matthias Klose  <doko@ubuntu.com>
31         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
32         * configure: Regenerate.
34 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
36         Update copyright years.
38 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
40         PR bootstrap/63784
41         * configure: Regenerated.
43 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
45         * ChangeLog.jit: New.
47 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
49         PR target/63610
50         * configure: Regenerate.
52 2014-10-23  Ian Lance Taylor  <iant@google.com>
54         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
55         Fix to return void *.
57 2014-05-08  Ian Lance Taylor  <iant@google.com>
59         * mmap.c (backtrace_free): If freeing a large aligned block of
60         memory, call munmap rather than holding onto it.
61         (backtrace_vector_grow): When growing a vector, double the number
62         of pages requested.  When releasing the old version of a grown
63         vector, pass the correct size to backtrace_free.
65 2014-03-07  Ian Lance Taylor  <iant@google.com>
67         * sort.c (backtrace_qsort): Use middle element as pivot.
69 2014-03-06  Ian Lance Taylor  <iant@google.com>
71         * sort.c: New file.
72         * stest.c: New file.
73         * internal.h (backtrace_qsort): Declare.
74         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
75         (read_line_info, read_function_entry): Likewise.
76         (read_function_info, build_dwarf_data): Likewise.
77         * elf.c (elf_initialize_syminfo): Likewise.
78         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
79         (stest_SOURCES, stest_LDADD): Define.
80         (check_PROGRAMS): Add stest.
82 2014-02-07  Misty De Meo  <misty@brew.sh>
84         PR target/58710
85         * configure.ac: Use AC_LINK_IFELSE in check for
86         _Unwind_GetIPInfo.
87         * configure: Regenerate.
89 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
91         Update copyright years
93 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
95         * elf.c (ET_DYN): Undefine and define again.
96         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
97         return early -1 without closing the descriptor.
98         (struct phdr_data): Add exe_descriptor.
99         (phdr_callback): If pd->exe_descriptor is not -1, for very first
100         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
101         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
102         call to elf_add.
103         (backtrace_initialize): Adjust call to elf_add.  If it returns
104         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
106 2013-12-05  Ian Lance Taylor  <iant@google.com>
108         * alloc.c (backtrace_vector_finish): Add error_callback and data
109         parameters.  Call backtrace_vector_release.  Return address base.
110         * mmap.c (backtrace_vector_finish): Add error_callback and data
111         parameters.  Return address base.
112         * dwarf.c (read_function_info): Get new address base from
113         backtrace_vector_finish.
114         * internal.h (backtrace_vector_finish): Update declaration.
116 2013-11-27  Ian Lance Taylor  <iant@google.com>
118         * dwarf.c (find_address_ranges): New static function, broken out
119         of build_address_map.
120         (build_address_map): Call it.
121         * btest.c (check): Check for missing filename or function, rather
122         than crashing.
123         (f3): Check that enough frames were returned.
125 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
127         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
128         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
129         last argument.
130         * btest.c (struct symdata): Add size field.
131         (callback_three): Add symsize argument.  Copy it to the data->size
132         field.
133         (f23): Set symdata.size to 0.
134         (test5): Likewise.  If sizeof (int) > 1, lookup address of
135         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
136         values.
138         * atomic.c: Include sys/types.h.
140 2013-11-18  Ian Lance Taylor  <iant@google.com>
142         * configure.ac: Check for support of __atomic extensions.
143         * internal.h: Declare or #define atomic functions for use in
144         backtrace code.
145         * atomic.c: New file.
146         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
147         (dwarf_fileline, backtrace_dwarf_add): Likewise.
148         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
149         (backtrace_initialize): Likewise.
150         * fileline.c (fileline_initialize): Likewise.
151         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
152         * configure, config.h.in, Makefile.in: Rebuild.
154 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
156         * elf.c (SHN_UNDEF): Define.
157         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
158         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
159         (elf_add): Adjust caller.
161         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
163 2013-11-16  Ian Lance Taylor  <iant@google.com>
165         * backtrace.h (backtrace_create_state): Correct comment about
166         threading.
168 2013-11-15  Ian Lance Taylor  <iant@google.com>
170         * backtrace.h (backtrace_syminfo): Update comment and parameter
171         name to take any address, not just a PC value.
172         * elf.c (STT_OBJECT): Define.
173         (elf_nosyms): Rename parameter pc to addr.
174         (elf_symbol_search): Rename local variable pc to addr.
175         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
176         (elf_syminfo): Rename parameter pc to addr.
177         * btest.c (global): New global variable.
178         (test5): New test.
179         (main): Call test5.
181 2013-10-17  Ian Lance Taylor  <iant@google.com>
183         * elf.c (elf_add): Don't get the wrong offsets if a debug section
184         is missing.
186 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
188         * configure.ac: Add --enable-host-shared, setting up
189         pre-existing PIC_FLAG variable within Makefile.am et al.
190         * configure: Regenerate.
192 2013-09-20  Alan Modra  <amodra@gmail.com>
194         * configure: Regenerate.
196 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
198         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
200 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
202         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
203         dl_iterate_phdr callbacks.
205 2013-03-25  Ian Lance Taylor  <iant@google.com>
207         * alloc.c: #include <sys/types.h>.
208         * mmap.c: Likewise.
210 2013-01-31  Ian Lance Taylor  <iant@google.com>
212         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
213         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
215 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
217         PR other/56076
218         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
219         attribute was not seen.
221 2013-01-16  Ian Lance Taylor  <iant@google.com>
223         * dwarf.c (struct unit): Add filename and abs_filename fields.
224         (build_address_map): Set new fields when reading unit.
225         (dwarf_lookup_pc): If we don't find an entry in the line table,
226         just return the main file name.
228 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
230         Update copyright years.
232 2013-01-01  Ian Lance Taylor  <iant@google.com>
234         PR bootstrap/54834
235         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
236         $(MULTIBUILDTOP)/../../gcc/include.
237         * Makefile.in: Rebuild.
239 2013-01-01  Ian Lance Taylor  <iant@google.com>
241         PR other/55536
242         * mmap.c (backtrace_alloc): Don't call sync functions if not
243         threaded.
244         (backtrace_free): Likewise.
246 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
248         * mmapio.c: Define MAP_FAILED if not defined.
250 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
252         PR bootstrap/54926
253         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
254         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
255         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
256         accepts it.
257         * Makefile.in: Regenerated.
258         * configure: Regenerated.
260 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
262         PR bootstrap/54926
263         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
264         * Makefile.in: Regenerated.
266 2012-11-20  Ian Lance Taylor  <iant@google.com>
268         * dwarf.c (read_attribute): Always clear val.
270 2012-11-13  Ian Lance Taylor  <iant@google.com>
272         PR other/55312
273         * configure.ac: Only add -Werror if building a target library.
274         * configure: Rebuild.
276 2012-11-12  Ian Lance Taylor  <iant@google.com>
277             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
278             Gerald Pfeifer  <gerald@pfeifer.com>
280         * configure.ac: Check for getexecname.
281         * fileline.c: #include <errno.h>.  Define getexecname if not
282         available.
283         (fileline_initialize): Try to find the executable in a few
284         different ways.
285         * print.c (error_callback): Only print the filename if it came
286         from the backtrace state.
287         * configure, config.h.in: Rebuild.
289 2012-10-29  Ian Lance Taylor  <iant@google.com>
291         * mmap.c (backtrace_vector_release): Correct last patch: add
292         aligned, not size.
294 2012-10-29  Ian Lance Taylor  <iant@google.com>
296         * mmap.c (backtrace_vector_release): Make sure freed block is
297         aligned on 8-byte boundary.
299 2012-10-26  Ian Lance Taylor  <iant@google.com>
301         PR other/55087
302         * posix.c (backtrace_open): Add does_not_exist parameter.
303         * elf.c (phdr_callback): Do not warn if shared library could not
304         be opened.
305         * fileline.c (fileline_initialize): Update calls to
306         backtrace_open.
307         * internal.h (backtrace_open): Update declaration.
309 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
311         PR target/55061
312         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
313         * configure: Regenerate.
315 2012-10-24  Ian Lance Taylor  <iant@google.com>
317         PR target/55061
318         * configure.ac: Check whether -funwind-tables option works.
319         * configure: Rebuild.
321 2012-10-11  Ian Lance Taylor  <iant@google.com>
323         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
324         * configure: Rebuild.
326 2012-10-10  Ian Lance Taylor  <iant@google.com>
328         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
329         lower case.
331 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
333         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
335 2012-10-09  Ian Lance Taylor  <iant@google.com>
337         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
338         (backtrace_dwarf_add): Likewise.
340 2012-10-09  Ian Lance Taylor  <iant@google.com>
342         Add support for tracing through shared libraries.
343         * configure.ac: Check for link.h and dl_iterate_phdr.
344         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
345         ELF macros before #defining them.
346         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
347         dl_iterate_phdr.
348         (struct elf_syminfo_data): Add next field.
349         (elf_initialize_syminfo): Initialize next field.
350         (elf_add_syminfo_data): New static function.
351         (elf_add): New static function, broken out of
352         backtrace_initialize.  Call backtrace_dwarf_add instead of
353         backtrace_dwarf_initialize.
354         (struct phdr_data): Define.
355         (phdr_callback): New static function.
356         (backtrace_initialize): Call elf_add.
357         * dwarf.c (struct dwarf_data): Add next and base_address fields.
358         (add_unit_addr): Add base_address parameter.  Change all callers.
359         (add_unit_ranges, build_address_map): Likewise.
360         (add_line): Add ddata parameter.  Change all callers.
361         (read_line_program, add_function_range): Likewise.
362         (dwarf_lookup_pc): New static function, broken out of
363         dwarf_fileline.
364         (dwarf_fileline): Call dwarf_lookup_pc.
365         (build_dwarf_data): New static function.
366         (backtrace_dwarf_add): New function.
367         (backtrace_dwarf_initialize): Remove.
368         * internal.h (backtrace_dwarf_initialize): Don't declare.
369         (backtrace_dwarf_add): Declare.
370         * configure, config.h.in: Rebuild.
372 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
374         * btest.c (f23): Avoid uninitialized variable warning.
376 2012-10-04  Ian Lance Taylor  <iant@google.com>
378         * dwarf.c: If the system header files do not declare strnlen,
379         provide our own version.
381 2012-10-03  Ian Lance Taylor  <iant@google.com>
383         * dwarf.c (read_uleb128): Fix overflow test.
384         (read_sleb128): Likewise.
385         (build_address_map): Don't change unit_buf.start.
387 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
389         PR other/54761
390         * configure.ac (EXTRA_FLAGS): New.
391         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
392         * configure, Makefile.in: Regenerate.
394 2012-09-29  Ian Lance Taylor  <iant@google.com>
396         PR other/54749
397         * fileline.c (fileline_initialize): Pass errnum as -1 when
398         reporting that we could not read executable information after a
399         previous failure.
401 2012-09-27  Ian Lance Taylor  <iant@google.com>
403         PR bootstrap/54732
404         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
405         * Makefile.am: Add dependencies for all objects.
406         * configure, aclocal.m4, Makefile.in: Rebuild.
408 2012-09-27  Ian Lance Taylor  <iant@google.com>
410         PR other/54726
411         * elf.c (backtrace_initialize): Set *fileln_fn, not
412         state->fileln_fn.
414 2012-09-19  Ian Lance Taylor  <iant@google.com>
416         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
417         as a target library.
418         * configure: Rebuild.
420 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
421             Ian Lance Taylor  <iant@google.com>
423         * configure.ac (GCC_HEADER_STDINT): Invoke.
424         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
425         * btest.c: Don't include <stdint.h>.
426         * dwarf.c: Likewise.
427         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
429 2012-09-18  Ian Lance Taylor  <iant@google.com>
431         PR bootstrap/54623
432         * Makefile.am (AM_CPPFLAGS): Define.
433         (AM_CFLAGS): Remove -I options.
434         * Makefile.in: Rebuild.
436 2012-09-18  Ian Lance Taylor  <iant@google.com>
438         * posix.c (O_BINARY): Define if not defined.
439         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
440         HAVE_FCNTL is defined.
441         * configure.ac: Test for the fcntl function.
442         * configure, config.h.in: Rebuild.
444 2012-09-18  Ian Lance Taylor  <iant@google.com>
446         * btest.c (test1, test2, test3, test4): Add the unused attribute.
448 2012-09-18  Ian Lance Taylor  <iant@google.com>
450         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
452 2012-09-18  Ian Lance Taylor  <iant@google.com>
454         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
455         * mmapio.c: Don't define _GNU_SOURCE.
456         * configure, config.h.in: Rebuild.
458 2012-09-18  Ian Lance Taylor  <iant@google.com>
460         * configure.ac: Check whether strnlen is declared.
461         * dwarf.c: Declare strnlen if not declared.
462         * configure, config.h.in: Rebuild.
464 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
466         * fileline.c: Include <stdlib.h>.
467         * mmap.c: Likewise.
469 2012-09-17  Ian Lance Taylor  <iant@google.com>
471         PR bootstrap/54611
472         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
473         parameter.
475 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
477         PR bootstrap/54611
478         * nounwind.c (backtrace_simple): Add state parameter.
480 2012-09-17  Ian Lance Taylor  <iant@google.com>
482         PR bootstrap/54609
483         * unknown.c (unknown_fileline): Add state parameter, remove
484         fileline_data parameter, name error_callback parameter.
485         (backtrace_initialize): Add state parameter.
487 2012-09-17  Ian Lance Taylor  <iant@google.com>
489         * Initial implementation.