PR 60324 VLA related fixes to random number generator.
[official-gcc.git] / libbacktrace / ChangeLog
blobec6fbc3494d7463d5122fe0e810129e875fc5290
1 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
3         * ChangeLog.jit: New.
5 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
7         PR target/63610
8         * configure: Regenerate.
10 2014-10-23  Ian Lance Taylor  <iant@google.com>
12         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
13         Fix to return void *.
15 2014-05-08  Ian Lance Taylor  <iant@google.com>
17         * mmap.c (backtrace_free): If freeing a large aligned block of
18         memory, call munmap rather than holding onto it.
19         (backtrace_vector_grow): When growing a vector, double the number
20         of pages requested.  When releasing the old version of a grown
21         vector, pass the correct size to backtrace_free.
23 2014-03-07  Ian Lance Taylor  <iant@google.com>
25         * sort.c (backtrace_qsort): Use middle element as pivot.
27 2014-03-06  Ian Lance Taylor  <iant@google.com>
29         * sort.c: New file.
30         * stest.c: New file.
31         * internal.h (backtrace_qsort): Declare.
32         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
33         (read_line_info, read_function_entry): Likewise.
34         (read_function_info, build_dwarf_data): Likewise.
35         * elf.c (elf_initialize_syminfo): Likewise.
36         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
37         (stest_SOURCES, stest_LDADD): Define.
38         (check_PROGRAMS): Add stest.
40 2014-02-07  Misty De Meo  <misty@brew.sh>
42         PR target/58710
43         * configure.ac: Use AC_LINK_IFELSE in check for
44         _Unwind_GetIPInfo.
45         * configure: Regenerate.
47 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
49         Update copyright years
51 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
53         * elf.c (ET_DYN): Undefine and define again.
54         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
55         return early -1 without closing the descriptor.
56         (struct phdr_data): Add exe_descriptor.
57         (phdr_callback): If pd->exe_descriptor is not -1, for very first
58         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
59         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
60         call to elf_add.
61         (backtrace_initialize): Adjust call to elf_add.  If it returns
62         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
64 2013-12-05  Ian Lance Taylor  <iant@google.com>
66         * alloc.c (backtrace_vector_finish): Add error_callback and data
67         parameters.  Call backtrace_vector_release.  Return address base.
68         * mmap.c (backtrace_vector_finish): Add error_callback and data
69         parameters.  Return address base.
70         * dwarf.c (read_function_info): Get new address base from
71         backtrace_vector_finish.
72         * internal.h (backtrace_vector_finish): Update declaration.
74 2013-11-27  Ian Lance Taylor  <iant@google.com>
76         * dwarf.c (find_address_ranges): New static function, broken out
77         of build_address_map.
78         (build_address_map): Call it.
79         * btest.c (check): Check for missing filename or function, rather
80         than crashing.
81         (f3): Check that enough frames were returned.
83 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
85         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
86         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
87         last argument.
88         * btest.c (struct symdata): Add size field.
89         (callback_three): Add symsize argument.  Copy it to the data->size
90         field.
91         (f23): Set symdata.size to 0.
92         (test5): Likewise.  If sizeof (int) > 1, lookup address of
93         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
94         values.
96         * atomic.c: Include sys/types.h.
98 2013-11-18  Ian Lance Taylor  <iant@google.com>
100         * configure.ac: Check for support of __atomic extensions.
101         * internal.h: Declare or #define atomic functions for use in
102         backtrace code.
103         * atomic.c: New file.
104         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
105         (dwarf_fileline, backtrace_dwarf_add): Likewise.
106         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
107         (backtrace_initialize): Likewise.
108         * fileline.c (fileline_initialize): Likewise.
109         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
110         * configure, config.h.in, Makefile.in: Rebuild.
112 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
114         * elf.c (SHN_UNDEF): Define.
115         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
116         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
117         (elf_add): Adjust caller.
119         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
121 2013-11-16  Ian Lance Taylor  <iant@google.com>
123         * backtrace.h (backtrace_create_state): Correct comment about
124         threading.
126 2013-11-15  Ian Lance Taylor  <iant@google.com>
128         * backtrace.h (backtrace_syminfo): Update comment and parameter
129         name to take any address, not just a PC value.
130         * elf.c (STT_OBJECT): Define.
131         (elf_nosyms): Rename parameter pc to addr.
132         (elf_symbol_search): Rename local variable pc to addr.
133         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
134         (elf_syminfo): Rename parameter pc to addr.
135         * btest.c (global): New global variable.
136         (test5): New test.
137         (main): Call test5.
139 2013-10-17  Ian Lance Taylor  <iant@google.com>
141         * elf.c (elf_add): Don't get the wrong offsets if a debug section
142         is missing.
144 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
146         * configure.ac: Add --enable-host-shared, setting up
147         pre-existing PIC_FLAG variable within Makefile.am et al.
148         * configure: Regenerate.
150 2013-09-20  Alan Modra  <amodra@gmail.com>
152         * configure: Regenerate.
154 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
156         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
158 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
160         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
161         dl_iterate_phdr callbacks.
163 2013-03-25  Ian Lance Taylor  <iant@google.com>
165         * alloc.c: #include <sys/types.h>.
166         * mmap.c: Likewise.
168 2013-01-31  Ian Lance Taylor  <iant@google.com>
170         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
171         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
173 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
175         PR other/56076
176         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
177         attribute was not seen.
179 2013-01-16  Ian Lance Taylor  <iant@google.com>
181         * dwarf.c (struct unit): Add filename and abs_filename fields.
182         (build_address_map): Set new fields when reading unit.
183         (dwarf_lookup_pc): If we don't find an entry in the line table,
184         just return the main file name.
186 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
188         Update copyright years.
190 2013-01-01  Ian Lance Taylor  <iant@google.com>
192         PR bootstrap/54834
193         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
194         $(MULTIBUILDTOP)/../../gcc/include.
195         * Makefile.in: Rebuild.
197 2013-01-01  Ian Lance Taylor  <iant@google.com>
199         PR other/55536
200         * mmap.c (backtrace_alloc): Don't call sync functions if not
201         threaded.
202         (backtrace_free): Likewise.
204 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
206         * mmapio.c: Define MAP_FAILED if not defined.
208 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
210         PR bootstrap/54926
211         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
212         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
213         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
214         accepts it.
215         * Makefile.in: Regenerated.
216         * configure: Regenerated.
218 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
220         PR bootstrap/54926
221         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
222         * Makefile.in: Regenerated.
224 2012-11-20  Ian Lance Taylor  <iant@google.com>
226         * dwarf.c (read_attribute): Always clear val.
228 2012-11-13  Ian Lance Taylor  <iant@google.com>
230         PR other/55312
231         * configure.ac: Only add -Werror if building a target library.
232         * configure: Rebuild.
234 2012-11-12  Ian Lance Taylor  <iant@google.com>
235             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
236             Gerald Pfeifer  <gerald@pfeifer.com>
238         * configure.ac: Check for getexecname.
239         * fileline.c: #include <errno.h>.  Define getexecname if not
240         available.
241         (fileline_initialize): Try to find the executable in a few
242         different ways.
243         * print.c (error_callback): Only print the filename if it came
244         from the backtrace state.
245         * configure, config.h.in: Rebuild.
247 2012-10-29  Ian Lance Taylor  <iant@google.com>
249         * mmap.c (backtrace_vector_release): Correct last patch: add
250         aligned, not size.
252 2012-10-29  Ian Lance Taylor  <iant@google.com>
254         * mmap.c (backtrace_vector_release): Make sure freed block is
255         aligned on 8-byte boundary.
257 2012-10-26  Ian Lance Taylor  <iant@google.com>
259         PR other/55087
260         * posix.c (backtrace_open): Add does_not_exist parameter.
261         * elf.c (phdr_callback): Do not warn if shared library could not
262         be opened.
263         * fileline.c (fileline_initialize): Update calls to
264         backtrace_open.
265         * internal.h (backtrace_open): Update declaration.
267 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
269         PR target/55061
270         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
271         * configure: Regenerate.
273 2012-10-24  Ian Lance Taylor  <iant@google.com>
275         PR target/55061
276         * configure.ac: Check whether -funwind-tables option works.
277         * configure: Rebuild.
279 2012-10-11  Ian Lance Taylor  <iant@google.com>
281         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
282         * configure: Rebuild.
284 2012-10-10  Ian Lance Taylor  <iant@google.com>
286         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
287         lower case.
289 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
291         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
293 2012-10-09  Ian Lance Taylor  <iant@google.com>
295         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
296         (backtrace_dwarf_add): Likewise.
298 2012-10-09  Ian Lance Taylor  <iant@google.com>
300         Add support for tracing through shared libraries.
301         * configure.ac: Check for link.h and dl_iterate_phdr.
302         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
303         ELF macros before #defining them.
304         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
305         dl_iterate_phdr.
306         (struct elf_syminfo_data): Add next field.
307         (elf_initialize_syminfo): Initialize next field.
308         (elf_add_syminfo_data): New static function.
309         (elf_add): New static function, broken out of
310         backtrace_initialize.  Call backtrace_dwarf_add instead of
311         backtrace_dwarf_initialize.
312         (struct phdr_data): Define.
313         (phdr_callback): New static function.
314         (backtrace_initialize): Call elf_add.
315         * dwarf.c (struct dwarf_data): Add next and base_address fields.
316         (add_unit_addr): Add base_address parameter.  Change all callers.
317         (add_unit_ranges, build_address_map): Likewise.
318         (add_line): Add ddata parameter.  Change all callers.
319         (read_line_program, add_function_range): Likewise.
320         (dwarf_lookup_pc): New static function, broken out of
321         dwarf_fileline.
322         (dwarf_fileline): Call dwarf_lookup_pc.
323         (build_dwarf_data): New static function.
324         (backtrace_dwarf_add): New function.
325         (backtrace_dwarf_initialize): Remove.
326         * internal.h (backtrace_dwarf_initialize): Don't declare.
327         (backtrace_dwarf_add): Declare.
328         * configure, config.h.in: Rebuild.
330 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
332         * btest.c (f23): Avoid uninitialized variable warning.
334 2012-10-04  Ian Lance Taylor  <iant@google.com>
336         * dwarf.c: If the system header files do not declare strnlen,
337         provide our own version.
339 2012-10-03  Ian Lance Taylor  <iant@google.com>
341         * dwarf.c (read_uleb128): Fix overflow test.
342         (read_sleb128): Likewise.
343         (build_address_map): Don't change unit_buf.start.
345 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
347         PR other/54761
348         * configure.ac (EXTRA_FLAGS): New.
349         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
350         * configure, Makefile.in: Regenerate.
352 2012-09-29  Ian Lance Taylor  <iant@google.com>
354         PR other/54749
355         * fileline.c (fileline_initialize): Pass errnum as -1 when
356         reporting that we could not read executable information after a
357         previous failure.
359 2012-09-27  Ian Lance Taylor  <iant@google.com>
361         PR bootstrap/54732
362         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
363         * Makefile.am: Add dependencies for all objects.
364         * configure, aclocal.m4, Makefile.in: Rebuild.
366 2012-09-27  Ian Lance Taylor  <iant@google.com>
368         PR other/54726
369         * elf.c (backtrace_initialize): Set *fileln_fn, not
370         state->fileln_fn.
372 2012-09-19  Ian Lance Taylor  <iant@google.com>
374         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
375         as a target library.
376         * configure: Rebuild.
378 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
379             Ian Lance Taylor  <iant@google.com>
381         * configure.ac (GCC_HEADER_STDINT): Invoke.
382         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
383         * btest.c: Don't include <stdint.h>.
384         * dwarf.c: Likewise.
385         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
387 2012-09-18  Ian Lance Taylor  <iant@google.com>
389         PR bootstrap/54623
390         * Makefile.am (AM_CPPFLAGS): Define.
391         (AM_CFLAGS): Remove -I options.
392         * Makefile.in: Rebuild.
394 2012-09-18  Ian Lance Taylor  <iant@google.com>
396         * posix.c (O_BINARY): Define if not defined.
397         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
398         HAVE_FCNTL is defined.
399         * configure.ac: Test for the fcntl function.
400         * configure, config.h.in: Rebuild.
402 2012-09-18  Ian Lance Taylor  <iant@google.com>
404         * btest.c (test1, test2, test3, test4): Add the unused attribute.
406 2012-09-18  Ian Lance Taylor  <iant@google.com>
408         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
410 2012-09-18  Ian Lance Taylor  <iant@google.com>
412         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
413         * mmapio.c: Don't define _GNU_SOURCE.
414         * configure, config.h.in: Rebuild.
416 2012-09-18  Ian Lance Taylor  <iant@google.com>
418         * configure.ac: Check whether strnlen is declared.
419         * dwarf.c: Declare strnlen if not declared.
420         * configure, config.h.in: Rebuild.
422 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
424         * fileline.c: Include <stdlib.h>.
425         * mmap.c: Likewise.
427 2012-09-17  Ian Lance Taylor  <iant@google.com>
429         PR bootstrap/54611
430         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
431         parameter.
433 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
435         PR bootstrap/54611
436         * nounwind.c (backtrace_simple): Add state parameter.
438 2012-09-17  Ian Lance Taylor  <iant@google.com>
440         PR bootstrap/54609
441         * unknown.c (unknown_fileline): Add state parameter, remove
442         fileline_data parameter, name error_callback parameter.
443         (backtrace_initialize): Add state parameter.
445 2012-09-17  Ian Lance Taylor  <iant@google.com>
447         * Initial implementation.