1 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3 * fileline.c (fileline_initialize): Print pid_t as long.
5 2017-07-26 Tony Reix <tony.reix@atos.net>
7 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
8 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
9 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
10 * configure, config.h.in: Regenerate.
12 2017-07-21 Tony Reix <tony.reix@atos.net>
14 * filetype.awk: Add AIX XCOFF type detection.
15 * configure.ac: Recognize xcoff format.
16 * Makefile.am (FORMAT_FILES): Add xcoff.c.
17 * fileline.c: Include <unistd.h>.
18 (fileline_initialize): Add case for AIX procfs.
20 * configure, Makefile.in: Rebuild.
22 2017-06-21 Richard Biener <rguenther@suse.de>
24 * configure.ac: Add AC_SYS_LARGEFILE.
25 * config.h.in: Regenerate.
26 * configure: Likewise.
28 2017-06-11 Ian Lance Taylor <iant@golang.org>
30 * elf.c (backtrace_initialize): Always set *fileline_fn.
32 * btest.c: Move support functions into testlib.c. Change calls to
33 check to pass file name.
34 * testlib.c: New file, copied from (part of) btest.c.
35 * testlib.h: New file, declarations for testlib.c.
36 * edtest.c: Use testlib.h and testlib.c.
37 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
38 * Makefile.am (btest_SOURCES): Add testlib.c.
39 (edtest_SOURCES): Likewise.
40 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
41 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
42 * configure, Makefile.in: Rebuild.
44 2017-05-19 Than McIntosh <thanm@google.com>
46 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
47 (read_line_header): Don't allocate dirs if dirs_count == 0.
49 * edtest2.c: New file.
50 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
51 (check_PROGRAMS): Add edtest.
52 (edtest2_build.c, gen_edtest2_build): New targets.
53 * Makefile.in: Rebuild.
55 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
57 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
58 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
60 2017-01-01 Jakub Jelinek <jakub@redhat.com>
62 Update copyright years.
64 2016-11-15 Matthias Klose <doko@ubuntu.com>
66 * configure: Regenerate.
68 2016-09-11 Carlos Liam <carlos@aarzee.me>
70 * all: Remove meaningless trailing whitespace.
72 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
75 * elf.c (phdr_callback) [__i386__]: Add
76 __attribute__((__force_align_arg_pointer__)).
78 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
80 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
82 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
83 missing debug info anymore.
85 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
87 * mmap.c (MAP_FAILED): Define if not defined.
89 2016-01-04 Jakub Jelinek <jakub@redhat.com>
91 Update copyright years.
93 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
95 * configure.ac: Specify that DJGPP do not have mmap
96 even when sys/mman.h exists.
97 * configure: Regenerate
99 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
102 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
103 * configure: Regenerate.
104 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
107 2015-09-17 Ian Lance Taylor <iant@google.com>
109 * posix.c (backtrace_open): Cast second argument of open() to int.
111 2015-09-11 Ian Lance Taylor <iant@google.com>
113 * Makefile.am (backtrace.lo): Depend on internal.h.
114 (sort.lo, stest.lo): Add explicit dependencies.
115 * Makefile.in: Rebuild.
117 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
119 * backtrace.c: #include <sys/types.h>.
121 2015-09-08 Ian Lance Taylor <iant@google.com>
124 * backtrace.c: #include "internal.h".
125 (struct backtrace_data): Add can_alloc field.
126 (unwind): If can_alloc is false, don't try to get file/line
128 (backtrace_full): Set can_alloc field in bdata.
129 * alloc.c (backtrace_alloc): Don't call error_callback if it is
131 * mmap.c (backtrace_alloc): Likewise.
132 * internal.h: Update comments for backtrace_alloc and
135 2015-09-08 Ian Lance Taylor <iant@google.com>
138 * mmap.c (backtrace_alloc): Correct test for mmap failure.
140 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
142 * configure.ac: For spu-*-* targets, set have_fcntl to no.
143 * configure: Regenerate.
145 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
147 * configure.ac: Remove [disable-shared] argument to LT_INIT.
148 Remove setting PIC_FLAG when building as target library.
149 * configure: Regenerate.
151 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
153 * configure.ac: Only compile with -fPIC if the target
155 * configure: Regenerate.
157 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
159 * configure.ac: Set have_mmap to no on spu-*-* targets.
160 * configure: Regenerate.
162 2015-08-13 Ian Lance Taylor <iant@google.com>
164 * dwarf.c (read_function_entry): Add vec_inlined parameter.
167 2015-06-11 Martin Sebor <msebor@redhat.com>
170 * dwarf.c (struct line): Add new field idx.
171 (line_compare): Use it.
173 (read_line_info): Reset it.
175 2015-05-29 Tristan Gingold <gingold@adacore.com>
177 * pecoff.c: New file.
178 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
179 * Makefile.in: Regenerate.
180 * filetype.awk: Detect pecoff.
181 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
183 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
185 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
186 * configure: Regenerate.
187 * pecoff.c: New file.
189 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
191 * Makefile.in: Regenerated with automake-1.11.6.
192 * aclocal.m4: Likewise.
193 * configure: Likewise.
195 2015-01-24 Matthias Klose <doko@ubuntu.com>
197 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
198 * configure: Regenerate.
200 2015-01-05 Jakub Jelinek <jakub@redhat.com>
202 Update copyright years.
204 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
207 * configure: Regenerated.
209 2014-11-11 David Malcolm <dmalcolm@redhat.com>
211 * ChangeLog.jit: New.
213 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
216 * configure: Regenerate.
218 2014-10-23 Ian Lance Taylor <iant@google.com>
220 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
221 Fix to return void *.
223 2014-05-08 Ian Lance Taylor <iant@google.com>
225 * mmap.c (backtrace_free): If freeing a large aligned block of
226 memory, call munmap rather than holding onto it.
227 (backtrace_vector_grow): When growing a vector, double the number
228 of pages requested. When releasing the old version of a grown
229 vector, pass the correct size to backtrace_free.
231 2014-03-07 Ian Lance Taylor <iant@google.com>
233 * sort.c (backtrace_qsort): Use middle element as pivot.
235 2014-03-06 Ian Lance Taylor <iant@google.com>
239 * internal.h (backtrace_qsort): Declare.
240 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
241 (read_line_info, read_function_entry): Likewise.
242 (read_function_info, build_dwarf_data): Likewise.
243 * elf.c (elf_initialize_syminfo): Likewise.
244 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
245 (stest_SOURCES, stest_LDADD): Define.
246 (check_PROGRAMS): Add stest.
248 2014-02-07 Misty De Meo <misty@brew.sh>
251 * configure.ac: Use AC_LINK_IFELSE in check for
253 * configure: Regenerate.
255 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
257 Update copyright years
259 2013-12-06 Jakub Jelinek <jakub@redhat.com>
261 * elf.c (ET_DYN): Undefine and define again.
262 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
263 return early -1 without closing the descriptor.
264 (struct phdr_data): Add exe_descriptor.
265 (phdr_callback): If pd->exe_descriptor is not -1, for very first
266 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
267 otherwise backtrace_close the exe_descriptor if not -1. Adjust
269 (backtrace_initialize): Adjust call to elf_add. If it returns
270 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
272 2013-12-05 Ian Lance Taylor <iant@google.com>
274 * alloc.c (backtrace_vector_finish): Add error_callback and data
275 parameters. Call backtrace_vector_release. Return address base.
276 * mmap.c (backtrace_vector_finish): Add error_callback and data
277 parameters. Return address base.
278 * dwarf.c (read_function_info): Get new address base from
279 backtrace_vector_finish.
280 * internal.h (backtrace_vector_finish): Update declaration.
282 2013-11-27 Ian Lance Taylor <iant@google.com>
284 * dwarf.c (find_address_ranges): New static function, broken out
285 of build_address_map.
286 (build_address_map): Call it.
287 * btest.c (check): Check for missing filename or function, rather
289 (f3): Check that enough frames were returned.
291 2013-11-19 Jakub Jelinek <jakub@redhat.com>
293 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
294 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
296 * btest.c (struct symdata): Add size field.
297 (callback_three): Add symsize argument. Copy it to the data->size
299 (f23): Set symdata.size to 0.
300 (test5): Likewise. If sizeof (int) > 1, lookup address of
301 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
304 * atomic.c: Include sys/types.h.
306 2013-11-18 Ian Lance Taylor <iant@google.com>
308 * configure.ac: Check for support of __atomic extensions.
309 * internal.h: Declare or #define atomic functions for use in
311 * atomic.c: New file.
312 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
313 (dwarf_fileline, backtrace_dwarf_add): Likewise.
314 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
315 (backtrace_initialize): Likewise.
316 * fileline.c (fileline_initialize): Likewise.
317 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
318 * configure, config.h.in, Makefile.in: Rebuild.
320 2013-11-18 Jakub Jelinek <jakub@redhat.com>
322 * elf.c (SHN_UNDEF): Define.
323 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
324 with st_shndx == SHN_UNDEF. Add base_address to address fields.
325 (elf_add): Adjust caller.
327 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
329 2013-11-16 Ian Lance Taylor <iant@google.com>
331 * backtrace.h (backtrace_create_state): Correct comment about
334 2013-11-15 Ian Lance Taylor <iant@google.com>
336 * backtrace.h (backtrace_syminfo): Update comment and parameter
337 name to take any address, not just a PC value.
338 * elf.c (STT_OBJECT): Define.
339 (elf_nosyms): Rename parameter pc to addr.
340 (elf_symbol_search): Rename local variable pc to addr.
341 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
342 (elf_syminfo): Rename parameter pc to addr.
343 * btest.c (global): New global variable.
347 2013-10-17 Ian Lance Taylor <iant@google.com>
349 * elf.c (elf_add): Don't get the wrong offsets if a debug section
352 2013-10-15 David Malcolm <dmalcolm@redhat.com>
354 * configure.ac: Add --enable-host-shared, setting up
355 pre-existing PIC_FLAG variable within Makefile.am et al.
356 * configure: Regenerate.
358 2013-09-20 Alan Modra <amodra@gmail.com>
360 * configure: Regenerate.
362 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
364 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
366 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
368 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
369 dl_iterate_phdr callbacks.
371 2013-03-25 Ian Lance Taylor <iant@google.com>
373 * alloc.c: #include <sys/types.h>.
376 2013-01-31 Ian Lance Taylor <iant@google.com>
378 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
379 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
381 2013-01-25 Jakub Jelinek <jakub@redhat.com>
384 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
385 attribute was not seen.
387 2013-01-16 Ian Lance Taylor <iant@google.com>
389 * dwarf.c (struct unit): Add filename and abs_filename fields.
390 (build_address_map): Set new fields when reading unit.
391 (dwarf_lookup_pc): If we don't find an entry in the line table,
392 just return the main file name.
394 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
396 Update copyright years.
398 2013-01-01 Ian Lance Taylor <iant@google.com>
401 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
402 $(MULTIBUILDTOP)/../../gcc/include.
403 * Makefile.in: Rebuild.
405 2013-01-01 Ian Lance Taylor <iant@google.com>
408 * mmap.c (backtrace_alloc): Don't call sync functions if not
410 (backtrace_free): Likewise.
412 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
414 * mmapio.c: Define MAP_FAILED if not defined.
416 2012-12-11 Jakub Jelinek <jakub@redhat.com>
419 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
420 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
421 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
423 * Makefile.in: Regenerated.
424 * configure: Regenerated.
426 2012-12-07 Jakub Jelinek <jakub@redhat.com>
429 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
430 * Makefile.in: Regenerated.
432 2012-11-20 Ian Lance Taylor <iant@google.com>
434 * dwarf.c (read_attribute): Always clear val.
436 2012-11-13 Ian Lance Taylor <iant@google.com>
439 * configure.ac: Only add -Werror if building a target library.
440 * configure: Rebuild.
442 2012-11-12 Ian Lance Taylor <iant@google.com>
443 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
444 Gerald Pfeifer <gerald@pfeifer.com>
446 * configure.ac: Check for getexecname.
447 * fileline.c: #include <errno.h>. Define getexecname if not
449 (fileline_initialize): Try to find the executable in a few
451 * print.c (error_callback): Only print the filename if it came
452 from the backtrace state.
453 * configure, config.h.in: Rebuild.
455 2012-10-29 Ian Lance Taylor <iant@google.com>
457 * mmap.c (backtrace_vector_release): Correct last patch: add
460 2012-10-29 Ian Lance Taylor <iant@google.com>
462 * mmap.c (backtrace_vector_release): Make sure freed block is
463 aligned on 8-byte boundary.
465 2012-10-26 Ian Lance Taylor <iant@google.com>
468 * posix.c (backtrace_open): Add does_not_exist parameter.
469 * elf.c (phdr_callback): Do not warn if shared library could not
471 * fileline.c (fileline_initialize): Update calls to
473 * internal.h (backtrace_open): Update declaration.
475 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
478 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
479 * configure: Regenerate.
481 2012-10-24 Ian Lance Taylor <iant@google.com>
484 * configure.ac: Check whether -funwind-tables option works.
485 * configure: Rebuild.
487 2012-10-11 Ian Lance Taylor <iant@google.com>
489 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
490 * configure: Rebuild.
492 2012-10-10 Ian Lance Taylor <iant@google.com>
494 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
497 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
499 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
501 2012-10-09 Ian Lance Taylor <iant@google.com>
503 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
504 (backtrace_dwarf_add): Likewise.
506 2012-10-09 Ian Lance Taylor <iant@google.com>
508 Add support for tracing through shared libraries.
509 * configure.ac: Check for link.h and dl_iterate_phdr.
510 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
511 ELF macros before #defining them.
512 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
514 (struct elf_syminfo_data): Add next field.
515 (elf_initialize_syminfo): Initialize next field.
516 (elf_add_syminfo_data): New static function.
517 (elf_add): New static function, broken out of
518 backtrace_initialize. Call backtrace_dwarf_add instead of
519 backtrace_dwarf_initialize.
520 (struct phdr_data): Define.
521 (phdr_callback): New static function.
522 (backtrace_initialize): Call elf_add.
523 * dwarf.c (struct dwarf_data): Add next and base_address fields.
524 (add_unit_addr): Add base_address parameter. Change all callers.
525 (add_unit_ranges, build_address_map): Likewise.
526 (add_line): Add ddata parameter. Change all callers.
527 (read_line_program, add_function_range): Likewise.
528 (dwarf_lookup_pc): New static function, broken out of
530 (dwarf_fileline): Call dwarf_lookup_pc.
531 (build_dwarf_data): New static function.
532 (backtrace_dwarf_add): New function.
533 (backtrace_dwarf_initialize): Remove.
534 * internal.h (backtrace_dwarf_initialize): Don't declare.
535 (backtrace_dwarf_add): Declare.
536 * configure, config.h.in: Rebuild.
538 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
540 * btest.c (f23): Avoid uninitialized variable warning.
542 2012-10-04 Ian Lance Taylor <iant@google.com>
544 * dwarf.c: If the system header files do not declare strnlen,
545 provide our own version.
547 2012-10-03 Ian Lance Taylor <iant@google.com>
549 * dwarf.c (read_uleb128): Fix overflow test.
550 (read_sleb128): Likewise.
551 (build_address_map): Don't change unit_buf.start.
553 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
556 * configure.ac (EXTRA_FLAGS): New.
557 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
558 * configure, Makefile.in: Regenerate.
560 2012-09-29 Ian Lance Taylor <iant@google.com>
563 * fileline.c (fileline_initialize): Pass errnum as -1 when
564 reporting that we could not read executable information after a
567 2012-09-27 Ian Lance Taylor <iant@google.com>
570 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
571 * Makefile.am: Add dependencies for all objects.
572 * configure, aclocal.m4, Makefile.in: Rebuild.
574 2012-09-27 Ian Lance Taylor <iant@google.com>
577 * elf.c (backtrace_initialize): Set *fileln_fn, not
580 2012-09-19 Ian Lance Taylor <iant@google.com>
582 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
584 * configure: Rebuild.
586 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
587 Ian Lance Taylor <iant@google.com>
589 * configure.ac (GCC_HEADER_STDINT): Invoke.
590 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
591 * btest.c: Don't include <stdint.h>.
593 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
595 2012-09-18 Ian Lance Taylor <iant@google.com>
598 * Makefile.am (AM_CPPFLAGS): Define.
599 (AM_CFLAGS): Remove -I options.
600 * Makefile.in: Rebuild.
602 2012-09-18 Ian Lance Taylor <iant@google.com>
604 * posix.c (O_BINARY): Define if not defined.
605 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
606 HAVE_FCNTL is defined.
607 * configure.ac: Test for the fcntl function.
608 * configure, config.h.in: Rebuild.
610 2012-09-18 Ian Lance Taylor <iant@google.com>
612 * btest.c (test1, test2, test3, test4): Add the unused attribute.
614 2012-09-18 Ian Lance Taylor <iant@google.com>
616 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
618 2012-09-18 Ian Lance Taylor <iant@google.com>
620 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
621 * mmapio.c: Don't define _GNU_SOURCE.
622 * configure, config.h.in: Rebuild.
624 2012-09-18 Ian Lance Taylor <iant@google.com>
626 * configure.ac: Check whether strnlen is declared.
627 * dwarf.c: Declare strnlen if not declared.
628 * configure, config.h.in: Rebuild.
630 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
632 * fileline.c: Include <stdlib.h>.
635 2012-09-17 Ian Lance Taylor <iant@google.com>
638 * nounwind.c (backtrace_full): Rename from backtrace. Add state
641 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
644 * nounwind.c (backtrace_simple): Add state parameter.
646 2012-09-17 Ian Lance Taylor <iant@google.com>
649 * unknown.c (unknown_fileline): Add state parameter, remove
650 fileline_data parameter, name error_callback parameter.
651 (backtrace_initialize): Add state parameter.
653 2012-09-17 Ian Lance Taylor <iant@google.com>
655 * Initial implementation.
657 Copyright (C) 2012-2017 Free Software Foundation, Inc.
659 Copying and distribution of this file, with or without modification,
660 are permitted in any medium without royalty provided the copyright
661 notice and this notice are preserved.