1 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3 Update copyright years.
5 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
7 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
9 * Makefile.in: Regenerate.
11 2018-12-28 Tom de Vries <tdevries@suse.de>
13 * dwarf.c (build_address_map): Reuse unused units.
15 2018-12-28 Tom de Vries <tdevries@suse.de>
17 * dwarf.c (build_address_map): Simplify by removing local variable
20 2018-12-28 Ian Lance Taylor <iant@golang.org>
21 Tom de Vries <tdevries@suse.de>
24 * dwarf.c (free_unit_addrs_vector): Remove.
25 (build_address_map): Keep track of allocated units in vector. Free
26 allocated units and corresponding abbrevs upon failure. Remove now
27 redundant call to free_unit_addrs_vector. Free addrs vector upon
28 failure. Free allocated unit vector.
30 2018-12-28 Tom de Vries <tdevries@suse.de>
32 * dwarf.c (build_address_map): Free addrs vector upon failure.
34 2018-12-14 Tom de Vries <tdevries@suse.de>
37 * allocfail.sh: Remove "set -o pipefail".
39 2018-12-12 Tom de Vries <tdevries@suse.de>
41 * Makefile.am (TESTS): Add allocfail.sh.
42 (check_PROGRAMS): Add allocfail.
43 * Makefile.in: Regenerate.
44 * instrumented_alloc.c: New file. Redefine malloc and realloc.
46 * allocfail.c: New file.
47 * allocfail.sh: New file.
49 2018-11-30 Tom de Vries <tdevries@suse.de>
51 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
52 test_xcoff_64, test_pecoff and test_unknown.
53 * Makefile.in: Regenerate.
54 * test_format.c: New file.
56 2018-11-30 Tom de Vries <tdevries@suse.de>
58 * Makefile.am : Add _with_alloc version for each test in
60 * Makefile.in: Regenerate.
62 2018-11-30 Tom de Vries <tdevries@suse.de>
64 * internal.h (backtrace_vector_free): New static inline fuction,
66 * dwarf.c (read_line_info): ... here.
68 2018-11-28 Tom de Vries <tdevries@suse.de>
70 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
73 2018-11-27 Tom de Vries <tdevries@suse.de>
75 * mmap.c (backtrace_vector_release): Same.
76 * unittest.c (test1): Add check.
78 2018-11-27 Tom de Vries <tdevries@suse.de>
80 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
82 * Makefile.am (check_PROGRAMS): Add unittest.
83 * Makefile.in: Regenerate.
84 * unittest.c: New file.
86 2018-11-22 Tom de Vries <tdevries@suse.de>
88 * dwarf.c (read_initial_length): Factor out of ...
89 (build_address_map, read_line_info): ... here.
91 2018-11-21 Tom de Vries <tdevries@suse.de>
93 * dwarf.c (read_string): Factor out of ...
94 (read_attribute, read_line_header, read_line_program): ... here.
96 2018-10-31 Joseph Myers <joseph@codesourcery.com>
99 * Makefile.am: Include multilib.am.
100 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
101 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
103 2018-10-05 Ian Lance Taylor <iant@golang.org>
105 PR libbacktrace/87529
106 * backtrace.h: Document that backtrace_create_state should be
109 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
111 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
112 * Makefile.in: Regenerate.
113 * config.h.in: Likewise.
114 * configure: Likewise.
116 2018-08-01 Tony Reix <tony.reix@atos.net>
118 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
119 (struct xcoff_func, struct xcoff_func_vector): New structs.
120 (xcoff_syminfo): Drop leading dot from symbol name.
121 (xcoff_line_compare, xcoff_line_search): Remove.
122 (xcoff_func_compare, xcoff_func_search): New static functions.
123 (xcoff_lookup_pc): Search function table.
124 (xcoff_add_line, xcoff_process_linenos): Remove.
125 (xcoff_initialize_fileline): Build function table.
127 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
130 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
131 checking up to 36 bytes.
133 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
135 * configure: Regenerated.
137 2018-04-19 Jakub Jelinek <jakub@redhat.com>
139 * configure: Regenerated.
141 2018-04-17 Ian Lance Taylor <iant@golang.org>
143 * backtrace.c: Revert last two changes. Don't call mmap
146 2018-04-17 Ian Lance Taylor <iant@golang.org>
148 * backtrace.c: Include backtrace-supported.h before checking
149 BACKTRACE_USES_MALLOC.
151 2018-04-17 Ian Lance Taylor <iant@golang.org>
153 * backtrace.c (backtrace_full): When testing whether we can
154 allocate memory, call mmap directly, and munmap the memory.
156 2018-04-04 Jakub Jelinek <jakub@redhat.com>
159 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
160 big endian, only use 32-bit loads if endianity macros are predefined
161 and indicate big or little endian.
163 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
166 * configure: Regenerate.
168 2018-02-15 Jakub Jelinek <jakub@redhat.com>
171 * elf.c (SHT_PROGBITS): Undefine and define.
173 2018-02-14 Jakub Jelinek <jakub@redhat.com>
176 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
177 (struct elf_ppc64_opd_data): New type.
178 (elf_initialize_syminfo): Add opd argument, handle symbols
179 pointing into the PowerPC64 ELFv1 .opd section.
180 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
181 to structure with .opd data to elf_initialize_syminfo.
183 2018-01-31 Ian Lance Taylor <iant@golang.org>
185 * elf.c (elf_add): Close descriptor if we use a debugfile.
186 * btest.c (check_open_files): New static function.
187 (main): Call check_open_files.
189 2018-01-25 Ian Lance Taylor <iant@golang.org>
191 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
193 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
195 2018-01-25 Ian Lance Taylor <iant@golang.org>
197 * pecoff.c (coff_add): Only release syms_view if it is valid.
199 2018-01-25 Ian Lance Taylor <iant@golang.org>
201 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
203 2018-01-24 Ian Lance Taylor <iant@golang.org>
205 * pecoff.c (coff_add): Use coff_read4, not memcpy.
207 2018-01-24 Ian Lance Taylor <iant@golang.org>
210 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
213 2018-01-19 Tony Reix <tony.reix@atos.net>
215 * xcoff.c (xcoff_incl_compare): New function.
216 (xcoff_incl_search): New function.
217 (xcoff_process_linenos): Use bsearch to find include file.
218 (xcoff_initialize_fileline): Sort include file information.
220 2018-01-16 Ian Lance Taylor <iant@golang.org>
222 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
224 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
225 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
226 (elf_zlib_default_table): Update.
227 (elf_zlib_default_dist_table): New static array.
228 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
230 * ztest.c (struct zlib_test): Add uncompressed_len.
231 (tests): Initialize uncompressed_len field. Add new test case.
232 (test_samples): Use uncompressed_len field.
234 2018-01-03 Jakub Jelinek <jakub@redhat.com>
236 Update copyright years.
238 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
240 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
241 * aclocal.m4: Regenerate.
242 * Makefile.in: Likewise.
243 * configure: Likewise.
245 2017-10-06 Ian Lance Taylor <iant@golang.org>
247 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
248 zlib uncompress function.
250 2017-10-05 Ian Lance Taylor <iant@golang.org>
252 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
253 Read a four byte integer.
254 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
255 boundary before ever calling elf_zlib_fetch.
256 * ztest.c (test_large): Simplify print statements a bit.
258 2017-10-02 Ian Lance Taylor <iant@golang.org>
260 * ztest.c: #include <errno.h>.
261 (TEST_TIMING): Don't define, don't test.
262 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
263 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
264 (ZLIB_CLOCK_GETTIME_ARG): Define.
265 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
266 * Makefile.am: Likewise.
267 * configure, Makefile.in: Rebuild.
269 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
272 * Makefile.am: Append the content of clock_gettime_link to
274 * configure.ac: Test for the case that clock_gettime is in librt.
275 * Makefile.in: Regenerate.
276 * configure: Likewise.
279 * configure.ac: Check for clock_gettime.
280 * config.h.in: Regenerate.
281 * configure: Likewise.
282 * ztest.c (average_time, test_large): Conditionalize test timing
283 on clock_gettime availability.
285 2017-09-29 Tony Reix <tony.reix@atos.net>
287 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
288 (STYP_DWARF, SSUBTYP_DW*): Define.
289 (enum dwarf_section): Define.
290 (struct dwsect_info): Define.
291 (xcoff_add): Look for DWARF sections, pass them to
294 2017-09-28 Ian Lance Taylor <iant@golang.org>
297 * elf.c (__builtin_prefetch): Define if not __GNUC__.
299 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
300 (b_elf_chdr): Define type.
301 (enum debug_section): Add ZDEBUG_xxx values.
302 (debug_section_names): Add names for new sections.
303 (struct debug_section_info): Add compressed field.
304 (elf_zlib_failed, elf_zlib_fetch): New static functions.
305 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
306 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
307 (HUFFMAN_SECONDARY_SHIFT): Define.
308 (ZDEBUG_TABLE_SIZE): Define.
309 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
310 (final_next_secondary): New static variable if
311 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
312 (elf_zlib_inflate_table): New static function.
313 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
314 function to produce fixed Huffman table.
315 (elf_zlib_default_table): New static variable.
316 (elf_zlib_inflate): New static function.
317 (elf_zlib_verify_checksum): Likewise.
318 (elf_zlib_inflate_and_verify): Likewise.
319 (elf_uncompress_zdebug): Likewise.
320 (elf_uncompress_chdr): Likewise.
321 (backtrace_uncompress_zdebug): New extern function.
322 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
323 sections, and uncompress them.
324 * internal.h (backtrace_compress_zdebug): Declare.
326 * configure.ac: Check for -lz and check whether the linker
327 supports --compress-debug-sections.
328 * Makefile.am (ztest_SOURCES): New variable.
329 (ztest_CFLAGS, ztest_LDADD): New variables.
330 (check_PROGRAMS): Add ztest.
331 (ctestg_SOURCES): New variable.
332 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
333 (ctesta_SOURCES): New variable.
334 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
335 (check_PROGRAMS): Add ctestg and ctesta.
336 * configure, config.h.in, Makefile.in: Rebuild.
338 2017-09-22 Ian Lance Taylor <iant@golang.org>
341 * configure.ac: Check for lstat and readlink.
342 * elf.c (lstat, readlink): Provide dummy versions if real versions
344 * configure, config.h.in: Rebuild.
346 2017-09-21 Ian Lance Taylor <iant@google.com>
349 * elf.c (backtrace_initialize): Set pd.exe_filename.
351 2017-09-20 Ian Lance Taylor <iant@golang.org>
352 Denis Khalikov <d.khalikov@partner.samsung.com>
355 Support for external debug info.
356 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
357 (S_ISLNK): Define if not defined.
358 (xstrnlen): Define if strnlen is not available.
359 (b_elf_note): Define type.
360 (NT_GNU_BUILD_ID): Define macro.
361 (elf_crc32, elf_crc32_file): New static functions.
362 (elf_is_symlink, elf_readlink): New static functions.
363 (elf_open_debugfile_by_buildid): New static function.
364 (elf_try_debugfile): New static function.
365 (elf_find_debugfile_by_debuglink): New static function.
366 (elf_open_debugfile_by_debuglink): New static function.
367 (elf_add): Add filename and debuginfo parameters. Adjust all
368 callers. Look for external debug info notes, and try to fetch
369 debug info from external file.
370 (struct phdr_data): Add exe_filename field.
371 (phdr_callback): Pass filename to elf_add.
372 (backtrace_initialize): Add filename parameter.
373 * internal.h (backtrace_initialize): Add filename parameter.
374 * fileline.c (fileline_initialize): Pass filename to
375 backtrace_initialize.
376 * pecoff.c (fileline_initialize): Add unused filename parameter.
377 * unknown.c (fileline_initialize): Likewise.
378 * xcoff.c (fileline_initialize): Likewise.
379 * configure.ac: Check for objcopy --add-gnu-debuglink.
380 * Makefile.am (dtest): New test target.
381 * configure, Makefile.in: Rebuild.
383 2017-09-12 Steve Ellcey <sellcey@cavium.com>
386 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
387 * Makefile.in: Regenerate.
389 2017-09-12 Steve Ellcey <sellcey@cavium.com>
392 * libbacktrace/Makefile.in
393 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
395 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
398 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
400 2017-07-28 Tony Reix <tony.reix@atos.net>
402 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
404 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
406 * fileline.c (fileline_initialize): Print pid_t as long.
408 2017-07-26 Tony Reix <tony.reix@atos.net>
410 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
411 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
412 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
413 * configure, config.h.in: Regenerate.
415 2017-07-21 Tony Reix <tony.reix@atos.net>
417 * filetype.awk: Add AIX XCOFF type detection.
418 * configure.ac: Recognize xcoff format.
419 * Makefile.am (FORMAT_FILES): Add xcoff.c.
420 * fileline.c: Include <unistd.h>.
421 (fileline_initialize): Add case for AIX procfs.
423 * configure, Makefile.in: Rebuild.
425 2017-06-21 Richard Biener <rguenther@suse.de>
427 * configure.ac: Add AC_SYS_LARGEFILE.
428 * config.h.in: Regenerate.
429 * configure: Likewise.
431 2017-06-11 Ian Lance Taylor <iant@golang.org>
433 * elf.c (backtrace_initialize): Always set *fileline_fn.
435 * btest.c: Move support functions into testlib.c. Change calls to
436 check to pass file name.
437 * testlib.c: New file, copied from (part of) btest.c.
438 * testlib.h: New file, declarations for testlib.c.
439 * edtest.c: Use testlib.h and testlib.c.
440 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
441 * Makefile.am (btest_SOURCES): Add testlib.c.
442 (edtest_SOURCES): Likewise.
443 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
444 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
445 * configure, Makefile.in: Rebuild.
447 2017-05-19 Than McIntosh <thanm@google.com>
449 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
450 (read_line_header): Don't allocate dirs if dirs_count == 0.
451 * edtest.c: New file.
452 * edtest2.c: New file.
453 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
454 (check_PROGRAMS): Add edtest.
455 (edtest2_build.c, gen_edtest2_build): New targets.
456 * Makefile.in: Rebuild.
458 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
460 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
461 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
463 2017-01-01 Jakub Jelinek <jakub@redhat.com>
465 Update copyright years.
467 2016-11-15 Matthias Klose <doko@ubuntu.com>
469 * configure: Regenerate.
471 2016-09-11 Carlos Liam <carlos@aarzee.me>
473 * all: Remove meaningless trailing whitespace.
475 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
478 * elf.c (phdr_callback) [__i386__]: Add
479 __attribute__((__force_align_arg_pointer__)).
481 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
483 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
484 avoid possible crash.
485 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
486 missing debug info anymore.
488 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
490 * mmap.c (MAP_FAILED): Define if not defined.
492 2016-01-04 Jakub Jelinek <jakub@redhat.com>
494 Update copyright years.
496 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
498 * configure.ac: Specify that DJGPP do not have mmap
499 even when sys/mman.h exists.
500 * configure: Regenerate
502 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
505 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
506 * configure: Regenerate.
507 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
510 2015-09-17 Ian Lance Taylor <iant@google.com>
512 * posix.c (backtrace_open): Cast second argument of open() to int.
514 2015-09-11 Ian Lance Taylor <iant@google.com>
516 * Makefile.am (backtrace.lo): Depend on internal.h.
517 (sort.lo, stest.lo): Add explicit dependencies.
518 * Makefile.in: Rebuild.
520 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
522 * backtrace.c: #include <sys/types.h>.
524 2015-09-08 Ian Lance Taylor <iant@google.com>
527 * backtrace.c: #include "internal.h".
528 (struct backtrace_data): Add can_alloc field.
529 (unwind): If can_alloc is false, don't try to get file/line
531 (backtrace_full): Set can_alloc field in bdata.
532 * alloc.c (backtrace_alloc): Don't call error_callback if it is
534 * mmap.c (backtrace_alloc): Likewise.
535 * internal.h: Update comments for backtrace_alloc and
538 2015-09-08 Ian Lance Taylor <iant@google.com>
541 * mmap.c (backtrace_alloc): Correct test for mmap failure.
543 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
545 * configure.ac: For spu-*-* targets, set have_fcntl to no.
546 * configure: Regenerate.
548 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
550 * configure.ac: Remove [disable-shared] argument to LT_INIT.
551 Remove setting PIC_FLAG when building as target library.
552 * configure: Regenerate.
554 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
556 * configure.ac: Only compile with -fPIC if the target
558 * configure: Regenerate.
560 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
562 * configure.ac: Set have_mmap to no on spu-*-* targets.
563 * configure: Regenerate.
565 2015-08-13 Ian Lance Taylor <iant@google.com>
567 * dwarf.c (read_function_entry): Add vec_inlined parameter.
570 2015-06-11 Martin Sebor <msebor@redhat.com>
573 * dwarf.c (struct line): Add new field idx.
574 (line_compare): Use it.
576 (read_line_info): Reset it.
578 2015-05-29 Tristan Gingold <gingold@adacore.com>
580 * pecoff.c: New file.
581 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
582 * Makefile.in: Regenerate.
583 * filetype.awk: Detect pecoff.
584 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
586 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
588 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
589 * configure: Regenerate.
590 * pecoff.c: New file.
592 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
594 * Makefile.in: Regenerated with automake-1.11.6.
595 * aclocal.m4: Likewise.
596 * configure: Likewise.
598 2015-01-24 Matthias Klose <doko@ubuntu.com>
600 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
601 * configure: Regenerate.
603 2015-01-05 Jakub Jelinek <jakub@redhat.com>
605 Update copyright years.
607 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
610 * configure: Regenerated.
612 2014-11-11 David Malcolm <dmalcolm@redhat.com>
614 * ChangeLog.jit: New.
616 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
619 * configure: Regenerate.
621 2014-10-23 Ian Lance Taylor <iant@google.com>
623 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
624 Fix to return void *.
626 2014-05-08 Ian Lance Taylor <iant@google.com>
628 * mmap.c (backtrace_free): If freeing a large aligned block of
629 memory, call munmap rather than holding onto it.
630 (backtrace_vector_grow): When growing a vector, double the number
631 of pages requested. When releasing the old version of a grown
632 vector, pass the correct size to backtrace_free.
634 2014-03-07 Ian Lance Taylor <iant@google.com>
636 * sort.c (backtrace_qsort): Use middle element as pivot.
638 2014-03-06 Ian Lance Taylor <iant@google.com>
642 * internal.h (backtrace_qsort): Declare.
643 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
644 (read_line_info, read_function_entry): Likewise.
645 (read_function_info, build_dwarf_data): Likewise.
646 * elf.c (elf_initialize_syminfo): Likewise.
647 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
648 (stest_SOURCES, stest_LDADD): Define.
649 (check_PROGRAMS): Add stest.
651 2014-02-07 Misty De Meo <misty@brew.sh>
654 * configure.ac: Use AC_LINK_IFELSE in check for
656 * configure: Regenerate.
658 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
660 Update copyright years
662 2013-12-06 Jakub Jelinek <jakub@redhat.com>
664 * elf.c (ET_DYN): Undefine and define again.
665 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
666 return early -1 without closing the descriptor.
667 (struct phdr_data): Add exe_descriptor.
668 (phdr_callback): If pd->exe_descriptor is not -1, for very first
669 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
670 otherwise backtrace_close the exe_descriptor if not -1. Adjust
672 (backtrace_initialize): Adjust call to elf_add. If it returns
673 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
675 2013-12-05 Ian Lance Taylor <iant@google.com>
677 * alloc.c (backtrace_vector_finish): Add error_callback and data
678 parameters. Call backtrace_vector_release. Return address base.
679 * mmap.c (backtrace_vector_finish): Add error_callback and data
680 parameters. Return address base.
681 * dwarf.c (read_function_info): Get new address base from
682 backtrace_vector_finish.
683 * internal.h (backtrace_vector_finish): Update declaration.
685 2013-11-27 Ian Lance Taylor <iant@google.com>
687 * dwarf.c (find_address_ranges): New static function, broken out
688 of build_address_map.
689 (build_address_map): Call it.
690 * btest.c (check): Check for missing filename or function, rather
692 (f3): Check that enough frames were returned.
694 2013-11-19 Jakub Jelinek <jakub@redhat.com>
696 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
697 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
699 * btest.c (struct symdata): Add size field.
700 (callback_three): Add symsize argument. Copy it to the data->size
702 (f23): Set symdata.size to 0.
703 (test5): Likewise. If sizeof (int) > 1, lookup address of
704 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
707 * atomic.c: Include sys/types.h.
709 2013-11-18 Ian Lance Taylor <iant@google.com>
711 * configure.ac: Check for support of __atomic extensions.
712 * internal.h: Declare or #define atomic functions for use in
714 * atomic.c: New file.
715 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
716 (dwarf_fileline, backtrace_dwarf_add): Likewise.
717 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
718 (backtrace_initialize): Likewise.
719 * fileline.c (fileline_initialize): Likewise.
720 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
721 * configure, config.h.in, Makefile.in: Rebuild.
723 2013-11-18 Jakub Jelinek <jakub@redhat.com>
725 * elf.c (SHN_UNDEF): Define.
726 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
727 with st_shndx == SHN_UNDEF. Add base_address to address fields.
728 (elf_add): Adjust caller.
730 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
732 2013-11-16 Ian Lance Taylor <iant@google.com>
734 * backtrace.h (backtrace_create_state): Correct comment about
737 2013-11-15 Ian Lance Taylor <iant@google.com>
739 * backtrace.h (backtrace_syminfo): Update comment and parameter
740 name to take any address, not just a PC value.
741 * elf.c (STT_OBJECT): Define.
742 (elf_nosyms): Rename parameter pc to addr.
743 (elf_symbol_search): Rename local variable pc to addr.
744 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
745 (elf_syminfo): Rename parameter pc to addr.
746 * btest.c (global): New global variable.
750 2013-10-17 Ian Lance Taylor <iant@google.com>
752 * elf.c (elf_add): Don't get the wrong offsets if a debug section
755 2013-10-15 David Malcolm <dmalcolm@redhat.com>
757 * configure.ac: Add --enable-host-shared, setting up
758 pre-existing PIC_FLAG variable within Makefile.am et al.
759 * configure: Regenerate.
761 2013-09-20 Alan Modra <amodra@gmail.com>
763 * configure: Regenerate.
765 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
767 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
769 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
771 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
772 dl_iterate_phdr callbacks.
774 2013-03-25 Ian Lance Taylor <iant@google.com>
776 * alloc.c: #include <sys/types.h>.
779 2013-01-31 Ian Lance Taylor <iant@google.com>
781 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
782 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
784 2013-01-25 Jakub Jelinek <jakub@redhat.com>
787 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
788 attribute was not seen.
790 2013-01-16 Ian Lance Taylor <iant@google.com>
792 * dwarf.c (struct unit): Add filename and abs_filename fields.
793 (build_address_map): Set new fields when reading unit.
794 (dwarf_lookup_pc): If we don't find an entry in the line table,
795 just return the main file name.
797 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
799 Update copyright years.
801 2013-01-01 Ian Lance Taylor <iant@google.com>
804 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
805 $(MULTIBUILDTOP)/../../gcc/include.
806 * Makefile.in: Rebuild.
808 2013-01-01 Ian Lance Taylor <iant@google.com>
811 * mmap.c (backtrace_alloc): Don't call sync functions if not
813 (backtrace_free): Likewise.
815 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
817 * mmapio.c: Define MAP_FAILED if not defined.
819 2012-12-11 Jakub Jelinek <jakub@redhat.com>
822 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
823 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
824 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
826 * Makefile.in: Regenerated.
827 * configure: Regenerated.
829 2012-12-07 Jakub Jelinek <jakub@redhat.com>
832 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
833 * Makefile.in: Regenerated.
835 2012-11-20 Ian Lance Taylor <iant@google.com>
837 * dwarf.c (read_attribute): Always clear val.
839 2012-11-13 Ian Lance Taylor <iant@google.com>
842 * configure.ac: Only add -Werror if building a target library.
843 * configure: Rebuild.
845 2012-11-12 Ian Lance Taylor <iant@google.com>
846 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
847 Gerald Pfeifer <gerald@pfeifer.com>
849 * configure.ac: Check for getexecname.
850 * fileline.c: #include <errno.h>. Define getexecname if not
852 (fileline_initialize): Try to find the executable in a few
854 * print.c (error_callback): Only print the filename if it came
855 from the backtrace state.
856 * configure, config.h.in: Rebuild.
858 2012-10-29 Ian Lance Taylor <iant@google.com>
860 * mmap.c (backtrace_vector_release): Correct last patch: add
863 2012-10-29 Ian Lance Taylor <iant@google.com>
865 * mmap.c (backtrace_vector_release): Make sure freed block is
866 aligned on 8-byte boundary.
868 2012-10-26 Ian Lance Taylor <iant@google.com>
871 * posix.c (backtrace_open): Add does_not_exist parameter.
872 * elf.c (phdr_callback): Do not warn if shared library could not
874 * fileline.c (fileline_initialize): Update calls to
876 * internal.h (backtrace_open): Update declaration.
878 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
881 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
882 * configure: Regenerate.
884 2012-10-24 Ian Lance Taylor <iant@google.com>
887 * configure.ac: Check whether -funwind-tables option works.
888 * configure: Rebuild.
890 2012-10-11 Ian Lance Taylor <iant@google.com>
892 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
893 * configure: Rebuild.
895 2012-10-10 Ian Lance Taylor <iant@google.com>
897 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
900 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
902 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
904 2012-10-09 Ian Lance Taylor <iant@google.com>
906 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
907 (backtrace_dwarf_add): Likewise.
909 2012-10-09 Ian Lance Taylor <iant@google.com>
911 Add support for tracing through shared libraries.
912 * configure.ac: Check for link.h and dl_iterate_phdr.
913 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
914 ELF macros before #defining them.
915 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
917 (struct elf_syminfo_data): Add next field.
918 (elf_initialize_syminfo): Initialize next field.
919 (elf_add_syminfo_data): New static function.
920 (elf_add): New static function, broken out of
921 backtrace_initialize. Call backtrace_dwarf_add instead of
922 backtrace_dwarf_initialize.
923 (struct phdr_data): Define.
924 (phdr_callback): New static function.
925 (backtrace_initialize): Call elf_add.
926 * dwarf.c (struct dwarf_data): Add next and base_address fields.
927 (add_unit_addr): Add base_address parameter. Change all callers.
928 (add_unit_ranges, build_address_map): Likewise.
929 (add_line): Add ddata parameter. Change all callers.
930 (read_line_program, add_function_range): Likewise.
931 (dwarf_lookup_pc): New static function, broken out of
933 (dwarf_fileline): Call dwarf_lookup_pc.
934 (build_dwarf_data): New static function.
935 (backtrace_dwarf_add): New function.
936 (backtrace_dwarf_initialize): Remove.
937 * internal.h (backtrace_dwarf_initialize): Don't declare.
938 (backtrace_dwarf_add): Declare.
939 * configure, config.h.in: Rebuild.
941 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
943 * btest.c (f23): Avoid uninitialized variable warning.
945 2012-10-04 Ian Lance Taylor <iant@google.com>
947 * dwarf.c: If the system header files do not declare strnlen,
948 provide our own version.
950 2012-10-03 Ian Lance Taylor <iant@google.com>
952 * dwarf.c (read_uleb128): Fix overflow test.
953 (read_sleb128): Likewise.
954 (build_address_map): Don't change unit_buf.start.
956 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
959 * configure.ac (EXTRA_FLAGS): New.
960 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
961 * configure, Makefile.in: Regenerate.
963 2012-09-29 Ian Lance Taylor <iant@google.com>
966 * fileline.c (fileline_initialize): Pass errnum as -1 when
967 reporting that we could not read executable information after a
970 2012-09-27 Ian Lance Taylor <iant@google.com>
973 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
974 * Makefile.am: Add dependencies for all objects.
975 * configure, aclocal.m4, Makefile.in: Rebuild.
977 2012-09-27 Ian Lance Taylor <iant@google.com>
980 * elf.c (backtrace_initialize): Set *fileln_fn, not
983 2012-09-19 Ian Lance Taylor <iant@google.com>
985 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
987 * configure: Rebuild.
989 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
990 Ian Lance Taylor <iant@google.com>
992 * configure.ac (GCC_HEADER_STDINT): Invoke.
993 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
994 * btest.c: Don't include <stdint.h>.
996 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
998 2012-09-18 Ian Lance Taylor <iant@google.com>
1001 * Makefile.am (AM_CPPFLAGS): Define.
1002 (AM_CFLAGS): Remove -I options.
1003 * Makefile.in: Rebuild.
1005 2012-09-18 Ian Lance Taylor <iant@google.com>
1007 * posix.c (O_BINARY): Define if not defined.
1008 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1009 HAVE_FCNTL is defined.
1010 * configure.ac: Test for the fcntl function.
1011 * configure, config.h.in: Rebuild.
1013 2012-09-18 Ian Lance Taylor <iant@google.com>
1015 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1017 2012-09-18 Ian Lance Taylor <iant@google.com>
1019 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1021 2012-09-18 Ian Lance Taylor <iant@google.com>
1023 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1024 * mmapio.c: Don't define _GNU_SOURCE.
1025 * configure, config.h.in: Rebuild.
1027 2012-09-18 Ian Lance Taylor <iant@google.com>
1029 * configure.ac: Check whether strnlen is declared.
1030 * dwarf.c: Declare strnlen if not declared.
1031 * configure, config.h.in: Rebuild.
1033 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1035 * fileline.c: Include <stdlib.h>.
1038 2012-09-17 Ian Lance Taylor <iant@google.com>
1041 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1044 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1047 * nounwind.c (backtrace_simple): Add state parameter.
1049 2012-09-17 Ian Lance Taylor <iant@google.com>
1052 * unknown.c (unknown_fileline): Add state parameter, remove
1053 fileline_data parameter, name error_callback parameter.
1054 (backtrace_initialize): Add state parameter.
1056 2012-09-17 Ian Lance Taylor <iant@google.com>
1058 * Initial implementation.
1060 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1062 Copying and distribution of this file, with or without modification,
1063 are permitted in any medium without royalty provided the copyright
1064 notice and this notice are preserved.