1 2017-07-28 Tony Reix <tony.reix@atos.net>
3 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
5 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7 * fileline.c (fileline_initialize): Print pid_t as long.
9 2017-07-26 Tony Reix <tony.reix@atos.net>
11 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
12 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
13 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
14 * configure, config.h.in: Regenerate.
16 2017-07-21 Tony Reix <tony.reix@atos.net>
18 * filetype.awk: Add AIX XCOFF type detection.
19 * configure.ac: Recognize xcoff format.
20 * Makefile.am (FORMAT_FILES): Add xcoff.c.
21 * fileline.c: Include <unistd.h>.
22 (fileline_initialize): Add case for AIX procfs.
24 * configure, Makefile.in: Rebuild.
26 2017-06-21 Richard Biener <rguenther@suse.de>
28 * configure.ac: Add AC_SYS_LARGEFILE.
29 * config.h.in: Regenerate.
30 * configure: Likewise.
32 2017-06-11 Ian Lance Taylor <iant@golang.org>
34 * elf.c (backtrace_initialize): Always set *fileline_fn.
36 * btest.c: Move support functions into testlib.c. Change calls to
37 check to pass file name.
38 * testlib.c: New file, copied from (part of) btest.c.
39 * testlib.h: New file, declarations for testlib.c.
40 * edtest.c: Use testlib.h and testlib.c.
41 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
42 * Makefile.am (btest_SOURCES): Add testlib.c.
43 (edtest_SOURCES): Likewise.
44 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
45 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
46 * configure, Makefile.in: Rebuild.
48 2017-05-19 Than McIntosh <thanm@google.com>
50 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
51 (read_line_header): Don't allocate dirs if dirs_count == 0.
53 * edtest2.c: New file.
54 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
55 (check_PROGRAMS): Add edtest.
56 (edtest2_build.c, gen_edtest2_build): New targets.
57 * Makefile.in: Rebuild.
59 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
61 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
62 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
64 2017-01-01 Jakub Jelinek <jakub@redhat.com>
66 Update copyright years.
68 2016-11-15 Matthias Klose <doko@ubuntu.com>
70 * configure: Regenerate.
72 2016-09-11 Carlos Liam <carlos@aarzee.me>
74 * all: Remove meaningless trailing whitespace.
76 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
79 * elf.c (phdr_callback) [__i386__]: Add
80 __attribute__((__force_align_arg_pointer__)).
82 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
84 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
86 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
87 missing debug info anymore.
89 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
91 * mmap.c (MAP_FAILED): Define if not defined.
93 2016-01-04 Jakub Jelinek <jakub@redhat.com>
95 Update copyright years.
97 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
99 * configure.ac: Specify that DJGPP do not have mmap
100 even when sys/mman.h exists.
101 * configure: Regenerate
103 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
106 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
107 * configure: Regenerate.
108 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
111 2015-09-17 Ian Lance Taylor <iant@google.com>
113 * posix.c (backtrace_open): Cast second argument of open() to int.
115 2015-09-11 Ian Lance Taylor <iant@google.com>
117 * Makefile.am (backtrace.lo): Depend on internal.h.
118 (sort.lo, stest.lo): Add explicit dependencies.
119 * Makefile.in: Rebuild.
121 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
123 * backtrace.c: #include <sys/types.h>.
125 2015-09-08 Ian Lance Taylor <iant@google.com>
128 * backtrace.c: #include "internal.h".
129 (struct backtrace_data): Add can_alloc field.
130 (unwind): If can_alloc is false, don't try to get file/line
132 (backtrace_full): Set can_alloc field in bdata.
133 * alloc.c (backtrace_alloc): Don't call error_callback if it is
135 * mmap.c (backtrace_alloc): Likewise.
136 * internal.h: Update comments for backtrace_alloc and
139 2015-09-08 Ian Lance Taylor <iant@google.com>
142 * mmap.c (backtrace_alloc): Correct test for mmap failure.
144 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
146 * configure.ac: For spu-*-* targets, set have_fcntl to no.
147 * configure: Regenerate.
149 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
151 * configure.ac: Remove [disable-shared] argument to LT_INIT.
152 Remove setting PIC_FLAG when building as target library.
153 * configure: Regenerate.
155 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
157 * configure.ac: Only compile with -fPIC if the target
159 * configure: Regenerate.
161 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
163 * configure.ac: Set have_mmap to no on spu-*-* targets.
164 * configure: Regenerate.
166 2015-08-13 Ian Lance Taylor <iant@google.com>
168 * dwarf.c (read_function_entry): Add vec_inlined parameter.
171 2015-06-11 Martin Sebor <msebor@redhat.com>
174 * dwarf.c (struct line): Add new field idx.
175 (line_compare): Use it.
177 (read_line_info): Reset it.
179 2015-05-29 Tristan Gingold <gingold@adacore.com>
181 * pecoff.c: New file.
182 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
183 * Makefile.in: Regenerate.
184 * filetype.awk: Detect pecoff.
185 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
187 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
189 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
190 * configure: Regenerate.
191 * pecoff.c: New file.
193 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
195 * Makefile.in: Regenerated with automake-1.11.6.
196 * aclocal.m4: Likewise.
197 * configure: Likewise.
199 2015-01-24 Matthias Klose <doko@ubuntu.com>
201 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
202 * configure: Regenerate.
204 2015-01-05 Jakub Jelinek <jakub@redhat.com>
206 Update copyright years.
208 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
211 * configure: Regenerated.
213 2014-11-11 David Malcolm <dmalcolm@redhat.com>
215 * ChangeLog.jit: New.
217 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
220 * configure: Regenerate.
222 2014-10-23 Ian Lance Taylor <iant@google.com>
224 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
225 Fix to return void *.
227 2014-05-08 Ian Lance Taylor <iant@google.com>
229 * mmap.c (backtrace_free): If freeing a large aligned block of
230 memory, call munmap rather than holding onto it.
231 (backtrace_vector_grow): When growing a vector, double the number
232 of pages requested. When releasing the old version of a grown
233 vector, pass the correct size to backtrace_free.
235 2014-03-07 Ian Lance Taylor <iant@google.com>
237 * sort.c (backtrace_qsort): Use middle element as pivot.
239 2014-03-06 Ian Lance Taylor <iant@google.com>
243 * internal.h (backtrace_qsort): Declare.
244 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
245 (read_line_info, read_function_entry): Likewise.
246 (read_function_info, build_dwarf_data): Likewise.
247 * elf.c (elf_initialize_syminfo): Likewise.
248 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
249 (stest_SOURCES, stest_LDADD): Define.
250 (check_PROGRAMS): Add stest.
252 2014-02-07 Misty De Meo <misty@brew.sh>
255 * configure.ac: Use AC_LINK_IFELSE in check for
257 * configure: Regenerate.
259 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
261 Update copyright years
263 2013-12-06 Jakub Jelinek <jakub@redhat.com>
265 * elf.c (ET_DYN): Undefine and define again.
266 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
267 return early -1 without closing the descriptor.
268 (struct phdr_data): Add exe_descriptor.
269 (phdr_callback): If pd->exe_descriptor is not -1, for very first
270 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
271 otherwise backtrace_close the exe_descriptor if not -1. Adjust
273 (backtrace_initialize): Adjust call to elf_add. If it returns
274 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
276 2013-12-05 Ian Lance Taylor <iant@google.com>
278 * alloc.c (backtrace_vector_finish): Add error_callback and data
279 parameters. Call backtrace_vector_release. Return address base.
280 * mmap.c (backtrace_vector_finish): Add error_callback and data
281 parameters. Return address base.
282 * dwarf.c (read_function_info): Get new address base from
283 backtrace_vector_finish.
284 * internal.h (backtrace_vector_finish): Update declaration.
286 2013-11-27 Ian Lance Taylor <iant@google.com>
288 * dwarf.c (find_address_ranges): New static function, broken out
289 of build_address_map.
290 (build_address_map): Call it.
291 * btest.c (check): Check for missing filename or function, rather
293 (f3): Check that enough frames were returned.
295 2013-11-19 Jakub Jelinek <jakub@redhat.com>
297 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
298 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
300 * btest.c (struct symdata): Add size field.
301 (callback_three): Add symsize argument. Copy it to the data->size
303 (f23): Set symdata.size to 0.
304 (test5): Likewise. If sizeof (int) > 1, lookup address of
305 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
308 * atomic.c: Include sys/types.h.
310 2013-11-18 Ian Lance Taylor <iant@google.com>
312 * configure.ac: Check for support of __atomic extensions.
313 * internal.h: Declare or #define atomic functions for use in
315 * atomic.c: New file.
316 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
317 (dwarf_fileline, backtrace_dwarf_add): Likewise.
318 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
319 (backtrace_initialize): Likewise.
320 * fileline.c (fileline_initialize): Likewise.
321 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
322 * configure, config.h.in, Makefile.in: Rebuild.
324 2013-11-18 Jakub Jelinek <jakub@redhat.com>
326 * elf.c (SHN_UNDEF): Define.
327 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
328 with st_shndx == SHN_UNDEF. Add base_address to address fields.
329 (elf_add): Adjust caller.
331 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
333 2013-11-16 Ian Lance Taylor <iant@google.com>
335 * backtrace.h (backtrace_create_state): Correct comment about
338 2013-11-15 Ian Lance Taylor <iant@google.com>
340 * backtrace.h (backtrace_syminfo): Update comment and parameter
341 name to take any address, not just a PC value.
342 * elf.c (STT_OBJECT): Define.
343 (elf_nosyms): Rename parameter pc to addr.
344 (elf_symbol_search): Rename local variable pc to addr.
345 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
346 (elf_syminfo): Rename parameter pc to addr.
347 * btest.c (global): New global variable.
351 2013-10-17 Ian Lance Taylor <iant@google.com>
353 * elf.c (elf_add): Don't get the wrong offsets if a debug section
356 2013-10-15 David Malcolm <dmalcolm@redhat.com>
358 * configure.ac: Add --enable-host-shared, setting up
359 pre-existing PIC_FLAG variable within Makefile.am et al.
360 * configure: Regenerate.
362 2013-09-20 Alan Modra <amodra@gmail.com>
364 * configure: Regenerate.
366 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
368 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
370 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
372 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
373 dl_iterate_phdr callbacks.
375 2013-03-25 Ian Lance Taylor <iant@google.com>
377 * alloc.c: #include <sys/types.h>.
380 2013-01-31 Ian Lance Taylor <iant@google.com>
382 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
383 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
385 2013-01-25 Jakub Jelinek <jakub@redhat.com>
388 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
389 attribute was not seen.
391 2013-01-16 Ian Lance Taylor <iant@google.com>
393 * dwarf.c (struct unit): Add filename and abs_filename fields.
394 (build_address_map): Set new fields when reading unit.
395 (dwarf_lookup_pc): If we don't find an entry in the line table,
396 just return the main file name.
398 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
400 Update copyright years.
402 2013-01-01 Ian Lance Taylor <iant@google.com>
405 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
406 $(MULTIBUILDTOP)/../../gcc/include.
407 * Makefile.in: Rebuild.
409 2013-01-01 Ian Lance Taylor <iant@google.com>
412 * mmap.c (backtrace_alloc): Don't call sync functions if not
414 (backtrace_free): Likewise.
416 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
418 * mmapio.c: Define MAP_FAILED if not defined.
420 2012-12-11 Jakub Jelinek <jakub@redhat.com>
423 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
424 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
425 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
427 * Makefile.in: Regenerated.
428 * configure: Regenerated.
430 2012-12-07 Jakub Jelinek <jakub@redhat.com>
433 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
434 * Makefile.in: Regenerated.
436 2012-11-20 Ian Lance Taylor <iant@google.com>
438 * dwarf.c (read_attribute): Always clear val.
440 2012-11-13 Ian Lance Taylor <iant@google.com>
443 * configure.ac: Only add -Werror if building a target library.
444 * configure: Rebuild.
446 2012-11-12 Ian Lance Taylor <iant@google.com>
447 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
448 Gerald Pfeifer <gerald@pfeifer.com>
450 * configure.ac: Check for getexecname.
451 * fileline.c: #include <errno.h>. Define getexecname if not
453 (fileline_initialize): Try to find the executable in a few
455 * print.c (error_callback): Only print the filename if it came
456 from the backtrace state.
457 * configure, config.h.in: Rebuild.
459 2012-10-29 Ian Lance Taylor <iant@google.com>
461 * mmap.c (backtrace_vector_release): Correct last patch: add
464 2012-10-29 Ian Lance Taylor <iant@google.com>
466 * mmap.c (backtrace_vector_release): Make sure freed block is
467 aligned on 8-byte boundary.
469 2012-10-26 Ian Lance Taylor <iant@google.com>
472 * posix.c (backtrace_open): Add does_not_exist parameter.
473 * elf.c (phdr_callback): Do not warn if shared library could not
475 * fileline.c (fileline_initialize): Update calls to
477 * internal.h (backtrace_open): Update declaration.
479 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
482 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
483 * configure: Regenerate.
485 2012-10-24 Ian Lance Taylor <iant@google.com>
488 * configure.ac: Check whether -funwind-tables option works.
489 * configure: Rebuild.
491 2012-10-11 Ian Lance Taylor <iant@google.com>
493 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
494 * configure: Rebuild.
496 2012-10-10 Ian Lance Taylor <iant@google.com>
498 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
501 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
503 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
505 2012-10-09 Ian Lance Taylor <iant@google.com>
507 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
508 (backtrace_dwarf_add): Likewise.
510 2012-10-09 Ian Lance Taylor <iant@google.com>
512 Add support for tracing through shared libraries.
513 * configure.ac: Check for link.h and dl_iterate_phdr.
514 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
515 ELF macros before #defining them.
516 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
518 (struct elf_syminfo_data): Add next field.
519 (elf_initialize_syminfo): Initialize next field.
520 (elf_add_syminfo_data): New static function.
521 (elf_add): New static function, broken out of
522 backtrace_initialize. Call backtrace_dwarf_add instead of
523 backtrace_dwarf_initialize.
524 (struct phdr_data): Define.
525 (phdr_callback): New static function.
526 (backtrace_initialize): Call elf_add.
527 * dwarf.c (struct dwarf_data): Add next and base_address fields.
528 (add_unit_addr): Add base_address parameter. Change all callers.
529 (add_unit_ranges, build_address_map): Likewise.
530 (add_line): Add ddata parameter. Change all callers.
531 (read_line_program, add_function_range): Likewise.
532 (dwarf_lookup_pc): New static function, broken out of
534 (dwarf_fileline): Call dwarf_lookup_pc.
535 (build_dwarf_data): New static function.
536 (backtrace_dwarf_add): New function.
537 (backtrace_dwarf_initialize): Remove.
538 * internal.h (backtrace_dwarf_initialize): Don't declare.
539 (backtrace_dwarf_add): Declare.
540 * configure, config.h.in: Rebuild.
542 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
544 * btest.c (f23): Avoid uninitialized variable warning.
546 2012-10-04 Ian Lance Taylor <iant@google.com>
548 * dwarf.c: If the system header files do not declare strnlen,
549 provide our own version.
551 2012-10-03 Ian Lance Taylor <iant@google.com>
553 * dwarf.c (read_uleb128): Fix overflow test.
554 (read_sleb128): Likewise.
555 (build_address_map): Don't change unit_buf.start.
557 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
560 * configure.ac (EXTRA_FLAGS): New.
561 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
562 * configure, Makefile.in: Regenerate.
564 2012-09-29 Ian Lance Taylor <iant@google.com>
567 * fileline.c (fileline_initialize): Pass errnum as -1 when
568 reporting that we could not read executable information after a
571 2012-09-27 Ian Lance Taylor <iant@google.com>
574 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
575 * Makefile.am: Add dependencies for all objects.
576 * configure, aclocal.m4, Makefile.in: Rebuild.
578 2012-09-27 Ian Lance Taylor <iant@google.com>
581 * elf.c (backtrace_initialize): Set *fileln_fn, not
584 2012-09-19 Ian Lance Taylor <iant@google.com>
586 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
588 * configure: Rebuild.
590 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
591 Ian Lance Taylor <iant@google.com>
593 * configure.ac (GCC_HEADER_STDINT): Invoke.
594 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
595 * btest.c: Don't include <stdint.h>.
597 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
599 2012-09-18 Ian Lance Taylor <iant@google.com>
602 * Makefile.am (AM_CPPFLAGS): Define.
603 (AM_CFLAGS): Remove -I options.
604 * Makefile.in: Rebuild.
606 2012-09-18 Ian Lance Taylor <iant@google.com>
608 * posix.c (O_BINARY): Define if not defined.
609 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
610 HAVE_FCNTL is defined.
611 * configure.ac: Test for the fcntl function.
612 * configure, config.h.in: Rebuild.
614 2012-09-18 Ian Lance Taylor <iant@google.com>
616 * btest.c (test1, test2, test3, test4): Add the unused attribute.
618 2012-09-18 Ian Lance Taylor <iant@google.com>
620 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
622 2012-09-18 Ian Lance Taylor <iant@google.com>
624 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
625 * mmapio.c: Don't define _GNU_SOURCE.
626 * configure, config.h.in: Rebuild.
628 2012-09-18 Ian Lance Taylor <iant@google.com>
630 * configure.ac: Check whether strnlen is declared.
631 * dwarf.c: Declare strnlen if not declared.
632 * configure, config.h.in: Rebuild.
634 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
636 * fileline.c: Include <stdlib.h>.
639 2012-09-17 Ian Lance Taylor <iant@google.com>
642 * nounwind.c (backtrace_full): Rename from backtrace. Add state
645 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
648 * nounwind.c (backtrace_simple): Add state parameter.
650 2012-09-17 Ian Lance Taylor <iant@google.com>
653 * unknown.c (unknown_fileline): Add state parameter, remove
654 fileline_data parameter, name error_callback parameter.
655 (backtrace_initialize): Add state parameter.
657 2012-09-17 Ian Lance Taylor <iant@google.com>
659 * Initial implementation.
661 Copyright (C) 2012-2017 Free Software Foundation, Inc.
663 Copying and distribution of this file, with or without modification,
664 are permitted in any medium without royalty provided the copyright
665 notice and this notice are preserved.