1 2019-05-03 Release Manager
5 2019-03-11 Ian Lance Taylor <iant@golang.org>
8 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
10 * Makefile.in: Regenerate.
12 2019-02-26 Tom de Vries <tdevries@suse.de>
14 * btest.c (test5): Allow global.* as minimal symbol name for global.
16 2019-02-26 Tom de Vries <tdevries@suse.de>
18 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
19 * Makefile.in: Regenerate.
21 2019-02-12 Tom de Vries <tdevries@suse.de>
24 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
26 2019-02-10 Tom de Vries <tdevries@suse.de>
28 * Makefile.am (BUILDTESTS): Add btest_lto.
29 * Makefile.in: Regenerate.
30 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
31 __attribute__((noclone)).
33 2019-02-08 Tom de Vries <tdevries@suse.de>
35 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
36 * print.c (backtrace_print): Same.
37 * simple.c (backtrace_simple): Same.
39 2019-02-08 Tom de Vries <tdevries@suse.de>
42 * dwarf.c (build_address_map): Keep all parsed units.
43 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
45 2019-01-31 Tom de Vries <tdevries@suse.de>
48 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
49 'debugaltlink_name_len =+ 1'.
51 2019-01-29 Tom de Vries <tdevries@suse.de>
53 * install-debuginfo-for-buildid.sh.in: New script.
54 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
55 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
56 * Makefile.in: Regenerate.
57 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
58 (READELF): Set with AC_CHECK_PROG.
59 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
60 * configure: Regenerate.
61 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
62 (elf_open_debugfile_by_buildid): ... here.
64 2019-01-29 Tom de Vries <tdevries@suse.de>
66 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
68 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
69 (check_PROGRAMS): Add BUILDTESTS.
70 * Makefile.in: Regenerate.
72 2019-01-28 Tom de Vries <tdevries@suse.de>
74 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
75 Use $< to access prerequisite.
76 * Makefile.in: Regenerate.
78 2019-01-25 Nathan Sidwell <nathan@acm.org>
80 * elf.c (elf_add): Pass "" filename to recursive call with
83 2019-01-25 Tom de Vries <tdevries@suse.de>
85 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
87 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
88 * Makefile.in: Regenerate.
90 2019-01-25 Tom de Vries <tdevries@suse.de>
92 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
93 (TESTS): Rename dtest to btest_gnudebuglink.
94 * Makefile.in: Regenerate.
96 2019-01-23 Tom de Vries <tdevries@suse.de>
98 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
99 (units_search, find_unit): Use size_t for offset.
100 (build_address_map): Use size_t for unit_offset.
102 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
104 * allocfail.c (main): Increase portability of printf statement.
106 2019-01-18 Ian Lance Taylor <iant@golang.org>
108 PR libbacktrace/88890
109 * mmapio.c (backtrace_get_view): Change size parameter to
110 uint64_t. Check that value fits in size_t.
111 * read.c (backtrace_get_view): Likewise.
112 * internal.h (backtrace_get_view): Update declaration.
113 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
115 2019-01-17 Tom de Vries <tdevries@suse.de>
117 PR libbacktrace/82857
118 * configure.ac (DWZ): Set with AC_CHECK_PROG.
119 (HAVE_DWZ): Set with AM_CONDITIONAL.
120 * configure: Regenerate.
121 * Makefile.am (TESTS): Add btest_dwz.
122 * Makefile.in: Regenerate.
124 2019-01-17 Tom de Vries <tdevries@suse.de>
126 PR libbacktrace/82857
127 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
128 (read_attribute): Handle DW_FORM_GNU_ref_alt using
129 ATTR_VAL_REF_ALT_INFO.
130 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
132 2019-01-17 Tom de Vries <tdevries@suse.de>
134 * dwarf.c (struct unit): Add low_offset and high_offset fields.
135 (struct unit_vector): New type.
136 (struct dwarf_data): Add units and units_counts fields.
137 (find_unit): New function.
138 (find_address_ranges): Add and handle unit_tag parameter.
139 (build_address_map): Add and handle units_vec parameter.
140 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
143 2019-01-17 Tom de Vries <tdevries@suse.de>
145 PR libbacktrace/82857
146 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
149 2019-01-17 Tom de Vries <tdevries@suse.de>
151 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
152 (read_attribute): Add altlink parameter. Handle missing altlink for
153 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
154 (find_address_ranges, build_address_map, build_dwarf_data): Add and
155 handle altlink parameter.
156 (read_referenced_name, read_function_entry): Add argument to
159 2019-01-17 Tom de Vries <tdevries@suse.de>
161 * dwarf.c (struct dwarf_data): Add altlink field.
162 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
163 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
164 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
165 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
166 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
167 * xcoff.c (xcoff_add): Same.
169 2019-01-17 Tom de Vries <tdevries@suse.de>
171 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
172 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
173 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
174 argument to backtrace_dwarf_add call.
175 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
176 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
177 * xcoff.c (xcoff_add): Same.
179 2019-01-17 Tom de Vries <tdevries@suse.de>
181 * elf.c (elf_add): Add and handle with_buildid_data and
182 with_buildid_size parameters. Handle .gnu_debugaltlink section.
183 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
185 2019-01-16 Tom de Vries <tdevries@suse.de>
187 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
189 (read_referenced_name): ... here, and ...
190 (read_function_entry): ... here.
192 2019-01-16 Tom de Vries <tdevries@suse.de>
194 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
196 (read_function_entry): Same. Don't allow name found via
197 DW_AT_abstract_origin or case DW_AT_specification to override linkage
200 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
204 * backtrace.h: Mechanically replace "can not" with "cannot".
206 2019-01-01 Jakub Jelinek <jakub@redhat.com>
208 Update copyright years.
210 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
212 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
214 * Makefile.in: Regenerate.
216 2018-12-28 Tom de Vries <tdevries@suse.de>
218 * dwarf.c (build_address_map): Reuse unused units.
220 2018-12-28 Tom de Vries <tdevries@suse.de>
222 * dwarf.c (build_address_map): Simplify by removing local variable
225 2018-12-28 Ian Lance Taylor <iant@golang.org>
226 Tom de Vries <tdevries@suse.de>
228 PR libbacktrace/88063
229 * dwarf.c (free_unit_addrs_vector): Remove.
230 (build_address_map): Keep track of allocated units in vector. Free
231 allocated units and corresponding abbrevs upon failure. Remove now
232 redundant call to free_unit_addrs_vector. Free addrs vector upon
233 failure. Free allocated unit vector.
235 2018-12-28 Tom de Vries <tdevries@suse.de>
237 * dwarf.c (build_address_map): Free addrs vector upon failure.
239 2018-12-14 Tom de Vries <tdevries@suse.de>
242 * allocfail.sh: Remove "set -o pipefail".
244 2018-12-12 Tom de Vries <tdevries@suse.de>
246 * Makefile.am (TESTS): Add allocfail.sh.
247 (check_PROGRAMS): Add allocfail.
248 * Makefile.in: Regenerate.
249 * instrumented_alloc.c: New file. Redefine malloc and realloc.
251 * allocfail.c: New file.
252 * allocfail.sh: New file.
254 2018-11-30 Tom de Vries <tdevries@suse.de>
256 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
257 test_xcoff_64, test_pecoff and test_unknown.
258 * Makefile.in: Regenerate.
259 * test_format.c: New file.
261 2018-11-30 Tom de Vries <tdevries@suse.de>
263 * Makefile.am : Add _with_alloc version for each test in
265 * Makefile.in: Regenerate.
267 2018-11-30 Tom de Vries <tdevries@suse.de>
269 * internal.h (backtrace_vector_free): New static inline fuction,
271 * dwarf.c (read_line_info): ... here.
273 2018-11-28 Tom de Vries <tdevries@suse.de>
275 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
278 2018-11-27 Tom de Vries <tdevries@suse.de>
280 * mmap.c (backtrace_vector_release): Same.
281 * unittest.c (test1): Add check.
283 2018-11-27 Tom de Vries <tdevries@suse.de>
285 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
287 * Makefile.am (check_PROGRAMS): Add unittest.
288 * Makefile.in: Regenerate.
289 * unittest.c: New file.
291 2018-11-22 Tom de Vries <tdevries@suse.de>
293 * dwarf.c (read_initial_length): Factor out of ...
294 (build_address_map, read_line_info): ... here.
296 2018-11-21 Tom de Vries <tdevries@suse.de>
298 * dwarf.c (read_string): Factor out of ...
299 (read_attribute, read_line_header, read_line_program): ... here.
301 2018-10-31 Joseph Myers <joseph@codesourcery.com>
304 * Makefile.am: Include multilib.am.
305 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
306 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
308 2018-10-05 Ian Lance Taylor <iant@golang.org>
310 PR libbacktrace/87529
311 * backtrace.h: Document that backtrace_create_state should be
314 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
316 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
317 * Makefile.in: Regenerate.
318 * config.h.in: Likewise.
319 * configure: Likewise.
321 2018-08-01 Tony Reix <tony.reix@atos.net>
323 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
324 (struct xcoff_func, struct xcoff_func_vector): New structs.
325 (xcoff_syminfo): Drop leading dot from symbol name.
326 (xcoff_line_compare, xcoff_line_search): Remove.
327 (xcoff_func_compare, xcoff_func_search): New static functions.
328 (xcoff_lookup_pc): Search function table.
329 (xcoff_add_line, xcoff_process_linenos): Remove.
330 (xcoff_initialize_fileline): Build function table.
332 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
335 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
336 checking up to 36 bytes.
338 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
340 * configure: Regenerated.
342 2018-04-19 Jakub Jelinek <jakub@redhat.com>
344 * configure: Regenerated.
346 2018-04-17 Ian Lance Taylor <iant@golang.org>
348 * backtrace.c: Revert last two changes. Don't call mmap
351 2018-04-17 Ian Lance Taylor <iant@golang.org>
353 * backtrace.c: Include backtrace-supported.h before checking
354 BACKTRACE_USES_MALLOC.
356 2018-04-17 Ian Lance Taylor <iant@golang.org>
358 * backtrace.c (backtrace_full): When testing whether we can
359 allocate memory, call mmap directly, and munmap the memory.
361 2018-04-04 Jakub Jelinek <jakub@redhat.com>
364 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
365 big endian, only use 32-bit loads if endianity macros are predefined
366 and indicate big or little endian.
368 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
371 * configure: Regenerate.
373 2018-02-15 Jakub Jelinek <jakub@redhat.com>
376 * elf.c (SHT_PROGBITS): Undefine and define.
378 2018-02-14 Jakub Jelinek <jakub@redhat.com>
381 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
382 (struct elf_ppc64_opd_data): New type.
383 (elf_initialize_syminfo): Add opd argument, handle symbols
384 pointing into the PowerPC64 ELFv1 .opd section.
385 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
386 to structure with .opd data to elf_initialize_syminfo.
388 2018-01-31 Ian Lance Taylor <iant@golang.org>
390 * elf.c (elf_add): Close descriptor if we use a debugfile.
391 * btest.c (check_open_files): New static function.
392 (main): Call check_open_files.
394 2018-01-25 Ian Lance Taylor <iant@golang.org>
396 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
398 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
400 2018-01-25 Ian Lance Taylor <iant@golang.org>
402 * pecoff.c (coff_add): Only release syms_view if it is valid.
404 2018-01-25 Ian Lance Taylor <iant@golang.org>
406 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
408 2018-01-24 Ian Lance Taylor <iant@golang.org>
410 * pecoff.c (coff_add): Use coff_read4, not memcpy.
412 2018-01-24 Ian Lance Taylor <iant@golang.org>
415 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
418 2018-01-19 Tony Reix <tony.reix@atos.net>
420 * xcoff.c (xcoff_incl_compare): New function.
421 (xcoff_incl_search): New function.
422 (xcoff_process_linenos): Use bsearch to find include file.
423 (xcoff_initialize_fileline): Sort include file information.
425 2018-01-16 Ian Lance Taylor <iant@golang.org>
427 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
429 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
430 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
431 (elf_zlib_default_table): Update.
432 (elf_zlib_default_dist_table): New static array.
433 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
435 * ztest.c (struct zlib_test): Add uncompressed_len.
436 (tests): Initialize uncompressed_len field. Add new test case.
437 (test_samples): Use uncompressed_len field.
439 2018-01-03 Jakub Jelinek <jakub@redhat.com>
441 Update copyright years.
443 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
445 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
446 * aclocal.m4: Regenerate.
447 * Makefile.in: Likewise.
448 * configure: Likewise.
450 2017-10-06 Ian Lance Taylor <iant@golang.org>
452 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
453 zlib uncompress function.
455 2017-10-05 Ian Lance Taylor <iant@golang.org>
457 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
458 Read a four byte integer.
459 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
460 boundary before ever calling elf_zlib_fetch.
461 * ztest.c (test_large): Simplify print statements a bit.
463 2017-10-02 Ian Lance Taylor <iant@golang.org>
465 * ztest.c: #include <errno.h>.
466 (TEST_TIMING): Don't define, don't test.
467 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
468 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
469 (ZLIB_CLOCK_GETTIME_ARG): Define.
470 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
471 * Makefile.am: Likewise.
472 * configure, Makefile.in: Rebuild.
474 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
477 * Makefile.am: Append the content of clock_gettime_link to
479 * configure.ac: Test for the case that clock_gettime is in librt.
480 * Makefile.in: Regenerate.
481 * configure: Likewise.
484 * configure.ac: Check for clock_gettime.
485 * config.h.in: Regenerate.
486 * configure: Likewise.
487 * ztest.c (average_time, test_large): Conditionalize test timing
488 on clock_gettime availability.
490 2017-09-29 Tony Reix <tony.reix@atos.net>
492 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
493 (STYP_DWARF, SSUBTYP_DW*): Define.
494 (enum dwarf_section): Define.
495 (struct dwsect_info): Define.
496 (xcoff_add): Look for DWARF sections, pass them to
499 2017-09-28 Ian Lance Taylor <iant@golang.org>
502 * elf.c (__builtin_prefetch): Define if not __GNUC__.
504 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
505 (b_elf_chdr): Define type.
506 (enum debug_section): Add ZDEBUG_xxx values.
507 (debug_section_names): Add names for new sections.
508 (struct debug_section_info): Add compressed field.
509 (elf_zlib_failed, elf_zlib_fetch): New static functions.
510 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
511 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
512 (HUFFMAN_SECONDARY_SHIFT): Define.
513 (ZDEBUG_TABLE_SIZE): Define.
514 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
515 (final_next_secondary): New static variable if
516 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
517 (elf_zlib_inflate_table): New static function.
518 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
519 function to produce fixed Huffman table.
520 (elf_zlib_default_table): New static variable.
521 (elf_zlib_inflate): New static function.
522 (elf_zlib_verify_checksum): Likewise.
523 (elf_zlib_inflate_and_verify): Likewise.
524 (elf_uncompress_zdebug): Likewise.
525 (elf_uncompress_chdr): Likewise.
526 (backtrace_uncompress_zdebug): New extern function.
527 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
528 sections, and uncompress them.
529 * internal.h (backtrace_compress_zdebug): Declare.
531 * configure.ac: Check for -lz and check whether the linker
532 supports --compress-debug-sections.
533 * Makefile.am (ztest_SOURCES): New variable.
534 (ztest_CFLAGS, ztest_LDADD): New variables.
535 (check_PROGRAMS): Add ztest.
536 (ctestg_SOURCES): New variable.
537 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
538 (ctesta_SOURCES): New variable.
539 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
540 (check_PROGRAMS): Add ctestg and ctesta.
541 * configure, config.h.in, Makefile.in: Rebuild.
543 2017-09-22 Ian Lance Taylor <iant@golang.org>
546 * configure.ac: Check for lstat and readlink.
547 * elf.c (lstat, readlink): Provide dummy versions if real versions
549 * configure, config.h.in: Rebuild.
551 2017-09-21 Ian Lance Taylor <iant@google.com>
554 * elf.c (backtrace_initialize): Set pd.exe_filename.
556 2017-09-20 Ian Lance Taylor <iant@golang.org>
557 Denis Khalikov <d.khalikov@partner.samsung.com>
560 Support for external debug info.
561 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
562 (S_ISLNK): Define if not defined.
563 (xstrnlen): Define if strnlen is not available.
564 (b_elf_note): Define type.
565 (NT_GNU_BUILD_ID): Define macro.
566 (elf_crc32, elf_crc32_file): New static functions.
567 (elf_is_symlink, elf_readlink): New static functions.
568 (elf_open_debugfile_by_buildid): New static function.
569 (elf_try_debugfile): New static function.
570 (elf_find_debugfile_by_debuglink): New static function.
571 (elf_open_debugfile_by_debuglink): New static function.
572 (elf_add): Add filename and debuginfo parameters. Adjust all
573 callers. Look for external debug info notes, and try to fetch
574 debug info from external file.
575 (struct phdr_data): Add exe_filename field.
576 (phdr_callback): Pass filename to elf_add.
577 (backtrace_initialize): Add filename parameter.
578 * internal.h (backtrace_initialize): Add filename parameter.
579 * fileline.c (fileline_initialize): Pass filename to
580 backtrace_initialize.
581 * pecoff.c (fileline_initialize): Add unused filename parameter.
582 * unknown.c (fileline_initialize): Likewise.
583 * xcoff.c (fileline_initialize): Likewise.
584 * configure.ac: Check for objcopy --add-gnu-debuglink.
585 * Makefile.am (dtest): New test target.
586 * configure, Makefile.in: Rebuild.
588 2017-09-12 Steve Ellcey <sellcey@cavium.com>
591 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
592 * Makefile.in: Regenerate.
594 2017-09-12 Steve Ellcey <sellcey@cavium.com>
597 * libbacktrace/Makefile.in
598 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
600 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
603 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
605 2017-07-28 Tony Reix <tony.reix@atos.net>
607 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
609 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
611 * fileline.c (fileline_initialize): Print pid_t as long.
613 2017-07-26 Tony Reix <tony.reix@atos.net>
615 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
616 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
617 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
618 * configure, config.h.in: Regenerate.
620 2017-07-21 Tony Reix <tony.reix@atos.net>
622 * filetype.awk: Add AIX XCOFF type detection.
623 * configure.ac: Recognize xcoff format.
624 * Makefile.am (FORMAT_FILES): Add xcoff.c.
625 * fileline.c: Include <unistd.h>.
626 (fileline_initialize): Add case for AIX procfs.
628 * configure, Makefile.in: Rebuild.
630 2017-06-21 Richard Biener <rguenther@suse.de>
632 * configure.ac: Add AC_SYS_LARGEFILE.
633 * config.h.in: Regenerate.
634 * configure: Likewise.
636 2017-06-11 Ian Lance Taylor <iant@golang.org>
638 * elf.c (backtrace_initialize): Always set *fileline_fn.
640 * btest.c: Move support functions into testlib.c. Change calls to
641 check to pass file name.
642 * testlib.c: New file, copied from (part of) btest.c.
643 * testlib.h: New file, declarations for testlib.c.
644 * edtest.c: Use testlib.h and testlib.c.
645 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
646 * Makefile.am (btest_SOURCES): Add testlib.c.
647 (edtest_SOURCES): Likewise.
648 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
649 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
650 * configure, Makefile.in: Rebuild.
652 2017-05-19 Than McIntosh <thanm@google.com>
654 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
655 (read_line_header): Don't allocate dirs if dirs_count == 0.
656 * edtest.c: New file.
657 * edtest2.c: New file.
658 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
659 (check_PROGRAMS): Add edtest.
660 (edtest2_build.c, gen_edtest2_build): New targets.
661 * Makefile.in: Rebuild.
663 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
665 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
666 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
668 2017-01-01 Jakub Jelinek <jakub@redhat.com>
670 Update copyright years.
672 2016-11-15 Matthias Klose <doko@ubuntu.com>
674 * configure: Regenerate.
676 2016-09-11 Carlos Liam <carlos@aarzee.me>
678 * all: Remove meaningless trailing whitespace.
680 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
683 * elf.c (phdr_callback) [__i386__]: Add
684 __attribute__((__force_align_arg_pointer__)).
686 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
688 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
689 avoid possible crash.
690 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
691 missing debug info anymore.
693 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
695 * mmap.c (MAP_FAILED): Define if not defined.
697 2016-01-04 Jakub Jelinek <jakub@redhat.com>
699 Update copyright years.
701 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
703 * configure.ac: Specify that DJGPP do not have mmap
704 even when sys/mman.h exists.
705 * configure: Regenerate
707 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
710 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
711 * configure: Regenerate.
712 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
715 2015-09-17 Ian Lance Taylor <iant@google.com>
717 * posix.c (backtrace_open): Cast second argument of open() to int.
719 2015-09-11 Ian Lance Taylor <iant@google.com>
721 * Makefile.am (backtrace.lo): Depend on internal.h.
722 (sort.lo, stest.lo): Add explicit dependencies.
723 * Makefile.in: Rebuild.
725 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
727 * backtrace.c: #include <sys/types.h>.
729 2015-09-08 Ian Lance Taylor <iant@google.com>
732 * backtrace.c: #include "internal.h".
733 (struct backtrace_data): Add can_alloc field.
734 (unwind): If can_alloc is false, don't try to get file/line
736 (backtrace_full): Set can_alloc field in bdata.
737 * alloc.c (backtrace_alloc): Don't call error_callback if it is
739 * mmap.c (backtrace_alloc): Likewise.
740 * internal.h: Update comments for backtrace_alloc and
743 2015-09-08 Ian Lance Taylor <iant@google.com>
746 * mmap.c (backtrace_alloc): Correct test for mmap failure.
748 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
750 * configure.ac: For spu-*-* targets, set have_fcntl to no.
751 * configure: Regenerate.
753 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
755 * configure.ac: Remove [disable-shared] argument to LT_INIT.
756 Remove setting PIC_FLAG when building as target library.
757 * configure: Regenerate.
759 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
761 * configure.ac: Only compile with -fPIC if the target
763 * configure: Regenerate.
765 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
767 * configure.ac: Set have_mmap to no on spu-*-* targets.
768 * configure: Regenerate.
770 2015-08-13 Ian Lance Taylor <iant@google.com>
772 * dwarf.c (read_function_entry): Add vec_inlined parameter.
775 2015-06-11 Martin Sebor <msebor@redhat.com>
778 * dwarf.c (struct line): Add new field idx.
779 (line_compare): Use it.
781 (read_line_info): Reset it.
783 2015-05-29 Tristan Gingold <gingold@adacore.com>
785 * pecoff.c: New file.
786 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
787 * Makefile.in: Regenerate.
788 * filetype.awk: Detect pecoff.
789 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
791 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
793 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
794 * configure: Regenerate.
795 * pecoff.c: New file.
797 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
799 * Makefile.in: Regenerated with automake-1.11.6.
800 * aclocal.m4: Likewise.
801 * configure: Likewise.
803 2015-01-24 Matthias Klose <doko@ubuntu.com>
805 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
806 * configure: Regenerate.
808 2015-01-05 Jakub Jelinek <jakub@redhat.com>
810 Update copyright years.
812 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
815 * configure: Regenerated.
817 2014-11-11 David Malcolm <dmalcolm@redhat.com>
819 * ChangeLog.jit: New.
821 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
824 * configure: Regenerate.
826 2014-10-23 Ian Lance Taylor <iant@google.com>
828 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
829 Fix to return void *.
831 2014-05-08 Ian Lance Taylor <iant@google.com>
833 * mmap.c (backtrace_free): If freeing a large aligned block of
834 memory, call munmap rather than holding onto it.
835 (backtrace_vector_grow): When growing a vector, double the number
836 of pages requested. When releasing the old version of a grown
837 vector, pass the correct size to backtrace_free.
839 2014-03-07 Ian Lance Taylor <iant@google.com>
841 * sort.c (backtrace_qsort): Use middle element as pivot.
843 2014-03-06 Ian Lance Taylor <iant@google.com>
847 * internal.h (backtrace_qsort): Declare.
848 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
849 (read_line_info, read_function_entry): Likewise.
850 (read_function_info, build_dwarf_data): Likewise.
851 * elf.c (elf_initialize_syminfo): Likewise.
852 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
853 (stest_SOURCES, stest_LDADD): Define.
854 (check_PROGRAMS): Add stest.
856 2014-02-07 Misty De Meo <misty@brew.sh>
859 * configure.ac: Use AC_LINK_IFELSE in check for
861 * configure: Regenerate.
863 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
865 Update copyright years
867 2013-12-06 Jakub Jelinek <jakub@redhat.com>
869 * elf.c (ET_DYN): Undefine and define again.
870 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
871 return early -1 without closing the descriptor.
872 (struct phdr_data): Add exe_descriptor.
873 (phdr_callback): If pd->exe_descriptor is not -1, for very first
874 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
875 otherwise backtrace_close the exe_descriptor if not -1. Adjust
877 (backtrace_initialize): Adjust call to elf_add. If it returns
878 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
880 2013-12-05 Ian Lance Taylor <iant@google.com>
882 * alloc.c (backtrace_vector_finish): Add error_callback and data
883 parameters. Call backtrace_vector_release. Return address base.
884 * mmap.c (backtrace_vector_finish): Add error_callback and data
885 parameters. Return address base.
886 * dwarf.c (read_function_info): Get new address base from
887 backtrace_vector_finish.
888 * internal.h (backtrace_vector_finish): Update declaration.
890 2013-11-27 Ian Lance Taylor <iant@google.com>
892 * dwarf.c (find_address_ranges): New static function, broken out
893 of build_address_map.
894 (build_address_map): Call it.
895 * btest.c (check): Check for missing filename or function, rather
897 (f3): Check that enough frames were returned.
899 2013-11-19 Jakub Jelinek <jakub@redhat.com>
901 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
902 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
904 * btest.c (struct symdata): Add size field.
905 (callback_three): Add symsize argument. Copy it to the data->size
907 (f23): Set symdata.size to 0.
908 (test5): Likewise. If sizeof (int) > 1, lookup address of
909 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
912 * atomic.c: Include sys/types.h.
914 2013-11-18 Ian Lance Taylor <iant@google.com>
916 * configure.ac: Check for support of __atomic extensions.
917 * internal.h: Declare or #define atomic functions for use in
919 * atomic.c: New file.
920 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
921 (dwarf_fileline, backtrace_dwarf_add): Likewise.
922 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
923 (backtrace_initialize): Likewise.
924 * fileline.c (fileline_initialize): Likewise.
925 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
926 * configure, config.h.in, Makefile.in: Rebuild.
928 2013-11-18 Jakub Jelinek <jakub@redhat.com>
930 * elf.c (SHN_UNDEF): Define.
931 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
932 with st_shndx == SHN_UNDEF. Add base_address to address fields.
933 (elf_add): Adjust caller.
935 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
937 2013-11-16 Ian Lance Taylor <iant@google.com>
939 * backtrace.h (backtrace_create_state): Correct comment about
942 2013-11-15 Ian Lance Taylor <iant@google.com>
944 * backtrace.h (backtrace_syminfo): Update comment and parameter
945 name to take any address, not just a PC value.
946 * elf.c (STT_OBJECT): Define.
947 (elf_nosyms): Rename parameter pc to addr.
948 (elf_symbol_search): Rename local variable pc to addr.
949 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
950 (elf_syminfo): Rename parameter pc to addr.
951 * btest.c (global): New global variable.
955 2013-10-17 Ian Lance Taylor <iant@google.com>
957 * elf.c (elf_add): Don't get the wrong offsets if a debug section
960 2013-10-15 David Malcolm <dmalcolm@redhat.com>
962 * configure.ac: Add --enable-host-shared, setting up
963 pre-existing PIC_FLAG variable within Makefile.am et al.
964 * configure: Regenerate.
966 2013-09-20 Alan Modra <amodra@gmail.com>
968 * configure: Regenerate.
970 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
972 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
974 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
976 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
977 dl_iterate_phdr callbacks.
979 2013-03-25 Ian Lance Taylor <iant@google.com>
981 * alloc.c: #include <sys/types.h>.
984 2013-01-31 Ian Lance Taylor <iant@google.com>
986 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
987 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
989 2013-01-25 Jakub Jelinek <jakub@redhat.com>
992 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
993 attribute was not seen.
995 2013-01-16 Ian Lance Taylor <iant@google.com>
997 * dwarf.c (struct unit): Add filename and abs_filename fields.
998 (build_address_map): Set new fields when reading unit.
999 (dwarf_lookup_pc): If we don't find an entry in the line table,
1000 just return the main file name.
1002 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1004 Update copyright years.
1006 2013-01-01 Ian Lance Taylor <iant@google.com>
1009 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1010 $(MULTIBUILDTOP)/../../gcc/include.
1011 * Makefile.in: Rebuild.
1013 2013-01-01 Ian Lance Taylor <iant@google.com>
1016 * mmap.c (backtrace_alloc): Don't call sync functions if not
1018 (backtrace_free): Likewise.
1020 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1022 * mmapio.c: Define MAP_FAILED if not defined.
1024 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1027 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1028 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1029 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1031 * Makefile.in: Regenerated.
1032 * configure: Regenerated.
1034 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1037 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1038 * Makefile.in: Regenerated.
1040 2012-11-20 Ian Lance Taylor <iant@google.com>
1042 * dwarf.c (read_attribute): Always clear val.
1044 2012-11-13 Ian Lance Taylor <iant@google.com>
1047 * configure.ac: Only add -Werror if building a target library.
1048 * configure: Rebuild.
1050 2012-11-12 Ian Lance Taylor <iant@google.com>
1051 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1052 Gerald Pfeifer <gerald@pfeifer.com>
1054 * configure.ac: Check for getexecname.
1055 * fileline.c: #include <errno.h>. Define getexecname if not
1057 (fileline_initialize): Try to find the executable in a few
1059 * print.c (error_callback): Only print the filename if it came
1060 from the backtrace state.
1061 * configure, config.h.in: Rebuild.
1063 2012-10-29 Ian Lance Taylor <iant@google.com>
1065 * mmap.c (backtrace_vector_release): Correct last patch: add
1068 2012-10-29 Ian Lance Taylor <iant@google.com>
1070 * mmap.c (backtrace_vector_release): Make sure freed block is
1071 aligned on 8-byte boundary.
1073 2012-10-26 Ian Lance Taylor <iant@google.com>
1076 * posix.c (backtrace_open): Add does_not_exist parameter.
1077 * elf.c (phdr_callback): Do not warn if shared library could not
1079 * fileline.c (fileline_initialize): Update calls to
1081 * internal.h (backtrace_open): Update declaration.
1083 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1086 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1087 * configure: Regenerate.
1089 2012-10-24 Ian Lance Taylor <iant@google.com>
1092 * configure.ac: Check whether -funwind-tables option works.
1093 * configure: Rebuild.
1095 2012-10-11 Ian Lance Taylor <iant@google.com>
1097 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1098 * configure: Rebuild.
1100 2012-10-10 Ian Lance Taylor <iant@google.com>
1102 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1105 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1107 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1109 2012-10-09 Ian Lance Taylor <iant@google.com>
1111 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1112 (backtrace_dwarf_add): Likewise.
1114 2012-10-09 Ian Lance Taylor <iant@google.com>
1116 Add support for tracing through shared libraries.
1117 * configure.ac: Check for link.h and dl_iterate_phdr.
1118 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1119 ELF macros before #defining them.
1120 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1122 (struct elf_syminfo_data): Add next field.
1123 (elf_initialize_syminfo): Initialize next field.
1124 (elf_add_syminfo_data): New static function.
1125 (elf_add): New static function, broken out of
1126 backtrace_initialize. Call backtrace_dwarf_add instead of
1127 backtrace_dwarf_initialize.
1128 (struct phdr_data): Define.
1129 (phdr_callback): New static function.
1130 (backtrace_initialize): Call elf_add.
1131 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1132 (add_unit_addr): Add base_address parameter. Change all callers.
1133 (add_unit_ranges, build_address_map): Likewise.
1134 (add_line): Add ddata parameter. Change all callers.
1135 (read_line_program, add_function_range): Likewise.
1136 (dwarf_lookup_pc): New static function, broken out of
1138 (dwarf_fileline): Call dwarf_lookup_pc.
1139 (build_dwarf_data): New static function.
1140 (backtrace_dwarf_add): New function.
1141 (backtrace_dwarf_initialize): Remove.
1142 * internal.h (backtrace_dwarf_initialize): Don't declare.
1143 (backtrace_dwarf_add): Declare.
1144 * configure, config.h.in: Rebuild.
1146 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1148 * btest.c (f23): Avoid uninitialized variable warning.
1150 2012-10-04 Ian Lance Taylor <iant@google.com>
1152 * dwarf.c: If the system header files do not declare strnlen,
1153 provide our own version.
1155 2012-10-03 Ian Lance Taylor <iant@google.com>
1157 * dwarf.c (read_uleb128): Fix overflow test.
1158 (read_sleb128): Likewise.
1159 (build_address_map): Don't change unit_buf.start.
1161 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1164 * configure.ac (EXTRA_FLAGS): New.
1165 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1166 * configure, Makefile.in: Regenerate.
1168 2012-09-29 Ian Lance Taylor <iant@google.com>
1171 * fileline.c (fileline_initialize): Pass errnum as -1 when
1172 reporting that we could not read executable information after a
1175 2012-09-27 Ian Lance Taylor <iant@google.com>
1178 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1179 * Makefile.am: Add dependencies for all objects.
1180 * configure, aclocal.m4, Makefile.in: Rebuild.
1182 2012-09-27 Ian Lance Taylor <iant@google.com>
1185 * elf.c (backtrace_initialize): Set *fileln_fn, not
1188 2012-09-19 Ian Lance Taylor <iant@google.com>
1190 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1191 as a target library.
1192 * configure: Rebuild.
1194 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1195 Ian Lance Taylor <iant@google.com>
1197 * configure.ac (GCC_HEADER_STDINT): Invoke.
1198 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1199 * btest.c: Don't include <stdint.h>.
1200 * dwarf.c: Likewise.
1201 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1203 2012-09-18 Ian Lance Taylor <iant@google.com>
1206 * Makefile.am (AM_CPPFLAGS): Define.
1207 (AM_CFLAGS): Remove -I options.
1208 * Makefile.in: Rebuild.
1210 2012-09-18 Ian Lance Taylor <iant@google.com>
1212 * posix.c (O_BINARY): Define if not defined.
1213 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1214 HAVE_FCNTL is defined.
1215 * configure.ac: Test for the fcntl function.
1216 * configure, config.h.in: Rebuild.
1218 2012-09-18 Ian Lance Taylor <iant@google.com>
1220 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1222 2012-09-18 Ian Lance Taylor <iant@google.com>
1224 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1226 2012-09-18 Ian Lance Taylor <iant@google.com>
1228 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1229 * mmapio.c: Don't define _GNU_SOURCE.
1230 * configure, config.h.in: Rebuild.
1232 2012-09-18 Ian Lance Taylor <iant@google.com>
1234 * configure.ac: Check whether strnlen is declared.
1235 * dwarf.c: Declare strnlen if not declared.
1236 * configure, config.h.in: Rebuild.
1238 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1240 * fileline.c: Include <stdlib.h>.
1243 2012-09-17 Ian Lance Taylor <iant@google.com>
1246 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1249 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1252 * nounwind.c (backtrace_simple): Add state parameter.
1254 2012-09-17 Ian Lance Taylor <iant@google.com>
1257 * unknown.c (unknown_fileline): Add state parameter, remove
1258 fileline_data parameter, name error_callback parameter.
1259 (backtrace_initialize): Add state parameter.
1261 2012-09-17 Ian Lance Taylor <iant@google.com>
1263 * Initial implementation.
1265 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1267 Copying and distribution of this file, with or without modification,
1268 are permitted in any medium without royalty provided the copyright
1269 notice and this notice are preserved.