1 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3 Update copyright years.
5 2016-11-15 Matthias Klose <doko@ubuntu.com>
7 * configure: Regenerate.
9 2016-09-11 Carlos Liam <carlos@aarzee.me>
11 * all: Remove meaningless trailing whitespace.
13 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
16 * elf.c (phdr_callback) [__i386__]: Add
17 __attribute__((__force_align_arg_pointer__)).
19 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
21 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
23 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
24 missing debug info anymore.
26 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
28 * mmap.c (MAP_FAILED): Define if not defined.
30 2016-01-04 Jakub Jelinek <jakub@redhat.com>
32 Update copyright years.
34 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
36 * configure.ac: Specify that DJGPP do not have mmap
37 even when sys/mman.h exists.
38 * configure: Regenerate
40 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
43 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
44 * configure: Regenerate.
45 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
48 2015-09-17 Ian Lance Taylor <iant@google.com>
50 * posix.c (backtrace_open): Cast second argument of open() to int.
52 2015-09-11 Ian Lance Taylor <iant@google.com>
54 * Makefile.am (backtrace.lo): Depend on internal.h.
55 (sort.lo, stest.lo): Add explicit dependencies.
56 * Makefile.in: Rebuild.
58 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
60 * backtrace.c: #include <sys/types.h>.
62 2015-09-08 Ian Lance Taylor <iant@google.com>
65 * backtrace.c: #include "internal.h".
66 (struct backtrace_data): Add can_alloc field.
67 (unwind): If can_alloc is false, don't try to get file/line
69 (backtrace_full): Set can_alloc field in bdata.
70 * alloc.c (backtrace_alloc): Don't call error_callback if it is
72 * mmap.c (backtrace_alloc): Likewise.
73 * internal.h: Update comments for backtrace_alloc and
76 2015-09-08 Ian Lance Taylor <iant@google.com>
79 * mmap.c (backtrace_alloc): Correct test for mmap failure.
81 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
83 * configure.ac: For spu-*-* targets, set have_fcntl to no.
84 * configure: Regenerate.
86 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
88 * configure.ac: Remove [disable-shared] argument to LT_INIT.
89 Remove setting PIC_FLAG when building as target library.
90 * configure: Regenerate.
92 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
94 * configure.ac: Only compile with -fPIC if the target
96 * configure: Regenerate.
98 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
100 * configure.ac: Set have_mmap to no on spu-*-* targets.
101 * configure: Regenerate.
103 2015-08-13 Ian Lance Taylor <iant@google.com>
105 * dwarf.c (read_function_entry): Add vec_inlined parameter.
108 2015-06-11 Martin Sebor <msebor@redhat.com>
111 * dwarf.c (struct line): Add new field idx.
112 (line_compare): Use it.
114 (read_line_info): Reset it.
116 2015-05-29 Tristan Gingold <gingold@adacore.com>
118 * pecoff.c: New file.
119 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
120 * Makefile.in: Regenerate.
121 * filetype.awk: Detect pecoff.
122 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
124 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
126 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
127 * configure: Regenerate.
128 * pecoff.c: New file.
130 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
132 * Makefile.in: Regenerated with automake-1.11.6.
133 * aclocal.m4: Likewise.
134 * configure: Likewise.
136 2015-01-24 Matthias Klose <doko@ubuntu.com>
138 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
139 * configure: Regenerate.
141 2015-01-05 Jakub Jelinek <jakub@redhat.com>
143 Update copyright years.
145 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
148 * configure: Regenerated.
150 2014-11-11 David Malcolm <dmalcolm@redhat.com>
152 * ChangeLog.jit: New.
154 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
157 * configure: Regenerate.
159 2014-10-23 Ian Lance Taylor <iant@google.com>
161 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
162 Fix to return void *.
164 2014-05-08 Ian Lance Taylor <iant@google.com>
166 * mmap.c (backtrace_free): If freeing a large aligned block of
167 memory, call munmap rather than holding onto it.
168 (backtrace_vector_grow): When growing a vector, double the number
169 of pages requested. When releasing the old version of a grown
170 vector, pass the correct size to backtrace_free.
172 2014-03-07 Ian Lance Taylor <iant@google.com>
174 * sort.c (backtrace_qsort): Use middle element as pivot.
176 2014-03-06 Ian Lance Taylor <iant@google.com>
180 * internal.h (backtrace_qsort): Declare.
181 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
182 (read_line_info, read_function_entry): Likewise.
183 (read_function_info, build_dwarf_data): Likewise.
184 * elf.c (elf_initialize_syminfo): Likewise.
185 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
186 (stest_SOURCES, stest_LDADD): Define.
187 (check_PROGRAMS): Add stest.
189 2014-02-07 Misty De Meo <misty@brew.sh>
192 * configure.ac: Use AC_LINK_IFELSE in check for
194 * configure: Regenerate.
196 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
198 Update copyright years
200 2013-12-06 Jakub Jelinek <jakub@redhat.com>
202 * elf.c (ET_DYN): Undefine and define again.
203 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
204 return early -1 without closing the descriptor.
205 (struct phdr_data): Add exe_descriptor.
206 (phdr_callback): If pd->exe_descriptor is not -1, for very first
207 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
208 otherwise backtrace_close the exe_descriptor if not -1. Adjust
210 (backtrace_initialize): Adjust call to elf_add. If it returns
211 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
213 2013-12-05 Ian Lance Taylor <iant@google.com>
215 * alloc.c (backtrace_vector_finish): Add error_callback and data
216 parameters. Call backtrace_vector_release. Return address base.
217 * mmap.c (backtrace_vector_finish): Add error_callback and data
218 parameters. Return address base.
219 * dwarf.c (read_function_info): Get new address base from
220 backtrace_vector_finish.
221 * internal.h (backtrace_vector_finish): Update declaration.
223 2013-11-27 Ian Lance Taylor <iant@google.com>
225 * dwarf.c (find_address_ranges): New static function, broken out
226 of build_address_map.
227 (build_address_map): Call it.
228 * btest.c (check): Check for missing filename or function, rather
230 (f3): Check that enough frames were returned.
232 2013-11-19 Jakub Jelinek <jakub@redhat.com>
234 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
235 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
237 * btest.c (struct symdata): Add size field.
238 (callback_three): Add symsize argument. Copy it to the data->size
240 (f23): Set symdata.size to 0.
241 (test5): Likewise. If sizeof (int) > 1, lookup address of
242 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
245 * atomic.c: Include sys/types.h.
247 2013-11-18 Ian Lance Taylor <iant@google.com>
249 * configure.ac: Check for support of __atomic extensions.
250 * internal.h: Declare or #define atomic functions for use in
252 * atomic.c: New file.
253 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
254 (dwarf_fileline, backtrace_dwarf_add): Likewise.
255 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
256 (backtrace_initialize): Likewise.
257 * fileline.c (fileline_initialize): Likewise.
258 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
259 * configure, config.h.in, Makefile.in: Rebuild.
261 2013-11-18 Jakub Jelinek <jakub@redhat.com>
263 * elf.c (SHN_UNDEF): Define.
264 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
265 with st_shndx == SHN_UNDEF. Add base_address to address fields.
266 (elf_add): Adjust caller.
268 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
270 2013-11-16 Ian Lance Taylor <iant@google.com>
272 * backtrace.h (backtrace_create_state): Correct comment about
275 2013-11-15 Ian Lance Taylor <iant@google.com>
277 * backtrace.h (backtrace_syminfo): Update comment and parameter
278 name to take any address, not just a PC value.
279 * elf.c (STT_OBJECT): Define.
280 (elf_nosyms): Rename parameter pc to addr.
281 (elf_symbol_search): Rename local variable pc to addr.
282 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
283 (elf_syminfo): Rename parameter pc to addr.
284 * btest.c (global): New global variable.
288 2013-10-17 Ian Lance Taylor <iant@google.com>
290 * elf.c (elf_add): Don't get the wrong offsets if a debug section
293 2013-10-15 David Malcolm <dmalcolm@redhat.com>
295 * configure.ac: Add --enable-host-shared, setting up
296 pre-existing PIC_FLAG variable within Makefile.am et al.
297 * configure: Regenerate.
299 2013-09-20 Alan Modra <amodra@gmail.com>
301 * configure: Regenerate.
303 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
305 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
307 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
309 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
310 dl_iterate_phdr callbacks.
312 2013-03-25 Ian Lance Taylor <iant@google.com>
314 * alloc.c: #include <sys/types.h>.
317 2013-01-31 Ian Lance Taylor <iant@google.com>
319 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
320 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
322 2013-01-25 Jakub Jelinek <jakub@redhat.com>
325 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
326 attribute was not seen.
328 2013-01-16 Ian Lance Taylor <iant@google.com>
330 * dwarf.c (struct unit): Add filename and abs_filename fields.
331 (build_address_map): Set new fields when reading unit.
332 (dwarf_lookup_pc): If we don't find an entry in the line table,
333 just return the main file name.
335 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
337 Update copyright years.
339 2013-01-01 Ian Lance Taylor <iant@google.com>
342 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
343 $(MULTIBUILDTOP)/../../gcc/include.
344 * Makefile.in: Rebuild.
346 2013-01-01 Ian Lance Taylor <iant@google.com>
349 * mmap.c (backtrace_alloc): Don't call sync functions if not
351 (backtrace_free): Likewise.
353 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
355 * mmapio.c: Define MAP_FAILED if not defined.
357 2012-12-11 Jakub Jelinek <jakub@redhat.com>
360 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
361 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
362 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
364 * Makefile.in: Regenerated.
365 * configure: Regenerated.
367 2012-12-07 Jakub Jelinek <jakub@redhat.com>
370 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
371 * Makefile.in: Regenerated.
373 2012-11-20 Ian Lance Taylor <iant@google.com>
375 * dwarf.c (read_attribute): Always clear val.
377 2012-11-13 Ian Lance Taylor <iant@google.com>
380 * configure.ac: Only add -Werror if building a target library.
381 * configure: Rebuild.
383 2012-11-12 Ian Lance Taylor <iant@google.com>
384 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
385 Gerald Pfeifer <gerald@pfeifer.com>
387 * configure.ac: Check for getexecname.
388 * fileline.c: #include <errno.h>. Define getexecname if not
390 (fileline_initialize): Try to find the executable in a few
392 * print.c (error_callback): Only print the filename if it came
393 from the backtrace state.
394 * configure, config.h.in: Rebuild.
396 2012-10-29 Ian Lance Taylor <iant@google.com>
398 * mmap.c (backtrace_vector_release): Correct last patch: add
401 2012-10-29 Ian Lance Taylor <iant@google.com>
403 * mmap.c (backtrace_vector_release): Make sure freed block is
404 aligned on 8-byte boundary.
406 2012-10-26 Ian Lance Taylor <iant@google.com>
409 * posix.c (backtrace_open): Add does_not_exist parameter.
410 * elf.c (phdr_callback): Do not warn if shared library could not
412 * fileline.c (fileline_initialize): Update calls to
414 * internal.h (backtrace_open): Update declaration.
416 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
419 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
420 * configure: Regenerate.
422 2012-10-24 Ian Lance Taylor <iant@google.com>
425 * configure.ac: Check whether -funwind-tables option works.
426 * configure: Rebuild.
428 2012-10-11 Ian Lance Taylor <iant@google.com>
430 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
431 * configure: Rebuild.
433 2012-10-10 Ian Lance Taylor <iant@google.com>
435 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
438 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
440 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
442 2012-10-09 Ian Lance Taylor <iant@google.com>
444 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
445 (backtrace_dwarf_add): Likewise.
447 2012-10-09 Ian Lance Taylor <iant@google.com>
449 Add support for tracing through shared libraries.
450 * configure.ac: Check for link.h and dl_iterate_phdr.
451 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
452 ELF macros before #defining them.
453 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
455 (struct elf_syminfo_data): Add next field.
456 (elf_initialize_syminfo): Initialize next field.
457 (elf_add_syminfo_data): New static function.
458 (elf_add): New static function, broken out of
459 backtrace_initialize. Call backtrace_dwarf_add instead of
460 backtrace_dwarf_initialize.
461 (struct phdr_data): Define.
462 (phdr_callback): New static function.
463 (backtrace_initialize): Call elf_add.
464 * dwarf.c (struct dwarf_data): Add next and base_address fields.
465 (add_unit_addr): Add base_address parameter. Change all callers.
466 (add_unit_ranges, build_address_map): Likewise.
467 (add_line): Add ddata parameter. Change all callers.
468 (read_line_program, add_function_range): Likewise.
469 (dwarf_lookup_pc): New static function, broken out of
471 (dwarf_fileline): Call dwarf_lookup_pc.
472 (build_dwarf_data): New static function.
473 (backtrace_dwarf_add): New function.
474 (backtrace_dwarf_initialize): Remove.
475 * internal.h (backtrace_dwarf_initialize): Don't declare.
476 (backtrace_dwarf_add): Declare.
477 * configure, config.h.in: Rebuild.
479 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
481 * btest.c (f23): Avoid uninitialized variable warning.
483 2012-10-04 Ian Lance Taylor <iant@google.com>
485 * dwarf.c: If the system header files do not declare strnlen,
486 provide our own version.
488 2012-10-03 Ian Lance Taylor <iant@google.com>
490 * dwarf.c (read_uleb128): Fix overflow test.
491 (read_sleb128): Likewise.
492 (build_address_map): Don't change unit_buf.start.
494 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
497 * configure.ac (EXTRA_FLAGS): New.
498 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
499 * configure, Makefile.in: Regenerate.
501 2012-09-29 Ian Lance Taylor <iant@google.com>
504 * fileline.c (fileline_initialize): Pass errnum as -1 when
505 reporting that we could not read executable information after a
508 2012-09-27 Ian Lance Taylor <iant@google.com>
511 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
512 * Makefile.am: Add dependencies for all objects.
513 * configure, aclocal.m4, Makefile.in: Rebuild.
515 2012-09-27 Ian Lance Taylor <iant@google.com>
518 * elf.c (backtrace_initialize): Set *fileln_fn, not
521 2012-09-19 Ian Lance Taylor <iant@google.com>
523 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
525 * configure: Rebuild.
527 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
528 Ian Lance Taylor <iant@google.com>
530 * configure.ac (GCC_HEADER_STDINT): Invoke.
531 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
532 * btest.c: Don't include <stdint.h>.
534 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
536 2012-09-18 Ian Lance Taylor <iant@google.com>
539 * Makefile.am (AM_CPPFLAGS): Define.
540 (AM_CFLAGS): Remove -I options.
541 * Makefile.in: Rebuild.
543 2012-09-18 Ian Lance Taylor <iant@google.com>
545 * posix.c (O_BINARY): Define if not defined.
546 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
547 HAVE_FCNTL is defined.
548 * configure.ac: Test for the fcntl function.
549 * configure, config.h.in: Rebuild.
551 2012-09-18 Ian Lance Taylor <iant@google.com>
553 * btest.c (test1, test2, test3, test4): Add the unused attribute.
555 2012-09-18 Ian Lance Taylor <iant@google.com>
557 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
559 2012-09-18 Ian Lance Taylor <iant@google.com>
561 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
562 * mmapio.c: Don't define _GNU_SOURCE.
563 * configure, config.h.in: Rebuild.
565 2012-09-18 Ian Lance Taylor <iant@google.com>
567 * configure.ac: Check whether strnlen is declared.
568 * dwarf.c: Declare strnlen if not declared.
569 * configure, config.h.in: Rebuild.
571 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
573 * fileline.c: Include <stdlib.h>.
576 2012-09-17 Ian Lance Taylor <iant@google.com>
579 * nounwind.c (backtrace_full): Rename from backtrace. Add state
582 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
585 * nounwind.c (backtrace_simple): Add state parameter.
587 2012-09-17 Ian Lance Taylor <iant@google.com>
590 * unknown.c (unknown_fileline): Add state parameter, remove
591 fileline_data parameter, name error_callback parameter.
592 (backtrace_initialize): Add state parameter.
594 2012-09-17 Ian Lance Taylor <iant@google.com>
596 * Initial implementation.
598 Copyright (C) 2012-2017 Free Software Foundation, Inc.
600 Copying and distribution of this file, with or without modification,
601 are permitted in any medium without royalty provided the copyright
602 notice and this notice are preserved.