1 2019-01-23 Tom de Vries <tdevries@suse.de>
3 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
4 (units_search, find_unit): Use size_t for offset.
5 (build_address_map): Use size_t for unit_offset.
7 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
9 * allocfail.c (main): Increase portability of printf statement.
11 2019-01-18 Ian Lance Taylor <iant@golang.org>
14 * mmapio.c (backtrace_get_view): Change size parameter to
15 uint64_t. Check that value fits in size_t.
16 * read.c (backtrace_get_view): Likewise.
17 * internal.h (backtrace_get_view): Update declaration.
18 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
20 2019-01-17 Tom de Vries <tdevries@suse.de>
23 * configure.ac (DWZ): Set with AC_CHECK_PROG.
24 (HAVE_DWZ): Set with AM_CONDITIONAL.
25 * configure: Regenerate.
26 * Makefile.am (TESTS): Add btest_dwz.
27 * Makefile.in: Regenerate.
29 2019-01-17 Tom de Vries <tdevries@suse.de>
32 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
33 (read_attribute): Handle DW_FORM_GNU_ref_alt using
34 ATTR_VAL_REF_ALT_INFO.
35 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
37 2019-01-17 Tom de Vries <tdevries@suse.de>
39 * dwarf.c (struct unit): Add low_offset and high_offset fields.
40 (struct unit_vector): New type.
41 (struct dwarf_data): Add units and units_counts fields.
42 (find_unit): New function.
43 (find_address_ranges): Add and handle unit_tag parameter.
44 (build_address_map): Add and handle units_vec parameter.
45 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
48 2019-01-17 Tom de Vries <tdevries@suse.de>
51 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
54 2019-01-17 Tom de Vries <tdevries@suse.de>
56 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
57 (read_attribute): Add altlink parameter. Handle missing altlink for
58 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
59 (find_address_ranges, build_address_map, build_dwarf_data): Add and
60 handle altlink parameter.
61 (read_referenced_name, read_function_entry): Add argument to
64 2019-01-17 Tom de Vries <tdevries@suse.de>
66 * dwarf.c (struct dwarf_data): Add altlink field.
67 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
68 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
69 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
70 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
71 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
72 * xcoff.c (xcoff_add): Same.
74 2019-01-17 Tom de Vries <tdevries@suse.de>
76 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
77 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
78 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
79 argument to backtrace_dwarf_add call.
80 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
81 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
82 * xcoff.c (xcoff_add): Same.
84 2019-01-17 Tom de Vries <tdevries@suse.de>
86 * elf.c (elf_add): Add and handle with_buildid_data and
87 with_buildid_size parameters. Handle .gnu_debugaltlink section.
88 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
90 2019-01-16 Tom de Vries <tdevries@suse.de>
92 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
94 (read_referenced_name): ... here, and ...
95 (read_function_entry): ... here.
97 2019-01-16 Tom de Vries <tdevries@suse.de>
99 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
101 (read_function_entry): Same. Don't allow name found via
102 DW_AT_abstract_origin or case DW_AT_specification to override linkage
105 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
109 * backtrace.h: Mechanically replace "can not" with "cannot".
111 2019-01-01 Jakub Jelinek <jakub@redhat.com>
113 Update copyright years.
115 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
117 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
119 * Makefile.in: Regenerate.
121 2018-12-28 Tom de Vries <tdevries@suse.de>
123 * dwarf.c (build_address_map): Reuse unused units.
125 2018-12-28 Tom de Vries <tdevries@suse.de>
127 * dwarf.c (build_address_map): Simplify by removing local variable
130 2018-12-28 Ian Lance Taylor <iant@golang.org>
131 Tom de Vries <tdevries@suse.de>
133 PR libbacktrace/88063
134 * dwarf.c (free_unit_addrs_vector): Remove.
135 (build_address_map): Keep track of allocated units in vector. Free
136 allocated units and corresponding abbrevs upon failure. Remove now
137 redundant call to free_unit_addrs_vector. Free addrs vector upon
138 failure. Free allocated unit vector.
140 2018-12-28 Tom de Vries <tdevries@suse.de>
142 * dwarf.c (build_address_map): Free addrs vector upon failure.
144 2018-12-14 Tom de Vries <tdevries@suse.de>
147 * allocfail.sh: Remove "set -o pipefail".
149 2018-12-12 Tom de Vries <tdevries@suse.de>
151 * Makefile.am (TESTS): Add allocfail.sh.
152 (check_PROGRAMS): Add allocfail.
153 * Makefile.in: Regenerate.
154 * instrumented_alloc.c: New file. Redefine malloc and realloc.
156 * allocfail.c: New file.
157 * allocfail.sh: New file.
159 2018-11-30 Tom de Vries <tdevries@suse.de>
161 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
162 test_xcoff_64, test_pecoff and test_unknown.
163 * Makefile.in: Regenerate.
164 * test_format.c: New file.
166 2018-11-30 Tom de Vries <tdevries@suse.de>
168 * Makefile.am : Add _with_alloc version for each test in
170 * Makefile.in: Regenerate.
172 2018-11-30 Tom de Vries <tdevries@suse.de>
174 * internal.h (backtrace_vector_free): New static inline fuction,
176 * dwarf.c (read_line_info): ... here.
178 2018-11-28 Tom de Vries <tdevries@suse.de>
180 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
183 2018-11-27 Tom de Vries <tdevries@suse.de>
185 * mmap.c (backtrace_vector_release): Same.
186 * unittest.c (test1): Add check.
188 2018-11-27 Tom de Vries <tdevries@suse.de>
190 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
192 * Makefile.am (check_PROGRAMS): Add unittest.
193 * Makefile.in: Regenerate.
194 * unittest.c: New file.
196 2018-11-22 Tom de Vries <tdevries@suse.de>
198 * dwarf.c (read_initial_length): Factor out of ...
199 (build_address_map, read_line_info): ... here.
201 2018-11-21 Tom de Vries <tdevries@suse.de>
203 * dwarf.c (read_string): Factor out of ...
204 (read_attribute, read_line_header, read_line_program): ... here.
206 2018-10-31 Joseph Myers <joseph@codesourcery.com>
209 * Makefile.am: Include multilib.am.
210 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
211 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
213 2018-10-05 Ian Lance Taylor <iant@golang.org>
215 PR libbacktrace/87529
216 * backtrace.h: Document that backtrace_create_state should be
219 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
221 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
222 * Makefile.in: Regenerate.
223 * config.h.in: Likewise.
224 * configure: Likewise.
226 2018-08-01 Tony Reix <tony.reix@atos.net>
228 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
229 (struct xcoff_func, struct xcoff_func_vector): New structs.
230 (xcoff_syminfo): Drop leading dot from symbol name.
231 (xcoff_line_compare, xcoff_line_search): Remove.
232 (xcoff_func_compare, xcoff_func_search): New static functions.
233 (xcoff_lookup_pc): Search function table.
234 (xcoff_add_line, xcoff_process_linenos): Remove.
235 (xcoff_initialize_fileline): Build function table.
237 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
240 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
241 checking up to 36 bytes.
243 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
245 * configure: Regenerated.
247 2018-04-19 Jakub Jelinek <jakub@redhat.com>
249 * configure: Regenerated.
251 2018-04-17 Ian Lance Taylor <iant@golang.org>
253 * backtrace.c: Revert last two changes. Don't call mmap
256 2018-04-17 Ian Lance Taylor <iant@golang.org>
258 * backtrace.c: Include backtrace-supported.h before checking
259 BACKTRACE_USES_MALLOC.
261 2018-04-17 Ian Lance Taylor <iant@golang.org>
263 * backtrace.c (backtrace_full): When testing whether we can
264 allocate memory, call mmap directly, and munmap the memory.
266 2018-04-04 Jakub Jelinek <jakub@redhat.com>
269 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
270 big endian, only use 32-bit loads if endianity macros are predefined
271 and indicate big or little endian.
273 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
276 * configure: Regenerate.
278 2018-02-15 Jakub Jelinek <jakub@redhat.com>
281 * elf.c (SHT_PROGBITS): Undefine and define.
283 2018-02-14 Jakub Jelinek <jakub@redhat.com>
286 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
287 (struct elf_ppc64_opd_data): New type.
288 (elf_initialize_syminfo): Add opd argument, handle symbols
289 pointing into the PowerPC64 ELFv1 .opd section.
290 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
291 to structure with .opd data to elf_initialize_syminfo.
293 2018-01-31 Ian Lance Taylor <iant@golang.org>
295 * elf.c (elf_add): Close descriptor if we use a debugfile.
296 * btest.c (check_open_files): New static function.
297 (main): Call check_open_files.
299 2018-01-25 Ian Lance Taylor <iant@golang.org>
301 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
303 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
305 2018-01-25 Ian Lance Taylor <iant@golang.org>
307 * pecoff.c (coff_add): Only release syms_view if it is valid.
309 2018-01-25 Ian Lance Taylor <iant@golang.org>
311 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
313 2018-01-24 Ian Lance Taylor <iant@golang.org>
315 * pecoff.c (coff_add): Use coff_read4, not memcpy.
317 2018-01-24 Ian Lance Taylor <iant@golang.org>
320 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
323 2018-01-19 Tony Reix <tony.reix@atos.net>
325 * xcoff.c (xcoff_incl_compare): New function.
326 (xcoff_incl_search): New function.
327 (xcoff_process_linenos): Use bsearch to find include file.
328 (xcoff_initialize_fileline): Sort include file information.
330 2018-01-16 Ian Lance Taylor <iant@golang.org>
332 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
334 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
335 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
336 (elf_zlib_default_table): Update.
337 (elf_zlib_default_dist_table): New static array.
338 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
340 * ztest.c (struct zlib_test): Add uncompressed_len.
341 (tests): Initialize uncompressed_len field. Add new test case.
342 (test_samples): Use uncompressed_len field.
344 2018-01-03 Jakub Jelinek <jakub@redhat.com>
346 Update copyright years.
348 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
350 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
351 * aclocal.m4: Regenerate.
352 * Makefile.in: Likewise.
353 * configure: Likewise.
355 2017-10-06 Ian Lance Taylor <iant@golang.org>
357 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
358 zlib uncompress function.
360 2017-10-05 Ian Lance Taylor <iant@golang.org>
362 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
363 Read a four byte integer.
364 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
365 boundary before ever calling elf_zlib_fetch.
366 * ztest.c (test_large): Simplify print statements a bit.
368 2017-10-02 Ian Lance Taylor <iant@golang.org>
370 * ztest.c: #include <errno.h>.
371 (TEST_TIMING): Don't define, don't test.
372 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
373 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
374 (ZLIB_CLOCK_GETTIME_ARG): Define.
375 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
376 * Makefile.am: Likewise.
377 * configure, Makefile.in: Rebuild.
379 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
382 * Makefile.am: Append the content of clock_gettime_link to
384 * configure.ac: Test for the case that clock_gettime is in librt.
385 * Makefile.in: Regenerate.
386 * configure: Likewise.
389 * configure.ac: Check for clock_gettime.
390 * config.h.in: Regenerate.
391 * configure: Likewise.
392 * ztest.c (average_time, test_large): Conditionalize test timing
393 on clock_gettime availability.
395 2017-09-29 Tony Reix <tony.reix@atos.net>
397 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
398 (STYP_DWARF, SSUBTYP_DW*): Define.
399 (enum dwarf_section): Define.
400 (struct dwsect_info): Define.
401 (xcoff_add): Look for DWARF sections, pass them to
404 2017-09-28 Ian Lance Taylor <iant@golang.org>
407 * elf.c (__builtin_prefetch): Define if not __GNUC__.
409 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
410 (b_elf_chdr): Define type.
411 (enum debug_section): Add ZDEBUG_xxx values.
412 (debug_section_names): Add names for new sections.
413 (struct debug_section_info): Add compressed field.
414 (elf_zlib_failed, elf_zlib_fetch): New static functions.
415 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
416 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
417 (HUFFMAN_SECONDARY_SHIFT): Define.
418 (ZDEBUG_TABLE_SIZE): Define.
419 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
420 (final_next_secondary): New static variable if
421 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
422 (elf_zlib_inflate_table): New static function.
423 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
424 function to produce fixed Huffman table.
425 (elf_zlib_default_table): New static variable.
426 (elf_zlib_inflate): New static function.
427 (elf_zlib_verify_checksum): Likewise.
428 (elf_zlib_inflate_and_verify): Likewise.
429 (elf_uncompress_zdebug): Likewise.
430 (elf_uncompress_chdr): Likewise.
431 (backtrace_uncompress_zdebug): New extern function.
432 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
433 sections, and uncompress them.
434 * internal.h (backtrace_compress_zdebug): Declare.
436 * configure.ac: Check for -lz and check whether the linker
437 supports --compress-debug-sections.
438 * Makefile.am (ztest_SOURCES): New variable.
439 (ztest_CFLAGS, ztest_LDADD): New variables.
440 (check_PROGRAMS): Add ztest.
441 (ctestg_SOURCES): New variable.
442 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
443 (ctesta_SOURCES): New variable.
444 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
445 (check_PROGRAMS): Add ctestg and ctesta.
446 * configure, config.h.in, Makefile.in: Rebuild.
448 2017-09-22 Ian Lance Taylor <iant@golang.org>
451 * configure.ac: Check for lstat and readlink.
452 * elf.c (lstat, readlink): Provide dummy versions if real versions
454 * configure, config.h.in: Rebuild.
456 2017-09-21 Ian Lance Taylor <iant@google.com>
459 * elf.c (backtrace_initialize): Set pd.exe_filename.
461 2017-09-20 Ian Lance Taylor <iant@golang.org>
462 Denis Khalikov <d.khalikov@partner.samsung.com>
465 Support for external debug info.
466 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
467 (S_ISLNK): Define if not defined.
468 (xstrnlen): Define if strnlen is not available.
469 (b_elf_note): Define type.
470 (NT_GNU_BUILD_ID): Define macro.
471 (elf_crc32, elf_crc32_file): New static functions.
472 (elf_is_symlink, elf_readlink): New static functions.
473 (elf_open_debugfile_by_buildid): New static function.
474 (elf_try_debugfile): New static function.
475 (elf_find_debugfile_by_debuglink): New static function.
476 (elf_open_debugfile_by_debuglink): New static function.
477 (elf_add): Add filename and debuginfo parameters. Adjust all
478 callers. Look for external debug info notes, and try to fetch
479 debug info from external file.
480 (struct phdr_data): Add exe_filename field.
481 (phdr_callback): Pass filename to elf_add.
482 (backtrace_initialize): Add filename parameter.
483 * internal.h (backtrace_initialize): Add filename parameter.
484 * fileline.c (fileline_initialize): Pass filename to
485 backtrace_initialize.
486 * pecoff.c (fileline_initialize): Add unused filename parameter.
487 * unknown.c (fileline_initialize): Likewise.
488 * xcoff.c (fileline_initialize): Likewise.
489 * configure.ac: Check for objcopy --add-gnu-debuglink.
490 * Makefile.am (dtest): New test target.
491 * configure, Makefile.in: Rebuild.
493 2017-09-12 Steve Ellcey <sellcey@cavium.com>
496 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
497 * Makefile.in: Regenerate.
499 2017-09-12 Steve Ellcey <sellcey@cavium.com>
502 * libbacktrace/Makefile.in
503 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
505 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
508 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
510 2017-07-28 Tony Reix <tony.reix@atos.net>
512 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
514 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
516 * fileline.c (fileline_initialize): Print pid_t as long.
518 2017-07-26 Tony Reix <tony.reix@atos.net>
520 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
521 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
522 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
523 * configure, config.h.in: Regenerate.
525 2017-07-21 Tony Reix <tony.reix@atos.net>
527 * filetype.awk: Add AIX XCOFF type detection.
528 * configure.ac: Recognize xcoff format.
529 * Makefile.am (FORMAT_FILES): Add xcoff.c.
530 * fileline.c: Include <unistd.h>.
531 (fileline_initialize): Add case for AIX procfs.
533 * configure, Makefile.in: Rebuild.
535 2017-06-21 Richard Biener <rguenther@suse.de>
537 * configure.ac: Add AC_SYS_LARGEFILE.
538 * config.h.in: Regenerate.
539 * configure: Likewise.
541 2017-06-11 Ian Lance Taylor <iant@golang.org>
543 * elf.c (backtrace_initialize): Always set *fileline_fn.
545 * btest.c: Move support functions into testlib.c. Change calls to
546 check to pass file name.
547 * testlib.c: New file, copied from (part of) btest.c.
548 * testlib.h: New file, declarations for testlib.c.
549 * edtest.c: Use testlib.h and testlib.c.
550 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
551 * Makefile.am (btest_SOURCES): Add testlib.c.
552 (edtest_SOURCES): Likewise.
553 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
554 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
555 * configure, Makefile.in: Rebuild.
557 2017-05-19 Than McIntosh <thanm@google.com>
559 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
560 (read_line_header): Don't allocate dirs if dirs_count == 0.
561 * edtest.c: New file.
562 * edtest2.c: New file.
563 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
564 (check_PROGRAMS): Add edtest.
565 (edtest2_build.c, gen_edtest2_build): New targets.
566 * Makefile.in: Rebuild.
568 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
570 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
571 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
573 2017-01-01 Jakub Jelinek <jakub@redhat.com>
575 Update copyright years.
577 2016-11-15 Matthias Klose <doko@ubuntu.com>
579 * configure: Regenerate.
581 2016-09-11 Carlos Liam <carlos@aarzee.me>
583 * all: Remove meaningless trailing whitespace.
585 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
588 * elf.c (phdr_callback) [__i386__]: Add
589 __attribute__((__force_align_arg_pointer__)).
591 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
593 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
594 avoid possible crash.
595 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
596 missing debug info anymore.
598 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
600 * mmap.c (MAP_FAILED): Define if not defined.
602 2016-01-04 Jakub Jelinek <jakub@redhat.com>
604 Update copyright years.
606 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
608 * configure.ac: Specify that DJGPP do not have mmap
609 even when sys/mman.h exists.
610 * configure: Regenerate
612 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
615 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
616 * configure: Regenerate.
617 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
620 2015-09-17 Ian Lance Taylor <iant@google.com>
622 * posix.c (backtrace_open): Cast second argument of open() to int.
624 2015-09-11 Ian Lance Taylor <iant@google.com>
626 * Makefile.am (backtrace.lo): Depend on internal.h.
627 (sort.lo, stest.lo): Add explicit dependencies.
628 * Makefile.in: Rebuild.
630 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
632 * backtrace.c: #include <sys/types.h>.
634 2015-09-08 Ian Lance Taylor <iant@google.com>
637 * backtrace.c: #include "internal.h".
638 (struct backtrace_data): Add can_alloc field.
639 (unwind): If can_alloc is false, don't try to get file/line
641 (backtrace_full): Set can_alloc field in bdata.
642 * alloc.c (backtrace_alloc): Don't call error_callback if it is
644 * mmap.c (backtrace_alloc): Likewise.
645 * internal.h: Update comments for backtrace_alloc and
648 2015-09-08 Ian Lance Taylor <iant@google.com>
651 * mmap.c (backtrace_alloc): Correct test for mmap failure.
653 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
655 * configure.ac: For spu-*-* targets, set have_fcntl to no.
656 * configure: Regenerate.
658 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
660 * configure.ac: Remove [disable-shared] argument to LT_INIT.
661 Remove setting PIC_FLAG when building as target library.
662 * configure: Regenerate.
664 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
666 * configure.ac: Only compile with -fPIC if the target
668 * configure: Regenerate.
670 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
672 * configure.ac: Set have_mmap to no on spu-*-* targets.
673 * configure: Regenerate.
675 2015-08-13 Ian Lance Taylor <iant@google.com>
677 * dwarf.c (read_function_entry): Add vec_inlined parameter.
680 2015-06-11 Martin Sebor <msebor@redhat.com>
683 * dwarf.c (struct line): Add new field idx.
684 (line_compare): Use it.
686 (read_line_info): Reset it.
688 2015-05-29 Tristan Gingold <gingold@adacore.com>
690 * pecoff.c: New file.
691 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
692 * Makefile.in: Regenerate.
693 * filetype.awk: Detect pecoff.
694 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
696 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
698 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
699 * configure: Regenerate.
700 * pecoff.c: New file.
702 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
704 * Makefile.in: Regenerated with automake-1.11.6.
705 * aclocal.m4: Likewise.
706 * configure: Likewise.
708 2015-01-24 Matthias Klose <doko@ubuntu.com>
710 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
711 * configure: Regenerate.
713 2015-01-05 Jakub Jelinek <jakub@redhat.com>
715 Update copyright years.
717 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
720 * configure: Regenerated.
722 2014-11-11 David Malcolm <dmalcolm@redhat.com>
724 * ChangeLog.jit: New.
726 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
729 * configure: Regenerate.
731 2014-10-23 Ian Lance Taylor <iant@google.com>
733 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
734 Fix to return void *.
736 2014-05-08 Ian Lance Taylor <iant@google.com>
738 * mmap.c (backtrace_free): If freeing a large aligned block of
739 memory, call munmap rather than holding onto it.
740 (backtrace_vector_grow): When growing a vector, double the number
741 of pages requested. When releasing the old version of a grown
742 vector, pass the correct size to backtrace_free.
744 2014-03-07 Ian Lance Taylor <iant@google.com>
746 * sort.c (backtrace_qsort): Use middle element as pivot.
748 2014-03-06 Ian Lance Taylor <iant@google.com>
752 * internal.h (backtrace_qsort): Declare.
753 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
754 (read_line_info, read_function_entry): Likewise.
755 (read_function_info, build_dwarf_data): Likewise.
756 * elf.c (elf_initialize_syminfo): Likewise.
757 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
758 (stest_SOURCES, stest_LDADD): Define.
759 (check_PROGRAMS): Add stest.
761 2014-02-07 Misty De Meo <misty@brew.sh>
764 * configure.ac: Use AC_LINK_IFELSE in check for
766 * configure: Regenerate.
768 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
770 Update copyright years
772 2013-12-06 Jakub Jelinek <jakub@redhat.com>
774 * elf.c (ET_DYN): Undefine and define again.
775 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
776 return early -1 without closing the descriptor.
777 (struct phdr_data): Add exe_descriptor.
778 (phdr_callback): If pd->exe_descriptor is not -1, for very first
779 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
780 otherwise backtrace_close the exe_descriptor if not -1. Adjust
782 (backtrace_initialize): Adjust call to elf_add. If it returns
783 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
785 2013-12-05 Ian Lance Taylor <iant@google.com>
787 * alloc.c (backtrace_vector_finish): Add error_callback and data
788 parameters. Call backtrace_vector_release. Return address base.
789 * mmap.c (backtrace_vector_finish): Add error_callback and data
790 parameters. Return address base.
791 * dwarf.c (read_function_info): Get new address base from
792 backtrace_vector_finish.
793 * internal.h (backtrace_vector_finish): Update declaration.
795 2013-11-27 Ian Lance Taylor <iant@google.com>
797 * dwarf.c (find_address_ranges): New static function, broken out
798 of build_address_map.
799 (build_address_map): Call it.
800 * btest.c (check): Check for missing filename or function, rather
802 (f3): Check that enough frames were returned.
804 2013-11-19 Jakub Jelinek <jakub@redhat.com>
806 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
807 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
809 * btest.c (struct symdata): Add size field.
810 (callback_three): Add symsize argument. Copy it to the data->size
812 (f23): Set symdata.size to 0.
813 (test5): Likewise. If sizeof (int) > 1, lookup address of
814 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
817 * atomic.c: Include sys/types.h.
819 2013-11-18 Ian Lance Taylor <iant@google.com>
821 * configure.ac: Check for support of __atomic extensions.
822 * internal.h: Declare or #define atomic functions for use in
824 * atomic.c: New file.
825 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
826 (dwarf_fileline, backtrace_dwarf_add): Likewise.
827 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
828 (backtrace_initialize): Likewise.
829 * fileline.c (fileline_initialize): Likewise.
830 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
831 * configure, config.h.in, Makefile.in: Rebuild.
833 2013-11-18 Jakub Jelinek <jakub@redhat.com>
835 * elf.c (SHN_UNDEF): Define.
836 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
837 with st_shndx == SHN_UNDEF. Add base_address to address fields.
838 (elf_add): Adjust caller.
840 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
842 2013-11-16 Ian Lance Taylor <iant@google.com>
844 * backtrace.h (backtrace_create_state): Correct comment about
847 2013-11-15 Ian Lance Taylor <iant@google.com>
849 * backtrace.h (backtrace_syminfo): Update comment and parameter
850 name to take any address, not just a PC value.
851 * elf.c (STT_OBJECT): Define.
852 (elf_nosyms): Rename parameter pc to addr.
853 (elf_symbol_search): Rename local variable pc to addr.
854 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
855 (elf_syminfo): Rename parameter pc to addr.
856 * btest.c (global): New global variable.
860 2013-10-17 Ian Lance Taylor <iant@google.com>
862 * elf.c (elf_add): Don't get the wrong offsets if a debug section
865 2013-10-15 David Malcolm <dmalcolm@redhat.com>
867 * configure.ac: Add --enable-host-shared, setting up
868 pre-existing PIC_FLAG variable within Makefile.am et al.
869 * configure: Regenerate.
871 2013-09-20 Alan Modra <amodra@gmail.com>
873 * configure: Regenerate.
875 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
877 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
879 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
881 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
882 dl_iterate_phdr callbacks.
884 2013-03-25 Ian Lance Taylor <iant@google.com>
886 * alloc.c: #include <sys/types.h>.
889 2013-01-31 Ian Lance Taylor <iant@google.com>
891 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
892 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
894 2013-01-25 Jakub Jelinek <jakub@redhat.com>
897 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
898 attribute was not seen.
900 2013-01-16 Ian Lance Taylor <iant@google.com>
902 * dwarf.c (struct unit): Add filename and abs_filename fields.
903 (build_address_map): Set new fields when reading unit.
904 (dwarf_lookup_pc): If we don't find an entry in the line table,
905 just return the main file name.
907 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
909 Update copyright years.
911 2013-01-01 Ian Lance Taylor <iant@google.com>
914 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
915 $(MULTIBUILDTOP)/../../gcc/include.
916 * Makefile.in: Rebuild.
918 2013-01-01 Ian Lance Taylor <iant@google.com>
921 * mmap.c (backtrace_alloc): Don't call sync functions if not
923 (backtrace_free): Likewise.
925 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
927 * mmapio.c: Define MAP_FAILED if not defined.
929 2012-12-11 Jakub Jelinek <jakub@redhat.com>
932 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
933 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
934 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
936 * Makefile.in: Regenerated.
937 * configure: Regenerated.
939 2012-12-07 Jakub Jelinek <jakub@redhat.com>
942 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
943 * Makefile.in: Regenerated.
945 2012-11-20 Ian Lance Taylor <iant@google.com>
947 * dwarf.c (read_attribute): Always clear val.
949 2012-11-13 Ian Lance Taylor <iant@google.com>
952 * configure.ac: Only add -Werror if building a target library.
953 * configure: Rebuild.
955 2012-11-12 Ian Lance Taylor <iant@google.com>
956 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
957 Gerald Pfeifer <gerald@pfeifer.com>
959 * configure.ac: Check for getexecname.
960 * fileline.c: #include <errno.h>. Define getexecname if not
962 (fileline_initialize): Try to find the executable in a few
964 * print.c (error_callback): Only print the filename if it came
965 from the backtrace state.
966 * configure, config.h.in: Rebuild.
968 2012-10-29 Ian Lance Taylor <iant@google.com>
970 * mmap.c (backtrace_vector_release): Correct last patch: add
973 2012-10-29 Ian Lance Taylor <iant@google.com>
975 * mmap.c (backtrace_vector_release): Make sure freed block is
976 aligned on 8-byte boundary.
978 2012-10-26 Ian Lance Taylor <iant@google.com>
981 * posix.c (backtrace_open): Add does_not_exist parameter.
982 * elf.c (phdr_callback): Do not warn if shared library could not
984 * fileline.c (fileline_initialize): Update calls to
986 * internal.h (backtrace_open): Update declaration.
988 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
991 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
992 * configure: Regenerate.
994 2012-10-24 Ian Lance Taylor <iant@google.com>
997 * configure.ac: Check whether -funwind-tables option works.
998 * configure: Rebuild.
1000 2012-10-11 Ian Lance Taylor <iant@google.com>
1002 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1003 * configure: Rebuild.
1005 2012-10-10 Ian Lance Taylor <iant@google.com>
1007 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1010 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1012 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1014 2012-10-09 Ian Lance Taylor <iant@google.com>
1016 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1017 (backtrace_dwarf_add): Likewise.
1019 2012-10-09 Ian Lance Taylor <iant@google.com>
1021 Add support for tracing through shared libraries.
1022 * configure.ac: Check for link.h and dl_iterate_phdr.
1023 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1024 ELF macros before #defining them.
1025 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1027 (struct elf_syminfo_data): Add next field.
1028 (elf_initialize_syminfo): Initialize next field.
1029 (elf_add_syminfo_data): New static function.
1030 (elf_add): New static function, broken out of
1031 backtrace_initialize. Call backtrace_dwarf_add instead of
1032 backtrace_dwarf_initialize.
1033 (struct phdr_data): Define.
1034 (phdr_callback): New static function.
1035 (backtrace_initialize): Call elf_add.
1036 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1037 (add_unit_addr): Add base_address parameter. Change all callers.
1038 (add_unit_ranges, build_address_map): Likewise.
1039 (add_line): Add ddata parameter. Change all callers.
1040 (read_line_program, add_function_range): Likewise.
1041 (dwarf_lookup_pc): New static function, broken out of
1043 (dwarf_fileline): Call dwarf_lookup_pc.
1044 (build_dwarf_data): New static function.
1045 (backtrace_dwarf_add): New function.
1046 (backtrace_dwarf_initialize): Remove.
1047 * internal.h (backtrace_dwarf_initialize): Don't declare.
1048 (backtrace_dwarf_add): Declare.
1049 * configure, config.h.in: Rebuild.
1051 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1053 * btest.c (f23): Avoid uninitialized variable warning.
1055 2012-10-04 Ian Lance Taylor <iant@google.com>
1057 * dwarf.c: If the system header files do not declare strnlen,
1058 provide our own version.
1060 2012-10-03 Ian Lance Taylor <iant@google.com>
1062 * dwarf.c (read_uleb128): Fix overflow test.
1063 (read_sleb128): Likewise.
1064 (build_address_map): Don't change unit_buf.start.
1066 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1069 * configure.ac (EXTRA_FLAGS): New.
1070 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1071 * configure, Makefile.in: Regenerate.
1073 2012-09-29 Ian Lance Taylor <iant@google.com>
1076 * fileline.c (fileline_initialize): Pass errnum as -1 when
1077 reporting that we could not read executable information after a
1080 2012-09-27 Ian Lance Taylor <iant@google.com>
1083 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1084 * Makefile.am: Add dependencies for all objects.
1085 * configure, aclocal.m4, Makefile.in: Rebuild.
1087 2012-09-27 Ian Lance Taylor <iant@google.com>
1090 * elf.c (backtrace_initialize): Set *fileln_fn, not
1093 2012-09-19 Ian Lance Taylor <iant@google.com>
1095 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1096 as a target library.
1097 * configure: Rebuild.
1099 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1100 Ian Lance Taylor <iant@google.com>
1102 * configure.ac (GCC_HEADER_STDINT): Invoke.
1103 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1104 * btest.c: Don't include <stdint.h>.
1105 * dwarf.c: Likewise.
1106 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1108 2012-09-18 Ian Lance Taylor <iant@google.com>
1111 * Makefile.am (AM_CPPFLAGS): Define.
1112 (AM_CFLAGS): Remove -I options.
1113 * Makefile.in: Rebuild.
1115 2012-09-18 Ian Lance Taylor <iant@google.com>
1117 * posix.c (O_BINARY): Define if not defined.
1118 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1119 HAVE_FCNTL is defined.
1120 * configure.ac: Test for the fcntl function.
1121 * configure, config.h.in: Rebuild.
1123 2012-09-18 Ian Lance Taylor <iant@google.com>
1125 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1127 2012-09-18 Ian Lance Taylor <iant@google.com>
1129 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1131 2012-09-18 Ian Lance Taylor <iant@google.com>
1133 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1134 * mmapio.c: Don't define _GNU_SOURCE.
1135 * configure, config.h.in: Rebuild.
1137 2012-09-18 Ian Lance Taylor <iant@google.com>
1139 * configure.ac: Check whether strnlen is declared.
1140 * dwarf.c: Declare strnlen if not declared.
1141 * configure, config.h.in: Rebuild.
1143 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1145 * fileline.c: Include <stdlib.h>.
1148 2012-09-17 Ian Lance Taylor <iant@google.com>
1151 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1154 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1157 * nounwind.c (backtrace_simple): Add state parameter.
1159 2012-09-17 Ian Lance Taylor <iant@google.com>
1162 * unknown.c (unknown_fileline): Add state parameter, remove
1163 fileline_data parameter, name error_callback parameter.
1164 (backtrace_initialize): Add state parameter.
1166 2012-09-17 Ian Lance Taylor <iant@google.com>
1168 * Initial implementation.
1170 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1172 Copying and distribution of this file, with or without modification,
1173 are permitted in any medium without royalty provided the copyright
1174 notice and this notice are preserved.