1 2017-07-21 Tony Reix <tony.reix@atos.net>
3 * filetype.awk: Add AIX XCOFF type detection.
4 * configure.ac: Recognize xcoff format.
5 * Makefile.am (FORMAT_FILES): Add xcoff.c.
6 * fileline.c: Include <unistd.h>.
7 (fileline_initialize): Add case for AIX procfs.
9 * configure, Makefile.in: Rebuild.
11 2017-06-21 Richard Biener <rguenther@suse.de>
13 * configure.ac: Add AC_SYS_LARGEFILE.
14 * config.h.in: Regenerate.
15 * configure: Likewise.
17 2017-06-11 Ian Lance Taylor <iant@golang.org>
19 * elf.c (backtrace_initialize): Always set *fileline_fn.
21 * btest.c: Move support functions into testlib.c. Change calls to
22 check to pass file name.
23 * testlib.c: New file, copied from (part of) btest.c.
24 * testlib.h: New file, declarations for testlib.c.
25 * edtest.c: Use testlib.h and testlib.c.
26 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
27 * Makefile.am (btest_SOURCES): Add testlib.c.
28 (edtest_SOURCES): Likewise.
29 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
30 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
31 * configure, Makefile.in: Rebuild.
33 2017-05-19 Than McIntosh <thanm@google.com>
35 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
36 (read_line_header): Don't allocate dirs if dirs_count == 0.
38 * edtest2.c: New file.
39 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
40 (check_PROGRAMS): Add edtest.
41 (edtest2_build.c, gen_edtest2_build): New targets.
42 * Makefile.in: Rebuild.
44 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
46 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
47 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
49 2017-01-01 Jakub Jelinek <jakub@redhat.com>
51 Update copyright years.
53 2016-11-15 Matthias Klose <doko@ubuntu.com>
55 * configure: Regenerate.
57 2016-09-11 Carlos Liam <carlos@aarzee.me>
59 * all: Remove meaningless trailing whitespace.
61 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
64 * elf.c (phdr_callback) [__i386__]: Add
65 __attribute__((__force_align_arg_pointer__)).
67 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
69 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
71 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
72 missing debug info anymore.
74 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
76 * mmap.c (MAP_FAILED): Define if not defined.
78 2016-01-04 Jakub Jelinek <jakub@redhat.com>
80 Update copyright years.
82 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
84 * configure.ac: Specify that DJGPP do not have mmap
85 even when sys/mman.h exists.
86 * configure: Regenerate
88 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
91 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
92 * configure: Regenerate.
93 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
96 2015-09-17 Ian Lance Taylor <iant@google.com>
98 * posix.c (backtrace_open): Cast second argument of open() to int.
100 2015-09-11 Ian Lance Taylor <iant@google.com>
102 * Makefile.am (backtrace.lo): Depend on internal.h.
103 (sort.lo, stest.lo): Add explicit dependencies.
104 * Makefile.in: Rebuild.
106 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
108 * backtrace.c: #include <sys/types.h>.
110 2015-09-08 Ian Lance Taylor <iant@google.com>
113 * backtrace.c: #include "internal.h".
114 (struct backtrace_data): Add can_alloc field.
115 (unwind): If can_alloc is false, don't try to get file/line
117 (backtrace_full): Set can_alloc field in bdata.
118 * alloc.c (backtrace_alloc): Don't call error_callback if it is
120 * mmap.c (backtrace_alloc): Likewise.
121 * internal.h: Update comments for backtrace_alloc and
124 2015-09-08 Ian Lance Taylor <iant@google.com>
127 * mmap.c (backtrace_alloc): Correct test for mmap failure.
129 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
131 * configure.ac: For spu-*-* targets, set have_fcntl to no.
132 * configure: Regenerate.
134 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
136 * configure.ac: Remove [disable-shared] argument to LT_INIT.
137 Remove setting PIC_FLAG when building as target library.
138 * configure: Regenerate.
140 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
142 * configure.ac: Only compile with -fPIC if the target
144 * configure: Regenerate.
146 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
148 * configure.ac: Set have_mmap to no on spu-*-* targets.
149 * configure: Regenerate.
151 2015-08-13 Ian Lance Taylor <iant@google.com>
153 * dwarf.c (read_function_entry): Add vec_inlined parameter.
156 2015-06-11 Martin Sebor <msebor@redhat.com>
159 * dwarf.c (struct line): Add new field idx.
160 (line_compare): Use it.
162 (read_line_info): Reset it.
164 2015-05-29 Tristan Gingold <gingold@adacore.com>
166 * pecoff.c: New file.
167 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
168 * Makefile.in: Regenerate.
169 * filetype.awk: Detect pecoff.
170 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
172 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
174 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
175 * configure: Regenerate.
176 * pecoff.c: New file.
178 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
180 * Makefile.in: Regenerated with automake-1.11.6.
181 * aclocal.m4: Likewise.
182 * configure: Likewise.
184 2015-01-24 Matthias Klose <doko@ubuntu.com>
186 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
187 * configure: Regenerate.
189 2015-01-05 Jakub Jelinek <jakub@redhat.com>
191 Update copyright years.
193 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
196 * configure: Regenerated.
198 2014-11-11 David Malcolm <dmalcolm@redhat.com>
200 * ChangeLog.jit: New.
202 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
205 * configure: Regenerate.
207 2014-10-23 Ian Lance Taylor <iant@google.com>
209 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
210 Fix to return void *.
212 2014-05-08 Ian Lance Taylor <iant@google.com>
214 * mmap.c (backtrace_free): If freeing a large aligned block of
215 memory, call munmap rather than holding onto it.
216 (backtrace_vector_grow): When growing a vector, double the number
217 of pages requested. When releasing the old version of a grown
218 vector, pass the correct size to backtrace_free.
220 2014-03-07 Ian Lance Taylor <iant@google.com>
222 * sort.c (backtrace_qsort): Use middle element as pivot.
224 2014-03-06 Ian Lance Taylor <iant@google.com>
228 * internal.h (backtrace_qsort): Declare.
229 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
230 (read_line_info, read_function_entry): Likewise.
231 (read_function_info, build_dwarf_data): Likewise.
232 * elf.c (elf_initialize_syminfo): Likewise.
233 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
234 (stest_SOURCES, stest_LDADD): Define.
235 (check_PROGRAMS): Add stest.
237 2014-02-07 Misty De Meo <misty@brew.sh>
240 * configure.ac: Use AC_LINK_IFELSE in check for
242 * configure: Regenerate.
244 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
246 Update copyright years
248 2013-12-06 Jakub Jelinek <jakub@redhat.com>
250 * elf.c (ET_DYN): Undefine and define again.
251 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
252 return early -1 without closing the descriptor.
253 (struct phdr_data): Add exe_descriptor.
254 (phdr_callback): If pd->exe_descriptor is not -1, for very first
255 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
256 otherwise backtrace_close the exe_descriptor if not -1. Adjust
258 (backtrace_initialize): Adjust call to elf_add. If it returns
259 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
261 2013-12-05 Ian Lance Taylor <iant@google.com>
263 * alloc.c (backtrace_vector_finish): Add error_callback and data
264 parameters. Call backtrace_vector_release. Return address base.
265 * mmap.c (backtrace_vector_finish): Add error_callback and data
266 parameters. Return address base.
267 * dwarf.c (read_function_info): Get new address base from
268 backtrace_vector_finish.
269 * internal.h (backtrace_vector_finish): Update declaration.
271 2013-11-27 Ian Lance Taylor <iant@google.com>
273 * dwarf.c (find_address_ranges): New static function, broken out
274 of build_address_map.
275 (build_address_map): Call it.
276 * btest.c (check): Check for missing filename or function, rather
278 (f3): Check that enough frames were returned.
280 2013-11-19 Jakub Jelinek <jakub@redhat.com>
282 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
283 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
285 * btest.c (struct symdata): Add size field.
286 (callback_three): Add symsize argument. Copy it to the data->size
288 (f23): Set symdata.size to 0.
289 (test5): Likewise. If sizeof (int) > 1, lookup address of
290 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
293 * atomic.c: Include sys/types.h.
295 2013-11-18 Ian Lance Taylor <iant@google.com>
297 * configure.ac: Check for support of __atomic extensions.
298 * internal.h: Declare or #define atomic functions for use in
300 * atomic.c: New file.
301 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
302 (dwarf_fileline, backtrace_dwarf_add): Likewise.
303 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
304 (backtrace_initialize): Likewise.
305 * fileline.c (fileline_initialize): Likewise.
306 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
307 * configure, config.h.in, Makefile.in: Rebuild.
309 2013-11-18 Jakub Jelinek <jakub@redhat.com>
311 * elf.c (SHN_UNDEF): Define.
312 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
313 with st_shndx == SHN_UNDEF. Add base_address to address fields.
314 (elf_add): Adjust caller.
316 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
318 2013-11-16 Ian Lance Taylor <iant@google.com>
320 * backtrace.h (backtrace_create_state): Correct comment about
323 2013-11-15 Ian Lance Taylor <iant@google.com>
325 * backtrace.h (backtrace_syminfo): Update comment and parameter
326 name to take any address, not just a PC value.
327 * elf.c (STT_OBJECT): Define.
328 (elf_nosyms): Rename parameter pc to addr.
329 (elf_symbol_search): Rename local variable pc to addr.
330 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
331 (elf_syminfo): Rename parameter pc to addr.
332 * btest.c (global): New global variable.
336 2013-10-17 Ian Lance Taylor <iant@google.com>
338 * elf.c (elf_add): Don't get the wrong offsets if a debug section
341 2013-10-15 David Malcolm <dmalcolm@redhat.com>
343 * configure.ac: Add --enable-host-shared, setting up
344 pre-existing PIC_FLAG variable within Makefile.am et al.
345 * configure: Regenerate.
347 2013-09-20 Alan Modra <amodra@gmail.com>
349 * configure: Regenerate.
351 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
353 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
355 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
357 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
358 dl_iterate_phdr callbacks.
360 2013-03-25 Ian Lance Taylor <iant@google.com>
362 * alloc.c: #include <sys/types.h>.
365 2013-01-31 Ian Lance Taylor <iant@google.com>
367 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
368 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
370 2013-01-25 Jakub Jelinek <jakub@redhat.com>
373 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
374 attribute was not seen.
376 2013-01-16 Ian Lance Taylor <iant@google.com>
378 * dwarf.c (struct unit): Add filename and abs_filename fields.
379 (build_address_map): Set new fields when reading unit.
380 (dwarf_lookup_pc): If we don't find an entry in the line table,
381 just return the main file name.
383 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
385 Update copyright years.
387 2013-01-01 Ian Lance Taylor <iant@google.com>
390 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
391 $(MULTIBUILDTOP)/../../gcc/include.
392 * Makefile.in: Rebuild.
394 2013-01-01 Ian Lance Taylor <iant@google.com>
397 * mmap.c (backtrace_alloc): Don't call sync functions if not
399 (backtrace_free): Likewise.
401 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
403 * mmapio.c: Define MAP_FAILED if not defined.
405 2012-12-11 Jakub Jelinek <jakub@redhat.com>
408 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
409 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
410 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
412 * Makefile.in: Regenerated.
413 * configure: Regenerated.
415 2012-12-07 Jakub Jelinek <jakub@redhat.com>
418 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
419 * Makefile.in: Regenerated.
421 2012-11-20 Ian Lance Taylor <iant@google.com>
423 * dwarf.c (read_attribute): Always clear val.
425 2012-11-13 Ian Lance Taylor <iant@google.com>
428 * configure.ac: Only add -Werror if building a target library.
429 * configure: Rebuild.
431 2012-11-12 Ian Lance Taylor <iant@google.com>
432 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
433 Gerald Pfeifer <gerald@pfeifer.com>
435 * configure.ac: Check for getexecname.
436 * fileline.c: #include <errno.h>. Define getexecname if not
438 (fileline_initialize): Try to find the executable in a few
440 * print.c (error_callback): Only print the filename if it came
441 from the backtrace state.
442 * configure, config.h.in: Rebuild.
444 2012-10-29 Ian Lance Taylor <iant@google.com>
446 * mmap.c (backtrace_vector_release): Correct last patch: add
449 2012-10-29 Ian Lance Taylor <iant@google.com>
451 * mmap.c (backtrace_vector_release): Make sure freed block is
452 aligned on 8-byte boundary.
454 2012-10-26 Ian Lance Taylor <iant@google.com>
457 * posix.c (backtrace_open): Add does_not_exist parameter.
458 * elf.c (phdr_callback): Do not warn if shared library could not
460 * fileline.c (fileline_initialize): Update calls to
462 * internal.h (backtrace_open): Update declaration.
464 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
467 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
468 * configure: Regenerate.
470 2012-10-24 Ian Lance Taylor <iant@google.com>
473 * configure.ac: Check whether -funwind-tables option works.
474 * configure: Rebuild.
476 2012-10-11 Ian Lance Taylor <iant@google.com>
478 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
479 * configure: Rebuild.
481 2012-10-10 Ian Lance Taylor <iant@google.com>
483 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
486 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
488 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
490 2012-10-09 Ian Lance Taylor <iant@google.com>
492 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
493 (backtrace_dwarf_add): Likewise.
495 2012-10-09 Ian Lance Taylor <iant@google.com>
497 Add support for tracing through shared libraries.
498 * configure.ac: Check for link.h and dl_iterate_phdr.
499 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
500 ELF macros before #defining them.
501 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
503 (struct elf_syminfo_data): Add next field.
504 (elf_initialize_syminfo): Initialize next field.
505 (elf_add_syminfo_data): New static function.
506 (elf_add): New static function, broken out of
507 backtrace_initialize. Call backtrace_dwarf_add instead of
508 backtrace_dwarf_initialize.
509 (struct phdr_data): Define.
510 (phdr_callback): New static function.
511 (backtrace_initialize): Call elf_add.
512 * dwarf.c (struct dwarf_data): Add next and base_address fields.
513 (add_unit_addr): Add base_address parameter. Change all callers.
514 (add_unit_ranges, build_address_map): Likewise.
515 (add_line): Add ddata parameter. Change all callers.
516 (read_line_program, add_function_range): Likewise.
517 (dwarf_lookup_pc): New static function, broken out of
519 (dwarf_fileline): Call dwarf_lookup_pc.
520 (build_dwarf_data): New static function.
521 (backtrace_dwarf_add): New function.
522 (backtrace_dwarf_initialize): Remove.
523 * internal.h (backtrace_dwarf_initialize): Don't declare.
524 (backtrace_dwarf_add): Declare.
525 * configure, config.h.in: Rebuild.
527 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
529 * btest.c (f23): Avoid uninitialized variable warning.
531 2012-10-04 Ian Lance Taylor <iant@google.com>
533 * dwarf.c: If the system header files do not declare strnlen,
534 provide our own version.
536 2012-10-03 Ian Lance Taylor <iant@google.com>
538 * dwarf.c (read_uleb128): Fix overflow test.
539 (read_sleb128): Likewise.
540 (build_address_map): Don't change unit_buf.start.
542 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
545 * configure.ac (EXTRA_FLAGS): New.
546 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
547 * configure, Makefile.in: Regenerate.
549 2012-09-29 Ian Lance Taylor <iant@google.com>
552 * fileline.c (fileline_initialize): Pass errnum as -1 when
553 reporting that we could not read executable information after a
556 2012-09-27 Ian Lance Taylor <iant@google.com>
559 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
560 * Makefile.am: Add dependencies for all objects.
561 * configure, aclocal.m4, Makefile.in: Rebuild.
563 2012-09-27 Ian Lance Taylor <iant@google.com>
566 * elf.c (backtrace_initialize): Set *fileln_fn, not
569 2012-09-19 Ian Lance Taylor <iant@google.com>
571 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
573 * configure: Rebuild.
575 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
576 Ian Lance Taylor <iant@google.com>
578 * configure.ac (GCC_HEADER_STDINT): Invoke.
579 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
580 * btest.c: Don't include <stdint.h>.
582 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
584 2012-09-18 Ian Lance Taylor <iant@google.com>
587 * Makefile.am (AM_CPPFLAGS): Define.
588 (AM_CFLAGS): Remove -I options.
589 * Makefile.in: Rebuild.
591 2012-09-18 Ian Lance Taylor <iant@google.com>
593 * posix.c (O_BINARY): Define if not defined.
594 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
595 HAVE_FCNTL is defined.
596 * configure.ac: Test for the fcntl function.
597 * configure, config.h.in: Rebuild.
599 2012-09-18 Ian Lance Taylor <iant@google.com>
601 * btest.c (test1, test2, test3, test4): Add the unused attribute.
603 2012-09-18 Ian Lance Taylor <iant@google.com>
605 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
607 2012-09-18 Ian Lance Taylor <iant@google.com>
609 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
610 * mmapio.c: Don't define _GNU_SOURCE.
611 * configure, config.h.in: Rebuild.
613 2012-09-18 Ian Lance Taylor <iant@google.com>
615 * configure.ac: Check whether strnlen is declared.
616 * dwarf.c: Declare strnlen if not declared.
617 * configure, config.h.in: Rebuild.
619 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
621 * fileline.c: Include <stdlib.h>.
624 2012-09-17 Ian Lance Taylor <iant@google.com>
627 * nounwind.c (backtrace_full): Rename from backtrace. Add state
630 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
633 * nounwind.c (backtrace_simple): Add state parameter.
635 2012-09-17 Ian Lance Taylor <iant@google.com>
638 * unknown.c (unknown_fileline): Add state parameter, remove
639 fileline_data parameter, name error_callback parameter.
640 (backtrace_initialize): Add state parameter.
642 2012-09-17 Ian Lance Taylor <iant@google.com>
644 * Initial implementation.
646 Copyright (C) 2012-2017 Free Software Foundation, Inc.
648 Copying and distribution of this file, with or without modification,
649 are permitted in any medium without royalty provided the copyright
650 notice and this notice are preserved.