1 2019-01-17 Tom de Vries <tdevries@suse.de>
4 * configure.ac (DWZ): Set with AC_CHECK_PROG.
5 (HAVE_DWZ): Set with AM_CONDITIONAL.
6 * configure: Regenerate.
7 * Makefile.am (TESTS): Add btest_dwz.
8 * Makefile.in: Regenerate.
10 2019-01-17 Tom de Vries <tdevries@suse.de>
13 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
14 (read_attribute): Handle DW_FORM_GNU_ref_alt using
15 ATTR_VAL_REF_ALT_INFO.
16 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
18 2019-01-17 Tom de Vries <tdevries@suse.de>
20 * dwarf.c (struct unit): Add low_offset and high_offset fields.
21 (struct unit_vector): New type.
22 (struct dwarf_data): Add units and units_counts fields.
23 (find_unit): New function.
24 (find_address_ranges): Add and handle unit_tag parameter.
25 (build_address_map): Add and handle units_vec parameter.
26 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
29 2019-01-17 Tom de Vries <tdevries@suse.de>
32 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
35 2019-01-17 Tom de Vries <tdevries@suse.de>
37 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
38 (read_attribute): Add altlink parameter. Handle missing altlink for
39 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
40 (find_address_ranges, build_address_map, build_dwarf_data): Add and
41 handle altlink parameter.
42 (read_referenced_name, read_function_entry): Add argument to
45 2019-01-17 Tom de Vries <tdevries@suse.de>
47 * dwarf.c (struct dwarf_data): Add altlink field.
48 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
49 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
50 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
51 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
52 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
53 * xcoff.c (xcoff_add): Same.
55 2019-01-17 Tom de Vries <tdevries@suse.de>
57 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
58 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
59 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
60 argument to backtrace_dwarf_add call.
61 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
62 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
63 * xcoff.c (xcoff_add): Same.
65 2019-01-17 Tom de Vries <tdevries@suse.de>
67 * elf.c (elf_add): Add and handle with_buildid_data and
68 with_buildid_size parameters. Handle .gnu_debugaltlink section.
69 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
71 2019-01-16 Tom de Vries <tdevries@suse.de>
73 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
75 (read_referenced_name): ... here, and ...
76 (read_function_entry): ... here.
78 2019-01-16 Tom de Vries <tdevries@suse.de>
80 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
82 (read_function_entry): Same. Don't allow name found via
83 DW_AT_abstract_origin or case DW_AT_specification to override linkage
86 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
90 * backtrace.h: Mechanically replace "can not" with "cannot".
92 2019-01-01 Jakub Jelinek <jakub@redhat.com>
94 Update copyright years.
96 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
98 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
100 * Makefile.in: Regenerate.
102 2018-12-28 Tom de Vries <tdevries@suse.de>
104 * dwarf.c (build_address_map): Reuse unused units.
106 2018-12-28 Tom de Vries <tdevries@suse.de>
108 * dwarf.c (build_address_map): Simplify by removing local variable
111 2018-12-28 Ian Lance Taylor <iant@golang.org>
112 Tom de Vries <tdevries@suse.de>
114 PR libbacktrace/88063
115 * dwarf.c (free_unit_addrs_vector): Remove.
116 (build_address_map): Keep track of allocated units in vector. Free
117 allocated units and corresponding abbrevs upon failure. Remove now
118 redundant call to free_unit_addrs_vector. Free addrs vector upon
119 failure. Free allocated unit vector.
121 2018-12-28 Tom de Vries <tdevries@suse.de>
123 * dwarf.c (build_address_map): Free addrs vector upon failure.
125 2018-12-14 Tom de Vries <tdevries@suse.de>
128 * allocfail.sh: Remove "set -o pipefail".
130 2018-12-12 Tom de Vries <tdevries@suse.de>
132 * Makefile.am (TESTS): Add allocfail.sh.
133 (check_PROGRAMS): Add allocfail.
134 * Makefile.in: Regenerate.
135 * instrumented_alloc.c: New file. Redefine malloc and realloc.
137 * allocfail.c: New file.
138 * allocfail.sh: New file.
140 2018-11-30 Tom de Vries <tdevries@suse.de>
142 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
143 test_xcoff_64, test_pecoff and test_unknown.
144 * Makefile.in: Regenerate.
145 * test_format.c: New file.
147 2018-11-30 Tom de Vries <tdevries@suse.de>
149 * Makefile.am : Add _with_alloc version for each test in
151 * Makefile.in: Regenerate.
153 2018-11-30 Tom de Vries <tdevries@suse.de>
155 * internal.h (backtrace_vector_free): New static inline fuction,
157 * dwarf.c (read_line_info): ... here.
159 2018-11-28 Tom de Vries <tdevries@suse.de>
161 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
164 2018-11-27 Tom de Vries <tdevries@suse.de>
166 * mmap.c (backtrace_vector_release): Same.
167 * unittest.c (test1): Add check.
169 2018-11-27 Tom de Vries <tdevries@suse.de>
171 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
173 * Makefile.am (check_PROGRAMS): Add unittest.
174 * Makefile.in: Regenerate.
175 * unittest.c: New file.
177 2018-11-22 Tom de Vries <tdevries@suse.de>
179 * dwarf.c (read_initial_length): Factor out of ...
180 (build_address_map, read_line_info): ... here.
182 2018-11-21 Tom de Vries <tdevries@suse.de>
184 * dwarf.c (read_string): Factor out of ...
185 (read_attribute, read_line_header, read_line_program): ... here.
187 2018-10-31 Joseph Myers <joseph@codesourcery.com>
190 * Makefile.am: Include multilib.am.
191 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
192 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
194 2018-10-05 Ian Lance Taylor <iant@golang.org>
196 PR libbacktrace/87529
197 * backtrace.h: Document that backtrace_create_state should be
200 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
202 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
203 * Makefile.in: Regenerate.
204 * config.h.in: Likewise.
205 * configure: Likewise.
207 2018-08-01 Tony Reix <tony.reix@atos.net>
209 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
210 (struct xcoff_func, struct xcoff_func_vector): New structs.
211 (xcoff_syminfo): Drop leading dot from symbol name.
212 (xcoff_line_compare, xcoff_line_search): Remove.
213 (xcoff_func_compare, xcoff_func_search): New static functions.
214 (xcoff_lookup_pc): Search function table.
215 (xcoff_add_line, xcoff_process_linenos): Remove.
216 (xcoff_initialize_fileline): Build function table.
218 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
221 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
222 checking up to 36 bytes.
224 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
226 * configure: Regenerated.
228 2018-04-19 Jakub Jelinek <jakub@redhat.com>
230 * configure: Regenerated.
232 2018-04-17 Ian Lance Taylor <iant@golang.org>
234 * backtrace.c: Revert last two changes. Don't call mmap
237 2018-04-17 Ian Lance Taylor <iant@golang.org>
239 * backtrace.c: Include backtrace-supported.h before checking
240 BACKTRACE_USES_MALLOC.
242 2018-04-17 Ian Lance Taylor <iant@golang.org>
244 * backtrace.c (backtrace_full): When testing whether we can
245 allocate memory, call mmap directly, and munmap the memory.
247 2018-04-04 Jakub Jelinek <jakub@redhat.com>
250 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
251 big endian, only use 32-bit loads if endianity macros are predefined
252 and indicate big or little endian.
254 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
257 * configure: Regenerate.
259 2018-02-15 Jakub Jelinek <jakub@redhat.com>
262 * elf.c (SHT_PROGBITS): Undefine and define.
264 2018-02-14 Jakub Jelinek <jakub@redhat.com>
267 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
268 (struct elf_ppc64_opd_data): New type.
269 (elf_initialize_syminfo): Add opd argument, handle symbols
270 pointing into the PowerPC64 ELFv1 .opd section.
271 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
272 to structure with .opd data to elf_initialize_syminfo.
274 2018-01-31 Ian Lance Taylor <iant@golang.org>
276 * elf.c (elf_add): Close descriptor if we use a debugfile.
277 * btest.c (check_open_files): New static function.
278 (main): Call check_open_files.
280 2018-01-25 Ian Lance Taylor <iant@golang.org>
282 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
284 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
286 2018-01-25 Ian Lance Taylor <iant@golang.org>
288 * pecoff.c (coff_add): Only release syms_view if it is valid.
290 2018-01-25 Ian Lance Taylor <iant@golang.org>
292 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
294 2018-01-24 Ian Lance Taylor <iant@golang.org>
296 * pecoff.c (coff_add): Use coff_read4, not memcpy.
298 2018-01-24 Ian Lance Taylor <iant@golang.org>
301 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
304 2018-01-19 Tony Reix <tony.reix@atos.net>
306 * xcoff.c (xcoff_incl_compare): New function.
307 (xcoff_incl_search): New function.
308 (xcoff_process_linenos): Use bsearch to find include file.
309 (xcoff_initialize_fileline): Sort include file information.
311 2018-01-16 Ian Lance Taylor <iant@golang.org>
313 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
315 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
316 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
317 (elf_zlib_default_table): Update.
318 (elf_zlib_default_dist_table): New static array.
319 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
321 * ztest.c (struct zlib_test): Add uncompressed_len.
322 (tests): Initialize uncompressed_len field. Add new test case.
323 (test_samples): Use uncompressed_len field.
325 2018-01-03 Jakub Jelinek <jakub@redhat.com>
327 Update copyright years.
329 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
331 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
332 * aclocal.m4: Regenerate.
333 * Makefile.in: Likewise.
334 * configure: Likewise.
336 2017-10-06 Ian Lance Taylor <iant@golang.org>
338 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
339 zlib uncompress function.
341 2017-10-05 Ian Lance Taylor <iant@golang.org>
343 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
344 Read a four byte integer.
345 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
346 boundary before ever calling elf_zlib_fetch.
347 * ztest.c (test_large): Simplify print statements a bit.
349 2017-10-02 Ian Lance Taylor <iant@golang.org>
351 * ztest.c: #include <errno.h>.
352 (TEST_TIMING): Don't define, don't test.
353 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
354 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
355 (ZLIB_CLOCK_GETTIME_ARG): Define.
356 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
357 * Makefile.am: Likewise.
358 * configure, Makefile.in: Rebuild.
360 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
363 * Makefile.am: Append the content of clock_gettime_link to
365 * configure.ac: Test for the case that clock_gettime is in librt.
366 * Makefile.in: Regenerate.
367 * configure: Likewise.
370 * configure.ac: Check for clock_gettime.
371 * config.h.in: Regenerate.
372 * configure: Likewise.
373 * ztest.c (average_time, test_large): Conditionalize test timing
374 on clock_gettime availability.
376 2017-09-29 Tony Reix <tony.reix@atos.net>
378 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
379 (STYP_DWARF, SSUBTYP_DW*): Define.
380 (enum dwarf_section): Define.
381 (struct dwsect_info): Define.
382 (xcoff_add): Look for DWARF sections, pass them to
385 2017-09-28 Ian Lance Taylor <iant@golang.org>
388 * elf.c (__builtin_prefetch): Define if not __GNUC__.
390 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
391 (b_elf_chdr): Define type.
392 (enum debug_section): Add ZDEBUG_xxx values.
393 (debug_section_names): Add names for new sections.
394 (struct debug_section_info): Add compressed field.
395 (elf_zlib_failed, elf_zlib_fetch): New static functions.
396 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
397 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
398 (HUFFMAN_SECONDARY_SHIFT): Define.
399 (ZDEBUG_TABLE_SIZE): Define.
400 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
401 (final_next_secondary): New static variable if
402 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
403 (elf_zlib_inflate_table): New static function.
404 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
405 function to produce fixed Huffman table.
406 (elf_zlib_default_table): New static variable.
407 (elf_zlib_inflate): New static function.
408 (elf_zlib_verify_checksum): Likewise.
409 (elf_zlib_inflate_and_verify): Likewise.
410 (elf_uncompress_zdebug): Likewise.
411 (elf_uncompress_chdr): Likewise.
412 (backtrace_uncompress_zdebug): New extern function.
413 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
414 sections, and uncompress them.
415 * internal.h (backtrace_compress_zdebug): Declare.
417 * configure.ac: Check for -lz and check whether the linker
418 supports --compress-debug-sections.
419 * Makefile.am (ztest_SOURCES): New variable.
420 (ztest_CFLAGS, ztest_LDADD): New variables.
421 (check_PROGRAMS): Add ztest.
422 (ctestg_SOURCES): New variable.
423 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
424 (ctesta_SOURCES): New variable.
425 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
426 (check_PROGRAMS): Add ctestg and ctesta.
427 * configure, config.h.in, Makefile.in: Rebuild.
429 2017-09-22 Ian Lance Taylor <iant@golang.org>
432 * configure.ac: Check for lstat and readlink.
433 * elf.c (lstat, readlink): Provide dummy versions if real versions
435 * configure, config.h.in: Rebuild.
437 2017-09-21 Ian Lance Taylor <iant@google.com>
440 * elf.c (backtrace_initialize): Set pd.exe_filename.
442 2017-09-20 Ian Lance Taylor <iant@golang.org>
443 Denis Khalikov <d.khalikov@partner.samsung.com>
446 Support for external debug info.
447 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
448 (S_ISLNK): Define if not defined.
449 (xstrnlen): Define if strnlen is not available.
450 (b_elf_note): Define type.
451 (NT_GNU_BUILD_ID): Define macro.
452 (elf_crc32, elf_crc32_file): New static functions.
453 (elf_is_symlink, elf_readlink): New static functions.
454 (elf_open_debugfile_by_buildid): New static function.
455 (elf_try_debugfile): New static function.
456 (elf_find_debugfile_by_debuglink): New static function.
457 (elf_open_debugfile_by_debuglink): New static function.
458 (elf_add): Add filename and debuginfo parameters. Adjust all
459 callers. Look for external debug info notes, and try to fetch
460 debug info from external file.
461 (struct phdr_data): Add exe_filename field.
462 (phdr_callback): Pass filename to elf_add.
463 (backtrace_initialize): Add filename parameter.
464 * internal.h (backtrace_initialize): Add filename parameter.
465 * fileline.c (fileline_initialize): Pass filename to
466 backtrace_initialize.
467 * pecoff.c (fileline_initialize): Add unused filename parameter.
468 * unknown.c (fileline_initialize): Likewise.
469 * xcoff.c (fileline_initialize): Likewise.
470 * configure.ac: Check for objcopy --add-gnu-debuglink.
471 * Makefile.am (dtest): New test target.
472 * configure, Makefile.in: Rebuild.
474 2017-09-12 Steve Ellcey <sellcey@cavium.com>
477 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
478 * Makefile.in: Regenerate.
480 2017-09-12 Steve Ellcey <sellcey@cavium.com>
483 * libbacktrace/Makefile.in
484 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
486 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
489 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
491 2017-07-28 Tony Reix <tony.reix@atos.net>
493 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
495 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
497 * fileline.c (fileline_initialize): Print pid_t as long.
499 2017-07-26 Tony Reix <tony.reix@atos.net>
501 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
502 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
503 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
504 * configure, config.h.in: Regenerate.
506 2017-07-21 Tony Reix <tony.reix@atos.net>
508 * filetype.awk: Add AIX XCOFF type detection.
509 * configure.ac: Recognize xcoff format.
510 * Makefile.am (FORMAT_FILES): Add xcoff.c.
511 * fileline.c: Include <unistd.h>.
512 (fileline_initialize): Add case for AIX procfs.
514 * configure, Makefile.in: Rebuild.
516 2017-06-21 Richard Biener <rguenther@suse.de>
518 * configure.ac: Add AC_SYS_LARGEFILE.
519 * config.h.in: Regenerate.
520 * configure: Likewise.
522 2017-06-11 Ian Lance Taylor <iant@golang.org>
524 * elf.c (backtrace_initialize): Always set *fileline_fn.
526 * btest.c: Move support functions into testlib.c. Change calls to
527 check to pass file name.
528 * testlib.c: New file, copied from (part of) btest.c.
529 * testlib.h: New file, declarations for testlib.c.
530 * edtest.c: Use testlib.h and testlib.c.
531 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
532 * Makefile.am (btest_SOURCES): Add testlib.c.
533 (edtest_SOURCES): Likewise.
534 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
535 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
536 * configure, Makefile.in: Rebuild.
538 2017-05-19 Than McIntosh <thanm@google.com>
540 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
541 (read_line_header): Don't allocate dirs if dirs_count == 0.
542 * edtest.c: New file.
543 * edtest2.c: New file.
544 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
545 (check_PROGRAMS): Add edtest.
546 (edtest2_build.c, gen_edtest2_build): New targets.
547 * Makefile.in: Rebuild.
549 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
551 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
552 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
554 2017-01-01 Jakub Jelinek <jakub@redhat.com>
556 Update copyright years.
558 2016-11-15 Matthias Klose <doko@ubuntu.com>
560 * configure: Regenerate.
562 2016-09-11 Carlos Liam <carlos@aarzee.me>
564 * all: Remove meaningless trailing whitespace.
566 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
569 * elf.c (phdr_callback) [__i386__]: Add
570 __attribute__((__force_align_arg_pointer__)).
572 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
574 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
575 avoid possible crash.
576 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
577 missing debug info anymore.
579 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
581 * mmap.c (MAP_FAILED): Define if not defined.
583 2016-01-04 Jakub Jelinek <jakub@redhat.com>
585 Update copyright years.
587 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
589 * configure.ac: Specify that DJGPP do not have mmap
590 even when sys/mman.h exists.
591 * configure: Regenerate
593 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
596 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
597 * configure: Regenerate.
598 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
601 2015-09-17 Ian Lance Taylor <iant@google.com>
603 * posix.c (backtrace_open): Cast second argument of open() to int.
605 2015-09-11 Ian Lance Taylor <iant@google.com>
607 * Makefile.am (backtrace.lo): Depend on internal.h.
608 (sort.lo, stest.lo): Add explicit dependencies.
609 * Makefile.in: Rebuild.
611 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
613 * backtrace.c: #include <sys/types.h>.
615 2015-09-08 Ian Lance Taylor <iant@google.com>
618 * backtrace.c: #include "internal.h".
619 (struct backtrace_data): Add can_alloc field.
620 (unwind): If can_alloc is false, don't try to get file/line
622 (backtrace_full): Set can_alloc field in bdata.
623 * alloc.c (backtrace_alloc): Don't call error_callback if it is
625 * mmap.c (backtrace_alloc): Likewise.
626 * internal.h: Update comments for backtrace_alloc and
629 2015-09-08 Ian Lance Taylor <iant@google.com>
632 * mmap.c (backtrace_alloc): Correct test for mmap failure.
634 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
636 * configure.ac: For spu-*-* targets, set have_fcntl to no.
637 * configure: Regenerate.
639 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
641 * configure.ac: Remove [disable-shared] argument to LT_INIT.
642 Remove setting PIC_FLAG when building as target library.
643 * configure: Regenerate.
645 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
647 * configure.ac: Only compile with -fPIC if the target
649 * configure: Regenerate.
651 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
653 * configure.ac: Set have_mmap to no on spu-*-* targets.
654 * configure: Regenerate.
656 2015-08-13 Ian Lance Taylor <iant@google.com>
658 * dwarf.c (read_function_entry): Add vec_inlined parameter.
661 2015-06-11 Martin Sebor <msebor@redhat.com>
664 * dwarf.c (struct line): Add new field idx.
665 (line_compare): Use it.
667 (read_line_info): Reset it.
669 2015-05-29 Tristan Gingold <gingold@adacore.com>
671 * pecoff.c: New file.
672 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
673 * Makefile.in: Regenerate.
674 * filetype.awk: Detect pecoff.
675 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
677 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
679 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
680 * configure: Regenerate.
681 * pecoff.c: New file.
683 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
685 * Makefile.in: Regenerated with automake-1.11.6.
686 * aclocal.m4: Likewise.
687 * configure: Likewise.
689 2015-01-24 Matthias Klose <doko@ubuntu.com>
691 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
692 * configure: Regenerate.
694 2015-01-05 Jakub Jelinek <jakub@redhat.com>
696 Update copyright years.
698 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
701 * configure: Regenerated.
703 2014-11-11 David Malcolm <dmalcolm@redhat.com>
705 * ChangeLog.jit: New.
707 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
710 * configure: Regenerate.
712 2014-10-23 Ian Lance Taylor <iant@google.com>
714 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
715 Fix to return void *.
717 2014-05-08 Ian Lance Taylor <iant@google.com>
719 * mmap.c (backtrace_free): If freeing a large aligned block of
720 memory, call munmap rather than holding onto it.
721 (backtrace_vector_grow): When growing a vector, double the number
722 of pages requested. When releasing the old version of a grown
723 vector, pass the correct size to backtrace_free.
725 2014-03-07 Ian Lance Taylor <iant@google.com>
727 * sort.c (backtrace_qsort): Use middle element as pivot.
729 2014-03-06 Ian Lance Taylor <iant@google.com>
733 * internal.h (backtrace_qsort): Declare.
734 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
735 (read_line_info, read_function_entry): Likewise.
736 (read_function_info, build_dwarf_data): Likewise.
737 * elf.c (elf_initialize_syminfo): Likewise.
738 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
739 (stest_SOURCES, stest_LDADD): Define.
740 (check_PROGRAMS): Add stest.
742 2014-02-07 Misty De Meo <misty@brew.sh>
745 * configure.ac: Use AC_LINK_IFELSE in check for
747 * configure: Regenerate.
749 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
751 Update copyright years
753 2013-12-06 Jakub Jelinek <jakub@redhat.com>
755 * elf.c (ET_DYN): Undefine and define again.
756 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
757 return early -1 without closing the descriptor.
758 (struct phdr_data): Add exe_descriptor.
759 (phdr_callback): If pd->exe_descriptor is not -1, for very first
760 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
761 otherwise backtrace_close the exe_descriptor if not -1. Adjust
763 (backtrace_initialize): Adjust call to elf_add. If it returns
764 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
766 2013-12-05 Ian Lance Taylor <iant@google.com>
768 * alloc.c (backtrace_vector_finish): Add error_callback and data
769 parameters. Call backtrace_vector_release. Return address base.
770 * mmap.c (backtrace_vector_finish): Add error_callback and data
771 parameters. Return address base.
772 * dwarf.c (read_function_info): Get new address base from
773 backtrace_vector_finish.
774 * internal.h (backtrace_vector_finish): Update declaration.
776 2013-11-27 Ian Lance Taylor <iant@google.com>
778 * dwarf.c (find_address_ranges): New static function, broken out
779 of build_address_map.
780 (build_address_map): Call it.
781 * btest.c (check): Check for missing filename or function, rather
783 (f3): Check that enough frames were returned.
785 2013-11-19 Jakub Jelinek <jakub@redhat.com>
787 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
788 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
790 * btest.c (struct symdata): Add size field.
791 (callback_three): Add symsize argument. Copy it to the data->size
793 (f23): Set symdata.size to 0.
794 (test5): Likewise. If sizeof (int) > 1, lookup address of
795 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
798 * atomic.c: Include sys/types.h.
800 2013-11-18 Ian Lance Taylor <iant@google.com>
802 * configure.ac: Check for support of __atomic extensions.
803 * internal.h: Declare or #define atomic functions for use in
805 * atomic.c: New file.
806 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
807 (dwarf_fileline, backtrace_dwarf_add): Likewise.
808 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
809 (backtrace_initialize): Likewise.
810 * fileline.c (fileline_initialize): Likewise.
811 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
812 * configure, config.h.in, Makefile.in: Rebuild.
814 2013-11-18 Jakub Jelinek <jakub@redhat.com>
816 * elf.c (SHN_UNDEF): Define.
817 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
818 with st_shndx == SHN_UNDEF. Add base_address to address fields.
819 (elf_add): Adjust caller.
821 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
823 2013-11-16 Ian Lance Taylor <iant@google.com>
825 * backtrace.h (backtrace_create_state): Correct comment about
828 2013-11-15 Ian Lance Taylor <iant@google.com>
830 * backtrace.h (backtrace_syminfo): Update comment and parameter
831 name to take any address, not just a PC value.
832 * elf.c (STT_OBJECT): Define.
833 (elf_nosyms): Rename parameter pc to addr.
834 (elf_symbol_search): Rename local variable pc to addr.
835 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
836 (elf_syminfo): Rename parameter pc to addr.
837 * btest.c (global): New global variable.
841 2013-10-17 Ian Lance Taylor <iant@google.com>
843 * elf.c (elf_add): Don't get the wrong offsets if a debug section
846 2013-10-15 David Malcolm <dmalcolm@redhat.com>
848 * configure.ac: Add --enable-host-shared, setting up
849 pre-existing PIC_FLAG variable within Makefile.am et al.
850 * configure: Regenerate.
852 2013-09-20 Alan Modra <amodra@gmail.com>
854 * configure: Regenerate.
856 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
858 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
860 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
862 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
863 dl_iterate_phdr callbacks.
865 2013-03-25 Ian Lance Taylor <iant@google.com>
867 * alloc.c: #include <sys/types.h>.
870 2013-01-31 Ian Lance Taylor <iant@google.com>
872 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
873 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
875 2013-01-25 Jakub Jelinek <jakub@redhat.com>
878 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
879 attribute was not seen.
881 2013-01-16 Ian Lance Taylor <iant@google.com>
883 * dwarf.c (struct unit): Add filename and abs_filename fields.
884 (build_address_map): Set new fields when reading unit.
885 (dwarf_lookup_pc): If we don't find an entry in the line table,
886 just return the main file name.
888 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
890 Update copyright years.
892 2013-01-01 Ian Lance Taylor <iant@google.com>
895 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
896 $(MULTIBUILDTOP)/../../gcc/include.
897 * Makefile.in: Rebuild.
899 2013-01-01 Ian Lance Taylor <iant@google.com>
902 * mmap.c (backtrace_alloc): Don't call sync functions if not
904 (backtrace_free): Likewise.
906 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
908 * mmapio.c: Define MAP_FAILED if not defined.
910 2012-12-11 Jakub Jelinek <jakub@redhat.com>
913 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
914 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
915 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
917 * Makefile.in: Regenerated.
918 * configure: Regenerated.
920 2012-12-07 Jakub Jelinek <jakub@redhat.com>
923 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
924 * Makefile.in: Regenerated.
926 2012-11-20 Ian Lance Taylor <iant@google.com>
928 * dwarf.c (read_attribute): Always clear val.
930 2012-11-13 Ian Lance Taylor <iant@google.com>
933 * configure.ac: Only add -Werror if building a target library.
934 * configure: Rebuild.
936 2012-11-12 Ian Lance Taylor <iant@google.com>
937 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
938 Gerald Pfeifer <gerald@pfeifer.com>
940 * configure.ac: Check for getexecname.
941 * fileline.c: #include <errno.h>. Define getexecname if not
943 (fileline_initialize): Try to find the executable in a few
945 * print.c (error_callback): Only print the filename if it came
946 from the backtrace state.
947 * configure, config.h.in: Rebuild.
949 2012-10-29 Ian Lance Taylor <iant@google.com>
951 * mmap.c (backtrace_vector_release): Correct last patch: add
954 2012-10-29 Ian Lance Taylor <iant@google.com>
956 * mmap.c (backtrace_vector_release): Make sure freed block is
957 aligned on 8-byte boundary.
959 2012-10-26 Ian Lance Taylor <iant@google.com>
962 * posix.c (backtrace_open): Add does_not_exist parameter.
963 * elf.c (phdr_callback): Do not warn if shared library could not
965 * fileline.c (fileline_initialize): Update calls to
967 * internal.h (backtrace_open): Update declaration.
969 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
972 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
973 * configure: Regenerate.
975 2012-10-24 Ian Lance Taylor <iant@google.com>
978 * configure.ac: Check whether -funwind-tables option works.
979 * configure: Rebuild.
981 2012-10-11 Ian Lance Taylor <iant@google.com>
983 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
984 * configure: Rebuild.
986 2012-10-10 Ian Lance Taylor <iant@google.com>
988 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
991 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
993 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
995 2012-10-09 Ian Lance Taylor <iant@google.com>
997 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
998 (backtrace_dwarf_add): Likewise.
1000 2012-10-09 Ian Lance Taylor <iant@google.com>
1002 Add support for tracing through shared libraries.
1003 * configure.ac: Check for link.h and dl_iterate_phdr.
1004 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1005 ELF macros before #defining them.
1006 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1008 (struct elf_syminfo_data): Add next field.
1009 (elf_initialize_syminfo): Initialize next field.
1010 (elf_add_syminfo_data): New static function.
1011 (elf_add): New static function, broken out of
1012 backtrace_initialize. Call backtrace_dwarf_add instead of
1013 backtrace_dwarf_initialize.
1014 (struct phdr_data): Define.
1015 (phdr_callback): New static function.
1016 (backtrace_initialize): Call elf_add.
1017 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1018 (add_unit_addr): Add base_address parameter. Change all callers.
1019 (add_unit_ranges, build_address_map): Likewise.
1020 (add_line): Add ddata parameter. Change all callers.
1021 (read_line_program, add_function_range): Likewise.
1022 (dwarf_lookup_pc): New static function, broken out of
1024 (dwarf_fileline): Call dwarf_lookup_pc.
1025 (build_dwarf_data): New static function.
1026 (backtrace_dwarf_add): New function.
1027 (backtrace_dwarf_initialize): Remove.
1028 * internal.h (backtrace_dwarf_initialize): Don't declare.
1029 (backtrace_dwarf_add): Declare.
1030 * configure, config.h.in: Rebuild.
1032 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1034 * btest.c (f23): Avoid uninitialized variable warning.
1036 2012-10-04 Ian Lance Taylor <iant@google.com>
1038 * dwarf.c: If the system header files do not declare strnlen,
1039 provide our own version.
1041 2012-10-03 Ian Lance Taylor <iant@google.com>
1043 * dwarf.c (read_uleb128): Fix overflow test.
1044 (read_sleb128): Likewise.
1045 (build_address_map): Don't change unit_buf.start.
1047 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1050 * configure.ac (EXTRA_FLAGS): New.
1051 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1052 * configure, Makefile.in: Regenerate.
1054 2012-09-29 Ian Lance Taylor <iant@google.com>
1057 * fileline.c (fileline_initialize): Pass errnum as -1 when
1058 reporting that we could not read executable information after a
1061 2012-09-27 Ian Lance Taylor <iant@google.com>
1064 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1065 * Makefile.am: Add dependencies for all objects.
1066 * configure, aclocal.m4, Makefile.in: Rebuild.
1068 2012-09-27 Ian Lance Taylor <iant@google.com>
1071 * elf.c (backtrace_initialize): Set *fileln_fn, not
1074 2012-09-19 Ian Lance Taylor <iant@google.com>
1076 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1077 as a target library.
1078 * configure: Rebuild.
1080 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1081 Ian Lance Taylor <iant@google.com>
1083 * configure.ac (GCC_HEADER_STDINT): Invoke.
1084 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1085 * btest.c: Don't include <stdint.h>.
1086 * dwarf.c: Likewise.
1087 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1089 2012-09-18 Ian Lance Taylor <iant@google.com>
1092 * Makefile.am (AM_CPPFLAGS): Define.
1093 (AM_CFLAGS): Remove -I options.
1094 * Makefile.in: Rebuild.
1096 2012-09-18 Ian Lance Taylor <iant@google.com>
1098 * posix.c (O_BINARY): Define if not defined.
1099 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1100 HAVE_FCNTL is defined.
1101 * configure.ac: Test for the fcntl function.
1102 * configure, config.h.in: Rebuild.
1104 2012-09-18 Ian Lance Taylor <iant@google.com>
1106 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1108 2012-09-18 Ian Lance Taylor <iant@google.com>
1110 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1112 2012-09-18 Ian Lance Taylor <iant@google.com>
1114 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1115 * mmapio.c: Don't define _GNU_SOURCE.
1116 * configure, config.h.in: Rebuild.
1118 2012-09-18 Ian Lance Taylor <iant@google.com>
1120 * configure.ac: Check whether strnlen is declared.
1121 * dwarf.c: Declare strnlen if not declared.
1122 * configure, config.h.in: Rebuild.
1124 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1126 * fileline.c: Include <stdlib.h>.
1129 2012-09-17 Ian Lance Taylor <iant@google.com>
1132 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1135 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1138 * nounwind.c (backtrace_simple): Add state parameter.
1140 2012-09-17 Ian Lance Taylor <iant@google.com>
1143 * unknown.c (unknown_fileline): Add state parameter, remove
1144 fileline_data parameter, name error_callback parameter.
1145 (backtrace_initialize): Add state parameter.
1147 2012-09-17 Ian Lance Taylor <iant@google.com>
1149 * Initial implementation.
1151 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1153 Copying and distribution of this file, with or without modification,
1154 are permitted in any medium without royalty provided the copyright
1155 notice and this notice are preserved.