1 2019-01-29 Tom de Vries <tdevries@suse.de>
3 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
5 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
6 (check_PROGRAMS): Add BUILDTESTS.
7 * Makefile.in: Regenerate.
9 2019-01-28 Tom de Vries <tdevries@suse.de>
11 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
12 Use $< to access prerequisite.
13 * Makefile.in: Regenerate.
15 2019-01-25 Nathan Sidwell <nathan@acm.org>
17 * elf.c (elf_add): Pass "" filename to recursive call with
20 2019-01-25 Tom de Vries <tdevries@suse.de>
22 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
24 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
25 * Makefile.in: Regenerate.
27 2019-01-25 Tom de Vries <tdevries@suse.de>
29 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
30 (TESTS): Rename dtest to btest_gnudebuglink.
31 * Makefile.in: Regenerate.
33 2019-01-23 Tom de Vries <tdevries@suse.de>
35 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
36 (units_search, find_unit): Use size_t for offset.
37 (build_address_map): Use size_t for unit_offset.
39 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
41 * allocfail.c (main): Increase portability of printf statement.
43 2019-01-18 Ian Lance Taylor <iant@golang.org>
46 * mmapio.c (backtrace_get_view): Change size parameter to
47 uint64_t. Check that value fits in size_t.
48 * read.c (backtrace_get_view): Likewise.
49 * internal.h (backtrace_get_view): Update declaration.
50 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
52 2019-01-17 Tom de Vries <tdevries@suse.de>
55 * configure.ac (DWZ): Set with AC_CHECK_PROG.
56 (HAVE_DWZ): Set with AM_CONDITIONAL.
57 * configure: Regenerate.
58 * Makefile.am (TESTS): Add btest_dwz.
59 * Makefile.in: Regenerate.
61 2019-01-17 Tom de Vries <tdevries@suse.de>
64 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
65 (read_attribute): Handle DW_FORM_GNU_ref_alt using
66 ATTR_VAL_REF_ALT_INFO.
67 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
69 2019-01-17 Tom de Vries <tdevries@suse.de>
71 * dwarf.c (struct unit): Add low_offset and high_offset fields.
72 (struct unit_vector): New type.
73 (struct dwarf_data): Add units and units_counts fields.
74 (find_unit): New function.
75 (find_address_ranges): Add and handle unit_tag parameter.
76 (build_address_map): Add and handle units_vec parameter.
77 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
80 2019-01-17 Tom de Vries <tdevries@suse.de>
83 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
86 2019-01-17 Tom de Vries <tdevries@suse.de>
88 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
89 (read_attribute): Add altlink parameter. Handle missing altlink for
90 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
91 (find_address_ranges, build_address_map, build_dwarf_data): Add and
92 handle altlink parameter.
93 (read_referenced_name, read_function_entry): Add argument to
96 2019-01-17 Tom de Vries <tdevries@suse.de>
98 * dwarf.c (struct dwarf_data): Add altlink field.
99 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
100 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
101 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
102 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
103 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
104 * xcoff.c (xcoff_add): Same.
106 2019-01-17 Tom de Vries <tdevries@suse.de>
108 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
109 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
110 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
111 argument to backtrace_dwarf_add call.
112 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
113 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
114 * xcoff.c (xcoff_add): Same.
116 2019-01-17 Tom de Vries <tdevries@suse.de>
118 * elf.c (elf_add): Add and handle with_buildid_data and
119 with_buildid_size parameters. Handle .gnu_debugaltlink section.
120 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
122 2019-01-16 Tom de Vries <tdevries@suse.de>
124 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
126 (read_referenced_name): ... here, and ...
127 (read_function_entry): ... here.
129 2019-01-16 Tom de Vries <tdevries@suse.de>
131 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
133 (read_function_entry): Same. Don't allow name found via
134 DW_AT_abstract_origin or case DW_AT_specification to override linkage
137 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
141 * backtrace.h: Mechanically replace "can not" with "cannot".
143 2019-01-01 Jakub Jelinek <jakub@redhat.com>
145 Update copyright years.
147 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
149 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
151 * Makefile.in: Regenerate.
153 2018-12-28 Tom de Vries <tdevries@suse.de>
155 * dwarf.c (build_address_map): Reuse unused units.
157 2018-12-28 Tom de Vries <tdevries@suse.de>
159 * dwarf.c (build_address_map): Simplify by removing local variable
162 2018-12-28 Ian Lance Taylor <iant@golang.org>
163 Tom de Vries <tdevries@suse.de>
165 PR libbacktrace/88063
166 * dwarf.c (free_unit_addrs_vector): Remove.
167 (build_address_map): Keep track of allocated units in vector. Free
168 allocated units and corresponding abbrevs upon failure. Remove now
169 redundant call to free_unit_addrs_vector. Free addrs vector upon
170 failure. Free allocated unit vector.
172 2018-12-28 Tom de Vries <tdevries@suse.de>
174 * dwarf.c (build_address_map): Free addrs vector upon failure.
176 2018-12-14 Tom de Vries <tdevries@suse.de>
179 * allocfail.sh: Remove "set -o pipefail".
181 2018-12-12 Tom de Vries <tdevries@suse.de>
183 * Makefile.am (TESTS): Add allocfail.sh.
184 (check_PROGRAMS): Add allocfail.
185 * Makefile.in: Regenerate.
186 * instrumented_alloc.c: New file. Redefine malloc and realloc.
188 * allocfail.c: New file.
189 * allocfail.sh: New file.
191 2018-11-30 Tom de Vries <tdevries@suse.de>
193 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
194 test_xcoff_64, test_pecoff and test_unknown.
195 * Makefile.in: Regenerate.
196 * test_format.c: New file.
198 2018-11-30 Tom de Vries <tdevries@suse.de>
200 * Makefile.am : Add _with_alloc version for each test in
202 * Makefile.in: Regenerate.
204 2018-11-30 Tom de Vries <tdevries@suse.de>
206 * internal.h (backtrace_vector_free): New static inline fuction,
208 * dwarf.c (read_line_info): ... here.
210 2018-11-28 Tom de Vries <tdevries@suse.de>
212 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
215 2018-11-27 Tom de Vries <tdevries@suse.de>
217 * mmap.c (backtrace_vector_release): Same.
218 * unittest.c (test1): Add check.
220 2018-11-27 Tom de Vries <tdevries@suse.de>
222 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
224 * Makefile.am (check_PROGRAMS): Add unittest.
225 * Makefile.in: Regenerate.
226 * unittest.c: New file.
228 2018-11-22 Tom de Vries <tdevries@suse.de>
230 * dwarf.c (read_initial_length): Factor out of ...
231 (build_address_map, read_line_info): ... here.
233 2018-11-21 Tom de Vries <tdevries@suse.de>
235 * dwarf.c (read_string): Factor out of ...
236 (read_attribute, read_line_header, read_line_program): ... here.
238 2018-10-31 Joseph Myers <joseph@codesourcery.com>
241 * Makefile.am: Include multilib.am.
242 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
243 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
245 2018-10-05 Ian Lance Taylor <iant@golang.org>
247 PR libbacktrace/87529
248 * backtrace.h: Document that backtrace_create_state should be
251 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
253 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
254 * Makefile.in: Regenerate.
255 * config.h.in: Likewise.
256 * configure: Likewise.
258 2018-08-01 Tony Reix <tony.reix@atos.net>
260 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
261 (struct xcoff_func, struct xcoff_func_vector): New structs.
262 (xcoff_syminfo): Drop leading dot from symbol name.
263 (xcoff_line_compare, xcoff_line_search): Remove.
264 (xcoff_func_compare, xcoff_func_search): New static functions.
265 (xcoff_lookup_pc): Search function table.
266 (xcoff_add_line, xcoff_process_linenos): Remove.
267 (xcoff_initialize_fileline): Build function table.
269 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
272 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
273 checking up to 36 bytes.
275 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
277 * configure: Regenerated.
279 2018-04-19 Jakub Jelinek <jakub@redhat.com>
281 * configure: Regenerated.
283 2018-04-17 Ian Lance Taylor <iant@golang.org>
285 * backtrace.c: Revert last two changes. Don't call mmap
288 2018-04-17 Ian Lance Taylor <iant@golang.org>
290 * backtrace.c: Include backtrace-supported.h before checking
291 BACKTRACE_USES_MALLOC.
293 2018-04-17 Ian Lance Taylor <iant@golang.org>
295 * backtrace.c (backtrace_full): When testing whether we can
296 allocate memory, call mmap directly, and munmap the memory.
298 2018-04-04 Jakub Jelinek <jakub@redhat.com>
301 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
302 big endian, only use 32-bit loads if endianity macros are predefined
303 and indicate big or little endian.
305 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
308 * configure: Regenerate.
310 2018-02-15 Jakub Jelinek <jakub@redhat.com>
313 * elf.c (SHT_PROGBITS): Undefine and define.
315 2018-02-14 Jakub Jelinek <jakub@redhat.com>
318 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
319 (struct elf_ppc64_opd_data): New type.
320 (elf_initialize_syminfo): Add opd argument, handle symbols
321 pointing into the PowerPC64 ELFv1 .opd section.
322 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
323 to structure with .opd data to elf_initialize_syminfo.
325 2018-01-31 Ian Lance Taylor <iant@golang.org>
327 * elf.c (elf_add): Close descriptor if we use a debugfile.
328 * btest.c (check_open_files): New static function.
329 (main): Call check_open_files.
331 2018-01-25 Ian Lance Taylor <iant@golang.org>
333 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
335 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
337 2018-01-25 Ian Lance Taylor <iant@golang.org>
339 * pecoff.c (coff_add): Only release syms_view if it is valid.
341 2018-01-25 Ian Lance Taylor <iant@golang.org>
343 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
345 2018-01-24 Ian Lance Taylor <iant@golang.org>
347 * pecoff.c (coff_add): Use coff_read4, not memcpy.
349 2018-01-24 Ian Lance Taylor <iant@golang.org>
352 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
355 2018-01-19 Tony Reix <tony.reix@atos.net>
357 * xcoff.c (xcoff_incl_compare): New function.
358 (xcoff_incl_search): New function.
359 (xcoff_process_linenos): Use bsearch to find include file.
360 (xcoff_initialize_fileline): Sort include file information.
362 2018-01-16 Ian Lance Taylor <iant@golang.org>
364 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
366 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
367 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
368 (elf_zlib_default_table): Update.
369 (elf_zlib_default_dist_table): New static array.
370 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
372 * ztest.c (struct zlib_test): Add uncompressed_len.
373 (tests): Initialize uncompressed_len field. Add new test case.
374 (test_samples): Use uncompressed_len field.
376 2018-01-03 Jakub Jelinek <jakub@redhat.com>
378 Update copyright years.
380 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
382 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
383 * aclocal.m4: Regenerate.
384 * Makefile.in: Likewise.
385 * configure: Likewise.
387 2017-10-06 Ian Lance Taylor <iant@golang.org>
389 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
390 zlib uncompress function.
392 2017-10-05 Ian Lance Taylor <iant@golang.org>
394 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
395 Read a four byte integer.
396 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
397 boundary before ever calling elf_zlib_fetch.
398 * ztest.c (test_large): Simplify print statements a bit.
400 2017-10-02 Ian Lance Taylor <iant@golang.org>
402 * ztest.c: #include <errno.h>.
403 (TEST_TIMING): Don't define, don't test.
404 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
405 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
406 (ZLIB_CLOCK_GETTIME_ARG): Define.
407 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
408 * Makefile.am: Likewise.
409 * configure, Makefile.in: Rebuild.
411 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
414 * Makefile.am: Append the content of clock_gettime_link to
416 * configure.ac: Test for the case that clock_gettime is in librt.
417 * Makefile.in: Regenerate.
418 * configure: Likewise.
421 * configure.ac: Check for clock_gettime.
422 * config.h.in: Regenerate.
423 * configure: Likewise.
424 * ztest.c (average_time, test_large): Conditionalize test timing
425 on clock_gettime availability.
427 2017-09-29 Tony Reix <tony.reix@atos.net>
429 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
430 (STYP_DWARF, SSUBTYP_DW*): Define.
431 (enum dwarf_section): Define.
432 (struct dwsect_info): Define.
433 (xcoff_add): Look for DWARF sections, pass them to
436 2017-09-28 Ian Lance Taylor <iant@golang.org>
439 * elf.c (__builtin_prefetch): Define if not __GNUC__.
441 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
442 (b_elf_chdr): Define type.
443 (enum debug_section): Add ZDEBUG_xxx values.
444 (debug_section_names): Add names for new sections.
445 (struct debug_section_info): Add compressed field.
446 (elf_zlib_failed, elf_zlib_fetch): New static functions.
447 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
448 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
449 (HUFFMAN_SECONDARY_SHIFT): Define.
450 (ZDEBUG_TABLE_SIZE): Define.
451 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
452 (final_next_secondary): New static variable if
453 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
454 (elf_zlib_inflate_table): New static function.
455 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
456 function to produce fixed Huffman table.
457 (elf_zlib_default_table): New static variable.
458 (elf_zlib_inflate): New static function.
459 (elf_zlib_verify_checksum): Likewise.
460 (elf_zlib_inflate_and_verify): Likewise.
461 (elf_uncompress_zdebug): Likewise.
462 (elf_uncompress_chdr): Likewise.
463 (backtrace_uncompress_zdebug): New extern function.
464 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
465 sections, and uncompress them.
466 * internal.h (backtrace_compress_zdebug): Declare.
468 * configure.ac: Check for -lz and check whether the linker
469 supports --compress-debug-sections.
470 * Makefile.am (ztest_SOURCES): New variable.
471 (ztest_CFLAGS, ztest_LDADD): New variables.
472 (check_PROGRAMS): Add ztest.
473 (ctestg_SOURCES): New variable.
474 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
475 (ctesta_SOURCES): New variable.
476 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
477 (check_PROGRAMS): Add ctestg and ctesta.
478 * configure, config.h.in, Makefile.in: Rebuild.
480 2017-09-22 Ian Lance Taylor <iant@golang.org>
483 * configure.ac: Check for lstat and readlink.
484 * elf.c (lstat, readlink): Provide dummy versions if real versions
486 * configure, config.h.in: Rebuild.
488 2017-09-21 Ian Lance Taylor <iant@google.com>
491 * elf.c (backtrace_initialize): Set pd.exe_filename.
493 2017-09-20 Ian Lance Taylor <iant@golang.org>
494 Denis Khalikov <d.khalikov@partner.samsung.com>
497 Support for external debug info.
498 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
499 (S_ISLNK): Define if not defined.
500 (xstrnlen): Define if strnlen is not available.
501 (b_elf_note): Define type.
502 (NT_GNU_BUILD_ID): Define macro.
503 (elf_crc32, elf_crc32_file): New static functions.
504 (elf_is_symlink, elf_readlink): New static functions.
505 (elf_open_debugfile_by_buildid): New static function.
506 (elf_try_debugfile): New static function.
507 (elf_find_debugfile_by_debuglink): New static function.
508 (elf_open_debugfile_by_debuglink): New static function.
509 (elf_add): Add filename and debuginfo parameters. Adjust all
510 callers. Look for external debug info notes, and try to fetch
511 debug info from external file.
512 (struct phdr_data): Add exe_filename field.
513 (phdr_callback): Pass filename to elf_add.
514 (backtrace_initialize): Add filename parameter.
515 * internal.h (backtrace_initialize): Add filename parameter.
516 * fileline.c (fileline_initialize): Pass filename to
517 backtrace_initialize.
518 * pecoff.c (fileline_initialize): Add unused filename parameter.
519 * unknown.c (fileline_initialize): Likewise.
520 * xcoff.c (fileline_initialize): Likewise.
521 * configure.ac: Check for objcopy --add-gnu-debuglink.
522 * Makefile.am (dtest): New test target.
523 * configure, Makefile.in: Rebuild.
525 2017-09-12 Steve Ellcey <sellcey@cavium.com>
528 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
529 * Makefile.in: Regenerate.
531 2017-09-12 Steve Ellcey <sellcey@cavium.com>
534 * libbacktrace/Makefile.in
535 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
537 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
540 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
542 2017-07-28 Tony Reix <tony.reix@atos.net>
544 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
546 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
548 * fileline.c (fileline_initialize): Print pid_t as long.
550 2017-07-26 Tony Reix <tony.reix@atos.net>
552 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
553 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
554 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
555 * configure, config.h.in: Regenerate.
557 2017-07-21 Tony Reix <tony.reix@atos.net>
559 * filetype.awk: Add AIX XCOFF type detection.
560 * configure.ac: Recognize xcoff format.
561 * Makefile.am (FORMAT_FILES): Add xcoff.c.
562 * fileline.c: Include <unistd.h>.
563 (fileline_initialize): Add case for AIX procfs.
565 * configure, Makefile.in: Rebuild.
567 2017-06-21 Richard Biener <rguenther@suse.de>
569 * configure.ac: Add AC_SYS_LARGEFILE.
570 * config.h.in: Regenerate.
571 * configure: Likewise.
573 2017-06-11 Ian Lance Taylor <iant@golang.org>
575 * elf.c (backtrace_initialize): Always set *fileline_fn.
577 * btest.c: Move support functions into testlib.c. Change calls to
578 check to pass file name.
579 * testlib.c: New file, copied from (part of) btest.c.
580 * testlib.h: New file, declarations for testlib.c.
581 * edtest.c: Use testlib.h and testlib.c.
582 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
583 * Makefile.am (btest_SOURCES): Add testlib.c.
584 (edtest_SOURCES): Likewise.
585 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
586 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
587 * configure, Makefile.in: Rebuild.
589 2017-05-19 Than McIntosh <thanm@google.com>
591 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
592 (read_line_header): Don't allocate dirs if dirs_count == 0.
593 * edtest.c: New file.
594 * edtest2.c: New file.
595 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
596 (check_PROGRAMS): Add edtest.
597 (edtest2_build.c, gen_edtest2_build): New targets.
598 * Makefile.in: Rebuild.
600 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
602 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
603 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
605 2017-01-01 Jakub Jelinek <jakub@redhat.com>
607 Update copyright years.
609 2016-11-15 Matthias Klose <doko@ubuntu.com>
611 * configure: Regenerate.
613 2016-09-11 Carlos Liam <carlos@aarzee.me>
615 * all: Remove meaningless trailing whitespace.
617 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
620 * elf.c (phdr_callback) [__i386__]: Add
621 __attribute__((__force_align_arg_pointer__)).
623 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
625 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
626 avoid possible crash.
627 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
628 missing debug info anymore.
630 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
632 * mmap.c (MAP_FAILED): Define if not defined.
634 2016-01-04 Jakub Jelinek <jakub@redhat.com>
636 Update copyright years.
638 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
640 * configure.ac: Specify that DJGPP do not have mmap
641 even when sys/mman.h exists.
642 * configure: Regenerate
644 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
647 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
648 * configure: Regenerate.
649 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
652 2015-09-17 Ian Lance Taylor <iant@google.com>
654 * posix.c (backtrace_open): Cast second argument of open() to int.
656 2015-09-11 Ian Lance Taylor <iant@google.com>
658 * Makefile.am (backtrace.lo): Depend on internal.h.
659 (sort.lo, stest.lo): Add explicit dependencies.
660 * Makefile.in: Rebuild.
662 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
664 * backtrace.c: #include <sys/types.h>.
666 2015-09-08 Ian Lance Taylor <iant@google.com>
669 * backtrace.c: #include "internal.h".
670 (struct backtrace_data): Add can_alloc field.
671 (unwind): If can_alloc is false, don't try to get file/line
673 (backtrace_full): Set can_alloc field in bdata.
674 * alloc.c (backtrace_alloc): Don't call error_callback if it is
676 * mmap.c (backtrace_alloc): Likewise.
677 * internal.h: Update comments for backtrace_alloc and
680 2015-09-08 Ian Lance Taylor <iant@google.com>
683 * mmap.c (backtrace_alloc): Correct test for mmap failure.
685 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
687 * configure.ac: For spu-*-* targets, set have_fcntl to no.
688 * configure: Regenerate.
690 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
692 * configure.ac: Remove [disable-shared] argument to LT_INIT.
693 Remove setting PIC_FLAG when building as target library.
694 * configure: Regenerate.
696 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
698 * configure.ac: Only compile with -fPIC if the target
700 * configure: Regenerate.
702 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
704 * configure.ac: Set have_mmap to no on spu-*-* targets.
705 * configure: Regenerate.
707 2015-08-13 Ian Lance Taylor <iant@google.com>
709 * dwarf.c (read_function_entry): Add vec_inlined parameter.
712 2015-06-11 Martin Sebor <msebor@redhat.com>
715 * dwarf.c (struct line): Add new field idx.
716 (line_compare): Use it.
718 (read_line_info): Reset it.
720 2015-05-29 Tristan Gingold <gingold@adacore.com>
722 * pecoff.c: New file.
723 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
724 * Makefile.in: Regenerate.
725 * filetype.awk: Detect pecoff.
726 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
728 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
730 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
731 * configure: Regenerate.
732 * pecoff.c: New file.
734 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
736 * Makefile.in: Regenerated with automake-1.11.6.
737 * aclocal.m4: Likewise.
738 * configure: Likewise.
740 2015-01-24 Matthias Klose <doko@ubuntu.com>
742 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
743 * configure: Regenerate.
745 2015-01-05 Jakub Jelinek <jakub@redhat.com>
747 Update copyright years.
749 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
752 * configure: Regenerated.
754 2014-11-11 David Malcolm <dmalcolm@redhat.com>
756 * ChangeLog.jit: New.
758 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
761 * configure: Regenerate.
763 2014-10-23 Ian Lance Taylor <iant@google.com>
765 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
766 Fix to return void *.
768 2014-05-08 Ian Lance Taylor <iant@google.com>
770 * mmap.c (backtrace_free): If freeing a large aligned block of
771 memory, call munmap rather than holding onto it.
772 (backtrace_vector_grow): When growing a vector, double the number
773 of pages requested. When releasing the old version of a grown
774 vector, pass the correct size to backtrace_free.
776 2014-03-07 Ian Lance Taylor <iant@google.com>
778 * sort.c (backtrace_qsort): Use middle element as pivot.
780 2014-03-06 Ian Lance Taylor <iant@google.com>
784 * internal.h (backtrace_qsort): Declare.
785 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
786 (read_line_info, read_function_entry): Likewise.
787 (read_function_info, build_dwarf_data): Likewise.
788 * elf.c (elf_initialize_syminfo): Likewise.
789 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
790 (stest_SOURCES, stest_LDADD): Define.
791 (check_PROGRAMS): Add stest.
793 2014-02-07 Misty De Meo <misty@brew.sh>
796 * configure.ac: Use AC_LINK_IFELSE in check for
798 * configure: Regenerate.
800 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
802 Update copyright years
804 2013-12-06 Jakub Jelinek <jakub@redhat.com>
806 * elf.c (ET_DYN): Undefine and define again.
807 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
808 return early -1 without closing the descriptor.
809 (struct phdr_data): Add exe_descriptor.
810 (phdr_callback): If pd->exe_descriptor is not -1, for very first
811 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
812 otherwise backtrace_close the exe_descriptor if not -1. Adjust
814 (backtrace_initialize): Adjust call to elf_add. If it returns
815 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
817 2013-12-05 Ian Lance Taylor <iant@google.com>
819 * alloc.c (backtrace_vector_finish): Add error_callback and data
820 parameters. Call backtrace_vector_release. Return address base.
821 * mmap.c (backtrace_vector_finish): Add error_callback and data
822 parameters. Return address base.
823 * dwarf.c (read_function_info): Get new address base from
824 backtrace_vector_finish.
825 * internal.h (backtrace_vector_finish): Update declaration.
827 2013-11-27 Ian Lance Taylor <iant@google.com>
829 * dwarf.c (find_address_ranges): New static function, broken out
830 of build_address_map.
831 (build_address_map): Call it.
832 * btest.c (check): Check for missing filename or function, rather
834 (f3): Check that enough frames were returned.
836 2013-11-19 Jakub Jelinek <jakub@redhat.com>
838 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
839 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
841 * btest.c (struct symdata): Add size field.
842 (callback_three): Add symsize argument. Copy it to the data->size
844 (f23): Set symdata.size to 0.
845 (test5): Likewise. If sizeof (int) > 1, lookup address of
846 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
849 * atomic.c: Include sys/types.h.
851 2013-11-18 Ian Lance Taylor <iant@google.com>
853 * configure.ac: Check for support of __atomic extensions.
854 * internal.h: Declare or #define atomic functions for use in
856 * atomic.c: New file.
857 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
858 (dwarf_fileline, backtrace_dwarf_add): Likewise.
859 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
860 (backtrace_initialize): Likewise.
861 * fileline.c (fileline_initialize): Likewise.
862 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
863 * configure, config.h.in, Makefile.in: Rebuild.
865 2013-11-18 Jakub Jelinek <jakub@redhat.com>
867 * elf.c (SHN_UNDEF): Define.
868 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
869 with st_shndx == SHN_UNDEF. Add base_address to address fields.
870 (elf_add): Adjust caller.
872 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
874 2013-11-16 Ian Lance Taylor <iant@google.com>
876 * backtrace.h (backtrace_create_state): Correct comment about
879 2013-11-15 Ian Lance Taylor <iant@google.com>
881 * backtrace.h (backtrace_syminfo): Update comment and parameter
882 name to take any address, not just a PC value.
883 * elf.c (STT_OBJECT): Define.
884 (elf_nosyms): Rename parameter pc to addr.
885 (elf_symbol_search): Rename local variable pc to addr.
886 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
887 (elf_syminfo): Rename parameter pc to addr.
888 * btest.c (global): New global variable.
892 2013-10-17 Ian Lance Taylor <iant@google.com>
894 * elf.c (elf_add): Don't get the wrong offsets if a debug section
897 2013-10-15 David Malcolm <dmalcolm@redhat.com>
899 * configure.ac: Add --enable-host-shared, setting up
900 pre-existing PIC_FLAG variable within Makefile.am et al.
901 * configure: Regenerate.
903 2013-09-20 Alan Modra <amodra@gmail.com>
905 * configure: Regenerate.
907 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
909 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
911 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
913 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
914 dl_iterate_phdr callbacks.
916 2013-03-25 Ian Lance Taylor <iant@google.com>
918 * alloc.c: #include <sys/types.h>.
921 2013-01-31 Ian Lance Taylor <iant@google.com>
923 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
924 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
926 2013-01-25 Jakub Jelinek <jakub@redhat.com>
929 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
930 attribute was not seen.
932 2013-01-16 Ian Lance Taylor <iant@google.com>
934 * dwarf.c (struct unit): Add filename and abs_filename fields.
935 (build_address_map): Set new fields when reading unit.
936 (dwarf_lookup_pc): If we don't find an entry in the line table,
937 just return the main file name.
939 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
941 Update copyright years.
943 2013-01-01 Ian Lance Taylor <iant@google.com>
946 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
947 $(MULTIBUILDTOP)/../../gcc/include.
948 * Makefile.in: Rebuild.
950 2013-01-01 Ian Lance Taylor <iant@google.com>
953 * mmap.c (backtrace_alloc): Don't call sync functions if not
955 (backtrace_free): Likewise.
957 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
959 * mmapio.c: Define MAP_FAILED if not defined.
961 2012-12-11 Jakub Jelinek <jakub@redhat.com>
964 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
965 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
966 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
968 * Makefile.in: Regenerated.
969 * configure: Regenerated.
971 2012-12-07 Jakub Jelinek <jakub@redhat.com>
974 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
975 * Makefile.in: Regenerated.
977 2012-11-20 Ian Lance Taylor <iant@google.com>
979 * dwarf.c (read_attribute): Always clear val.
981 2012-11-13 Ian Lance Taylor <iant@google.com>
984 * configure.ac: Only add -Werror if building a target library.
985 * configure: Rebuild.
987 2012-11-12 Ian Lance Taylor <iant@google.com>
988 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
989 Gerald Pfeifer <gerald@pfeifer.com>
991 * configure.ac: Check for getexecname.
992 * fileline.c: #include <errno.h>. Define getexecname if not
994 (fileline_initialize): Try to find the executable in a few
996 * print.c (error_callback): Only print the filename if it came
997 from the backtrace state.
998 * configure, config.h.in: Rebuild.
1000 2012-10-29 Ian Lance Taylor <iant@google.com>
1002 * mmap.c (backtrace_vector_release): Correct last patch: add
1005 2012-10-29 Ian Lance Taylor <iant@google.com>
1007 * mmap.c (backtrace_vector_release): Make sure freed block is
1008 aligned on 8-byte boundary.
1010 2012-10-26 Ian Lance Taylor <iant@google.com>
1013 * posix.c (backtrace_open): Add does_not_exist parameter.
1014 * elf.c (phdr_callback): Do not warn if shared library could not
1016 * fileline.c (fileline_initialize): Update calls to
1018 * internal.h (backtrace_open): Update declaration.
1020 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1023 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1024 * configure: Regenerate.
1026 2012-10-24 Ian Lance Taylor <iant@google.com>
1029 * configure.ac: Check whether -funwind-tables option works.
1030 * configure: Rebuild.
1032 2012-10-11 Ian Lance Taylor <iant@google.com>
1034 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1035 * configure: Rebuild.
1037 2012-10-10 Ian Lance Taylor <iant@google.com>
1039 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1042 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1044 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1046 2012-10-09 Ian Lance Taylor <iant@google.com>
1048 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1049 (backtrace_dwarf_add): Likewise.
1051 2012-10-09 Ian Lance Taylor <iant@google.com>
1053 Add support for tracing through shared libraries.
1054 * configure.ac: Check for link.h and dl_iterate_phdr.
1055 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1056 ELF macros before #defining them.
1057 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1059 (struct elf_syminfo_data): Add next field.
1060 (elf_initialize_syminfo): Initialize next field.
1061 (elf_add_syminfo_data): New static function.
1062 (elf_add): New static function, broken out of
1063 backtrace_initialize. Call backtrace_dwarf_add instead of
1064 backtrace_dwarf_initialize.
1065 (struct phdr_data): Define.
1066 (phdr_callback): New static function.
1067 (backtrace_initialize): Call elf_add.
1068 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1069 (add_unit_addr): Add base_address parameter. Change all callers.
1070 (add_unit_ranges, build_address_map): Likewise.
1071 (add_line): Add ddata parameter. Change all callers.
1072 (read_line_program, add_function_range): Likewise.
1073 (dwarf_lookup_pc): New static function, broken out of
1075 (dwarf_fileline): Call dwarf_lookup_pc.
1076 (build_dwarf_data): New static function.
1077 (backtrace_dwarf_add): New function.
1078 (backtrace_dwarf_initialize): Remove.
1079 * internal.h (backtrace_dwarf_initialize): Don't declare.
1080 (backtrace_dwarf_add): Declare.
1081 * configure, config.h.in: Rebuild.
1083 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1085 * btest.c (f23): Avoid uninitialized variable warning.
1087 2012-10-04 Ian Lance Taylor <iant@google.com>
1089 * dwarf.c: If the system header files do not declare strnlen,
1090 provide our own version.
1092 2012-10-03 Ian Lance Taylor <iant@google.com>
1094 * dwarf.c (read_uleb128): Fix overflow test.
1095 (read_sleb128): Likewise.
1096 (build_address_map): Don't change unit_buf.start.
1098 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1101 * configure.ac (EXTRA_FLAGS): New.
1102 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1103 * configure, Makefile.in: Regenerate.
1105 2012-09-29 Ian Lance Taylor <iant@google.com>
1108 * fileline.c (fileline_initialize): Pass errnum as -1 when
1109 reporting that we could not read executable information after a
1112 2012-09-27 Ian Lance Taylor <iant@google.com>
1115 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1116 * Makefile.am: Add dependencies for all objects.
1117 * configure, aclocal.m4, Makefile.in: Rebuild.
1119 2012-09-27 Ian Lance Taylor <iant@google.com>
1122 * elf.c (backtrace_initialize): Set *fileln_fn, not
1125 2012-09-19 Ian Lance Taylor <iant@google.com>
1127 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1128 as a target library.
1129 * configure: Rebuild.
1131 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1132 Ian Lance Taylor <iant@google.com>
1134 * configure.ac (GCC_HEADER_STDINT): Invoke.
1135 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1136 * btest.c: Don't include <stdint.h>.
1137 * dwarf.c: Likewise.
1138 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1140 2012-09-18 Ian Lance Taylor <iant@google.com>
1143 * Makefile.am (AM_CPPFLAGS): Define.
1144 (AM_CFLAGS): Remove -I options.
1145 * Makefile.in: Rebuild.
1147 2012-09-18 Ian Lance Taylor <iant@google.com>
1149 * posix.c (O_BINARY): Define if not defined.
1150 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1151 HAVE_FCNTL is defined.
1152 * configure.ac: Test for the fcntl function.
1153 * configure, config.h.in: Rebuild.
1155 2012-09-18 Ian Lance Taylor <iant@google.com>
1157 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1159 2012-09-18 Ian Lance Taylor <iant@google.com>
1161 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1163 2012-09-18 Ian Lance Taylor <iant@google.com>
1165 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1166 * mmapio.c: Don't define _GNU_SOURCE.
1167 * configure, config.h.in: Rebuild.
1169 2012-09-18 Ian Lance Taylor <iant@google.com>
1171 * configure.ac: Check whether strnlen is declared.
1172 * dwarf.c: Declare strnlen if not declared.
1173 * configure, config.h.in: Rebuild.
1175 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1177 * fileline.c: Include <stdlib.h>.
1180 2012-09-17 Ian Lance Taylor <iant@google.com>
1183 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1186 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1189 * nounwind.c (backtrace_simple): Add state parameter.
1191 2012-09-17 Ian Lance Taylor <iant@google.com>
1194 * unknown.c (unknown_fileline): Add state parameter, remove
1195 fileline_data parameter, name error_callback parameter.
1196 (backtrace_initialize): Add state parameter.
1198 2012-09-17 Ian Lance Taylor <iant@google.com>
1200 * Initial implementation.
1202 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1204 Copying and distribution of this file, with or without modification,
1205 are permitted in any medium without royalty provided the copyright
1206 notice and this notice are preserved.