1 2019-02-26 Tom de Vries <tdevries@suse.de>
3 * btest.c (test5): Allow global.* as minimal symbol name for global.
5 2019-02-26 Tom de Vries <tdevries@suse.de>
7 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
8 * Makefile.in: Regenerate.
10 2019-02-12 Tom de Vries <tdevries@suse.de>
13 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
15 2019-02-10 Tom de Vries <tdevries@suse.de>
17 * Makefile.am (BUILDTESTS): Add btest_lto.
18 * Makefile.in: Regenerate.
19 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
20 __attribute__((noclone)).
22 2019-02-08 Tom de Vries <tdevries@suse.de>
24 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
25 * print.c (backtrace_print): Same.
26 * simple.c (backtrace_simple): Same.
28 2019-02-08 Tom de Vries <tdevries@suse.de>
31 * dwarf.c (build_address_map): Keep all parsed units.
32 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
34 2019-01-31 Tom de Vries <tdevries@suse.de>
37 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
38 'debugaltlink_name_len =+ 1'.
40 2019-01-29 Tom de Vries <tdevries@suse.de>
42 * install-debuginfo-for-buildid.sh.in: New script.
43 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
44 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
45 * Makefile.in: Regenerate.
46 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
47 (READELF): Set with AC_CHECK_PROG.
48 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
49 * configure: Regenerate.
50 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
51 (elf_open_debugfile_by_buildid): ... here.
53 2019-01-29 Tom de Vries <tdevries@suse.de>
55 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
57 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
58 (check_PROGRAMS): Add BUILDTESTS.
59 * Makefile.in: Regenerate.
61 2019-01-28 Tom de Vries <tdevries@suse.de>
63 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
64 Use $< to access prerequisite.
65 * Makefile.in: Regenerate.
67 2019-01-25 Nathan Sidwell <nathan@acm.org>
69 * elf.c (elf_add): Pass "" filename to recursive call with
72 2019-01-25 Tom de Vries <tdevries@suse.de>
74 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
76 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
77 * Makefile.in: Regenerate.
79 2019-01-25 Tom de Vries <tdevries@suse.de>
81 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
82 (TESTS): Rename dtest to btest_gnudebuglink.
83 * Makefile.in: Regenerate.
85 2019-01-23 Tom de Vries <tdevries@suse.de>
87 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
88 (units_search, find_unit): Use size_t for offset.
89 (build_address_map): Use size_t for unit_offset.
91 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
93 * allocfail.c (main): Increase portability of printf statement.
95 2019-01-18 Ian Lance Taylor <iant@golang.org>
98 * mmapio.c (backtrace_get_view): Change size parameter to
99 uint64_t. Check that value fits in size_t.
100 * read.c (backtrace_get_view): Likewise.
101 * internal.h (backtrace_get_view): Update declaration.
102 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
104 2019-01-17 Tom de Vries <tdevries@suse.de>
106 PR libbacktrace/82857
107 * configure.ac (DWZ): Set with AC_CHECK_PROG.
108 (HAVE_DWZ): Set with AM_CONDITIONAL.
109 * configure: Regenerate.
110 * Makefile.am (TESTS): Add btest_dwz.
111 * Makefile.in: Regenerate.
113 2019-01-17 Tom de Vries <tdevries@suse.de>
115 PR libbacktrace/82857
116 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
117 (read_attribute): Handle DW_FORM_GNU_ref_alt using
118 ATTR_VAL_REF_ALT_INFO.
119 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
121 2019-01-17 Tom de Vries <tdevries@suse.de>
123 * dwarf.c (struct unit): Add low_offset and high_offset fields.
124 (struct unit_vector): New type.
125 (struct dwarf_data): Add units and units_counts fields.
126 (find_unit): New function.
127 (find_address_ranges): Add and handle unit_tag parameter.
128 (build_address_map): Add and handle units_vec parameter.
129 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
132 2019-01-17 Tom de Vries <tdevries@suse.de>
134 PR libbacktrace/82857
135 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
138 2019-01-17 Tom de Vries <tdevries@suse.de>
140 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
141 (read_attribute): Add altlink parameter. Handle missing altlink for
142 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
143 (find_address_ranges, build_address_map, build_dwarf_data): Add and
144 handle altlink parameter.
145 (read_referenced_name, read_function_entry): Add argument to
148 2019-01-17 Tom de Vries <tdevries@suse.de>
150 * dwarf.c (struct dwarf_data): Add altlink field.
151 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
152 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
153 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
154 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
155 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
156 * xcoff.c (xcoff_add): Same.
158 2019-01-17 Tom de Vries <tdevries@suse.de>
160 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
161 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
162 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
163 argument to backtrace_dwarf_add call.
164 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
165 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
166 * xcoff.c (xcoff_add): Same.
168 2019-01-17 Tom de Vries <tdevries@suse.de>
170 * elf.c (elf_add): Add and handle with_buildid_data and
171 with_buildid_size parameters. Handle .gnu_debugaltlink section.
172 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
174 2019-01-16 Tom de Vries <tdevries@suse.de>
176 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
178 (read_referenced_name): ... here, and ...
179 (read_function_entry): ... here.
181 2019-01-16 Tom de Vries <tdevries@suse.de>
183 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
185 (read_function_entry): Same. Don't allow name found via
186 DW_AT_abstract_origin or case DW_AT_specification to override linkage
189 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
193 * backtrace.h: Mechanically replace "can not" with "cannot".
195 2019-01-01 Jakub Jelinek <jakub@redhat.com>
197 Update copyright years.
199 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
201 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
203 * Makefile.in: Regenerate.
205 2018-12-28 Tom de Vries <tdevries@suse.de>
207 * dwarf.c (build_address_map): Reuse unused units.
209 2018-12-28 Tom de Vries <tdevries@suse.de>
211 * dwarf.c (build_address_map): Simplify by removing local variable
214 2018-12-28 Ian Lance Taylor <iant@golang.org>
215 Tom de Vries <tdevries@suse.de>
217 PR libbacktrace/88063
218 * dwarf.c (free_unit_addrs_vector): Remove.
219 (build_address_map): Keep track of allocated units in vector. Free
220 allocated units and corresponding abbrevs upon failure. Remove now
221 redundant call to free_unit_addrs_vector. Free addrs vector upon
222 failure. Free allocated unit vector.
224 2018-12-28 Tom de Vries <tdevries@suse.de>
226 * dwarf.c (build_address_map): Free addrs vector upon failure.
228 2018-12-14 Tom de Vries <tdevries@suse.de>
231 * allocfail.sh: Remove "set -o pipefail".
233 2018-12-12 Tom de Vries <tdevries@suse.de>
235 * Makefile.am (TESTS): Add allocfail.sh.
236 (check_PROGRAMS): Add allocfail.
237 * Makefile.in: Regenerate.
238 * instrumented_alloc.c: New file. Redefine malloc and realloc.
240 * allocfail.c: New file.
241 * allocfail.sh: New file.
243 2018-11-30 Tom de Vries <tdevries@suse.de>
245 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
246 test_xcoff_64, test_pecoff and test_unknown.
247 * Makefile.in: Regenerate.
248 * test_format.c: New file.
250 2018-11-30 Tom de Vries <tdevries@suse.de>
252 * Makefile.am : Add _with_alloc version for each test in
254 * Makefile.in: Regenerate.
256 2018-11-30 Tom de Vries <tdevries@suse.de>
258 * internal.h (backtrace_vector_free): New static inline fuction,
260 * dwarf.c (read_line_info): ... here.
262 2018-11-28 Tom de Vries <tdevries@suse.de>
264 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
267 2018-11-27 Tom de Vries <tdevries@suse.de>
269 * mmap.c (backtrace_vector_release): Same.
270 * unittest.c (test1): Add check.
272 2018-11-27 Tom de Vries <tdevries@suse.de>
274 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
276 * Makefile.am (check_PROGRAMS): Add unittest.
277 * Makefile.in: Regenerate.
278 * unittest.c: New file.
280 2018-11-22 Tom de Vries <tdevries@suse.de>
282 * dwarf.c (read_initial_length): Factor out of ...
283 (build_address_map, read_line_info): ... here.
285 2018-11-21 Tom de Vries <tdevries@suse.de>
287 * dwarf.c (read_string): Factor out of ...
288 (read_attribute, read_line_header, read_line_program): ... here.
290 2018-10-31 Joseph Myers <joseph@codesourcery.com>
293 * Makefile.am: Include multilib.am.
294 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
295 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
297 2018-10-05 Ian Lance Taylor <iant@golang.org>
299 PR libbacktrace/87529
300 * backtrace.h: Document that backtrace_create_state should be
303 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
305 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
306 * Makefile.in: Regenerate.
307 * config.h.in: Likewise.
308 * configure: Likewise.
310 2018-08-01 Tony Reix <tony.reix@atos.net>
312 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
313 (struct xcoff_func, struct xcoff_func_vector): New structs.
314 (xcoff_syminfo): Drop leading dot from symbol name.
315 (xcoff_line_compare, xcoff_line_search): Remove.
316 (xcoff_func_compare, xcoff_func_search): New static functions.
317 (xcoff_lookup_pc): Search function table.
318 (xcoff_add_line, xcoff_process_linenos): Remove.
319 (xcoff_initialize_fileline): Build function table.
321 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
324 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
325 checking up to 36 bytes.
327 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
329 * configure: Regenerated.
331 2018-04-19 Jakub Jelinek <jakub@redhat.com>
333 * configure: Regenerated.
335 2018-04-17 Ian Lance Taylor <iant@golang.org>
337 * backtrace.c: Revert last two changes. Don't call mmap
340 2018-04-17 Ian Lance Taylor <iant@golang.org>
342 * backtrace.c: Include backtrace-supported.h before checking
343 BACKTRACE_USES_MALLOC.
345 2018-04-17 Ian Lance Taylor <iant@golang.org>
347 * backtrace.c (backtrace_full): When testing whether we can
348 allocate memory, call mmap directly, and munmap the memory.
350 2018-04-04 Jakub Jelinek <jakub@redhat.com>
353 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
354 big endian, only use 32-bit loads if endianity macros are predefined
355 and indicate big or little endian.
357 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
360 * configure: Regenerate.
362 2018-02-15 Jakub Jelinek <jakub@redhat.com>
365 * elf.c (SHT_PROGBITS): Undefine and define.
367 2018-02-14 Jakub Jelinek <jakub@redhat.com>
370 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
371 (struct elf_ppc64_opd_data): New type.
372 (elf_initialize_syminfo): Add opd argument, handle symbols
373 pointing into the PowerPC64 ELFv1 .opd section.
374 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
375 to structure with .opd data to elf_initialize_syminfo.
377 2018-01-31 Ian Lance Taylor <iant@golang.org>
379 * elf.c (elf_add): Close descriptor if we use a debugfile.
380 * btest.c (check_open_files): New static function.
381 (main): Call check_open_files.
383 2018-01-25 Ian Lance Taylor <iant@golang.org>
385 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
387 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
389 2018-01-25 Ian Lance Taylor <iant@golang.org>
391 * pecoff.c (coff_add): Only release syms_view if it is valid.
393 2018-01-25 Ian Lance Taylor <iant@golang.org>
395 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
397 2018-01-24 Ian Lance Taylor <iant@golang.org>
399 * pecoff.c (coff_add): Use coff_read4, not memcpy.
401 2018-01-24 Ian Lance Taylor <iant@golang.org>
404 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
407 2018-01-19 Tony Reix <tony.reix@atos.net>
409 * xcoff.c (xcoff_incl_compare): New function.
410 (xcoff_incl_search): New function.
411 (xcoff_process_linenos): Use bsearch to find include file.
412 (xcoff_initialize_fileline): Sort include file information.
414 2018-01-16 Ian Lance Taylor <iant@golang.org>
416 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
418 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
419 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
420 (elf_zlib_default_table): Update.
421 (elf_zlib_default_dist_table): New static array.
422 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
424 * ztest.c (struct zlib_test): Add uncompressed_len.
425 (tests): Initialize uncompressed_len field. Add new test case.
426 (test_samples): Use uncompressed_len field.
428 2018-01-03 Jakub Jelinek <jakub@redhat.com>
430 Update copyright years.
432 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
434 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
435 * aclocal.m4: Regenerate.
436 * Makefile.in: Likewise.
437 * configure: Likewise.
439 2017-10-06 Ian Lance Taylor <iant@golang.org>
441 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
442 zlib uncompress function.
444 2017-10-05 Ian Lance Taylor <iant@golang.org>
446 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
447 Read a four byte integer.
448 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
449 boundary before ever calling elf_zlib_fetch.
450 * ztest.c (test_large): Simplify print statements a bit.
452 2017-10-02 Ian Lance Taylor <iant@golang.org>
454 * ztest.c: #include <errno.h>.
455 (TEST_TIMING): Don't define, don't test.
456 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
457 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
458 (ZLIB_CLOCK_GETTIME_ARG): Define.
459 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
460 * Makefile.am: Likewise.
461 * configure, Makefile.in: Rebuild.
463 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
466 * Makefile.am: Append the content of clock_gettime_link to
468 * configure.ac: Test for the case that clock_gettime is in librt.
469 * Makefile.in: Regenerate.
470 * configure: Likewise.
473 * configure.ac: Check for clock_gettime.
474 * config.h.in: Regenerate.
475 * configure: Likewise.
476 * ztest.c (average_time, test_large): Conditionalize test timing
477 on clock_gettime availability.
479 2017-09-29 Tony Reix <tony.reix@atos.net>
481 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
482 (STYP_DWARF, SSUBTYP_DW*): Define.
483 (enum dwarf_section): Define.
484 (struct dwsect_info): Define.
485 (xcoff_add): Look for DWARF sections, pass them to
488 2017-09-28 Ian Lance Taylor <iant@golang.org>
491 * elf.c (__builtin_prefetch): Define if not __GNUC__.
493 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
494 (b_elf_chdr): Define type.
495 (enum debug_section): Add ZDEBUG_xxx values.
496 (debug_section_names): Add names for new sections.
497 (struct debug_section_info): Add compressed field.
498 (elf_zlib_failed, elf_zlib_fetch): New static functions.
499 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
500 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
501 (HUFFMAN_SECONDARY_SHIFT): Define.
502 (ZDEBUG_TABLE_SIZE): Define.
503 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
504 (final_next_secondary): New static variable if
505 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
506 (elf_zlib_inflate_table): New static function.
507 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
508 function to produce fixed Huffman table.
509 (elf_zlib_default_table): New static variable.
510 (elf_zlib_inflate): New static function.
511 (elf_zlib_verify_checksum): Likewise.
512 (elf_zlib_inflate_and_verify): Likewise.
513 (elf_uncompress_zdebug): Likewise.
514 (elf_uncompress_chdr): Likewise.
515 (backtrace_uncompress_zdebug): New extern function.
516 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
517 sections, and uncompress them.
518 * internal.h (backtrace_compress_zdebug): Declare.
520 * configure.ac: Check for -lz and check whether the linker
521 supports --compress-debug-sections.
522 * Makefile.am (ztest_SOURCES): New variable.
523 (ztest_CFLAGS, ztest_LDADD): New variables.
524 (check_PROGRAMS): Add ztest.
525 (ctestg_SOURCES): New variable.
526 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
527 (ctesta_SOURCES): New variable.
528 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
529 (check_PROGRAMS): Add ctestg and ctesta.
530 * configure, config.h.in, Makefile.in: Rebuild.
532 2017-09-22 Ian Lance Taylor <iant@golang.org>
535 * configure.ac: Check for lstat and readlink.
536 * elf.c (lstat, readlink): Provide dummy versions if real versions
538 * configure, config.h.in: Rebuild.
540 2017-09-21 Ian Lance Taylor <iant@google.com>
543 * elf.c (backtrace_initialize): Set pd.exe_filename.
545 2017-09-20 Ian Lance Taylor <iant@golang.org>
546 Denis Khalikov <d.khalikov@partner.samsung.com>
549 Support for external debug info.
550 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
551 (S_ISLNK): Define if not defined.
552 (xstrnlen): Define if strnlen is not available.
553 (b_elf_note): Define type.
554 (NT_GNU_BUILD_ID): Define macro.
555 (elf_crc32, elf_crc32_file): New static functions.
556 (elf_is_symlink, elf_readlink): New static functions.
557 (elf_open_debugfile_by_buildid): New static function.
558 (elf_try_debugfile): New static function.
559 (elf_find_debugfile_by_debuglink): New static function.
560 (elf_open_debugfile_by_debuglink): New static function.
561 (elf_add): Add filename and debuginfo parameters. Adjust all
562 callers. Look for external debug info notes, and try to fetch
563 debug info from external file.
564 (struct phdr_data): Add exe_filename field.
565 (phdr_callback): Pass filename to elf_add.
566 (backtrace_initialize): Add filename parameter.
567 * internal.h (backtrace_initialize): Add filename parameter.
568 * fileline.c (fileline_initialize): Pass filename to
569 backtrace_initialize.
570 * pecoff.c (fileline_initialize): Add unused filename parameter.
571 * unknown.c (fileline_initialize): Likewise.
572 * xcoff.c (fileline_initialize): Likewise.
573 * configure.ac: Check for objcopy --add-gnu-debuglink.
574 * Makefile.am (dtest): New test target.
575 * configure, Makefile.in: Rebuild.
577 2017-09-12 Steve Ellcey <sellcey@cavium.com>
580 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
581 * Makefile.in: Regenerate.
583 2017-09-12 Steve Ellcey <sellcey@cavium.com>
586 * libbacktrace/Makefile.in
587 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
589 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
592 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
594 2017-07-28 Tony Reix <tony.reix@atos.net>
596 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
598 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
600 * fileline.c (fileline_initialize): Print pid_t as long.
602 2017-07-26 Tony Reix <tony.reix@atos.net>
604 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
605 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
606 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
607 * configure, config.h.in: Regenerate.
609 2017-07-21 Tony Reix <tony.reix@atos.net>
611 * filetype.awk: Add AIX XCOFF type detection.
612 * configure.ac: Recognize xcoff format.
613 * Makefile.am (FORMAT_FILES): Add xcoff.c.
614 * fileline.c: Include <unistd.h>.
615 (fileline_initialize): Add case for AIX procfs.
617 * configure, Makefile.in: Rebuild.
619 2017-06-21 Richard Biener <rguenther@suse.de>
621 * configure.ac: Add AC_SYS_LARGEFILE.
622 * config.h.in: Regenerate.
623 * configure: Likewise.
625 2017-06-11 Ian Lance Taylor <iant@golang.org>
627 * elf.c (backtrace_initialize): Always set *fileline_fn.
629 * btest.c: Move support functions into testlib.c. Change calls to
630 check to pass file name.
631 * testlib.c: New file, copied from (part of) btest.c.
632 * testlib.h: New file, declarations for testlib.c.
633 * edtest.c: Use testlib.h and testlib.c.
634 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
635 * Makefile.am (btest_SOURCES): Add testlib.c.
636 (edtest_SOURCES): Likewise.
637 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
638 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
639 * configure, Makefile.in: Rebuild.
641 2017-05-19 Than McIntosh <thanm@google.com>
643 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
644 (read_line_header): Don't allocate dirs if dirs_count == 0.
645 * edtest.c: New file.
646 * edtest2.c: New file.
647 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
648 (check_PROGRAMS): Add edtest.
649 (edtest2_build.c, gen_edtest2_build): New targets.
650 * Makefile.in: Rebuild.
652 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
654 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
655 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
657 2017-01-01 Jakub Jelinek <jakub@redhat.com>
659 Update copyright years.
661 2016-11-15 Matthias Klose <doko@ubuntu.com>
663 * configure: Regenerate.
665 2016-09-11 Carlos Liam <carlos@aarzee.me>
667 * all: Remove meaningless trailing whitespace.
669 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
672 * elf.c (phdr_callback) [__i386__]: Add
673 __attribute__((__force_align_arg_pointer__)).
675 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
677 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
678 avoid possible crash.
679 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
680 missing debug info anymore.
682 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
684 * mmap.c (MAP_FAILED): Define if not defined.
686 2016-01-04 Jakub Jelinek <jakub@redhat.com>
688 Update copyright years.
690 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
692 * configure.ac: Specify that DJGPP do not have mmap
693 even when sys/mman.h exists.
694 * configure: Regenerate
696 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
699 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
700 * configure: Regenerate.
701 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
704 2015-09-17 Ian Lance Taylor <iant@google.com>
706 * posix.c (backtrace_open): Cast second argument of open() to int.
708 2015-09-11 Ian Lance Taylor <iant@google.com>
710 * Makefile.am (backtrace.lo): Depend on internal.h.
711 (sort.lo, stest.lo): Add explicit dependencies.
712 * Makefile.in: Rebuild.
714 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
716 * backtrace.c: #include <sys/types.h>.
718 2015-09-08 Ian Lance Taylor <iant@google.com>
721 * backtrace.c: #include "internal.h".
722 (struct backtrace_data): Add can_alloc field.
723 (unwind): If can_alloc is false, don't try to get file/line
725 (backtrace_full): Set can_alloc field in bdata.
726 * alloc.c (backtrace_alloc): Don't call error_callback if it is
728 * mmap.c (backtrace_alloc): Likewise.
729 * internal.h: Update comments for backtrace_alloc and
732 2015-09-08 Ian Lance Taylor <iant@google.com>
735 * mmap.c (backtrace_alloc): Correct test for mmap failure.
737 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
739 * configure.ac: For spu-*-* targets, set have_fcntl to no.
740 * configure: Regenerate.
742 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
744 * configure.ac: Remove [disable-shared] argument to LT_INIT.
745 Remove setting PIC_FLAG when building as target library.
746 * configure: Regenerate.
748 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
750 * configure.ac: Only compile with -fPIC if the target
752 * configure: Regenerate.
754 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
756 * configure.ac: Set have_mmap to no on spu-*-* targets.
757 * configure: Regenerate.
759 2015-08-13 Ian Lance Taylor <iant@google.com>
761 * dwarf.c (read_function_entry): Add vec_inlined parameter.
764 2015-06-11 Martin Sebor <msebor@redhat.com>
767 * dwarf.c (struct line): Add new field idx.
768 (line_compare): Use it.
770 (read_line_info): Reset it.
772 2015-05-29 Tristan Gingold <gingold@adacore.com>
774 * pecoff.c: New file.
775 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
776 * Makefile.in: Regenerate.
777 * filetype.awk: Detect pecoff.
778 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
780 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
782 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
783 * configure: Regenerate.
784 * pecoff.c: New file.
786 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
788 * Makefile.in: Regenerated with automake-1.11.6.
789 * aclocal.m4: Likewise.
790 * configure: Likewise.
792 2015-01-24 Matthias Klose <doko@ubuntu.com>
794 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
795 * configure: Regenerate.
797 2015-01-05 Jakub Jelinek <jakub@redhat.com>
799 Update copyright years.
801 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
804 * configure: Regenerated.
806 2014-11-11 David Malcolm <dmalcolm@redhat.com>
808 * ChangeLog.jit: New.
810 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
813 * configure: Regenerate.
815 2014-10-23 Ian Lance Taylor <iant@google.com>
817 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
818 Fix to return void *.
820 2014-05-08 Ian Lance Taylor <iant@google.com>
822 * mmap.c (backtrace_free): If freeing a large aligned block of
823 memory, call munmap rather than holding onto it.
824 (backtrace_vector_grow): When growing a vector, double the number
825 of pages requested. When releasing the old version of a grown
826 vector, pass the correct size to backtrace_free.
828 2014-03-07 Ian Lance Taylor <iant@google.com>
830 * sort.c (backtrace_qsort): Use middle element as pivot.
832 2014-03-06 Ian Lance Taylor <iant@google.com>
836 * internal.h (backtrace_qsort): Declare.
837 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
838 (read_line_info, read_function_entry): Likewise.
839 (read_function_info, build_dwarf_data): Likewise.
840 * elf.c (elf_initialize_syminfo): Likewise.
841 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
842 (stest_SOURCES, stest_LDADD): Define.
843 (check_PROGRAMS): Add stest.
845 2014-02-07 Misty De Meo <misty@brew.sh>
848 * configure.ac: Use AC_LINK_IFELSE in check for
850 * configure: Regenerate.
852 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
854 Update copyright years
856 2013-12-06 Jakub Jelinek <jakub@redhat.com>
858 * elf.c (ET_DYN): Undefine and define again.
859 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
860 return early -1 without closing the descriptor.
861 (struct phdr_data): Add exe_descriptor.
862 (phdr_callback): If pd->exe_descriptor is not -1, for very first
863 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
864 otherwise backtrace_close the exe_descriptor if not -1. Adjust
866 (backtrace_initialize): Adjust call to elf_add. If it returns
867 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
869 2013-12-05 Ian Lance Taylor <iant@google.com>
871 * alloc.c (backtrace_vector_finish): Add error_callback and data
872 parameters. Call backtrace_vector_release. Return address base.
873 * mmap.c (backtrace_vector_finish): Add error_callback and data
874 parameters. Return address base.
875 * dwarf.c (read_function_info): Get new address base from
876 backtrace_vector_finish.
877 * internal.h (backtrace_vector_finish): Update declaration.
879 2013-11-27 Ian Lance Taylor <iant@google.com>
881 * dwarf.c (find_address_ranges): New static function, broken out
882 of build_address_map.
883 (build_address_map): Call it.
884 * btest.c (check): Check for missing filename or function, rather
886 (f3): Check that enough frames were returned.
888 2013-11-19 Jakub Jelinek <jakub@redhat.com>
890 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
891 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
893 * btest.c (struct symdata): Add size field.
894 (callback_three): Add symsize argument. Copy it to the data->size
896 (f23): Set symdata.size to 0.
897 (test5): Likewise. If sizeof (int) > 1, lookup address of
898 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
901 * atomic.c: Include sys/types.h.
903 2013-11-18 Ian Lance Taylor <iant@google.com>
905 * configure.ac: Check for support of __atomic extensions.
906 * internal.h: Declare or #define atomic functions for use in
908 * atomic.c: New file.
909 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
910 (dwarf_fileline, backtrace_dwarf_add): Likewise.
911 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
912 (backtrace_initialize): Likewise.
913 * fileline.c (fileline_initialize): Likewise.
914 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
915 * configure, config.h.in, Makefile.in: Rebuild.
917 2013-11-18 Jakub Jelinek <jakub@redhat.com>
919 * elf.c (SHN_UNDEF): Define.
920 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
921 with st_shndx == SHN_UNDEF. Add base_address to address fields.
922 (elf_add): Adjust caller.
924 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
926 2013-11-16 Ian Lance Taylor <iant@google.com>
928 * backtrace.h (backtrace_create_state): Correct comment about
931 2013-11-15 Ian Lance Taylor <iant@google.com>
933 * backtrace.h (backtrace_syminfo): Update comment and parameter
934 name to take any address, not just a PC value.
935 * elf.c (STT_OBJECT): Define.
936 (elf_nosyms): Rename parameter pc to addr.
937 (elf_symbol_search): Rename local variable pc to addr.
938 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
939 (elf_syminfo): Rename parameter pc to addr.
940 * btest.c (global): New global variable.
944 2013-10-17 Ian Lance Taylor <iant@google.com>
946 * elf.c (elf_add): Don't get the wrong offsets if a debug section
949 2013-10-15 David Malcolm <dmalcolm@redhat.com>
951 * configure.ac: Add --enable-host-shared, setting up
952 pre-existing PIC_FLAG variable within Makefile.am et al.
953 * configure: Regenerate.
955 2013-09-20 Alan Modra <amodra@gmail.com>
957 * configure: Regenerate.
959 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
961 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
963 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
965 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
966 dl_iterate_phdr callbacks.
968 2013-03-25 Ian Lance Taylor <iant@google.com>
970 * alloc.c: #include <sys/types.h>.
973 2013-01-31 Ian Lance Taylor <iant@google.com>
975 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
976 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
978 2013-01-25 Jakub Jelinek <jakub@redhat.com>
981 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
982 attribute was not seen.
984 2013-01-16 Ian Lance Taylor <iant@google.com>
986 * dwarf.c (struct unit): Add filename and abs_filename fields.
987 (build_address_map): Set new fields when reading unit.
988 (dwarf_lookup_pc): If we don't find an entry in the line table,
989 just return the main file name.
991 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
993 Update copyright years.
995 2013-01-01 Ian Lance Taylor <iant@google.com>
998 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
999 $(MULTIBUILDTOP)/../../gcc/include.
1000 * Makefile.in: Rebuild.
1002 2013-01-01 Ian Lance Taylor <iant@google.com>
1005 * mmap.c (backtrace_alloc): Don't call sync functions if not
1007 (backtrace_free): Likewise.
1009 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1011 * mmapio.c: Define MAP_FAILED if not defined.
1013 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1016 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1017 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1018 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1020 * Makefile.in: Regenerated.
1021 * configure: Regenerated.
1023 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1026 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1027 * Makefile.in: Regenerated.
1029 2012-11-20 Ian Lance Taylor <iant@google.com>
1031 * dwarf.c (read_attribute): Always clear val.
1033 2012-11-13 Ian Lance Taylor <iant@google.com>
1036 * configure.ac: Only add -Werror if building a target library.
1037 * configure: Rebuild.
1039 2012-11-12 Ian Lance Taylor <iant@google.com>
1040 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1041 Gerald Pfeifer <gerald@pfeifer.com>
1043 * configure.ac: Check for getexecname.
1044 * fileline.c: #include <errno.h>. Define getexecname if not
1046 (fileline_initialize): Try to find the executable in a few
1048 * print.c (error_callback): Only print the filename if it came
1049 from the backtrace state.
1050 * configure, config.h.in: Rebuild.
1052 2012-10-29 Ian Lance Taylor <iant@google.com>
1054 * mmap.c (backtrace_vector_release): Correct last patch: add
1057 2012-10-29 Ian Lance Taylor <iant@google.com>
1059 * mmap.c (backtrace_vector_release): Make sure freed block is
1060 aligned on 8-byte boundary.
1062 2012-10-26 Ian Lance Taylor <iant@google.com>
1065 * posix.c (backtrace_open): Add does_not_exist parameter.
1066 * elf.c (phdr_callback): Do not warn if shared library could not
1068 * fileline.c (fileline_initialize): Update calls to
1070 * internal.h (backtrace_open): Update declaration.
1072 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1075 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1076 * configure: Regenerate.
1078 2012-10-24 Ian Lance Taylor <iant@google.com>
1081 * configure.ac: Check whether -funwind-tables option works.
1082 * configure: Rebuild.
1084 2012-10-11 Ian Lance Taylor <iant@google.com>
1086 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1087 * configure: Rebuild.
1089 2012-10-10 Ian Lance Taylor <iant@google.com>
1091 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1094 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1096 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1098 2012-10-09 Ian Lance Taylor <iant@google.com>
1100 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1101 (backtrace_dwarf_add): Likewise.
1103 2012-10-09 Ian Lance Taylor <iant@google.com>
1105 Add support for tracing through shared libraries.
1106 * configure.ac: Check for link.h and dl_iterate_phdr.
1107 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1108 ELF macros before #defining them.
1109 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1111 (struct elf_syminfo_data): Add next field.
1112 (elf_initialize_syminfo): Initialize next field.
1113 (elf_add_syminfo_data): New static function.
1114 (elf_add): New static function, broken out of
1115 backtrace_initialize. Call backtrace_dwarf_add instead of
1116 backtrace_dwarf_initialize.
1117 (struct phdr_data): Define.
1118 (phdr_callback): New static function.
1119 (backtrace_initialize): Call elf_add.
1120 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1121 (add_unit_addr): Add base_address parameter. Change all callers.
1122 (add_unit_ranges, build_address_map): Likewise.
1123 (add_line): Add ddata parameter. Change all callers.
1124 (read_line_program, add_function_range): Likewise.
1125 (dwarf_lookup_pc): New static function, broken out of
1127 (dwarf_fileline): Call dwarf_lookup_pc.
1128 (build_dwarf_data): New static function.
1129 (backtrace_dwarf_add): New function.
1130 (backtrace_dwarf_initialize): Remove.
1131 * internal.h (backtrace_dwarf_initialize): Don't declare.
1132 (backtrace_dwarf_add): Declare.
1133 * configure, config.h.in: Rebuild.
1135 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1137 * btest.c (f23): Avoid uninitialized variable warning.
1139 2012-10-04 Ian Lance Taylor <iant@google.com>
1141 * dwarf.c: If the system header files do not declare strnlen,
1142 provide our own version.
1144 2012-10-03 Ian Lance Taylor <iant@google.com>
1146 * dwarf.c (read_uleb128): Fix overflow test.
1147 (read_sleb128): Likewise.
1148 (build_address_map): Don't change unit_buf.start.
1150 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1153 * configure.ac (EXTRA_FLAGS): New.
1154 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1155 * configure, Makefile.in: Regenerate.
1157 2012-09-29 Ian Lance Taylor <iant@google.com>
1160 * fileline.c (fileline_initialize): Pass errnum as -1 when
1161 reporting that we could not read executable information after a
1164 2012-09-27 Ian Lance Taylor <iant@google.com>
1167 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1168 * Makefile.am: Add dependencies for all objects.
1169 * configure, aclocal.m4, Makefile.in: Rebuild.
1171 2012-09-27 Ian Lance Taylor <iant@google.com>
1174 * elf.c (backtrace_initialize): Set *fileln_fn, not
1177 2012-09-19 Ian Lance Taylor <iant@google.com>
1179 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1180 as a target library.
1181 * configure: Rebuild.
1183 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1184 Ian Lance Taylor <iant@google.com>
1186 * configure.ac (GCC_HEADER_STDINT): Invoke.
1187 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1188 * btest.c: Don't include <stdint.h>.
1189 * dwarf.c: Likewise.
1190 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1192 2012-09-18 Ian Lance Taylor <iant@google.com>
1195 * Makefile.am (AM_CPPFLAGS): Define.
1196 (AM_CFLAGS): Remove -I options.
1197 * Makefile.in: Rebuild.
1199 2012-09-18 Ian Lance Taylor <iant@google.com>
1201 * posix.c (O_BINARY): Define if not defined.
1202 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1203 HAVE_FCNTL is defined.
1204 * configure.ac: Test for the fcntl function.
1205 * configure, config.h.in: Rebuild.
1207 2012-09-18 Ian Lance Taylor <iant@google.com>
1209 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1211 2012-09-18 Ian Lance Taylor <iant@google.com>
1213 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1215 2012-09-18 Ian Lance Taylor <iant@google.com>
1217 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1218 * mmapio.c: Don't define _GNU_SOURCE.
1219 * configure, config.h.in: Rebuild.
1221 2012-09-18 Ian Lance Taylor <iant@google.com>
1223 * configure.ac: Check whether strnlen is declared.
1224 * dwarf.c: Declare strnlen if not declared.
1225 * configure, config.h.in: Rebuild.
1227 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1229 * fileline.c: Include <stdlib.h>.
1232 2012-09-17 Ian Lance Taylor <iant@google.com>
1235 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1238 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1241 * nounwind.c (backtrace_simple): Add state parameter.
1243 2012-09-17 Ian Lance Taylor <iant@google.com>
1246 * unknown.c (unknown_fileline): Add state parameter, remove
1247 fileline_data parameter, name error_callback parameter.
1248 (backtrace_initialize): Add state parameter.
1250 2012-09-17 Ian Lance Taylor <iant@google.com>
1252 * Initial implementation.
1254 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1256 Copying and distribution of this file, with or without modification,
1257 are permitted in any medium without royalty provided the copyright
1258 notice and this notice are preserved.