1 2015-05-29 Tristan Gingold <gingold@adacore.com>
4 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
5 * Makefile.in: Regenerate.
6 * filetype.awk: Detect pecoff.
7 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
9 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
11 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
12 * configure: Regenerate.
15 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
17 * Makefile.in: Regenerated with automake-1.11.6.
18 * aclocal.m4: Likewise.
19 * configure: Likewise.
21 2015-01-24 Matthias Klose <doko@ubuntu.com>
23 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
24 * configure: Regenerate.
26 2015-01-05 Jakub Jelinek <jakub@redhat.com>
28 Update copyright years.
30 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
33 * configure: Regenerated.
35 2014-11-11 David Malcolm <dmalcolm@redhat.com>
39 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
42 * configure: Regenerate.
44 2014-10-23 Ian Lance Taylor <iant@google.com>
46 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
49 2014-05-08 Ian Lance Taylor <iant@google.com>
51 * mmap.c (backtrace_free): If freeing a large aligned block of
52 memory, call munmap rather than holding onto it.
53 (backtrace_vector_grow): When growing a vector, double the number
54 of pages requested. When releasing the old version of a grown
55 vector, pass the correct size to backtrace_free.
57 2014-03-07 Ian Lance Taylor <iant@google.com>
59 * sort.c (backtrace_qsort): Use middle element as pivot.
61 2014-03-06 Ian Lance Taylor <iant@google.com>
65 * internal.h (backtrace_qsort): Declare.
66 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
67 (read_line_info, read_function_entry): Likewise.
68 (read_function_info, build_dwarf_data): Likewise.
69 * elf.c (elf_initialize_syminfo): Likewise.
70 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
71 (stest_SOURCES, stest_LDADD): Define.
72 (check_PROGRAMS): Add stest.
74 2014-02-07 Misty De Meo <misty@brew.sh>
77 * configure.ac: Use AC_LINK_IFELSE in check for
79 * configure: Regenerate.
81 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
83 Update copyright years
85 2013-12-06 Jakub Jelinek <jakub@redhat.com>
87 * elf.c (ET_DYN): Undefine and define again.
88 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
89 return early -1 without closing the descriptor.
90 (struct phdr_data): Add exe_descriptor.
91 (phdr_callback): If pd->exe_descriptor is not -1, for very first
92 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
93 otherwise backtrace_close the exe_descriptor if not -1. Adjust
95 (backtrace_initialize): Adjust call to elf_add. If it returns
96 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
98 2013-12-05 Ian Lance Taylor <iant@google.com>
100 * alloc.c (backtrace_vector_finish): Add error_callback and data
101 parameters. Call backtrace_vector_release. Return address base.
102 * mmap.c (backtrace_vector_finish): Add error_callback and data
103 parameters. Return address base.
104 * dwarf.c (read_function_info): Get new address base from
105 backtrace_vector_finish.
106 * internal.h (backtrace_vector_finish): Update declaration.
108 2013-11-27 Ian Lance Taylor <iant@google.com>
110 * dwarf.c (find_address_ranges): New static function, broken out
111 of build_address_map.
112 (build_address_map): Call it.
113 * btest.c (check): Check for missing filename or function, rather
115 (f3): Check that enough frames were returned.
117 2013-11-19 Jakub Jelinek <jakub@redhat.com>
119 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
120 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
122 * btest.c (struct symdata): Add size field.
123 (callback_three): Add symsize argument. Copy it to the data->size
125 (f23): Set symdata.size to 0.
126 (test5): Likewise. If sizeof (int) > 1, lookup address of
127 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
130 * atomic.c: Include sys/types.h.
132 2013-11-18 Ian Lance Taylor <iant@google.com>
134 * configure.ac: Check for support of __atomic extensions.
135 * internal.h: Declare or #define atomic functions for use in
137 * atomic.c: New file.
138 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
139 (dwarf_fileline, backtrace_dwarf_add): Likewise.
140 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
141 (backtrace_initialize): Likewise.
142 * fileline.c (fileline_initialize): Likewise.
143 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
144 * configure, config.h.in, Makefile.in: Rebuild.
146 2013-11-18 Jakub Jelinek <jakub@redhat.com>
148 * elf.c (SHN_UNDEF): Define.
149 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
150 with st_shndx == SHN_UNDEF. Add base_address to address fields.
151 (elf_add): Adjust caller.
153 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
155 2013-11-16 Ian Lance Taylor <iant@google.com>
157 * backtrace.h (backtrace_create_state): Correct comment about
160 2013-11-15 Ian Lance Taylor <iant@google.com>
162 * backtrace.h (backtrace_syminfo): Update comment and parameter
163 name to take any address, not just a PC value.
164 * elf.c (STT_OBJECT): Define.
165 (elf_nosyms): Rename parameter pc to addr.
166 (elf_symbol_search): Rename local variable pc to addr.
167 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
168 (elf_syminfo): Rename parameter pc to addr.
169 * btest.c (global): New global variable.
173 2013-10-17 Ian Lance Taylor <iant@google.com>
175 * elf.c (elf_add): Don't get the wrong offsets if a debug section
178 2013-10-15 David Malcolm <dmalcolm@redhat.com>
180 * configure.ac: Add --enable-host-shared, setting up
181 pre-existing PIC_FLAG variable within Makefile.am et al.
182 * configure: Regenerate.
184 2013-09-20 Alan Modra <amodra@gmail.com>
186 * configure: Regenerate.
188 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
190 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
192 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
194 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
195 dl_iterate_phdr callbacks.
197 2013-03-25 Ian Lance Taylor <iant@google.com>
199 * alloc.c: #include <sys/types.h>.
202 2013-01-31 Ian Lance Taylor <iant@google.com>
204 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
205 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
207 2013-01-25 Jakub Jelinek <jakub@redhat.com>
210 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
211 attribute was not seen.
213 2013-01-16 Ian Lance Taylor <iant@google.com>
215 * dwarf.c (struct unit): Add filename and abs_filename fields.
216 (build_address_map): Set new fields when reading unit.
217 (dwarf_lookup_pc): If we don't find an entry in the line table,
218 just return the main file name.
220 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
222 Update copyright years.
224 2013-01-01 Ian Lance Taylor <iant@google.com>
227 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
228 $(MULTIBUILDTOP)/../../gcc/include.
229 * Makefile.in: Rebuild.
231 2013-01-01 Ian Lance Taylor <iant@google.com>
234 * mmap.c (backtrace_alloc): Don't call sync functions if not
236 (backtrace_free): Likewise.
238 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
240 * mmapio.c: Define MAP_FAILED if not defined.
242 2012-12-11 Jakub Jelinek <jakub@redhat.com>
245 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
246 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
247 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
249 * Makefile.in: Regenerated.
250 * configure: Regenerated.
252 2012-12-07 Jakub Jelinek <jakub@redhat.com>
255 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
256 * Makefile.in: Regenerated.
258 2012-11-20 Ian Lance Taylor <iant@google.com>
260 * dwarf.c (read_attribute): Always clear val.
262 2012-11-13 Ian Lance Taylor <iant@google.com>
265 * configure.ac: Only add -Werror if building a target library.
266 * configure: Rebuild.
268 2012-11-12 Ian Lance Taylor <iant@google.com>
269 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
270 Gerald Pfeifer <gerald@pfeifer.com>
272 * configure.ac: Check for getexecname.
273 * fileline.c: #include <errno.h>. Define getexecname if not
275 (fileline_initialize): Try to find the executable in a few
277 * print.c (error_callback): Only print the filename if it came
278 from the backtrace state.
279 * configure, config.h.in: Rebuild.
281 2012-10-29 Ian Lance Taylor <iant@google.com>
283 * mmap.c (backtrace_vector_release): Correct last patch: add
286 2012-10-29 Ian Lance Taylor <iant@google.com>
288 * mmap.c (backtrace_vector_release): Make sure freed block is
289 aligned on 8-byte boundary.
291 2012-10-26 Ian Lance Taylor <iant@google.com>
294 * posix.c (backtrace_open): Add does_not_exist parameter.
295 * elf.c (phdr_callback): Do not warn if shared library could not
297 * fileline.c (fileline_initialize): Update calls to
299 * internal.h (backtrace_open): Update declaration.
301 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
304 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
305 * configure: Regenerate.
307 2012-10-24 Ian Lance Taylor <iant@google.com>
310 * configure.ac: Check whether -funwind-tables option works.
311 * configure: Rebuild.
313 2012-10-11 Ian Lance Taylor <iant@google.com>
315 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
316 * configure: Rebuild.
318 2012-10-10 Ian Lance Taylor <iant@google.com>
320 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
323 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
325 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
327 2012-10-09 Ian Lance Taylor <iant@google.com>
329 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
330 (backtrace_dwarf_add): Likewise.
332 2012-10-09 Ian Lance Taylor <iant@google.com>
334 Add support for tracing through shared libraries.
335 * configure.ac: Check for link.h and dl_iterate_phdr.
336 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
337 ELF macros before #defining them.
338 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
340 (struct elf_syminfo_data): Add next field.
341 (elf_initialize_syminfo): Initialize next field.
342 (elf_add_syminfo_data): New static function.
343 (elf_add): New static function, broken out of
344 backtrace_initialize. Call backtrace_dwarf_add instead of
345 backtrace_dwarf_initialize.
346 (struct phdr_data): Define.
347 (phdr_callback): New static function.
348 (backtrace_initialize): Call elf_add.
349 * dwarf.c (struct dwarf_data): Add next and base_address fields.
350 (add_unit_addr): Add base_address parameter. Change all callers.
351 (add_unit_ranges, build_address_map): Likewise.
352 (add_line): Add ddata parameter. Change all callers.
353 (read_line_program, add_function_range): Likewise.
354 (dwarf_lookup_pc): New static function, broken out of
356 (dwarf_fileline): Call dwarf_lookup_pc.
357 (build_dwarf_data): New static function.
358 (backtrace_dwarf_add): New function.
359 (backtrace_dwarf_initialize): Remove.
360 * internal.h (backtrace_dwarf_initialize): Don't declare.
361 (backtrace_dwarf_add): Declare.
362 * configure, config.h.in: Rebuild.
364 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
366 * btest.c (f23): Avoid uninitialized variable warning.
368 2012-10-04 Ian Lance Taylor <iant@google.com>
370 * dwarf.c: If the system header files do not declare strnlen,
371 provide our own version.
373 2012-10-03 Ian Lance Taylor <iant@google.com>
375 * dwarf.c (read_uleb128): Fix overflow test.
376 (read_sleb128): Likewise.
377 (build_address_map): Don't change unit_buf.start.
379 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
382 * configure.ac (EXTRA_FLAGS): New.
383 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
384 * configure, Makefile.in: Regenerate.
386 2012-09-29 Ian Lance Taylor <iant@google.com>
389 * fileline.c (fileline_initialize): Pass errnum as -1 when
390 reporting that we could not read executable information after a
393 2012-09-27 Ian Lance Taylor <iant@google.com>
396 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
397 * Makefile.am: Add dependencies for all objects.
398 * configure, aclocal.m4, Makefile.in: Rebuild.
400 2012-09-27 Ian Lance Taylor <iant@google.com>
403 * elf.c (backtrace_initialize): Set *fileln_fn, not
406 2012-09-19 Ian Lance Taylor <iant@google.com>
408 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
410 * configure: Rebuild.
412 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
413 Ian Lance Taylor <iant@google.com>
415 * configure.ac (GCC_HEADER_STDINT): Invoke.
416 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
417 * btest.c: Don't include <stdint.h>.
419 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
421 2012-09-18 Ian Lance Taylor <iant@google.com>
424 * Makefile.am (AM_CPPFLAGS): Define.
425 (AM_CFLAGS): Remove -I options.
426 * Makefile.in: Rebuild.
428 2012-09-18 Ian Lance Taylor <iant@google.com>
430 * posix.c (O_BINARY): Define if not defined.
431 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
432 HAVE_FCNTL is defined.
433 * configure.ac: Test for the fcntl function.
434 * configure, config.h.in: Rebuild.
436 2012-09-18 Ian Lance Taylor <iant@google.com>
438 * btest.c (test1, test2, test3, test4): Add the unused attribute.
440 2012-09-18 Ian Lance Taylor <iant@google.com>
442 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
444 2012-09-18 Ian Lance Taylor <iant@google.com>
446 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
447 * mmapio.c: Don't define _GNU_SOURCE.
448 * configure, config.h.in: Rebuild.
450 2012-09-18 Ian Lance Taylor <iant@google.com>
452 * configure.ac: Check whether strnlen is declared.
453 * dwarf.c: Declare strnlen if not declared.
454 * configure, config.h.in: Rebuild.
456 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
458 * fileline.c: Include <stdlib.h>.
461 2012-09-17 Ian Lance Taylor <iant@google.com>
464 * nounwind.c (backtrace_full): Rename from backtrace. Add state
467 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
470 * nounwind.c (backtrace_simple): Add state parameter.
472 2012-09-17 Ian Lance Taylor <iant@google.com>
475 * unknown.c (unknown_fileline): Add state parameter, remove
476 fileline_data parameter, name error_callback parameter.
477 (backtrace_initialize): Add state parameter.
479 2012-09-17 Ian Lance Taylor <iant@google.com>
481 * Initial implementation.