1 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
3 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
5 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
6 missing debug info anymore.
8 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
10 * mmap.c (MAP_FAILED): Define if not defined.
12 2016-01-04 Jakub Jelinek <jakub@redhat.com>
14 Update copyright years.
16 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
18 * configure.ac: Specify that DJGPP do not have mmap even when sys/mman.h exists
19 * configure: Regenerate
21 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
24 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
25 * configure: Regenerate.
26 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
29 2015-09-17 Ian Lance Taylor <iant@google.com>
31 * posix.c (backtrace_open): Cast second argument of open() to int.
33 2015-09-11 Ian Lance Taylor <iant@google.com>
35 * Makefile.am (backtrace.lo): Depend on internal.h.
36 (sort.lo, stest.lo): Add explicit dependencies.
37 * Makefile.in: Rebuild.
39 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
41 * backtrace.c: #include <sys/types.h>.
43 2015-09-08 Ian Lance Taylor <iant@google.com>
46 * backtrace.c: #include "internal.h".
47 (struct backtrace_data): Add can_alloc field.
48 (unwind): If can_alloc is false, don't try to get file/line
50 (backtrace_full): Set can_alloc field in bdata.
51 * alloc.c (backtrace_alloc): Don't call error_callback if it is
53 * mmap.c (backtrace_alloc): Likewise.
54 * internal.h: Update comments for backtrace_alloc and
57 2015-09-08 Ian Lance Taylor <iant@google.com>
60 * mmap.c (backtrace_alloc): Correct test for mmap failure.
62 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
64 * configure.ac: For spu-*-* targets, set have_fcntl to no.
65 * configure: Regenerate.
67 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
69 * configure.ac: Remove [disable-shared] argument to LT_INIT.
70 Remove setting PIC_FLAG when building as target library.
71 * configure: Regenerate.
73 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
75 * configure.ac: Only compile with -fPIC if the target
77 * configure: Regenerate.
79 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
81 * configure.ac: Set have_mmap to no on spu-*-* targets.
82 * configure: Regenerate.
84 2015-08-13 Ian Lance Taylor <iant@google.com>
86 * dwarf.c (read_function_entry): Add vec_inlined parameter.
89 2015-06-11 Martin Sebor <msebor@redhat.com>
92 * dwarf.c (struct line): Add new field idx.
93 (line_compare): Use it.
95 (read_line_info): Reset it.
97 2015-05-29 Tristan Gingold <gingold@adacore.com>
100 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
101 * Makefile.in: Regenerate.
102 * filetype.awk: Detect pecoff.
103 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
105 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
107 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
108 * configure: Regenerate.
109 * pecoff.c: New file.
111 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
113 * Makefile.in: Regenerated with automake-1.11.6.
114 * aclocal.m4: Likewise.
115 * configure: Likewise.
117 2015-01-24 Matthias Klose <doko@ubuntu.com>
119 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
120 * configure: Regenerate.
122 2015-01-05 Jakub Jelinek <jakub@redhat.com>
124 Update copyright years.
126 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
129 * configure: Regenerated.
131 2014-11-11 David Malcolm <dmalcolm@redhat.com>
133 * ChangeLog.jit: New.
135 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
138 * configure: Regenerate.
140 2014-10-23 Ian Lance Taylor <iant@google.com>
142 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
143 Fix to return void *.
145 2014-05-08 Ian Lance Taylor <iant@google.com>
147 * mmap.c (backtrace_free): If freeing a large aligned block of
148 memory, call munmap rather than holding onto it.
149 (backtrace_vector_grow): When growing a vector, double the number
150 of pages requested. When releasing the old version of a grown
151 vector, pass the correct size to backtrace_free.
153 2014-03-07 Ian Lance Taylor <iant@google.com>
155 * sort.c (backtrace_qsort): Use middle element as pivot.
157 2014-03-06 Ian Lance Taylor <iant@google.com>
161 * internal.h (backtrace_qsort): Declare.
162 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
163 (read_line_info, read_function_entry): Likewise.
164 (read_function_info, build_dwarf_data): Likewise.
165 * elf.c (elf_initialize_syminfo): Likewise.
166 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
167 (stest_SOURCES, stest_LDADD): Define.
168 (check_PROGRAMS): Add stest.
170 2014-02-07 Misty De Meo <misty@brew.sh>
173 * configure.ac: Use AC_LINK_IFELSE in check for
175 * configure: Regenerate.
177 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
179 Update copyright years
181 2013-12-06 Jakub Jelinek <jakub@redhat.com>
183 * elf.c (ET_DYN): Undefine and define again.
184 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
185 return early -1 without closing the descriptor.
186 (struct phdr_data): Add exe_descriptor.
187 (phdr_callback): If pd->exe_descriptor is not -1, for very first
188 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
189 otherwise backtrace_close the exe_descriptor if not -1. Adjust
191 (backtrace_initialize): Adjust call to elf_add. If it returns
192 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
194 2013-12-05 Ian Lance Taylor <iant@google.com>
196 * alloc.c (backtrace_vector_finish): Add error_callback and data
197 parameters. Call backtrace_vector_release. Return address base.
198 * mmap.c (backtrace_vector_finish): Add error_callback and data
199 parameters. Return address base.
200 * dwarf.c (read_function_info): Get new address base from
201 backtrace_vector_finish.
202 * internal.h (backtrace_vector_finish): Update declaration.
204 2013-11-27 Ian Lance Taylor <iant@google.com>
206 * dwarf.c (find_address_ranges): New static function, broken out
207 of build_address_map.
208 (build_address_map): Call it.
209 * btest.c (check): Check for missing filename or function, rather
211 (f3): Check that enough frames were returned.
213 2013-11-19 Jakub Jelinek <jakub@redhat.com>
215 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
216 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
218 * btest.c (struct symdata): Add size field.
219 (callback_three): Add symsize argument. Copy it to the data->size
221 (f23): Set symdata.size to 0.
222 (test5): Likewise. If sizeof (int) > 1, lookup address of
223 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
226 * atomic.c: Include sys/types.h.
228 2013-11-18 Ian Lance Taylor <iant@google.com>
230 * configure.ac: Check for support of __atomic extensions.
231 * internal.h: Declare or #define atomic functions for use in
233 * atomic.c: New file.
234 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
235 (dwarf_fileline, backtrace_dwarf_add): Likewise.
236 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
237 (backtrace_initialize): Likewise.
238 * fileline.c (fileline_initialize): Likewise.
239 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
240 * configure, config.h.in, Makefile.in: Rebuild.
242 2013-11-18 Jakub Jelinek <jakub@redhat.com>
244 * elf.c (SHN_UNDEF): Define.
245 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
246 with st_shndx == SHN_UNDEF. Add base_address to address fields.
247 (elf_add): Adjust caller.
249 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
251 2013-11-16 Ian Lance Taylor <iant@google.com>
253 * backtrace.h (backtrace_create_state): Correct comment about
256 2013-11-15 Ian Lance Taylor <iant@google.com>
258 * backtrace.h (backtrace_syminfo): Update comment and parameter
259 name to take any address, not just a PC value.
260 * elf.c (STT_OBJECT): Define.
261 (elf_nosyms): Rename parameter pc to addr.
262 (elf_symbol_search): Rename local variable pc to addr.
263 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
264 (elf_syminfo): Rename parameter pc to addr.
265 * btest.c (global): New global variable.
269 2013-10-17 Ian Lance Taylor <iant@google.com>
271 * elf.c (elf_add): Don't get the wrong offsets if a debug section
274 2013-10-15 David Malcolm <dmalcolm@redhat.com>
276 * configure.ac: Add --enable-host-shared, setting up
277 pre-existing PIC_FLAG variable within Makefile.am et al.
278 * configure: Regenerate.
280 2013-09-20 Alan Modra <amodra@gmail.com>
282 * configure: Regenerate.
284 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
286 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
288 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
290 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
291 dl_iterate_phdr callbacks.
293 2013-03-25 Ian Lance Taylor <iant@google.com>
295 * alloc.c: #include <sys/types.h>.
298 2013-01-31 Ian Lance Taylor <iant@google.com>
300 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
301 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
303 2013-01-25 Jakub Jelinek <jakub@redhat.com>
306 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
307 attribute was not seen.
309 2013-01-16 Ian Lance Taylor <iant@google.com>
311 * dwarf.c (struct unit): Add filename and abs_filename fields.
312 (build_address_map): Set new fields when reading unit.
313 (dwarf_lookup_pc): If we don't find an entry in the line table,
314 just return the main file name.
316 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
318 Update copyright years.
320 2013-01-01 Ian Lance Taylor <iant@google.com>
323 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
324 $(MULTIBUILDTOP)/../../gcc/include.
325 * Makefile.in: Rebuild.
327 2013-01-01 Ian Lance Taylor <iant@google.com>
330 * mmap.c (backtrace_alloc): Don't call sync functions if not
332 (backtrace_free): Likewise.
334 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
336 * mmapio.c: Define MAP_FAILED if not defined.
338 2012-12-11 Jakub Jelinek <jakub@redhat.com>
341 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
342 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
343 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
345 * Makefile.in: Regenerated.
346 * configure: Regenerated.
348 2012-12-07 Jakub Jelinek <jakub@redhat.com>
351 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
352 * Makefile.in: Regenerated.
354 2012-11-20 Ian Lance Taylor <iant@google.com>
356 * dwarf.c (read_attribute): Always clear val.
358 2012-11-13 Ian Lance Taylor <iant@google.com>
361 * configure.ac: Only add -Werror if building a target library.
362 * configure: Rebuild.
364 2012-11-12 Ian Lance Taylor <iant@google.com>
365 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
366 Gerald Pfeifer <gerald@pfeifer.com>
368 * configure.ac: Check for getexecname.
369 * fileline.c: #include <errno.h>. Define getexecname if not
371 (fileline_initialize): Try to find the executable in a few
373 * print.c (error_callback): Only print the filename if it came
374 from the backtrace state.
375 * configure, config.h.in: Rebuild.
377 2012-10-29 Ian Lance Taylor <iant@google.com>
379 * mmap.c (backtrace_vector_release): Correct last patch: add
382 2012-10-29 Ian Lance Taylor <iant@google.com>
384 * mmap.c (backtrace_vector_release): Make sure freed block is
385 aligned on 8-byte boundary.
387 2012-10-26 Ian Lance Taylor <iant@google.com>
390 * posix.c (backtrace_open): Add does_not_exist parameter.
391 * elf.c (phdr_callback): Do not warn if shared library could not
393 * fileline.c (fileline_initialize): Update calls to
395 * internal.h (backtrace_open): Update declaration.
397 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
400 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
401 * configure: Regenerate.
403 2012-10-24 Ian Lance Taylor <iant@google.com>
406 * configure.ac: Check whether -funwind-tables option works.
407 * configure: Rebuild.
409 2012-10-11 Ian Lance Taylor <iant@google.com>
411 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
412 * configure: Rebuild.
414 2012-10-10 Ian Lance Taylor <iant@google.com>
416 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
419 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
421 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
423 2012-10-09 Ian Lance Taylor <iant@google.com>
425 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
426 (backtrace_dwarf_add): Likewise.
428 2012-10-09 Ian Lance Taylor <iant@google.com>
430 Add support for tracing through shared libraries.
431 * configure.ac: Check for link.h and dl_iterate_phdr.
432 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
433 ELF macros before #defining them.
434 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
436 (struct elf_syminfo_data): Add next field.
437 (elf_initialize_syminfo): Initialize next field.
438 (elf_add_syminfo_data): New static function.
439 (elf_add): New static function, broken out of
440 backtrace_initialize. Call backtrace_dwarf_add instead of
441 backtrace_dwarf_initialize.
442 (struct phdr_data): Define.
443 (phdr_callback): New static function.
444 (backtrace_initialize): Call elf_add.
445 * dwarf.c (struct dwarf_data): Add next and base_address fields.
446 (add_unit_addr): Add base_address parameter. Change all callers.
447 (add_unit_ranges, build_address_map): Likewise.
448 (add_line): Add ddata parameter. Change all callers.
449 (read_line_program, add_function_range): Likewise.
450 (dwarf_lookup_pc): New static function, broken out of
452 (dwarf_fileline): Call dwarf_lookup_pc.
453 (build_dwarf_data): New static function.
454 (backtrace_dwarf_add): New function.
455 (backtrace_dwarf_initialize): Remove.
456 * internal.h (backtrace_dwarf_initialize): Don't declare.
457 (backtrace_dwarf_add): Declare.
458 * configure, config.h.in: Rebuild.
460 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
462 * btest.c (f23): Avoid uninitialized variable warning.
464 2012-10-04 Ian Lance Taylor <iant@google.com>
466 * dwarf.c: If the system header files do not declare strnlen,
467 provide our own version.
469 2012-10-03 Ian Lance Taylor <iant@google.com>
471 * dwarf.c (read_uleb128): Fix overflow test.
472 (read_sleb128): Likewise.
473 (build_address_map): Don't change unit_buf.start.
475 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
478 * configure.ac (EXTRA_FLAGS): New.
479 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
480 * configure, Makefile.in: Regenerate.
482 2012-09-29 Ian Lance Taylor <iant@google.com>
485 * fileline.c (fileline_initialize): Pass errnum as -1 when
486 reporting that we could not read executable information after a
489 2012-09-27 Ian Lance Taylor <iant@google.com>
492 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
493 * Makefile.am: Add dependencies for all objects.
494 * configure, aclocal.m4, Makefile.in: Rebuild.
496 2012-09-27 Ian Lance Taylor <iant@google.com>
499 * elf.c (backtrace_initialize): Set *fileln_fn, not
502 2012-09-19 Ian Lance Taylor <iant@google.com>
504 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
506 * configure: Rebuild.
508 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
509 Ian Lance Taylor <iant@google.com>
511 * configure.ac (GCC_HEADER_STDINT): Invoke.
512 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
513 * btest.c: Don't include <stdint.h>.
515 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
517 2012-09-18 Ian Lance Taylor <iant@google.com>
520 * Makefile.am (AM_CPPFLAGS): Define.
521 (AM_CFLAGS): Remove -I options.
522 * Makefile.in: Rebuild.
524 2012-09-18 Ian Lance Taylor <iant@google.com>
526 * posix.c (O_BINARY): Define if not defined.
527 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
528 HAVE_FCNTL is defined.
529 * configure.ac: Test for the fcntl function.
530 * configure, config.h.in: Rebuild.
532 2012-09-18 Ian Lance Taylor <iant@google.com>
534 * btest.c (test1, test2, test3, test4): Add the unused attribute.
536 2012-09-18 Ian Lance Taylor <iant@google.com>
538 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
540 2012-09-18 Ian Lance Taylor <iant@google.com>
542 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
543 * mmapio.c: Don't define _GNU_SOURCE.
544 * configure, config.h.in: Rebuild.
546 2012-09-18 Ian Lance Taylor <iant@google.com>
548 * configure.ac: Check whether strnlen is declared.
549 * dwarf.c: Declare strnlen if not declared.
550 * configure, config.h.in: Rebuild.
552 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
554 * fileline.c: Include <stdlib.h>.
557 2012-09-17 Ian Lance Taylor <iant@google.com>
560 * nounwind.c (backtrace_full): Rename from backtrace. Add state
563 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
566 * nounwind.c (backtrace_simple): Add state parameter.
568 2012-09-17 Ian Lance Taylor <iant@google.com>
571 * unknown.c (unknown_fileline): Add state parameter, remove
572 fileline_data parameter, name error_callback parameter.
573 (backtrace_initialize): Add state parameter.
575 2012-09-17 Ian Lance Taylor <iant@google.com>
577 * Initial implementation.
579 Copyright (C) 2012-2016 Free Software Foundation, Inc.
581 Copying and distribution of this file, with or without modification,
582 are permitted in any medium without royalty provided the copyright
583 notice and this notice are preserved.