1 2019-01-28 Tom de Vries <tdevries@suse.de>
3 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
4 Use $< to access prerequisite.
5 * Makefile.in: Regenerate.
7 2019-01-25 Nathan Sidwell <nathan@acm.org>
9 * elf.c (elf_add): Pass "" filename to recursive call with
12 2019-01-25 Tom de Vries <tdevries@suse.de>
14 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
16 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
17 * Makefile.in: Regenerate.
19 2019-01-25 Tom de Vries <tdevries@suse.de>
21 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
22 (TESTS): Rename dtest to btest_gnudebuglink.
23 * Makefile.in: Regenerate.
25 2019-01-23 Tom de Vries <tdevries@suse.de>
27 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
28 (units_search, find_unit): Use size_t for offset.
29 (build_address_map): Use size_t for unit_offset.
31 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
33 * allocfail.c (main): Increase portability of printf statement.
35 2019-01-18 Ian Lance Taylor <iant@golang.org>
38 * mmapio.c (backtrace_get_view): Change size parameter to
39 uint64_t. Check that value fits in size_t.
40 * read.c (backtrace_get_view): Likewise.
41 * internal.h (backtrace_get_view): Update declaration.
42 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
44 2019-01-17 Tom de Vries <tdevries@suse.de>
47 * configure.ac (DWZ): Set with AC_CHECK_PROG.
48 (HAVE_DWZ): Set with AM_CONDITIONAL.
49 * configure: Regenerate.
50 * Makefile.am (TESTS): Add btest_dwz.
51 * Makefile.in: Regenerate.
53 2019-01-17 Tom de Vries <tdevries@suse.de>
56 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
57 (read_attribute): Handle DW_FORM_GNU_ref_alt using
58 ATTR_VAL_REF_ALT_INFO.
59 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
61 2019-01-17 Tom de Vries <tdevries@suse.de>
63 * dwarf.c (struct unit): Add low_offset and high_offset fields.
64 (struct unit_vector): New type.
65 (struct dwarf_data): Add units and units_counts fields.
66 (find_unit): New function.
67 (find_address_ranges): Add and handle unit_tag parameter.
68 (build_address_map): Add and handle units_vec parameter.
69 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
72 2019-01-17 Tom de Vries <tdevries@suse.de>
75 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
78 2019-01-17 Tom de Vries <tdevries@suse.de>
80 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
81 (read_attribute): Add altlink parameter. Handle missing altlink for
82 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
83 (find_address_ranges, build_address_map, build_dwarf_data): Add and
84 handle altlink parameter.
85 (read_referenced_name, read_function_entry): Add argument to
88 2019-01-17 Tom de Vries <tdevries@suse.de>
90 * dwarf.c (struct dwarf_data): Add altlink field.
91 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
92 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
93 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
94 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
95 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
96 * xcoff.c (xcoff_add): Same.
98 2019-01-17 Tom de Vries <tdevries@suse.de>
100 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
101 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
102 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
103 argument to backtrace_dwarf_add call.
104 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
105 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
106 * xcoff.c (xcoff_add): Same.
108 2019-01-17 Tom de Vries <tdevries@suse.de>
110 * elf.c (elf_add): Add and handle with_buildid_data and
111 with_buildid_size parameters. Handle .gnu_debugaltlink section.
112 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
114 2019-01-16 Tom de Vries <tdevries@suse.de>
116 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
118 (read_referenced_name): ... here, and ...
119 (read_function_entry): ... here.
121 2019-01-16 Tom de Vries <tdevries@suse.de>
123 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
125 (read_function_entry): Same. Don't allow name found via
126 DW_AT_abstract_origin or case DW_AT_specification to override linkage
129 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
133 * backtrace.h: Mechanically replace "can not" with "cannot".
135 2019-01-01 Jakub Jelinek <jakub@redhat.com>
137 Update copyright years.
139 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
141 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
143 * Makefile.in: Regenerate.
145 2018-12-28 Tom de Vries <tdevries@suse.de>
147 * dwarf.c (build_address_map): Reuse unused units.
149 2018-12-28 Tom de Vries <tdevries@suse.de>
151 * dwarf.c (build_address_map): Simplify by removing local variable
154 2018-12-28 Ian Lance Taylor <iant@golang.org>
155 Tom de Vries <tdevries@suse.de>
157 PR libbacktrace/88063
158 * dwarf.c (free_unit_addrs_vector): Remove.
159 (build_address_map): Keep track of allocated units in vector. Free
160 allocated units and corresponding abbrevs upon failure. Remove now
161 redundant call to free_unit_addrs_vector. Free addrs vector upon
162 failure. Free allocated unit vector.
164 2018-12-28 Tom de Vries <tdevries@suse.de>
166 * dwarf.c (build_address_map): Free addrs vector upon failure.
168 2018-12-14 Tom de Vries <tdevries@suse.de>
171 * allocfail.sh: Remove "set -o pipefail".
173 2018-12-12 Tom de Vries <tdevries@suse.de>
175 * Makefile.am (TESTS): Add allocfail.sh.
176 (check_PROGRAMS): Add allocfail.
177 * Makefile.in: Regenerate.
178 * instrumented_alloc.c: New file. Redefine malloc and realloc.
180 * allocfail.c: New file.
181 * allocfail.sh: New file.
183 2018-11-30 Tom de Vries <tdevries@suse.de>
185 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
186 test_xcoff_64, test_pecoff and test_unknown.
187 * Makefile.in: Regenerate.
188 * test_format.c: New file.
190 2018-11-30 Tom de Vries <tdevries@suse.de>
192 * Makefile.am : Add _with_alloc version for each test in
194 * Makefile.in: Regenerate.
196 2018-11-30 Tom de Vries <tdevries@suse.de>
198 * internal.h (backtrace_vector_free): New static inline fuction,
200 * dwarf.c (read_line_info): ... here.
202 2018-11-28 Tom de Vries <tdevries@suse.de>
204 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
207 2018-11-27 Tom de Vries <tdevries@suse.de>
209 * mmap.c (backtrace_vector_release): Same.
210 * unittest.c (test1): Add check.
212 2018-11-27 Tom de Vries <tdevries@suse.de>
214 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
216 * Makefile.am (check_PROGRAMS): Add unittest.
217 * Makefile.in: Regenerate.
218 * unittest.c: New file.
220 2018-11-22 Tom de Vries <tdevries@suse.de>
222 * dwarf.c (read_initial_length): Factor out of ...
223 (build_address_map, read_line_info): ... here.
225 2018-11-21 Tom de Vries <tdevries@suse.de>
227 * dwarf.c (read_string): Factor out of ...
228 (read_attribute, read_line_header, read_line_program): ... here.
230 2018-10-31 Joseph Myers <joseph@codesourcery.com>
233 * Makefile.am: Include multilib.am.
234 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
235 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
237 2018-10-05 Ian Lance Taylor <iant@golang.org>
239 PR libbacktrace/87529
240 * backtrace.h: Document that backtrace_create_state should be
243 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
245 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
246 * Makefile.in: Regenerate.
247 * config.h.in: Likewise.
248 * configure: Likewise.
250 2018-08-01 Tony Reix <tony.reix@atos.net>
252 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
253 (struct xcoff_func, struct xcoff_func_vector): New structs.
254 (xcoff_syminfo): Drop leading dot from symbol name.
255 (xcoff_line_compare, xcoff_line_search): Remove.
256 (xcoff_func_compare, xcoff_func_search): New static functions.
257 (xcoff_lookup_pc): Search function table.
258 (xcoff_add_line, xcoff_process_linenos): Remove.
259 (xcoff_initialize_fileline): Build function table.
261 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
264 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
265 checking up to 36 bytes.
267 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
269 * configure: Regenerated.
271 2018-04-19 Jakub Jelinek <jakub@redhat.com>
273 * configure: Regenerated.
275 2018-04-17 Ian Lance Taylor <iant@golang.org>
277 * backtrace.c: Revert last two changes. Don't call mmap
280 2018-04-17 Ian Lance Taylor <iant@golang.org>
282 * backtrace.c: Include backtrace-supported.h before checking
283 BACKTRACE_USES_MALLOC.
285 2018-04-17 Ian Lance Taylor <iant@golang.org>
287 * backtrace.c (backtrace_full): When testing whether we can
288 allocate memory, call mmap directly, and munmap the memory.
290 2018-04-04 Jakub Jelinek <jakub@redhat.com>
293 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
294 big endian, only use 32-bit loads if endianity macros are predefined
295 and indicate big or little endian.
297 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
300 * configure: Regenerate.
302 2018-02-15 Jakub Jelinek <jakub@redhat.com>
305 * elf.c (SHT_PROGBITS): Undefine and define.
307 2018-02-14 Jakub Jelinek <jakub@redhat.com>
310 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
311 (struct elf_ppc64_opd_data): New type.
312 (elf_initialize_syminfo): Add opd argument, handle symbols
313 pointing into the PowerPC64 ELFv1 .opd section.
314 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
315 to structure with .opd data to elf_initialize_syminfo.
317 2018-01-31 Ian Lance Taylor <iant@golang.org>
319 * elf.c (elf_add): Close descriptor if we use a debugfile.
320 * btest.c (check_open_files): New static function.
321 (main): Call check_open_files.
323 2018-01-25 Ian Lance Taylor <iant@golang.org>
325 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
327 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
329 2018-01-25 Ian Lance Taylor <iant@golang.org>
331 * pecoff.c (coff_add): Only release syms_view if it is valid.
333 2018-01-25 Ian Lance Taylor <iant@golang.org>
335 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
337 2018-01-24 Ian Lance Taylor <iant@golang.org>
339 * pecoff.c (coff_add): Use coff_read4, not memcpy.
341 2018-01-24 Ian Lance Taylor <iant@golang.org>
344 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
347 2018-01-19 Tony Reix <tony.reix@atos.net>
349 * xcoff.c (xcoff_incl_compare): New function.
350 (xcoff_incl_search): New function.
351 (xcoff_process_linenos): Use bsearch to find include file.
352 (xcoff_initialize_fileline): Sort include file information.
354 2018-01-16 Ian Lance Taylor <iant@golang.org>
356 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
358 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
359 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
360 (elf_zlib_default_table): Update.
361 (elf_zlib_default_dist_table): New static array.
362 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
364 * ztest.c (struct zlib_test): Add uncompressed_len.
365 (tests): Initialize uncompressed_len field. Add new test case.
366 (test_samples): Use uncompressed_len field.
368 2018-01-03 Jakub Jelinek <jakub@redhat.com>
370 Update copyright years.
372 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
374 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
375 * aclocal.m4: Regenerate.
376 * Makefile.in: Likewise.
377 * configure: Likewise.
379 2017-10-06 Ian Lance Taylor <iant@golang.org>
381 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
382 zlib uncompress function.
384 2017-10-05 Ian Lance Taylor <iant@golang.org>
386 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
387 Read a four byte integer.
388 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
389 boundary before ever calling elf_zlib_fetch.
390 * ztest.c (test_large): Simplify print statements a bit.
392 2017-10-02 Ian Lance Taylor <iant@golang.org>
394 * ztest.c: #include <errno.h>.
395 (TEST_TIMING): Don't define, don't test.
396 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
397 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
398 (ZLIB_CLOCK_GETTIME_ARG): Define.
399 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
400 * Makefile.am: Likewise.
401 * configure, Makefile.in: Rebuild.
403 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
406 * Makefile.am: Append the content of clock_gettime_link to
408 * configure.ac: Test for the case that clock_gettime is in librt.
409 * Makefile.in: Regenerate.
410 * configure: Likewise.
413 * configure.ac: Check for clock_gettime.
414 * config.h.in: Regenerate.
415 * configure: Likewise.
416 * ztest.c (average_time, test_large): Conditionalize test timing
417 on clock_gettime availability.
419 2017-09-29 Tony Reix <tony.reix@atos.net>
421 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
422 (STYP_DWARF, SSUBTYP_DW*): Define.
423 (enum dwarf_section): Define.
424 (struct dwsect_info): Define.
425 (xcoff_add): Look for DWARF sections, pass them to
428 2017-09-28 Ian Lance Taylor <iant@golang.org>
431 * elf.c (__builtin_prefetch): Define if not __GNUC__.
433 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
434 (b_elf_chdr): Define type.
435 (enum debug_section): Add ZDEBUG_xxx values.
436 (debug_section_names): Add names for new sections.
437 (struct debug_section_info): Add compressed field.
438 (elf_zlib_failed, elf_zlib_fetch): New static functions.
439 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
440 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
441 (HUFFMAN_SECONDARY_SHIFT): Define.
442 (ZDEBUG_TABLE_SIZE): Define.
443 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
444 (final_next_secondary): New static variable if
445 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
446 (elf_zlib_inflate_table): New static function.
447 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
448 function to produce fixed Huffman table.
449 (elf_zlib_default_table): New static variable.
450 (elf_zlib_inflate): New static function.
451 (elf_zlib_verify_checksum): Likewise.
452 (elf_zlib_inflate_and_verify): Likewise.
453 (elf_uncompress_zdebug): Likewise.
454 (elf_uncompress_chdr): Likewise.
455 (backtrace_uncompress_zdebug): New extern function.
456 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
457 sections, and uncompress them.
458 * internal.h (backtrace_compress_zdebug): Declare.
460 * configure.ac: Check for -lz and check whether the linker
461 supports --compress-debug-sections.
462 * Makefile.am (ztest_SOURCES): New variable.
463 (ztest_CFLAGS, ztest_LDADD): New variables.
464 (check_PROGRAMS): Add ztest.
465 (ctestg_SOURCES): New variable.
466 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
467 (ctesta_SOURCES): New variable.
468 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
469 (check_PROGRAMS): Add ctestg and ctesta.
470 * configure, config.h.in, Makefile.in: Rebuild.
472 2017-09-22 Ian Lance Taylor <iant@golang.org>
475 * configure.ac: Check for lstat and readlink.
476 * elf.c (lstat, readlink): Provide dummy versions if real versions
478 * configure, config.h.in: Rebuild.
480 2017-09-21 Ian Lance Taylor <iant@google.com>
483 * elf.c (backtrace_initialize): Set pd.exe_filename.
485 2017-09-20 Ian Lance Taylor <iant@golang.org>
486 Denis Khalikov <d.khalikov@partner.samsung.com>
489 Support for external debug info.
490 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
491 (S_ISLNK): Define if not defined.
492 (xstrnlen): Define if strnlen is not available.
493 (b_elf_note): Define type.
494 (NT_GNU_BUILD_ID): Define macro.
495 (elf_crc32, elf_crc32_file): New static functions.
496 (elf_is_symlink, elf_readlink): New static functions.
497 (elf_open_debugfile_by_buildid): New static function.
498 (elf_try_debugfile): New static function.
499 (elf_find_debugfile_by_debuglink): New static function.
500 (elf_open_debugfile_by_debuglink): New static function.
501 (elf_add): Add filename and debuginfo parameters. Adjust all
502 callers. Look for external debug info notes, and try to fetch
503 debug info from external file.
504 (struct phdr_data): Add exe_filename field.
505 (phdr_callback): Pass filename to elf_add.
506 (backtrace_initialize): Add filename parameter.
507 * internal.h (backtrace_initialize): Add filename parameter.
508 * fileline.c (fileline_initialize): Pass filename to
509 backtrace_initialize.
510 * pecoff.c (fileline_initialize): Add unused filename parameter.
511 * unknown.c (fileline_initialize): Likewise.
512 * xcoff.c (fileline_initialize): Likewise.
513 * configure.ac: Check for objcopy --add-gnu-debuglink.
514 * Makefile.am (dtest): New test target.
515 * configure, Makefile.in: Rebuild.
517 2017-09-12 Steve Ellcey <sellcey@cavium.com>
520 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
521 * Makefile.in: Regenerate.
523 2017-09-12 Steve Ellcey <sellcey@cavium.com>
526 * libbacktrace/Makefile.in
527 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
529 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
532 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
534 2017-07-28 Tony Reix <tony.reix@atos.net>
536 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
538 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
540 * fileline.c (fileline_initialize): Print pid_t as long.
542 2017-07-26 Tony Reix <tony.reix@atos.net>
544 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
545 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
546 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
547 * configure, config.h.in: Regenerate.
549 2017-07-21 Tony Reix <tony.reix@atos.net>
551 * filetype.awk: Add AIX XCOFF type detection.
552 * configure.ac: Recognize xcoff format.
553 * Makefile.am (FORMAT_FILES): Add xcoff.c.
554 * fileline.c: Include <unistd.h>.
555 (fileline_initialize): Add case for AIX procfs.
557 * configure, Makefile.in: Rebuild.
559 2017-06-21 Richard Biener <rguenther@suse.de>
561 * configure.ac: Add AC_SYS_LARGEFILE.
562 * config.h.in: Regenerate.
563 * configure: Likewise.
565 2017-06-11 Ian Lance Taylor <iant@golang.org>
567 * elf.c (backtrace_initialize): Always set *fileline_fn.
569 * btest.c: Move support functions into testlib.c. Change calls to
570 check to pass file name.
571 * testlib.c: New file, copied from (part of) btest.c.
572 * testlib.h: New file, declarations for testlib.c.
573 * edtest.c: Use testlib.h and testlib.c.
574 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
575 * Makefile.am (btest_SOURCES): Add testlib.c.
576 (edtest_SOURCES): Likewise.
577 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
578 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
579 * configure, Makefile.in: Rebuild.
581 2017-05-19 Than McIntosh <thanm@google.com>
583 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
584 (read_line_header): Don't allocate dirs if dirs_count == 0.
585 * edtest.c: New file.
586 * edtest2.c: New file.
587 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
588 (check_PROGRAMS): Add edtest.
589 (edtest2_build.c, gen_edtest2_build): New targets.
590 * Makefile.in: Rebuild.
592 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
594 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
595 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
597 2017-01-01 Jakub Jelinek <jakub@redhat.com>
599 Update copyright years.
601 2016-11-15 Matthias Klose <doko@ubuntu.com>
603 * configure: Regenerate.
605 2016-09-11 Carlos Liam <carlos@aarzee.me>
607 * all: Remove meaningless trailing whitespace.
609 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
612 * elf.c (phdr_callback) [__i386__]: Add
613 __attribute__((__force_align_arg_pointer__)).
615 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
617 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
618 avoid possible crash.
619 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
620 missing debug info anymore.
622 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
624 * mmap.c (MAP_FAILED): Define if not defined.
626 2016-01-04 Jakub Jelinek <jakub@redhat.com>
628 Update copyright years.
630 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
632 * configure.ac: Specify that DJGPP do not have mmap
633 even when sys/mman.h exists.
634 * configure: Regenerate
636 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
639 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
640 * configure: Regenerate.
641 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
644 2015-09-17 Ian Lance Taylor <iant@google.com>
646 * posix.c (backtrace_open): Cast second argument of open() to int.
648 2015-09-11 Ian Lance Taylor <iant@google.com>
650 * Makefile.am (backtrace.lo): Depend on internal.h.
651 (sort.lo, stest.lo): Add explicit dependencies.
652 * Makefile.in: Rebuild.
654 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
656 * backtrace.c: #include <sys/types.h>.
658 2015-09-08 Ian Lance Taylor <iant@google.com>
661 * backtrace.c: #include "internal.h".
662 (struct backtrace_data): Add can_alloc field.
663 (unwind): If can_alloc is false, don't try to get file/line
665 (backtrace_full): Set can_alloc field in bdata.
666 * alloc.c (backtrace_alloc): Don't call error_callback if it is
668 * mmap.c (backtrace_alloc): Likewise.
669 * internal.h: Update comments for backtrace_alloc and
672 2015-09-08 Ian Lance Taylor <iant@google.com>
675 * mmap.c (backtrace_alloc): Correct test for mmap failure.
677 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
679 * configure.ac: For spu-*-* targets, set have_fcntl to no.
680 * configure: Regenerate.
682 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
684 * configure.ac: Remove [disable-shared] argument to LT_INIT.
685 Remove setting PIC_FLAG when building as target library.
686 * configure: Regenerate.
688 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
690 * configure.ac: Only compile with -fPIC if the target
692 * configure: Regenerate.
694 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
696 * configure.ac: Set have_mmap to no on spu-*-* targets.
697 * configure: Regenerate.
699 2015-08-13 Ian Lance Taylor <iant@google.com>
701 * dwarf.c (read_function_entry): Add vec_inlined parameter.
704 2015-06-11 Martin Sebor <msebor@redhat.com>
707 * dwarf.c (struct line): Add new field idx.
708 (line_compare): Use it.
710 (read_line_info): Reset it.
712 2015-05-29 Tristan Gingold <gingold@adacore.com>
714 * pecoff.c: New file.
715 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
716 * Makefile.in: Regenerate.
717 * filetype.awk: Detect pecoff.
718 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
720 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
722 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
723 * configure: Regenerate.
724 * pecoff.c: New file.
726 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
728 * Makefile.in: Regenerated with automake-1.11.6.
729 * aclocal.m4: Likewise.
730 * configure: Likewise.
732 2015-01-24 Matthias Klose <doko@ubuntu.com>
734 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
735 * configure: Regenerate.
737 2015-01-05 Jakub Jelinek <jakub@redhat.com>
739 Update copyright years.
741 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
744 * configure: Regenerated.
746 2014-11-11 David Malcolm <dmalcolm@redhat.com>
748 * ChangeLog.jit: New.
750 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
753 * configure: Regenerate.
755 2014-10-23 Ian Lance Taylor <iant@google.com>
757 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
758 Fix to return void *.
760 2014-05-08 Ian Lance Taylor <iant@google.com>
762 * mmap.c (backtrace_free): If freeing a large aligned block of
763 memory, call munmap rather than holding onto it.
764 (backtrace_vector_grow): When growing a vector, double the number
765 of pages requested. When releasing the old version of a grown
766 vector, pass the correct size to backtrace_free.
768 2014-03-07 Ian Lance Taylor <iant@google.com>
770 * sort.c (backtrace_qsort): Use middle element as pivot.
772 2014-03-06 Ian Lance Taylor <iant@google.com>
776 * internal.h (backtrace_qsort): Declare.
777 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
778 (read_line_info, read_function_entry): Likewise.
779 (read_function_info, build_dwarf_data): Likewise.
780 * elf.c (elf_initialize_syminfo): Likewise.
781 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
782 (stest_SOURCES, stest_LDADD): Define.
783 (check_PROGRAMS): Add stest.
785 2014-02-07 Misty De Meo <misty@brew.sh>
788 * configure.ac: Use AC_LINK_IFELSE in check for
790 * configure: Regenerate.
792 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
794 Update copyright years
796 2013-12-06 Jakub Jelinek <jakub@redhat.com>
798 * elf.c (ET_DYN): Undefine and define again.
799 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
800 return early -1 without closing the descriptor.
801 (struct phdr_data): Add exe_descriptor.
802 (phdr_callback): If pd->exe_descriptor is not -1, for very first
803 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
804 otherwise backtrace_close the exe_descriptor if not -1. Adjust
806 (backtrace_initialize): Adjust call to elf_add. If it returns
807 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
809 2013-12-05 Ian Lance Taylor <iant@google.com>
811 * alloc.c (backtrace_vector_finish): Add error_callback and data
812 parameters. Call backtrace_vector_release. Return address base.
813 * mmap.c (backtrace_vector_finish): Add error_callback and data
814 parameters. Return address base.
815 * dwarf.c (read_function_info): Get new address base from
816 backtrace_vector_finish.
817 * internal.h (backtrace_vector_finish): Update declaration.
819 2013-11-27 Ian Lance Taylor <iant@google.com>
821 * dwarf.c (find_address_ranges): New static function, broken out
822 of build_address_map.
823 (build_address_map): Call it.
824 * btest.c (check): Check for missing filename or function, rather
826 (f3): Check that enough frames were returned.
828 2013-11-19 Jakub Jelinek <jakub@redhat.com>
830 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
831 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
833 * btest.c (struct symdata): Add size field.
834 (callback_three): Add symsize argument. Copy it to the data->size
836 (f23): Set symdata.size to 0.
837 (test5): Likewise. If sizeof (int) > 1, lookup address of
838 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
841 * atomic.c: Include sys/types.h.
843 2013-11-18 Ian Lance Taylor <iant@google.com>
845 * configure.ac: Check for support of __atomic extensions.
846 * internal.h: Declare or #define atomic functions for use in
848 * atomic.c: New file.
849 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
850 (dwarf_fileline, backtrace_dwarf_add): Likewise.
851 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
852 (backtrace_initialize): Likewise.
853 * fileline.c (fileline_initialize): Likewise.
854 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
855 * configure, config.h.in, Makefile.in: Rebuild.
857 2013-11-18 Jakub Jelinek <jakub@redhat.com>
859 * elf.c (SHN_UNDEF): Define.
860 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
861 with st_shndx == SHN_UNDEF. Add base_address to address fields.
862 (elf_add): Adjust caller.
864 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
866 2013-11-16 Ian Lance Taylor <iant@google.com>
868 * backtrace.h (backtrace_create_state): Correct comment about
871 2013-11-15 Ian Lance Taylor <iant@google.com>
873 * backtrace.h (backtrace_syminfo): Update comment and parameter
874 name to take any address, not just a PC value.
875 * elf.c (STT_OBJECT): Define.
876 (elf_nosyms): Rename parameter pc to addr.
877 (elf_symbol_search): Rename local variable pc to addr.
878 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
879 (elf_syminfo): Rename parameter pc to addr.
880 * btest.c (global): New global variable.
884 2013-10-17 Ian Lance Taylor <iant@google.com>
886 * elf.c (elf_add): Don't get the wrong offsets if a debug section
889 2013-10-15 David Malcolm <dmalcolm@redhat.com>
891 * configure.ac: Add --enable-host-shared, setting up
892 pre-existing PIC_FLAG variable within Makefile.am et al.
893 * configure: Regenerate.
895 2013-09-20 Alan Modra <amodra@gmail.com>
897 * configure: Regenerate.
899 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
901 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
903 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
905 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
906 dl_iterate_phdr callbacks.
908 2013-03-25 Ian Lance Taylor <iant@google.com>
910 * alloc.c: #include <sys/types.h>.
913 2013-01-31 Ian Lance Taylor <iant@google.com>
915 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
916 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
918 2013-01-25 Jakub Jelinek <jakub@redhat.com>
921 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
922 attribute was not seen.
924 2013-01-16 Ian Lance Taylor <iant@google.com>
926 * dwarf.c (struct unit): Add filename and abs_filename fields.
927 (build_address_map): Set new fields when reading unit.
928 (dwarf_lookup_pc): If we don't find an entry in the line table,
929 just return the main file name.
931 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
933 Update copyright years.
935 2013-01-01 Ian Lance Taylor <iant@google.com>
938 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
939 $(MULTIBUILDTOP)/../../gcc/include.
940 * Makefile.in: Rebuild.
942 2013-01-01 Ian Lance Taylor <iant@google.com>
945 * mmap.c (backtrace_alloc): Don't call sync functions if not
947 (backtrace_free): Likewise.
949 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
951 * mmapio.c: Define MAP_FAILED if not defined.
953 2012-12-11 Jakub Jelinek <jakub@redhat.com>
956 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
957 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
958 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
960 * Makefile.in: Regenerated.
961 * configure: Regenerated.
963 2012-12-07 Jakub Jelinek <jakub@redhat.com>
966 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
967 * Makefile.in: Regenerated.
969 2012-11-20 Ian Lance Taylor <iant@google.com>
971 * dwarf.c (read_attribute): Always clear val.
973 2012-11-13 Ian Lance Taylor <iant@google.com>
976 * configure.ac: Only add -Werror if building a target library.
977 * configure: Rebuild.
979 2012-11-12 Ian Lance Taylor <iant@google.com>
980 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
981 Gerald Pfeifer <gerald@pfeifer.com>
983 * configure.ac: Check for getexecname.
984 * fileline.c: #include <errno.h>. Define getexecname if not
986 (fileline_initialize): Try to find the executable in a few
988 * print.c (error_callback): Only print the filename if it came
989 from the backtrace state.
990 * configure, config.h.in: Rebuild.
992 2012-10-29 Ian Lance Taylor <iant@google.com>
994 * mmap.c (backtrace_vector_release): Correct last patch: add
997 2012-10-29 Ian Lance Taylor <iant@google.com>
999 * mmap.c (backtrace_vector_release): Make sure freed block is
1000 aligned on 8-byte boundary.
1002 2012-10-26 Ian Lance Taylor <iant@google.com>
1005 * posix.c (backtrace_open): Add does_not_exist parameter.
1006 * elf.c (phdr_callback): Do not warn if shared library could not
1008 * fileline.c (fileline_initialize): Update calls to
1010 * internal.h (backtrace_open): Update declaration.
1012 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1015 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1016 * configure: Regenerate.
1018 2012-10-24 Ian Lance Taylor <iant@google.com>
1021 * configure.ac: Check whether -funwind-tables option works.
1022 * configure: Rebuild.
1024 2012-10-11 Ian Lance Taylor <iant@google.com>
1026 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1027 * configure: Rebuild.
1029 2012-10-10 Ian Lance Taylor <iant@google.com>
1031 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1034 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1036 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1038 2012-10-09 Ian Lance Taylor <iant@google.com>
1040 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1041 (backtrace_dwarf_add): Likewise.
1043 2012-10-09 Ian Lance Taylor <iant@google.com>
1045 Add support for tracing through shared libraries.
1046 * configure.ac: Check for link.h and dl_iterate_phdr.
1047 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1048 ELF macros before #defining them.
1049 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1051 (struct elf_syminfo_data): Add next field.
1052 (elf_initialize_syminfo): Initialize next field.
1053 (elf_add_syminfo_data): New static function.
1054 (elf_add): New static function, broken out of
1055 backtrace_initialize. Call backtrace_dwarf_add instead of
1056 backtrace_dwarf_initialize.
1057 (struct phdr_data): Define.
1058 (phdr_callback): New static function.
1059 (backtrace_initialize): Call elf_add.
1060 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1061 (add_unit_addr): Add base_address parameter. Change all callers.
1062 (add_unit_ranges, build_address_map): Likewise.
1063 (add_line): Add ddata parameter. Change all callers.
1064 (read_line_program, add_function_range): Likewise.
1065 (dwarf_lookup_pc): New static function, broken out of
1067 (dwarf_fileline): Call dwarf_lookup_pc.
1068 (build_dwarf_data): New static function.
1069 (backtrace_dwarf_add): New function.
1070 (backtrace_dwarf_initialize): Remove.
1071 * internal.h (backtrace_dwarf_initialize): Don't declare.
1072 (backtrace_dwarf_add): Declare.
1073 * configure, config.h.in: Rebuild.
1075 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1077 * btest.c (f23): Avoid uninitialized variable warning.
1079 2012-10-04 Ian Lance Taylor <iant@google.com>
1081 * dwarf.c: If the system header files do not declare strnlen,
1082 provide our own version.
1084 2012-10-03 Ian Lance Taylor <iant@google.com>
1086 * dwarf.c (read_uleb128): Fix overflow test.
1087 (read_sleb128): Likewise.
1088 (build_address_map): Don't change unit_buf.start.
1090 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1093 * configure.ac (EXTRA_FLAGS): New.
1094 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1095 * configure, Makefile.in: Regenerate.
1097 2012-09-29 Ian Lance Taylor <iant@google.com>
1100 * fileline.c (fileline_initialize): Pass errnum as -1 when
1101 reporting that we could not read executable information after a
1104 2012-09-27 Ian Lance Taylor <iant@google.com>
1107 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1108 * Makefile.am: Add dependencies for all objects.
1109 * configure, aclocal.m4, Makefile.in: Rebuild.
1111 2012-09-27 Ian Lance Taylor <iant@google.com>
1114 * elf.c (backtrace_initialize): Set *fileln_fn, not
1117 2012-09-19 Ian Lance Taylor <iant@google.com>
1119 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1120 as a target library.
1121 * configure: Rebuild.
1123 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1124 Ian Lance Taylor <iant@google.com>
1126 * configure.ac (GCC_HEADER_STDINT): Invoke.
1127 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1128 * btest.c: Don't include <stdint.h>.
1129 * dwarf.c: Likewise.
1130 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1132 2012-09-18 Ian Lance Taylor <iant@google.com>
1135 * Makefile.am (AM_CPPFLAGS): Define.
1136 (AM_CFLAGS): Remove -I options.
1137 * Makefile.in: Rebuild.
1139 2012-09-18 Ian Lance Taylor <iant@google.com>
1141 * posix.c (O_BINARY): Define if not defined.
1142 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1143 HAVE_FCNTL is defined.
1144 * configure.ac: Test for the fcntl function.
1145 * configure, config.h.in: Rebuild.
1147 2012-09-18 Ian Lance Taylor <iant@google.com>
1149 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1151 2012-09-18 Ian Lance Taylor <iant@google.com>
1153 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1155 2012-09-18 Ian Lance Taylor <iant@google.com>
1157 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1158 * mmapio.c: Don't define _GNU_SOURCE.
1159 * configure, config.h.in: Rebuild.
1161 2012-09-18 Ian Lance Taylor <iant@google.com>
1163 * configure.ac: Check whether strnlen is declared.
1164 * dwarf.c: Declare strnlen if not declared.
1165 * configure, config.h.in: Rebuild.
1167 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1169 * fileline.c: Include <stdlib.h>.
1172 2012-09-17 Ian Lance Taylor <iant@google.com>
1175 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1178 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1181 * nounwind.c (backtrace_simple): Add state parameter.
1183 2012-09-17 Ian Lance Taylor <iant@google.com>
1186 * unknown.c (unknown_fileline): Add state parameter, remove
1187 fileline_data parameter, name error_callback parameter.
1188 (backtrace_initialize): Add state parameter.
1190 2012-09-17 Ian Lance Taylor <iant@google.com>
1192 * Initial implementation.
1194 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1196 Copying and distribution of this file, with or without modification,
1197 are permitted in any medium without royalty provided the copyright
1198 notice and this notice are preserved.