1 2017-06-11 Ian Lance Taylor <iant@golang.org>
3 * elf.c (backtrace_initialize): Always set *fileline_fn.
5 * btest.c: Move support functions into testlib.c. Change calls to
6 check to pass file name.
7 * testlib.c: New file, copied from (part of) btest.c.
8 * testlib.h: New file, declarations for testlib.c.
9 * edtest.c: Use testlib.h and testlib.c.
10 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
11 * Makefile.am (btest_SOURCES): Add testlib.c.
12 (edtest_SOURCES): Likewise.
13 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
14 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
15 * configure, Makefile.in: Rebuild.
17 2017-05-19 Than McIntosh <thanm@google.com>
19 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
20 (read_line_header): Don't allocate dirs if dirs_count == 0.
22 * edtest2.c: New file.
23 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
24 (check_PROGRAMS): Add edtest.
25 (edtest2_build.c, gen_edtest2_build): New targets.
26 * Makefile.in: Rebuild.
28 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
30 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
31 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
33 2017-01-01 Jakub Jelinek <jakub@redhat.com>
35 Update copyright years.
37 2016-11-15 Matthias Klose <doko@ubuntu.com>
39 * configure: Regenerate.
41 2016-09-11 Carlos Liam <carlos@aarzee.me>
43 * all: Remove meaningless trailing whitespace.
45 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
48 * elf.c (phdr_callback) [__i386__]: Add
49 __attribute__((__force_align_arg_pointer__)).
51 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
53 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
55 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
56 missing debug info anymore.
58 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
60 * mmap.c (MAP_FAILED): Define if not defined.
62 2016-01-04 Jakub Jelinek <jakub@redhat.com>
64 Update copyright years.
66 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
68 * configure.ac: Specify that DJGPP do not have mmap
69 even when sys/mman.h exists.
70 * configure: Regenerate
72 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
75 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
76 * configure: Regenerate.
77 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
80 2015-09-17 Ian Lance Taylor <iant@google.com>
82 * posix.c (backtrace_open): Cast second argument of open() to int.
84 2015-09-11 Ian Lance Taylor <iant@google.com>
86 * Makefile.am (backtrace.lo): Depend on internal.h.
87 (sort.lo, stest.lo): Add explicit dependencies.
88 * Makefile.in: Rebuild.
90 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
92 * backtrace.c: #include <sys/types.h>.
94 2015-09-08 Ian Lance Taylor <iant@google.com>
97 * backtrace.c: #include "internal.h".
98 (struct backtrace_data): Add can_alloc field.
99 (unwind): If can_alloc is false, don't try to get file/line
101 (backtrace_full): Set can_alloc field in bdata.
102 * alloc.c (backtrace_alloc): Don't call error_callback if it is
104 * mmap.c (backtrace_alloc): Likewise.
105 * internal.h: Update comments for backtrace_alloc and
108 2015-09-08 Ian Lance Taylor <iant@google.com>
111 * mmap.c (backtrace_alloc): Correct test for mmap failure.
113 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
115 * configure.ac: For spu-*-* targets, set have_fcntl to no.
116 * configure: Regenerate.
118 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
120 * configure.ac: Remove [disable-shared] argument to LT_INIT.
121 Remove setting PIC_FLAG when building as target library.
122 * configure: Regenerate.
124 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
126 * configure.ac: Only compile with -fPIC if the target
128 * configure: Regenerate.
130 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
132 * configure.ac: Set have_mmap to no on spu-*-* targets.
133 * configure: Regenerate.
135 2015-08-13 Ian Lance Taylor <iant@google.com>
137 * dwarf.c (read_function_entry): Add vec_inlined parameter.
140 2015-06-11 Martin Sebor <msebor@redhat.com>
143 * dwarf.c (struct line): Add new field idx.
144 (line_compare): Use it.
146 (read_line_info): Reset it.
148 2015-05-29 Tristan Gingold <gingold@adacore.com>
150 * pecoff.c: New file.
151 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
152 * Makefile.in: Regenerate.
153 * filetype.awk: Detect pecoff.
154 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
156 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
158 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
159 * configure: Regenerate.
160 * pecoff.c: New file.
162 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
164 * Makefile.in: Regenerated with automake-1.11.6.
165 * aclocal.m4: Likewise.
166 * configure: Likewise.
168 2015-01-24 Matthias Klose <doko@ubuntu.com>
170 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
171 * configure: Regenerate.
173 2015-01-05 Jakub Jelinek <jakub@redhat.com>
175 Update copyright years.
177 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
180 * configure: Regenerated.
182 2014-11-11 David Malcolm <dmalcolm@redhat.com>
184 * ChangeLog.jit: New.
186 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
189 * configure: Regenerate.
191 2014-10-23 Ian Lance Taylor <iant@google.com>
193 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
194 Fix to return void *.
196 2014-05-08 Ian Lance Taylor <iant@google.com>
198 * mmap.c (backtrace_free): If freeing a large aligned block of
199 memory, call munmap rather than holding onto it.
200 (backtrace_vector_grow): When growing a vector, double the number
201 of pages requested. When releasing the old version of a grown
202 vector, pass the correct size to backtrace_free.
204 2014-03-07 Ian Lance Taylor <iant@google.com>
206 * sort.c (backtrace_qsort): Use middle element as pivot.
208 2014-03-06 Ian Lance Taylor <iant@google.com>
212 * internal.h (backtrace_qsort): Declare.
213 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
214 (read_line_info, read_function_entry): Likewise.
215 (read_function_info, build_dwarf_data): Likewise.
216 * elf.c (elf_initialize_syminfo): Likewise.
217 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
218 (stest_SOURCES, stest_LDADD): Define.
219 (check_PROGRAMS): Add stest.
221 2014-02-07 Misty De Meo <misty@brew.sh>
224 * configure.ac: Use AC_LINK_IFELSE in check for
226 * configure: Regenerate.
228 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
230 Update copyright years
232 2013-12-06 Jakub Jelinek <jakub@redhat.com>
234 * elf.c (ET_DYN): Undefine and define again.
235 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
236 return early -1 without closing the descriptor.
237 (struct phdr_data): Add exe_descriptor.
238 (phdr_callback): If pd->exe_descriptor is not -1, for very first
239 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
240 otherwise backtrace_close the exe_descriptor if not -1. Adjust
242 (backtrace_initialize): Adjust call to elf_add. If it returns
243 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
245 2013-12-05 Ian Lance Taylor <iant@google.com>
247 * alloc.c (backtrace_vector_finish): Add error_callback and data
248 parameters. Call backtrace_vector_release. Return address base.
249 * mmap.c (backtrace_vector_finish): Add error_callback and data
250 parameters. Return address base.
251 * dwarf.c (read_function_info): Get new address base from
252 backtrace_vector_finish.
253 * internal.h (backtrace_vector_finish): Update declaration.
255 2013-11-27 Ian Lance Taylor <iant@google.com>
257 * dwarf.c (find_address_ranges): New static function, broken out
258 of build_address_map.
259 (build_address_map): Call it.
260 * btest.c (check): Check for missing filename or function, rather
262 (f3): Check that enough frames were returned.
264 2013-11-19 Jakub Jelinek <jakub@redhat.com>
266 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
267 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
269 * btest.c (struct symdata): Add size field.
270 (callback_three): Add symsize argument. Copy it to the data->size
272 (f23): Set symdata.size to 0.
273 (test5): Likewise. If sizeof (int) > 1, lookup address of
274 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
277 * atomic.c: Include sys/types.h.
279 2013-11-18 Ian Lance Taylor <iant@google.com>
281 * configure.ac: Check for support of __atomic extensions.
282 * internal.h: Declare or #define atomic functions for use in
284 * atomic.c: New file.
285 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
286 (dwarf_fileline, backtrace_dwarf_add): Likewise.
287 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
288 (backtrace_initialize): Likewise.
289 * fileline.c (fileline_initialize): Likewise.
290 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
291 * configure, config.h.in, Makefile.in: Rebuild.
293 2013-11-18 Jakub Jelinek <jakub@redhat.com>
295 * elf.c (SHN_UNDEF): Define.
296 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
297 with st_shndx == SHN_UNDEF. Add base_address to address fields.
298 (elf_add): Adjust caller.
300 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
302 2013-11-16 Ian Lance Taylor <iant@google.com>
304 * backtrace.h (backtrace_create_state): Correct comment about
307 2013-11-15 Ian Lance Taylor <iant@google.com>
309 * backtrace.h (backtrace_syminfo): Update comment and parameter
310 name to take any address, not just a PC value.
311 * elf.c (STT_OBJECT): Define.
312 (elf_nosyms): Rename parameter pc to addr.
313 (elf_symbol_search): Rename local variable pc to addr.
314 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
315 (elf_syminfo): Rename parameter pc to addr.
316 * btest.c (global): New global variable.
320 2013-10-17 Ian Lance Taylor <iant@google.com>
322 * elf.c (elf_add): Don't get the wrong offsets if a debug section
325 2013-10-15 David Malcolm <dmalcolm@redhat.com>
327 * configure.ac: Add --enable-host-shared, setting up
328 pre-existing PIC_FLAG variable within Makefile.am et al.
329 * configure: Regenerate.
331 2013-09-20 Alan Modra <amodra@gmail.com>
333 * configure: Regenerate.
335 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
337 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
339 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
341 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
342 dl_iterate_phdr callbacks.
344 2013-03-25 Ian Lance Taylor <iant@google.com>
346 * alloc.c: #include <sys/types.h>.
349 2013-01-31 Ian Lance Taylor <iant@google.com>
351 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
352 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
354 2013-01-25 Jakub Jelinek <jakub@redhat.com>
357 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
358 attribute was not seen.
360 2013-01-16 Ian Lance Taylor <iant@google.com>
362 * dwarf.c (struct unit): Add filename and abs_filename fields.
363 (build_address_map): Set new fields when reading unit.
364 (dwarf_lookup_pc): If we don't find an entry in the line table,
365 just return the main file name.
367 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
369 Update copyright years.
371 2013-01-01 Ian Lance Taylor <iant@google.com>
374 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
375 $(MULTIBUILDTOP)/../../gcc/include.
376 * Makefile.in: Rebuild.
378 2013-01-01 Ian Lance Taylor <iant@google.com>
381 * mmap.c (backtrace_alloc): Don't call sync functions if not
383 (backtrace_free): Likewise.
385 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
387 * mmapio.c: Define MAP_FAILED if not defined.
389 2012-12-11 Jakub Jelinek <jakub@redhat.com>
392 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
393 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
394 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
396 * Makefile.in: Regenerated.
397 * configure: Regenerated.
399 2012-12-07 Jakub Jelinek <jakub@redhat.com>
402 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
403 * Makefile.in: Regenerated.
405 2012-11-20 Ian Lance Taylor <iant@google.com>
407 * dwarf.c (read_attribute): Always clear val.
409 2012-11-13 Ian Lance Taylor <iant@google.com>
412 * configure.ac: Only add -Werror if building a target library.
413 * configure: Rebuild.
415 2012-11-12 Ian Lance Taylor <iant@google.com>
416 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
417 Gerald Pfeifer <gerald@pfeifer.com>
419 * configure.ac: Check for getexecname.
420 * fileline.c: #include <errno.h>. Define getexecname if not
422 (fileline_initialize): Try to find the executable in a few
424 * print.c (error_callback): Only print the filename if it came
425 from the backtrace state.
426 * configure, config.h.in: Rebuild.
428 2012-10-29 Ian Lance Taylor <iant@google.com>
430 * mmap.c (backtrace_vector_release): Correct last patch: add
433 2012-10-29 Ian Lance Taylor <iant@google.com>
435 * mmap.c (backtrace_vector_release): Make sure freed block is
436 aligned on 8-byte boundary.
438 2012-10-26 Ian Lance Taylor <iant@google.com>
441 * posix.c (backtrace_open): Add does_not_exist parameter.
442 * elf.c (phdr_callback): Do not warn if shared library could not
444 * fileline.c (fileline_initialize): Update calls to
446 * internal.h (backtrace_open): Update declaration.
448 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
451 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
452 * configure: Regenerate.
454 2012-10-24 Ian Lance Taylor <iant@google.com>
457 * configure.ac: Check whether -funwind-tables option works.
458 * configure: Rebuild.
460 2012-10-11 Ian Lance Taylor <iant@google.com>
462 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
463 * configure: Rebuild.
465 2012-10-10 Ian Lance Taylor <iant@google.com>
467 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
470 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
472 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
474 2012-10-09 Ian Lance Taylor <iant@google.com>
476 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
477 (backtrace_dwarf_add): Likewise.
479 2012-10-09 Ian Lance Taylor <iant@google.com>
481 Add support for tracing through shared libraries.
482 * configure.ac: Check for link.h and dl_iterate_phdr.
483 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
484 ELF macros before #defining them.
485 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
487 (struct elf_syminfo_data): Add next field.
488 (elf_initialize_syminfo): Initialize next field.
489 (elf_add_syminfo_data): New static function.
490 (elf_add): New static function, broken out of
491 backtrace_initialize. Call backtrace_dwarf_add instead of
492 backtrace_dwarf_initialize.
493 (struct phdr_data): Define.
494 (phdr_callback): New static function.
495 (backtrace_initialize): Call elf_add.
496 * dwarf.c (struct dwarf_data): Add next and base_address fields.
497 (add_unit_addr): Add base_address parameter. Change all callers.
498 (add_unit_ranges, build_address_map): Likewise.
499 (add_line): Add ddata parameter. Change all callers.
500 (read_line_program, add_function_range): Likewise.
501 (dwarf_lookup_pc): New static function, broken out of
503 (dwarf_fileline): Call dwarf_lookup_pc.
504 (build_dwarf_data): New static function.
505 (backtrace_dwarf_add): New function.
506 (backtrace_dwarf_initialize): Remove.
507 * internal.h (backtrace_dwarf_initialize): Don't declare.
508 (backtrace_dwarf_add): Declare.
509 * configure, config.h.in: Rebuild.
511 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
513 * btest.c (f23): Avoid uninitialized variable warning.
515 2012-10-04 Ian Lance Taylor <iant@google.com>
517 * dwarf.c: If the system header files do not declare strnlen,
518 provide our own version.
520 2012-10-03 Ian Lance Taylor <iant@google.com>
522 * dwarf.c (read_uleb128): Fix overflow test.
523 (read_sleb128): Likewise.
524 (build_address_map): Don't change unit_buf.start.
526 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
529 * configure.ac (EXTRA_FLAGS): New.
530 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
531 * configure, Makefile.in: Regenerate.
533 2012-09-29 Ian Lance Taylor <iant@google.com>
536 * fileline.c (fileline_initialize): Pass errnum as -1 when
537 reporting that we could not read executable information after a
540 2012-09-27 Ian Lance Taylor <iant@google.com>
543 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
544 * Makefile.am: Add dependencies for all objects.
545 * configure, aclocal.m4, Makefile.in: Rebuild.
547 2012-09-27 Ian Lance Taylor <iant@google.com>
550 * elf.c (backtrace_initialize): Set *fileln_fn, not
553 2012-09-19 Ian Lance Taylor <iant@google.com>
555 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
557 * configure: Rebuild.
559 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
560 Ian Lance Taylor <iant@google.com>
562 * configure.ac (GCC_HEADER_STDINT): Invoke.
563 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
564 * btest.c: Don't include <stdint.h>.
566 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
568 2012-09-18 Ian Lance Taylor <iant@google.com>
571 * Makefile.am (AM_CPPFLAGS): Define.
572 (AM_CFLAGS): Remove -I options.
573 * Makefile.in: Rebuild.
575 2012-09-18 Ian Lance Taylor <iant@google.com>
577 * posix.c (O_BINARY): Define if not defined.
578 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
579 HAVE_FCNTL is defined.
580 * configure.ac: Test for the fcntl function.
581 * configure, config.h.in: Rebuild.
583 2012-09-18 Ian Lance Taylor <iant@google.com>
585 * btest.c (test1, test2, test3, test4): Add the unused attribute.
587 2012-09-18 Ian Lance Taylor <iant@google.com>
589 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
591 2012-09-18 Ian Lance Taylor <iant@google.com>
593 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
594 * mmapio.c: Don't define _GNU_SOURCE.
595 * configure, config.h.in: Rebuild.
597 2012-09-18 Ian Lance Taylor <iant@google.com>
599 * configure.ac: Check whether strnlen is declared.
600 * dwarf.c: Declare strnlen if not declared.
601 * configure, config.h.in: Rebuild.
603 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
605 * fileline.c: Include <stdlib.h>.
608 2012-09-17 Ian Lance Taylor <iant@google.com>
611 * nounwind.c (backtrace_full): Rename from backtrace. Add state
614 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
617 * nounwind.c (backtrace_simple): Add state parameter.
619 2012-09-17 Ian Lance Taylor <iant@google.com>
622 * unknown.c (unknown_fileline): Add state parameter, remove
623 fileline_data parameter, name error_callback parameter.
624 (backtrace_initialize): Add state parameter.
626 2012-09-17 Ian Lance Taylor <iant@google.com>
628 * Initial implementation.
630 Copyright (C) 2012-2017 Free Software Foundation, Inc.
632 Copying and distribution of this file, with or without modification,
633 are permitted in any medium without royalty provided the copyright
634 notice and this notice are preserved.