1 2019-01-17 Tom de Vries <tdevries@suse.de>
3 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
4 (read_attribute): Add altlink parameter. Handle missing altlink for
5 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
6 (find_address_ranges, build_address_map, build_dwarf_data): Add and
7 handle altlink parameter.
8 (read_referenced_name, read_function_entry): Add argument to
11 2019-01-17 Tom de Vries <tdevries@suse.de>
13 * dwarf.c (struct dwarf_data): Add altlink field.
14 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
15 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
16 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
17 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
18 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
19 * xcoff.c (xcoff_add): Same.
21 2019-01-17 Tom de Vries <tdevries@suse.de>
23 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
24 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
25 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
26 argument to backtrace_dwarf_add call.
27 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
28 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
29 * xcoff.c (xcoff_add): Same.
31 2019-01-17 Tom de Vries <tdevries@suse.de>
33 * elf.c (elf_add): Add and handle with_buildid_data and
34 with_buildid_size parameters. Handle .gnu_debugaltlink section.
35 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
37 2019-01-16 Tom de Vries <tdevries@suse.de>
39 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
41 (read_referenced_name): ... here, and ...
42 (read_function_entry): ... here.
44 2019-01-16 Tom de Vries <tdevries@suse.de>
46 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
48 (read_function_entry): Same. Don't allow name found via
49 DW_AT_abstract_origin or case DW_AT_specification to override linkage
52 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
56 * backtrace.h: Mechanically replace "can not" with "cannot".
58 2019-01-01 Jakub Jelinek <jakub@redhat.com>
60 Update copyright years.
62 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
64 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
66 * Makefile.in: Regenerate.
68 2018-12-28 Tom de Vries <tdevries@suse.de>
70 * dwarf.c (build_address_map): Reuse unused units.
72 2018-12-28 Tom de Vries <tdevries@suse.de>
74 * dwarf.c (build_address_map): Simplify by removing local variable
77 2018-12-28 Ian Lance Taylor <iant@golang.org>
78 Tom de Vries <tdevries@suse.de>
81 * dwarf.c (free_unit_addrs_vector): Remove.
82 (build_address_map): Keep track of allocated units in vector. Free
83 allocated units and corresponding abbrevs upon failure. Remove now
84 redundant call to free_unit_addrs_vector. Free addrs vector upon
85 failure. Free allocated unit vector.
87 2018-12-28 Tom de Vries <tdevries@suse.de>
89 * dwarf.c (build_address_map): Free addrs vector upon failure.
91 2018-12-14 Tom de Vries <tdevries@suse.de>
94 * allocfail.sh: Remove "set -o pipefail".
96 2018-12-12 Tom de Vries <tdevries@suse.de>
98 * Makefile.am (TESTS): Add allocfail.sh.
99 (check_PROGRAMS): Add allocfail.
100 * Makefile.in: Regenerate.
101 * instrumented_alloc.c: New file. Redefine malloc and realloc.
103 * allocfail.c: New file.
104 * allocfail.sh: New file.
106 2018-11-30 Tom de Vries <tdevries@suse.de>
108 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
109 test_xcoff_64, test_pecoff and test_unknown.
110 * Makefile.in: Regenerate.
111 * test_format.c: New file.
113 2018-11-30 Tom de Vries <tdevries@suse.de>
115 * Makefile.am : Add _with_alloc version for each test in
117 * Makefile.in: Regenerate.
119 2018-11-30 Tom de Vries <tdevries@suse.de>
121 * internal.h (backtrace_vector_free): New static inline fuction,
123 * dwarf.c (read_line_info): ... here.
125 2018-11-28 Tom de Vries <tdevries@suse.de>
127 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
130 2018-11-27 Tom de Vries <tdevries@suse.de>
132 * mmap.c (backtrace_vector_release): Same.
133 * unittest.c (test1): Add check.
135 2018-11-27 Tom de Vries <tdevries@suse.de>
137 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
139 * Makefile.am (check_PROGRAMS): Add unittest.
140 * Makefile.in: Regenerate.
141 * unittest.c: New file.
143 2018-11-22 Tom de Vries <tdevries@suse.de>
145 * dwarf.c (read_initial_length): Factor out of ...
146 (build_address_map, read_line_info): ... here.
148 2018-11-21 Tom de Vries <tdevries@suse.de>
150 * dwarf.c (read_string): Factor out of ...
151 (read_attribute, read_line_header, read_line_program): ... here.
153 2018-10-31 Joseph Myers <joseph@codesourcery.com>
156 * Makefile.am: Include multilib.am.
157 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
158 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
160 2018-10-05 Ian Lance Taylor <iant@golang.org>
162 PR libbacktrace/87529
163 * backtrace.h: Document that backtrace_create_state should be
166 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
168 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
169 * Makefile.in: Regenerate.
170 * config.h.in: Likewise.
171 * configure: Likewise.
173 2018-08-01 Tony Reix <tony.reix@atos.net>
175 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
176 (struct xcoff_func, struct xcoff_func_vector): New structs.
177 (xcoff_syminfo): Drop leading dot from symbol name.
178 (xcoff_line_compare, xcoff_line_search): Remove.
179 (xcoff_func_compare, xcoff_func_search): New static functions.
180 (xcoff_lookup_pc): Search function table.
181 (xcoff_add_line, xcoff_process_linenos): Remove.
182 (xcoff_initialize_fileline): Build function table.
184 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
187 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
188 checking up to 36 bytes.
190 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
192 * configure: Regenerated.
194 2018-04-19 Jakub Jelinek <jakub@redhat.com>
196 * configure: Regenerated.
198 2018-04-17 Ian Lance Taylor <iant@golang.org>
200 * backtrace.c: Revert last two changes. Don't call mmap
203 2018-04-17 Ian Lance Taylor <iant@golang.org>
205 * backtrace.c: Include backtrace-supported.h before checking
206 BACKTRACE_USES_MALLOC.
208 2018-04-17 Ian Lance Taylor <iant@golang.org>
210 * backtrace.c (backtrace_full): When testing whether we can
211 allocate memory, call mmap directly, and munmap the memory.
213 2018-04-04 Jakub Jelinek <jakub@redhat.com>
216 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
217 big endian, only use 32-bit loads if endianity macros are predefined
218 and indicate big or little endian.
220 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
223 * configure: Regenerate.
225 2018-02-15 Jakub Jelinek <jakub@redhat.com>
228 * elf.c (SHT_PROGBITS): Undefine and define.
230 2018-02-14 Jakub Jelinek <jakub@redhat.com>
233 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
234 (struct elf_ppc64_opd_data): New type.
235 (elf_initialize_syminfo): Add opd argument, handle symbols
236 pointing into the PowerPC64 ELFv1 .opd section.
237 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
238 to structure with .opd data to elf_initialize_syminfo.
240 2018-01-31 Ian Lance Taylor <iant@golang.org>
242 * elf.c (elf_add): Close descriptor if we use a debugfile.
243 * btest.c (check_open_files): New static function.
244 (main): Call check_open_files.
246 2018-01-25 Ian Lance Taylor <iant@golang.org>
248 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
250 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
252 2018-01-25 Ian Lance Taylor <iant@golang.org>
254 * pecoff.c (coff_add): Only release syms_view if it is valid.
256 2018-01-25 Ian Lance Taylor <iant@golang.org>
258 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
260 2018-01-24 Ian Lance Taylor <iant@golang.org>
262 * pecoff.c (coff_add): Use coff_read4, not memcpy.
264 2018-01-24 Ian Lance Taylor <iant@golang.org>
267 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
270 2018-01-19 Tony Reix <tony.reix@atos.net>
272 * xcoff.c (xcoff_incl_compare): New function.
273 (xcoff_incl_search): New function.
274 (xcoff_process_linenos): Use bsearch to find include file.
275 (xcoff_initialize_fileline): Sort include file information.
277 2018-01-16 Ian Lance Taylor <iant@golang.org>
279 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
281 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
282 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
283 (elf_zlib_default_table): Update.
284 (elf_zlib_default_dist_table): New static array.
285 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
287 * ztest.c (struct zlib_test): Add uncompressed_len.
288 (tests): Initialize uncompressed_len field. Add new test case.
289 (test_samples): Use uncompressed_len field.
291 2018-01-03 Jakub Jelinek <jakub@redhat.com>
293 Update copyright years.
295 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
297 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
298 * aclocal.m4: Regenerate.
299 * Makefile.in: Likewise.
300 * configure: Likewise.
302 2017-10-06 Ian Lance Taylor <iant@golang.org>
304 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
305 zlib uncompress function.
307 2017-10-05 Ian Lance Taylor <iant@golang.org>
309 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
310 Read a four byte integer.
311 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
312 boundary before ever calling elf_zlib_fetch.
313 * ztest.c (test_large): Simplify print statements a bit.
315 2017-10-02 Ian Lance Taylor <iant@golang.org>
317 * ztest.c: #include <errno.h>.
318 (TEST_TIMING): Don't define, don't test.
319 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
320 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
321 (ZLIB_CLOCK_GETTIME_ARG): Define.
322 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
323 * Makefile.am: Likewise.
324 * configure, Makefile.in: Rebuild.
326 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
329 * Makefile.am: Append the content of clock_gettime_link to
331 * configure.ac: Test for the case that clock_gettime is in librt.
332 * Makefile.in: Regenerate.
333 * configure: Likewise.
336 * configure.ac: Check for clock_gettime.
337 * config.h.in: Regenerate.
338 * configure: Likewise.
339 * ztest.c (average_time, test_large): Conditionalize test timing
340 on clock_gettime availability.
342 2017-09-29 Tony Reix <tony.reix@atos.net>
344 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
345 (STYP_DWARF, SSUBTYP_DW*): Define.
346 (enum dwarf_section): Define.
347 (struct dwsect_info): Define.
348 (xcoff_add): Look for DWARF sections, pass them to
351 2017-09-28 Ian Lance Taylor <iant@golang.org>
354 * elf.c (__builtin_prefetch): Define if not __GNUC__.
356 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
357 (b_elf_chdr): Define type.
358 (enum debug_section): Add ZDEBUG_xxx values.
359 (debug_section_names): Add names for new sections.
360 (struct debug_section_info): Add compressed field.
361 (elf_zlib_failed, elf_zlib_fetch): New static functions.
362 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
363 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
364 (HUFFMAN_SECONDARY_SHIFT): Define.
365 (ZDEBUG_TABLE_SIZE): Define.
366 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
367 (final_next_secondary): New static variable if
368 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
369 (elf_zlib_inflate_table): New static function.
370 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
371 function to produce fixed Huffman table.
372 (elf_zlib_default_table): New static variable.
373 (elf_zlib_inflate): New static function.
374 (elf_zlib_verify_checksum): Likewise.
375 (elf_zlib_inflate_and_verify): Likewise.
376 (elf_uncompress_zdebug): Likewise.
377 (elf_uncompress_chdr): Likewise.
378 (backtrace_uncompress_zdebug): New extern function.
379 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
380 sections, and uncompress them.
381 * internal.h (backtrace_compress_zdebug): Declare.
383 * configure.ac: Check for -lz and check whether the linker
384 supports --compress-debug-sections.
385 * Makefile.am (ztest_SOURCES): New variable.
386 (ztest_CFLAGS, ztest_LDADD): New variables.
387 (check_PROGRAMS): Add ztest.
388 (ctestg_SOURCES): New variable.
389 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
390 (ctesta_SOURCES): New variable.
391 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
392 (check_PROGRAMS): Add ctestg and ctesta.
393 * configure, config.h.in, Makefile.in: Rebuild.
395 2017-09-22 Ian Lance Taylor <iant@golang.org>
398 * configure.ac: Check for lstat and readlink.
399 * elf.c (lstat, readlink): Provide dummy versions if real versions
401 * configure, config.h.in: Rebuild.
403 2017-09-21 Ian Lance Taylor <iant@google.com>
406 * elf.c (backtrace_initialize): Set pd.exe_filename.
408 2017-09-20 Ian Lance Taylor <iant@golang.org>
409 Denis Khalikov <d.khalikov@partner.samsung.com>
412 Support for external debug info.
413 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
414 (S_ISLNK): Define if not defined.
415 (xstrnlen): Define if strnlen is not available.
416 (b_elf_note): Define type.
417 (NT_GNU_BUILD_ID): Define macro.
418 (elf_crc32, elf_crc32_file): New static functions.
419 (elf_is_symlink, elf_readlink): New static functions.
420 (elf_open_debugfile_by_buildid): New static function.
421 (elf_try_debugfile): New static function.
422 (elf_find_debugfile_by_debuglink): New static function.
423 (elf_open_debugfile_by_debuglink): New static function.
424 (elf_add): Add filename and debuginfo parameters. Adjust all
425 callers. Look for external debug info notes, and try to fetch
426 debug info from external file.
427 (struct phdr_data): Add exe_filename field.
428 (phdr_callback): Pass filename to elf_add.
429 (backtrace_initialize): Add filename parameter.
430 * internal.h (backtrace_initialize): Add filename parameter.
431 * fileline.c (fileline_initialize): Pass filename to
432 backtrace_initialize.
433 * pecoff.c (fileline_initialize): Add unused filename parameter.
434 * unknown.c (fileline_initialize): Likewise.
435 * xcoff.c (fileline_initialize): Likewise.
436 * configure.ac: Check for objcopy --add-gnu-debuglink.
437 * Makefile.am (dtest): New test target.
438 * configure, Makefile.in: Rebuild.
440 2017-09-12 Steve Ellcey <sellcey@cavium.com>
443 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
444 * Makefile.in: Regenerate.
446 2017-09-12 Steve Ellcey <sellcey@cavium.com>
449 * libbacktrace/Makefile.in
450 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
452 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
455 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
457 2017-07-28 Tony Reix <tony.reix@atos.net>
459 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
461 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
463 * fileline.c (fileline_initialize): Print pid_t as long.
465 2017-07-26 Tony Reix <tony.reix@atos.net>
467 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
468 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
469 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
470 * configure, config.h.in: Regenerate.
472 2017-07-21 Tony Reix <tony.reix@atos.net>
474 * filetype.awk: Add AIX XCOFF type detection.
475 * configure.ac: Recognize xcoff format.
476 * Makefile.am (FORMAT_FILES): Add xcoff.c.
477 * fileline.c: Include <unistd.h>.
478 (fileline_initialize): Add case for AIX procfs.
480 * configure, Makefile.in: Rebuild.
482 2017-06-21 Richard Biener <rguenther@suse.de>
484 * configure.ac: Add AC_SYS_LARGEFILE.
485 * config.h.in: Regenerate.
486 * configure: Likewise.
488 2017-06-11 Ian Lance Taylor <iant@golang.org>
490 * elf.c (backtrace_initialize): Always set *fileline_fn.
492 * btest.c: Move support functions into testlib.c. Change calls to
493 check to pass file name.
494 * testlib.c: New file, copied from (part of) btest.c.
495 * testlib.h: New file, declarations for testlib.c.
496 * edtest.c: Use testlib.h and testlib.c.
497 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
498 * Makefile.am (btest_SOURCES): Add testlib.c.
499 (edtest_SOURCES): Likewise.
500 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
501 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
502 * configure, Makefile.in: Rebuild.
504 2017-05-19 Than McIntosh <thanm@google.com>
506 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
507 (read_line_header): Don't allocate dirs if dirs_count == 0.
508 * edtest.c: New file.
509 * edtest2.c: New file.
510 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
511 (check_PROGRAMS): Add edtest.
512 (edtest2_build.c, gen_edtest2_build): New targets.
513 * Makefile.in: Rebuild.
515 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
517 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
518 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
520 2017-01-01 Jakub Jelinek <jakub@redhat.com>
522 Update copyright years.
524 2016-11-15 Matthias Klose <doko@ubuntu.com>
526 * configure: Regenerate.
528 2016-09-11 Carlos Liam <carlos@aarzee.me>
530 * all: Remove meaningless trailing whitespace.
532 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
535 * elf.c (phdr_callback) [__i386__]: Add
536 __attribute__((__force_align_arg_pointer__)).
538 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
540 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
541 avoid possible crash.
542 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
543 missing debug info anymore.
545 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
547 * mmap.c (MAP_FAILED): Define if not defined.
549 2016-01-04 Jakub Jelinek <jakub@redhat.com>
551 Update copyright years.
553 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
555 * configure.ac: Specify that DJGPP do not have mmap
556 even when sys/mman.h exists.
557 * configure: Regenerate
559 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
562 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
563 * configure: Regenerate.
564 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
567 2015-09-17 Ian Lance Taylor <iant@google.com>
569 * posix.c (backtrace_open): Cast second argument of open() to int.
571 2015-09-11 Ian Lance Taylor <iant@google.com>
573 * Makefile.am (backtrace.lo): Depend on internal.h.
574 (sort.lo, stest.lo): Add explicit dependencies.
575 * Makefile.in: Rebuild.
577 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
579 * backtrace.c: #include <sys/types.h>.
581 2015-09-08 Ian Lance Taylor <iant@google.com>
584 * backtrace.c: #include "internal.h".
585 (struct backtrace_data): Add can_alloc field.
586 (unwind): If can_alloc is false, don't try to get file/line
588 (backtrace_full): Set can_alloc field in bdata.
589 * alloc.c (backtrace_alloc): Don't call error_callback if it is
591 * mmap.c (backtrace_alloc): Likewise.
592 * internal.h: Update comments for backtrace_alloc and
595 2015-09-08 Ian Lance Taylor <iant@google.com>
598 * mmap.c (backtrace_alloc): Correct test for mmap failure.
600 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
602 * configure.ac: For spu-*-* targets, set have_fcntl to no.
603 * configure: Regenerate.
605 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
607 * configure.ac: Remove [disable-shared] argument to LT_INIT.
608 Remove setting PIC_FLAG when building as target library.
609 * configure: Regenerate.
611 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
613 * configure.ac: Only compile with -fPIC if the target
615 * configure: Regenerate.
617 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
619 * configure.ac: Set have_mmap to no on spu-*-* targets.
620 * configure: Regenerate.
622 2015-08-13 Ian Lance Taylor <iant@google.com>
624 * dwarf.c (read_function_entry): Add vec_inlined parameter.
627 2015-06-11 Martin Sebor <msebor@redhat.com>
630 * dwarf.c (struct line): Add new field idx.
631 (line_compare): Use it.
633 (read_line_info): Reset it.
635 2015-05-29 Tristan Gingold <gingold@adacore.com>
637 * pecoff.c: New file.
638 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
639 * Makefile.in: Regenerate.
640 * filetype.awk: Detect pecoff.
641 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
643 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
645 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
646 * configure: Regenerate.
647 * pecoff.c: New file.
649 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
651 * Makefile.in: Regenerated with automake-1.11.6.
652 * aclocal.m4: Likewise.
653 * configure: Likewise.
655 2015-01-24 Matthias Klose <doko@ubuntu.com>
657 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
658 * configure: Regenerate.
660 2015-01-05 Jakub Jelinek <jakub@redhat.com>
662 Update copyright years.
664 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
667 * configure: Regenerated.
669 2014-11-11 David Malcolm <dmalcolm@redhat.com>
671 * ChangeLog.jit: New.
673 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
676 * configure: Regenerate.
678 2014-10-23 Ian Lance Taylor <iant@google.com>
680 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
681 Fix to return void *.
683 2014-05-08 Ian Lance Taylor <iant@google.com>
685 * mmap.c (backtrace_free): If freeing a large aligned block of
686 memory, call munmap rather than holding onto it.
687 (backtrace_vector_grow): When growing a vector, double the number
688 of pages requested. When releasing the old version of a grown
689 vector, pass the correct size to backtrace_free.
691 2014-03-07 Ian Lance Taylor <iant@google.com>
693 * sort.c (backtrace_qsort): Use middle element as pivot.
695 2014-03-06 Ian Lance Taylor <iant@google.com>
699 * internal.h (backtrace_qsort): Declare.
700 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
701 (read_line_info, read_function_entry): Likewise.
702 (read_function_info, build_dwarf_data): Likewise.
703 * elf.c (elf_initialize_syminfo): Likewise.
704 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
705 (stest_SOURCES, stest_LDADD): Define.
706 (check_PROGRAMS): Add stest.
708 2014-02-07 Misty De Meo <misty@brew.sh>
711 * configure.ac: Use AC_LINK_IFELSE in check for
713 * configure: Regenerate.
715 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
717 Update copyright years
719 2013-12-06 Jakub Jelinek <jakub@redhat.com>
721 * elf.c (ET_DYN): Undefine and define again.
722 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
723 return early -1 without closing the descriptor.
724 (struct phdr_data): Add exe_descriptor.
725 (phdr_callback): If pd->exe_descriptor is not -1, for very first
726 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
727 otherwise backtrace_close the exe_descriptor if not -1. Adjust
729 (backtrace_initialize): Adjust call to elf_add. If it returns
730 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
732 2013-12-05 Ian Lance Taylor <iant@google.com>
734 * alloc.c (backtrace_vector_finish): Add error_callback and data
735 parameters. Call backtrace_vector_release. Return address base.
736 * mmap.c (backtrace_vector_finish): Add error_callback and data
737 parameters. Return address base.
738 * dwarf.c (read_function_info): Get new address base from
739 backtrace_vector_finish.
740 * internal.h (backtrace_vector_finish): Update declaration.
742 2013-11-27 Ian Lance Taylor <iant@google.com>
744 * dwarf.c (find_address_ranges): New static function, broken out
745 of build_address_map.
746 (build_address_map): Call it.
747 * btest.c (check): Check for missing filename or function, rather
749 (f3): Check that enough frames were returned.
751 2013-11-19 Jakub Jelinek <jakub@redhat.com>
753 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
754 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
756 * btest.c (struct symdata): Add size field.
757 (callback_three): Add symsize argument. Copy it to the data->size
759 (f23): Set symdata.size to 0.
760 (test5): Likewise. If sizeof (int) > 1, lookup address of
761 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
764 * atomic.c: Include sys/types.h.
766 2013-11-18 Ian Lance Taylor <iant@google.com>
768 * configure.ac: Check for support of __atomic extensions.
769 * internal.h: Declare or #define atomic functions for use in
771 * atomic.c: New file.
772 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
773 (dwarf_fileline, backtrace_dwarf_add): Likewise.
774 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
775 (backtrace_initialize): Likewise.
776 * fileline.c (fileline_initialize): Likewise.
777 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
778 * configure, config.h.in, Makefile.in: Rebuild.
780 2013-11-18 Jakub Jelinek <jakub@redhat.com>
782 * elf.c (SHN_UNDEF): Define.
783 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
784 with st_shndx == SHN_UNDEF. Add base_address to address fields.
785 (elf_add): Adjust caller.
787 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
789 2013-11-16 Ian Lance Taylor <iant@google.com>
791 * backtrace.h (backtrace_create_state): Correct comment about
794 2013-11-15 Ian Lance Taylor <iant@google.com>
796 * backtrace.h (backtrace_syminfo): Update comment and parameter
797 name to take any address, not just a PC value.
798 * elf.c (STT_OBJECT): Define.
799 (elf_nosyms): Rename parameter pc to addr.
800 (elf_symbol_search): Rename local variable pc to addr.
801 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
802 (elf_syminfo): Rename parameter pc to addr.
803 * btest.c (global): New global variable.
807 2013-10-17 Ian Lance Taylor <iant@google.com>
809 * elf.c (elf_add): Don't get the wrong offsets if a debug section
812 2013-10-15 David Malcolm <dmalcolm@redhat.com>
814 * configure.ac: Add --enable-host-shared, setting up
815 pre-existing PIC_FLAG variable within Makefile.am et al.
816 * configure: Regenerate.
818 2013-09-20 Alan Modra <amodra@gmail.com>
820 * configure: Regenerate.
822 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
824 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
826 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
828 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
829 dl_iterate_phdr callbacks.
831 2013-03-25 Ian Lance Taylor <iant@google.com>
833 * alloc.c: #include <sys/types.h>.
836 2013-01-31 Ian Lance Taylor <iant@google.com>
838 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
839 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
841 2013-01-25 Jakub Jelinek <jakub@redhat.com>
844 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
845 attribute was not seen.
847 2013-01-16 Ian Lance Taylor <iant@google.com>
849 * dwarf.c (struct unit): Add filename and abs_filename fields.
850 (build_address_map): Set new fields when reading unit.
851 (dwarf_lookup_pc): If we don't find an entry in the line table,
852 just return the main file name.
854 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
856 Update copyright years.
858 2013-01-01 Ian Lance Taylor <iant@google.com>
861 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
862 $(MULTIBUILDTOP)/../../gcc/include.
863 * Makefile.in: Rebuild.
865 2013-01-01 Ian Lance Taylor <iant@google.com>
868 * mmap.c (backtrace_alloc): Don't call sync functions if not
870 (backtrace_free): Likewise.
872 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
874 * mmapio.c: Define MAP_FAILED if not defined.
876 2012-12-11 Jakub Jelinek <jakub@redhat.com>
879 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
880 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
881 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
883 * Makefile.in: Regenerated.
884 * configure: Regenerated.
886 2012-12-07 Jakub Jelinek <jakub@redhat.com>
889 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
890 * Makefile.in: Regenerated.
892 2012-11-20 Ian Lance Taylor <iant@google.com>
894 * dwarf.c (read_attribute): Always clear val.
896 2012-11-13 Ian Lance Taylor <iant@google.com>
899 * configure.ac: Only add -Werror if building a target library.
900 * configure: Rebuild.
902 2012-11-12 Ian Lance Taylor <iant@google.com>
903 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
904 Gerald Pfeifer <gerald@pfeifer.com>
906 * configure.ac: Check for getexecname.
907 * fileline.c: #include <errno.h>. Define getexecname if not
909 (fileline_initialize): Try to find the executable in a few
911 * print.c (error_callback): Only print the filename if it came
912 from the backtrace state.
913 * configure, config.h.in: Rebuild.
915 2012-10-29 Ian Lance Taylor <iant@google.com>
917 * mmap.c (backtrace_vector_release): Correct last patch: add
920 2012-10-29 Ian Lance Taylor <iant@google.com>
922 * mmap.c (backtrace_vector_release): Make sure freed block is
923 aligned on 8-byte boundary.
925 2012-10-26 Ian Lance Taylor <iant@google.com>
928 * posix.c (backtrace_open): Add does_not_exist parameter.
929 * elf.c (phdr_callback): Do not warn if shared library could not
931 * fileline.c (fileline_initialize): Update calls to
933 * internal.h (backtrace_open): Update declaration.
935 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
938 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
939 * configure: Regenerate.
941 2012-10-24 Ian Lance Taylor <iant@google.com>
944 * configure.ac: Check whether -funwind-tables option works.
945 * configure: Rebuild.
947 2012-10-11 Ian Lance Taylor <iant@google.com>
949 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
950 * configure: Rebuild.
952 2012-10-10 Ian Lance Taylor <iant@google.com>
954 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
957 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
959 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
961 2012-10-09 Ian Lance Taylor <iant@google.com>
963 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
964 (backtrace_dwarf_add): Likewise.
966 2012-10-09 Ian Lance Taylor <iant@google.com>
968 Add support for tracing through shared libraries.
969 * configure.ac: Check for link.h and dl_iterate_phdr.
970 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
971 ELF macros before #defining them.
972 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
974 (struct elf_syminfo_data): Add next field.
975 (elf_initialize_syminfo): Initialize next field.
976 (elf_add_syminfo_data): New static function.
977 (elf_add): New static function, broken out of
978 backtrace_initialize. Call backtrace_dwarf_add instead of
979 backtrace_dwarf_initialize.
980 (struct phdr_data): Define.
981 (phdr_callback): New static function.
982 (backtrace_initialize): Call elf_add.
983 * dwarf.c (struct dwarf_data): Add next and base_address fields.
984 (add_unit_addr): Add base_address parameter. Change all callers.
985 (add_unit_ranges, build_address_map): Likewise.
986 (add_line): Add ddata parameter. Change all callers.
987 (read_line_program, add_function_range): Likewise.
988 (dwarf_lookup_pc): New static function, broken out of
990 (dwarf_fileline): Call dwarf_lookup_pc.
991 (build_dwarf_data): New static function.
992 (backtrace_dwarf_add): New function.
993 (backtrace_dwarf_initialize): Remove.
994 * internal.h (backtrace_dwarf_initialize): Don't declare.
995 (backtrace_dwarf_add): Declare.
996 * configure, config.h.in: Rebuild.
998 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1000 * btest.c (f23): Avoid uninitialized variable warning.
1002 2012-10-04 Ian Lance Taylor <iant@google.com>
1004 * dwarf.c: If the system header files do not declare strnlen,
1005 provide our own version.
1007 2012-10-03 Ian Lance Taylor <iant@google.com>
1009 * dwarf.c (read_uleb128): Fix overflow test.
1010 (read_sleb128): Likewise.
1011 (build_address_map): Don't change unit_buf.start.
1013 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1016 * configure.ac (EXTRA_FLAGS): New.
1017 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1018 * configure, Makefile.in: Regenerate.
1020 2012-09-29 Ian Lance Taylor <iant@google.com>
1023 * fileline.c (fileline_initialize): Pass errnum as -1 when
1024 reporting that we could not read executable information after a
1027 2012-09-27 Ian Lance Taylor <iant@google.com>
1030 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1031 * Makefile.am: Add dependencies for all objects.
1032 * configure, aclocal.m4, Makefile.in: Rebuild.
1034 2012-09-27 Ian Lance Taylor <iant@google.com>
1037 * elf.c (backtrace_initialize): Set *fileln_fn, not
1040 2012-09-19 Ian Lance Taylor <iant@google.com>
1042 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1043 as a target library.
1044 * configure: Rebuild.
1046 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1047 Ian Lance Taylor <iant@google.com>
1049 * configure.ac (GCC_HEADER_STDINT): Invoke.
1050 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1051 * btest.c: Don't include <stdint.h>.
1052 * dwarf.c: Likewise.
1053 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1055 2012-09-18 Ian Lance Taylor <iant@google.com>
1058 * Makefile.am (AM_CPPFLAGS): Define.
1059 (AM_CFLAGS): Remove -I options.
1060 * Makefile.in: Rebuild.
1062 2012-09-18 Ian Lance Taylor <iant@google.com>
1064 * posix.c (O_BINARY): Define if not defined.
1065 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1066 HAVE_FCNTL is defined.
1067 * configure.ac: Test for the fcntl function.
1068 * configure, config.h.in: Rebuild.
1070 2012-09-18 Ian Lance Taylor <iant@google.com>
1072 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1074 2012-09-18 Ian Lance Taylor <iant@google.com>
1076 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1078 2012-09-18 Ian Lance Taylor <iant@google.com>
1080 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1081 * mmapio.c: Don't define _GNU_SOURCE.
1082 * configure, config.h.in: Rebuild.
1084 2012-09-18 Ian Lance Taylor <iant@google.com>
1086 * configure.ac: Check whether strnlen is declared.
1087 * dwarf.c: Declare strnlen if not declared.
1088 * configure, config.h.in: Rebuild.
1090 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1092 * fileline.c: Include <stdlib.h>.
1095 2012-09-17 Ian Lance Taylor <iant@google.com>
1098 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1101 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1104 * nounwind.c (backtrace_simple): Add state parameter.
1106 2012-09-17 Ian Lance Taylor <iant@google.com>
1109 * unknown.c (unknown_fileline): Add state parameter, remove
1110 fileline_data parameter, name error_callback parameter.
1111 (backtrace_initialize): Add state parameter.
1113 2012-09-17 Ian Lance Taylor <iant@google.com>
1115 * Initial implementation.
1117 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1119 Copying and distribution of this file, with or without modification,
1120 are permitted in any medium without royalty provided the copyright
1121 notice and this notice are preserved.