1 2020-02-15 Ian Lance Taylor <iant@golang.org>
3 * ztest.c (test_large): Update file to current libgo test file.
5 2020-02-03 Ian Lance Taylor <iant@golang.org>
7 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
8 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
9 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
10 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
11 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
12 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
13 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
14 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
15 (stest_alloc_CFLAGS): Likewise.
16 * Makefile.in: Regenerate.
17 * ztest.c (error_callback_compress): Mark vdata unused.
18 (test_large): Add casts to avoid warnings.
20 2020-01-01 Jakub Jelinek <jakub@redhat.com>
22 Update copyright years.
24 2019-12-13 Ian Lance Taylor <iant@golang.org>
27 * dwarf.c (struct attr): Add val field.
28 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
29 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
30 (struct line_header): Add addrsize field.
31 (struct line_header_format): Define.
32 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
34 (read_uint24): New static function.
35 (read_attribute): Add implicit_val parameter. Replace dwarf_str
36 and dwarf_str_size parameters with dwarf_sections parameter. Add
37 support for new DWARF 5 forms. Change all callers.
38 (resolve_string): New static function.
39 (resolve_addr_index): Likewise.
40 (read_abbrevs): Support DW_FORM_implicit_const.
41 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
42 and ranges_is_index fields.
43 (update_pcrange): Support DWARF 5 encodings.
44 (add_high_low_range): New static function, split out of
46 (add_ranges_from_ranges): Likewise.
47 (add_ranges_from_rnglists): New static function.
48 (add_ranges): Just call new helper functions.
49 (find_address_ranges): Use resolve_string for strings, after
50 reading all attributes. Handle new DWARF 5 attributes.
51 (build_address_map): Support DWARF 5 compilation units.
52 (read_v2_paths): New static function, split out of
54 (read_lnct): New static function.
55 (read_line_header_format_entries): Likewise.
56 (read_line_header): Add ddata parameter. Support DWARF 5 line
57 headers. Call new helper functions. Change all callers.
58 (read_line_program): Use addrsize from line program header. Don't
59 special case directory index 0 for DWARF 5.
60 (read_referenced_name): Use resolve_string.
61 (read_function_entry): Handle DWARF 5 encodings. Use
63 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
64 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
65 * elf.c (dwarf_section_names): Add new section names.
66 * pecoff.c (dwarf_section_names): Likewise.
67 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
69 * configure.ac: Define HAVE_DWARF5 automake conditional.
70 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
71 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
72 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
73 (dwarf5_alloc_LDADD): Likewise.
74 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
75 (CLEANFILES, clean-local): Define.
77 2019-12-08 Ian Lance Taylor <iant@golang.org>
79 * dwarf.c (struct pcrange): Define.
80 (update_pcrange, add_ranges): New static functions.
81 (add_unit_addr): Change signature to work with add_ranges. Don't
82 add base_address here.
83 (add_unit_ranges): Remove.
84 (find_address_ranges): Replace str/ranges parameters with
85 dwarf_sections. Use update_pcrange and add_ranges. Change all
87 (add_function_range): Change signature to work with add_ranges.
88 Don't add base_address here.
89 (add_function_ranges): Remove.
90 (read_function_entry): Use update_pcrange and add_ranges.
92 2019-12-04 Ian Lance Taylor <iant@golang.org>
94 * edtest.c (test1): Add noclone attribute.
96 2019-12-04 Ian Lance Taylor <iant@golang.org>
98 * internal.h (enum dwarf_section): Define.
99 (struct dwarf_sections): Define.
100 (backtrace_dwarf_add): Update declaration to replace specific
101 section parameters with dwarf_sections parameter.
102 * dwarf.c (struct dwarf_data): Replace specific section fields
103 with dwarf_sections field.
104 (read_attribute): Use dwarf_sections with altlink.
105 (build_address_map): Replace specific section parameters with
106 dwarf_sections parameter. Change all callers.
107 (read_line_info): Use dwarf_sections with ddata.
108 (read_referenced_name): Likewise.
109 (add_function_ranges): Likewise.
110 (read_function_entry): Likewise.
111 (read_function_info): Likewise.
112 (build_dwarf_data): Replace specific section parameters with
113 dwarf_sections parameter. Change all callers.
114 (backtrace_dwarf_add): Likewise.
115 * elf.c (enum debug_section): Remove.
116 (dwarf_section_names): Remove .zdebug names.
117 (elf_add): Track zsections separately. Build dwarf_sections.
118 * pecoff.c (enum debug_section): Remove.
119 (struct debug_section_info): Remove data field.
120 (coff_add): Build dwarf_sections.
121 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
122 references with DEBUG_xxx references.
123 (xcoff_add): Build dwarf_sections.
125 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
127 * configure: Regenerate.
129 2019-09-26 Ian Lance Taylor <iant@golang.org>
131 PR libbacktrace/91908
132 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
133 __sync_bool_compare_and_swap to void.
134 * xcoff.c (backtrace_initialize): Likewise.
136 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
138 * configure.ac: Remove references to spu.
139 * configure: Regenerate.
141 2019-05-24 Clement Chigot <clement.chigot@atos.net>
143 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
145 * Makefile.in: Regenerate.
147 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
149 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
151 * configure: Regenerate.
153 2019-03-11 Ian Lance Taylor <iant@golang.org>
155 PR libbacktrace/89669
156 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
158 * Makefile.in: Regenerate.
160 2019-02-26 Tom de Vries <tdevries@suse.de>
162 * btest.c (test5): Allow global.* as minimal symbol name for global.
164 2019-02-26 Tom de Vries <tdevries@suse.de>
166 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
167 * Makefile.in: Regenerate.
169 2019-02-12 Tom de Vries <tdevries@suse.de>
171 PR libbacktrace/81983
172 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
174 2019-02-10 Tom de Vries <tdevries@suse.de>
176 * Makefile.am (BUILDTESTS): Add btest_lto.
177 * Makefile.in: Regenerate.
178 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
179 __attribute__((noclone)).
181 2019-02-08 Tom de Vries <tdevries@suse.de>
183 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
184 * print.c (backtrace_print): Same.
185 * simple.c (backtrace_simple): Same.
187 2019-02-08 Tom de Vries <tdevries@suse.de>
189 PR libbacktrace/78063
190 * dwarf.c (build_address_map): Keep all parsed units.
191 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
193 2019-01-31 Tom de Vries <tdevries@suse.de>
195 PR libbacktrace/89136
196 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
197 'debugaltlink_name_len =+ 1'.
199 2019-01-29 Tom de Vries <tdevries@suse.de>
201 * install-debuginfo-for-buildid.sh.in: New script.
202 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
203 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
204 * Makefile.in: Regenerate.
205 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
206 (READELF): Set with AC_CHECK_PROG.
207 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
208 * configure: Regenerate.
209 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
210 (elf_open_debugfile_by_buildid): ... here.
212 2019-01-29 Tom de Vries <tdevries@suse.de>
214 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
216 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
217 (check_PROGRAMS): Add BUILDTESTS.
218 * Makefile.in: Regenerate.
220 2019-01-28 Tom de Vries <tdevries@suse.de>
222 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
223 Use $< to access prerequisite.
224 * Makefile.in: Regenerate.
226 2019-01-25 Nathan Sidwell <nathan@acm.org>
228 * elf.c (elf_add): Pass "" filename to recursive call with
231 2019-01-25 Tom de Vries <tdevries@suse.de>
233 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
235 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
236 * Makefile.in: Regenerate.
238 2019-01-25 Tom de Vries <tdevries@suse.de>
240 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
241 (TESTS): Rename dtest to btest_gnudebuglink.
242 * Makefile.in: Regenerate.
244 2019-01-23 Tom de Vries <tdevries@suse.de>
246 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
247 (units_search, find_unit): Use size_t for offset.
248 (build_address_map): Use size_t for unit_offset.
250 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
252 * allocfail.c (main): Increase portability of printf statement.
254 2019-01-18 Ian Lance Taylor <iant@golang.org>
256 PR libbacktrace/88890
257 * mmapio.c (backtrace_get_view): Change size parameter to
258 uint64_t. Check that value fits in size_t.
259 * read.c (backtrace_get_view): Likewise.
260 * internal.h (backtrace_get_view): Update declaration.
261 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
263 2019-01-17 Tom de Vries <tdevries@suse.de>
265 PR libbacktrace/82857
266 * configure.ac (DWZ): Set with AC_CHECK_PROG.
267 (HAVE_DWZ): Set with AM_CONDITIONAL.
268 * configure: Regenerate.
269 * Makefile.am (TESTS): Add btest_dwz.
270 * Makefile.in: Regenerate.
272 2019-01-17 Tom de Vries <tdevries@suse.de>
274 PR libbacktrace/82857
275 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
276 (read_attribute): Handle DW_FORM_GNU_ref_alt using
277 ATTR_VAL_REF_ALT_INFO.
278 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
280 2019-01-17 Tom de Vries <tdevries@suse.de>
282 * dwarf.c (struct unit): Add low_offset and high_offset fields.
283 (struct unit_vector): New type.
284 (struct dwarf_data): Add units and units_counts fields.
285 (find_unit): New function.
286 (find_address_ranges): Add and handle unit_tag parameter.
287 (build_address_map): Add and handle units_vec parameter.
288 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
291 2019-01-17 Tom de Vries <tdevries@suse.de>
293 PR libbacktrace/82857
294 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
297 2019-01-17 Tom de Vries <tdevries@suse.de>
299 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
300 (read_attribute): Add altlink parameter. Handle missing altlink for
301 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
302 (find_address_ranges, build_address_map, build_dwarf_data): Add and
303 handle altlink parameter.
304 (read_referenced_name, read_function_entry): Add argument to
307 2019-01-17 Tom de Vries <tdevries@suse.de>
309 * dwarf.c (struct dwarf_data): Add altlink field.
310 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
311 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
312 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
313 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
314 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
315 * xcoff.c (xcoff_add): Same.
317 2019-01-17 Tom de Vries <tdevries@suse.de>
319 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
320 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
321 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
322 argument to backtrace_dwarf_add call.
323 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
324 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
325 * xcoff.c (xcoff_add): Same.
327 2019-01-17 Tom de Vries <tdevries@suse.de>
329 * elf.c (elf_add): Add and handle with_buildid_data and
330 with_buildid_size parameters. Handle .gnu_debugaltlink section.
331 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
333 2019-01-16 Tom de Vries <tdevries@suse.de>
335 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
337 (read_referenced_name): ... here, and ...
338 (read_function_entry): ... here.
340 2019-01-16 Tom de Vries <tdevries@suse.de>
342 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
344 (read_function_entry): Same. Don't allow name found via
345 DW_AT_abstract_origin or case DW_AT_specification to override linkage
348 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
352 * backtrace.h: Mechanically replace "can not" with "cannot".
354 2019-01-01 Jakub Jelinek <jakub@redhat.com>
356 Update copyright years.
358 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
360 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
362 * Makefile.in: Regenerate.
364 2018-12-28 Tom de Vries <tdevries@suse.de>
366 * dwarf.c (build_address_map): Reuse unused units.
368 2018-12-28 Tom de Vries <tdevries@suse.de>
370 * dwarf.c (build_address_map): Simplify by removing local variable
373 2018-12-28 Ian Lance Taylor <iant@golang.org>
374 Tom de Vries <tdevries@suse.de>
376 PR libbacktrace/88063
377 * dwarf.c (free_unit_addrs_vector): Remove.
378 (build_address_map): Keep track of allocated units in vector. Free
379 allocated units and corresponding abbrevs upon failure. Remove now
380 redundant call to free_unit_addrs_vector. Free addrs vector upon
381 failure. Free allocated unit vector.
383 2018-12-28 Tom de Vries <tdevries@suse.de>
385 * dwarf.c (build_address_map): Free addrs vector upon failure.
387 2018-12-14 Tom de Vries <tdevries@suse.de>
390 * allocfail.sh: Remove "set -o pipefail".
392 2018-12-12 Tom de Vries <tdevries@suse.de>
394 * Makefile.am (TESTS): Add allocfail.sh.
395 (check_PROGRAMS): Add allocfail.
396 * Makefile.in: Regenerate.
397 * instrumented_alloc.c: New file. Redefine malloc and realloc.
399 * allocfail.c: New file.
400 * allocfail.sh: New file.
402 2018-11-30 Tom de Vries <tdevries@suse.de>
404 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
405 test_xcoff_64, test_pecoff and test_unknown.
406 * Makefile.in: Regenerate.
407 * test_format.c: New file.
409 2018-11-30 Tom de Vries <tdevries@suse.de>
411 * Makefile.am : Add _with_alloc version for each test in
413 * Makefile.in: Regenerate.
415 2018-11-30 Tom de Vries <tdevries@suse.de>
417 * internal.h (backtrace_vector_free): New static inline fuction,
419 * dwarf.c (read_line_info): ... here.
421 2018-11-28 Tom de Vries <tdevries@suse.de>
423 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
426 2018-11-27 Tom de Vries <tdevries@suse.de>
428 * mmap.c (backtrace_vector_release): Same.
429 * unittest.c (test1): Add check.
431 2018-11-27 Tom de Vries <tdevries@suse.de>
433 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
435 * Makefile.am (check_PROGRAMS): Add unittest.
436 * Makefile.in: Regenerate.
437 * unittest.c: New file.
439 2018-11-22 Tom de Vries <tdevries@suse.de>
441 * dwarf.c (read_initial_length): Factor out of ...
442 (build_address_map, read_line_info): ... here.
444 2018-11-21 Tom de Vries <tdevries@suse.de>
446 * dwarf.c (read_string): Factor out of ...
447 (read_attribute, read_line_header, read_line_program): ... here.
449 2018-10-31 Joseph Myers <joseph@codesourcery.com>
452 * Makefile.am: Include multilib.am.
453 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
454 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
456 2018-10-05 Ian Lance Taylor <iant@golang.org>
458 PR libbacktrace/87529
459 * backtrace.h: Document that backtrace_create_state should be
462 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
464 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
465 * Makefile.in: Regenerate.
466 * config.h.in: Likewise.
467 * configure: Likewise.
469 2018-08-01 Tony Reix <tony.reix@atos.net>
471 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
472 (struct xcoff_func, struct xcoff_func_vector): New structs.
473 (xcoff_syminfo): Drop leading dot from symbol name.
474 (xcoff_line_compare, xcoff_line_search): Remove.
475 (xcoff_func_compare, xcoff_func_search): New static functions.
476 (xcoff_lookup_pc): Search function table.
477 (xcoff_add_line, xcoff_process_linenos): Remove.
478 (xcoff_initialize_fileline): Build function table.
480 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
483 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
484 checking up to 36 bytes.
486 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
488 * configure: Regenerated.
490 2018-04-19 Jakub Jelinek <jakub@redhat.com>
492 * configure: Regenerated.
494 2018-04-17 Ian Lance Taylor <iant@golang.org>
496 * backtrace.c: Revert last two changes. Don't call mmap
499 2018-04-17 Ian Lance Taylor <iant@golang.org>
501 * backtrace.c: Include backtrace-supported.h before checking
502 BACKTRACE_USES_MALLOC.
504 2018-04-17 Ian Lance Taylor <iant@golang.org>
506 * backtrace.c (backtrace_full): When testing whether we can
507 allocate memory, call mmap directly, and munmap the memory.
509 2018-04-04 Jakub Jelinek <jakub@redhat.com>
512 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
513 big endian, only use 32-bit loads if endianity macros are predefined
514 and indicate big or little endian.
516 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
519 * configure: Regenerate.
521 2018-02-15 Jakub Jelinek <jakub@redhat.com>
524 * elf.c (SHT_PROGBITS): Undefine and define.
526 2018-02-14 Jakub Jelinek <jakub@redhat.com>
529 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
530 (struct elf_ppc64_opd_data): New type.
531 (elf_initialize_syminfo): Add opd argument, handle symbols
532 pointing into the PowerPC64 ELFv1 .opd section.
533 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
534 to structure with .opd data to elf_initialize_syminfo.
536 2018-01-31 Ian Lance Taylor <iant@golang.org>
538 * elf.c (elf_add): Close descriptor if we use a debugfile.
539 * btest.c (check_open_files): New static function.
540 (main): Call check_open_files.
542 2018-01-25 Ian Lance Taylor <iant@golang.org>
544 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
546 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
548 2018-01-25 Ian Lance Taylor <iant@golang.org>
550 * pecoff.c (coff_add): Only release syms_view if it is valid.
552 2018-01-25 Ian Lance Taylor <iant@golang.org>
554 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
556 2018-01-24 Ian Lance Taylor <iant@golang.org>
558 * pecoff.c (coff_add): Use coff_read4, not memcpy.
560 2018-01-24 Ian Lance Taylor <iant@golang.org>
563 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
566 2018-01-19 Tony Reix <tony.reix@atos.net>
568 * xcoff.c (xcoff_incl_compare): New function.
569 (xcoff_incl_search): New function.
570 (xcoff_process_linenos): Use bsearch to find include file.
571 (xcoff_initialize_fileline): Sort include file information.
573 2018-01-16 Ian Lance Taylor <iant@golang.org>
575 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
577 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
578 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
579 (elf_zlib_default_table): Update.
580 (elf_zlib_default_dist_table): New static array.
581 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
583 * ztest.c (struct zlib_test): Add uncompressed_len.
584 (tests): Initialize uncompressed_len field. Add new test case.
585 (test_samples): Use uncompressed_len field.
587 2018-01-03 Jakub Jelinek <jakub@redhat.com>
589 Update copyright years.
591 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
593 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
594 * aclocal.m4: Regenerate.
595 * Makefile.in: Likewise.
596 * configure: Likewise.
598 2017-10-06 Ian Lance Taylor <iant@golang.org>
600 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
601 zlib uncompress function.
603 2017-10-05 Ian Lance Taylor <iant@golang.org>
605 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
606 Read a four byte integer.
607 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
608 boundary before ever calling elf_zlib_fetch.
609 * ztest.c (test_large): Simplify print statements a bit.
611 2017-10-02 Ian Lance Taylor <iant@golang.org>
613 * ztest.c: #include <errno.h>.
614 (TEST_TIMING): Don't define, don't test.
615 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
616 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
617 (ZLIB_CLOCK_GETTIME_ARG): Define.
618 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
619 * Makefile.am: Likewise.
620 * configure, Makefile.in: Rebuild.
622 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
625 * Makefile.am: Append the content of clock_gettime_link to
627 * configure.ac: Test for the case that clock_gettime is in librt.
628 * Makefile.in: Regenerate.
629 * configure: Likewise.
632 * configure.ac: Check for clock_gettime.
633 * config.h.in: Regenerate.
634 * configure: Likewise.
635 * ztest.c (average_time, test_large): Conditionalize test timing
636 on clock_gettime availability.
638 2017-09-29 Tony Reix <tony.reix@atos.net>
640 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
641 (STYP_DWARF, SSUBTYP_DW*): Define.
642 (enum dwarf_section): Define.
643 (struct dwsect_info): Define.
644 (xcoff_add): Look for DWARF sections, pass them to
647 2017-09-28 Ian Lance Taylor <iant@golang.org>
650 * elf.c (__builtin_prefetch): Define if not __GNUC__.
652 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
653 (b_elf_chdr): Define type.
654 (enum debug_section): Add ZDEBUG_xxx values.
655 (debug_section_names): Add names for new sections.
656 (struct debug_section_info): Add compressed field.
657 (elf_zlib_failed, elf_zlib_fetch): New static functions.
658 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
659 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
660 (HUFFMAN_SECONDARY_SHIFT): Define.
661 (ZDEBUG_TABLE_SIZE): Define.
662 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
663 (final_next_secondary): New static variable if
664 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
665 (elf_zlib_inflate_table): New static function.
666 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
667 function to produce fixed Huffman table.
668 (elf_zlib_default_table): New static variable.
669 (elf_zlib_inflate): New static function.
670 (elf_zlib_verify_checksum): Likewise.
671 (elf_zlib_inflate_and_verify): Likewise.
672 (elf_uncompress_zdebug): Likewise.
673 (elf_uncompress_chdr): Likewise.
674 (backtrace_uncompress_zdebug): New extern function.
675 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
676 sections, and uncompress them.
677 * internal.h (backtrace_compress_zdebug): Declare.
679 * configure.ac: Check for -lz and check whether the linker
680 supports --compress-debug-sections.
681 * Makefile.am (ztest_SOURCES): New variable.
682 (ztest_CFLAGS, ztest_LDADD): New variables.
683 (check_PROGRAMS): Add ztest.
684 (ctestg_SOURCES): New variable.
685 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
686 (ctesta_SOURCES): New variable.
687 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
688 (check_PROGRAMS): Add ctestg and ctesta.
689 * configure, config.h.in, Makefile.in: Rebuild.
691 2017-09-22 Ian Lance Taylor <iant@golang.org>
694 * configure.ac: Check for lstat and readlink.
695 * elf.c (lstat, readlink): Provide dummy versions if real versions
697 * configure, config.h.in: Rebuild.
699 2017-09-21 Ian Lance Taylor <iant@google.com>
702 * elf.c (backtrace_initialize): Set pd.exe_filename.
704 2017-09-20 Ian Lance Taylor <iant@golang.org>
705 Denis Khalikov <d.khalikov@partner.samsung.com>
708 Support for external debug info.
709 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
710 (S_ISLNK): Define if not defined.
711 (xstrnlen): Define if strnlen is not available.
712 (b_elf_note): Define type.
713 (NT_GNU_BUILD_ID): Define macro.
714 (elf_crc32, elf_crc32_file): New static functions.
715 (elf_is_symlink, elf_readlink): New static functions.
716 (elf_open_debugfile_by_buildid): New static function.
717 (elf_try_debugfile): New static function.
718 (elf_find_debugfile_by_debuglink): New static function.
719 (elf_open_debugfile_by_debuglink): New static function.
720 (elf_add): Add filename and debuginfo parameters. Adjust all
721 callers. Look for external debug info notes, and try to fetch
722 debug info from external file.
723 (struct phdr_data): Add exe_filename field.
724 (phdr_callback): Pass filename to elf_add.
725 (backtrace_initialize): Add filename parameter.
726 * internal.h (backtrace_initialize): Add filename parameter.
727 * fileline.c (fileline_initialize): Pass filename to
728 backtrace_initialize.
729 * pecoff.c (fileline_initialize): Add unused filename parameter.
730 * unknown.c (fileline_initialize): Likewise.
731 * xcoff.c (fileline_initialize): Likewise.
732 * configure.ac: Check for objcopy --add-gnu-debuglink.
733 * Makefile.am (dtest): New test target.
734 * configure, Makefile.in: Rebuild.
736 2017-09-12 Steve Ellcey <sellcey@cavium.com>
739 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
740 * Makefile.in: Regenerate.
742 2017-09-12 Steve Ellcey <sellcey@cavium.com>
745 * libbacktrace/Makefile.in
746 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
748 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
751 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
753 2017-07-28 Tony Reix <tony.reix@atos.net>
755 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
757 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
759 * fileline.c (fileline_initialize): Print pid_t as long.
761 2017-07-26 Tony Reix <tony.reix@atos.net>
763 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
764 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
765 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
766 * configure, config.h.in: Regenerate.
768 2017-07-21 Tony Reix <tony.reix@atos.net>
770 * filetype.awk: Add AIX XCOFF type detection.
771 * configure.ac: Recognize xcoff format.
772 * Makefile.am (FORMAT_FILES): Add xcoff.c.
773 * fileline.c: Include <unistd.h>.
774 (fileline_initialize): Add case for AIX procfs.
776 * configure, Makefile.in: Rebuild.
778 2017-06-21 Richard Biener <rguenther@suse.de>
780 * configure.ac: Add AC_SYS_LARGEFILE.
781 * config.h.in: Regenerate.
782 * configure: Likewise.
784 2017-06-11 Ian Lance Taylor <iant@golang.org>
786 * elf.c (backtrace_initialize): Always set *fileline_fn.
788 * btest.c: Move support functions into testlib.c. Change calls to
789 check to pass file name.
790 * testlib.c: New file, copied from (part of) btest.c.
791 * testlib.h: New file, declarations for testlib.c.
792 * edtest.c: Use testlib.h and testlib.c.
793 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
794 * Makefile.am (btest_SOURCES): Add testlib.c.
795 (edtest_SOURCES): Likewise.
796 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
797 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
798 * configure, Makefile.in: Rebuild.
800 2017-05-19 Than McIntosh <thanm@google.com>
802 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
803 (read_line_header): Don't allocate dirs if dirs_count == 0.
804 * edtest.c: New file.
805 * edtest2.c: New file.
806 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
807 (check_PROGRAMS): Add edtest.
808 (edtest2_build.c, gen_edtest2_build): New targets.
809 * Makefile.in: Rebuild.
811 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
813 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
814 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
816 2017-01-01 Jakub Jelinek <jakub@redhat.com>
818 Update copyright years.
820 2016-11-15 Matthias Klose <doko@ubuntu.com>
822 * configure: Regenerate.
824 2016-09-11 Carlos Liam <carlos@aarzee.me>
826 * all: Remove meaningless trailing whitespace.
828 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
831 * elf.c (phdr_callback) [__i386__]: Add
832 __attribute__((__force_align_arg_pointer__)).
834 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
836 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
837 avoid possible crash.
838 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
839 missing debug info anymore.
841 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
843 * mmap.c (MAP_FAILED): Define if not defined.
845 2016-01-04 Jakub Jelinek <jakub@redhat.com>
847 Update copyright years.
849 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
851 * configure.ac: Specify that DJGPP do not have mmap
852 even when sys/mman.h exists.
853 * configure: Regenerate
855 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
858 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
859 * configure: Regenerate.
860 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
863 2015-09-17 Ian Lance Taylor <iant@google.com>
865 * posix.c (backtrace_open): Cast second argument of open() to int.
867 2015-09-11 Ian Lance Taylor <iant@google.com>
869 * Makefile.am (backtrace.lo): Depend on internal.h.
870 (sort.lo, stest.lo): Add explicit dependencies.
871 * Makefile.in: Rebuild.
873 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
875 * backtrace.c: #include <sys/types.h>.
877 2015-09-08 Ian Lance Taylor <iant@google.com>
880 * backtrace.c: #include "internal.h".
881 (struct backtrace_data): Add can_alloc field.
882 (unwind): If can_alloc is false, don't try to get file/line
884 (backtrace_full): Set can_alloc field in bdata.
885 * alloc.c (backtrace_alloc): Don't call error_callback if it is
887 * mmap.c (backtrace_alloc): Likewise.
888 * internal.h: Update comments for backtrace_alloc and
891 2015-09-08 Ian Lance Taylor <iant@google.com>
894 * mmap.c (backtrace_alloc): Correct test for mmap failure.
896 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
898 * configure.ac: For spu-*-* targets, set have_fcntl to no.
899 * configure: Regenerate.
901 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
903 * configure.ac: Remove [disable-shared] argument to LT_INIT.
904 Remove setting PIC_FLAG when building as target library.
905 * configure: Regenerate.
907 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
909 * configure.ac: Only compile with -fPIC if the target
911 * configure: Regenerate.
913 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
915 * configure.ac: Set have_mmap to no on spu-*-* targets.
916 * configure: Regenerate.
918 2015-08-13 Ian Lance Taylor <iant@google.com>
920 * dwarf.c (read_function_entry): Add vec_inlined parameter.
923 2015-06-11 Martin Sebor <msebor@redhat.com>
926 * dwarf.c (struct line): Add new field idx.
927 (line_compare): Use it.
929 (read_line_info): Reset it.
931 2015-05-29 Tristan Gingold <gingold@adacore.com>
933 * pecoff.c: New file.
934 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
935 * Makefile.in: Regenerate.
936 * filetype.awk: Detect pecoff.
937 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
939 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
941 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
942 * configure: Regenerate.
943 * pecoff.c: New file.
945 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
947 * Makefile.in: Regenerated with automake-1.11.6.
948 * aclocal.m4: Likewise.
949 * configure: Likewise.
951 2015-01-24 Matthias Klose <doko@ubuntu.com>
953 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
954 * configure: Regenerate.
956 2015-01-05 Jakub Jelinek <jakub@redhat.com>
958 Update copyright years.
960 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
963 * configure: Regenerated.
965 2014-11-11 David Malcolm <dmalcolm@redhat.com>
967 * ChangeLog.jit: New.
969 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
972 * configure: Regenerate.
974 2014-10-23 Ian Lance Taylor <iant@google.com>
976 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
977 Fix to return void *.
979 2014-05-08 Ian Lance Taylor <iant@google.com>
981 * mmap.c (backtrace_free): If freeing a large aligned block of
982 memory, call munmap rather than holding onto it.
983 (backtrace_vector_grow): When growing a vector, double the number
984 of pages requested. When releasing the old version of a grown
985 vector, pass the correct size to backtrace_free.
987 2014-03-07 Ian Lance Taylor <iant@google.com>
989 * sort.c (backtrace_qsort): Use middle element as pivot.
991 2014-03-06 Ian Lance Taylor <iant@google.com>
995 * internal.h (backtrace_qsort): Declare.
996 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
997 (read_line_info, read_function_entry): Likewise.
998 (read_function_info, build_dwarf_data): Likewise.
999 * elf.c (elf_initialize_syminfo): Likewise.
1000 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1001 (stest_SOURCES, stest_LDADD): Define.
1002 (check_PROGRAMS): Add stest.
1004 2014-02-07 Misty De Meo <misty@brew.sh>
1007 * configure.ac: Use AC_LINK_IFELSE in check for
1009 * configure: Regenerate.
1011 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1013 Update copyright years
1015 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1017 * elf.c (ET_DYN): Undefine and define again.
1018 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1019 return early -1 without closing the descriptor.
1020 (struct phdr_data): Add exe_descriptor.
1021 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1022 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1023 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1025 (backtrace_initialize): Adjust call to elf_add. If it returns
1026 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1028 2013-12-05 Ian Lance Taylor <iant@google.com>
1030 * alloc.c (backtrace_vector_finish): Add error_callback and data
1031 parameters. Call backtrace_vector_release. Return address base.
1032 * mmap.c (backtrace_vector_finish): Add error_callback and data
1033 parameters. Return address base.
1034 * dwarf.c (read_function_info): Get new address base from
1035 backtrace_vector_finish.
1036 * internal.h (backtrace_vector_finish): Update declaration.
1038 2013-11-27 Ian Lance Taylor <iant@google.com>
1040 * dwarf.c (find_address_ranges): New static function, broken out
1041 of build_address_map.
1042 (build_address_map): Call it.
1043 * btest.c (check): Check for missing filename or function, rather
1045 (f3): Check that enough frames were returned.
1047 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1049 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1050 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1052 * btest.c (struct symdata): Add size field.
1053 (callback_three): Add symsize argument. Copy it to the data->size
1055 (f23): Set symdata.size to 0.
1056 (test5): Likewise. If sizeof (int) > 1, lookup address of
1057 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1060 * atomic.c: Include sys/types.h.
1062 2013-11-18 Ian Lance Taylor <iant@google.com>
1064 * configure.ac: Check for support of __atomic extensions.
1065 * internal.h: Declare or #define atomic functions for use in
1067 * atomic.c: New file.
1068 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1069 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1070 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1071 (backtrace_initialize): Likewise.
1072 * fileline.c (fileline_initialize): Likewise.
1073 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1074 * configure, config.h.in, Makefile.in: Rebuild.
1076 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1078 * elf.c (SHN_UNDEF): Define.
1079 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1080 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1081 (elf_add): Adjust caller.
1083 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1085 2013-11-16 Ian Lance Taylor <iant@google.com>
1087 * backtrace.h (backtrace_create_state): Correct comment about
1090 2013-11-15 Ian Lance Taylor <iant@google.com>
1092 * backtrace.h (backtrace_syminfo): Update comment and parameter
1093 name to take any address, not just a PC value.
1094 * elf.c (STT_OBJECT): Define.
1095 (elf_nosyms): Rename parameter pc to addr.
1096 (elf_symbol_search): Rename local variable pc to addr.
1097 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1098 (elf_syminfo): Rename parameter pc to addr.
1099 * btest.c (global): New global variable.
1103 2013-10-17 Ian Lance Taylor <iant@google.com>
1105 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1108 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1110 * configure.ac: Add --enable-host-shared, setting up
1111 pre-existing PIC_FLAG variable within Makefile.am et al.
1112 * configure: Regenerate.
1114 2013-09-20 Alan Modra <amodra@gmail.com>
1116 * configure: Regenerate.
1118 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1120 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1122 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1124 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1125 dl_iterate_phdr callbacks.
1127 2013-03-25 Ian Lance Taylor <iant@google.com>
1129 * alloc.c: #include <sys/types.h>.
1132 2013-01-31 Ian Lance Taylor <iant@google.com>
1134 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1135 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1137 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1140 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1141 attribute was not seen.
1143 2013-01-16 Ian Lance Taylor <iant@google.com>
1145 * dwarf.c (struct unit): Add filename and abs_filename fields.
1146 (build_address_map): Set new fields when reading unit.
1147 (dwarf_lookup_pc): If we don't find an entry in the line table,
1148 just return the main file name.
1150 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1152 Update copyright years.
1154 2013-01-01 Ian Lance Taylor <iant@google.com>
1157 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1158 $(MULTIBUILDTOP)/../../gcc/include.
1159 * Makefile.in: Rebuild.
1161 2013-01-01 Ian Lance Taylor <iant@google.com>
1164 * mmap.c (backtrace_alloc): Don't call sync functions if not
1166 (backtrace_free): Likewise.
1168 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1170 * mmapio.c: Define MAP_FAILED if not defined.
1172 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1175 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1176 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1177 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1179 * Makefile.in: Regenerated.
1180 * configure: Regenerated.
1182 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1185 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1186 * Makefile.in: Regenerated.
1188 2012-11-20 Ian Lance Taylor <iant@google.com>
1190 * dwarf.c (read_attribute): Always clear val.
1192 2012-11-13 Ian Lance Taylor <iant@google.com>
1195 * configure.ac: Only add -Werror if building a target library.
1196 * configure: Rebuild.
1198 2012-11-12 Ian Lance Taylor <iant@google.com>
1199 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1200 Gerald Pfeifer <gerald@pfeifer.com>
1202 * configure.ac: Check for getexecname.
1203 * fileline.c: #include <errno.h>. Define getexecname if not
1205 (fileline_initialize): Try to find the executable in a few
1207 * print.c (error_callback): Only print the filename if it came
1208 from the backtrace state.
1209 * configure, config.h.in: Rebuild.
1211 2012-10-29 Ian Lance Taylor <iant@google.com>
1213 * mmap.c (backtrace_vector_release): Correct last patch: add
1216 2012-10-29 Ian Lance Taylor <iant@google.com>
1218 * mmap.c (backtrace_vector_release): Make sure freed block is
1219 aligned on 8-byte boundary.
1221 2012-10-26 Ian Lance Taylor <iant@google.com>
1224 * posix.c (backtrace_open): Add does_not_exist parameter.
1225 * elf.c (phdr_callback): Do not warn if shared library could not
1227 * fileline.c (fileline_initialize): Update calls to
1229 * internal.h (backtrace_open): Update declaration.
1231 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1234 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1235 * configure: Regenerate.
1237 2012-10-24 Ian Lance Taylor <iant@google.com>
1240 * configure.ac: Check whether -funwind-tables option works.
1241 * configure: Rebuild.
1243 2012-10-11 Ian Lance Taylor <iant@google.com>
1245 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1246 * configure: Rebuild.
1248 2012-10-10 Ian Lance Taylor <iant@google.com>
1250 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1253 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1255 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1257 2012-10-09 Ian Lance Taylor <iant@google.com>
1259 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1260 (backtrace_dwarf_add): Likewise.
1262 2012-10-09 Ian Lance Taylor <iant@google.com>
1264 Add support for tracing through shared libraries.
1265 * configure.ac: Check for link.h and dl_iterate_phdr.
1266 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1267 ELF macros before #defining them.
1268 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1270 (struct elf_syminfo_data): Add next field.
1271 (elf_initialize_syminfo): Initialize next field.
1272 (elf_add_syminfo_data): New static function.
1273 (elf_add): New static function, broken out of
1274 backtrace_initialize. Call backtrace_dwarf_add instead of
1275 backtrace_dwarf_initialize.
1276 (struct phdr_data): Define.
1277 (phdr_callback): New static function.
1278 (backtrace_initialize): Call elf_add.
1279 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1280 (add_unit_addr): Add base_address parameter. Change all callers.
1281 (add_unit_ranges, build_address_map): Likewise.
1282 (add_line): Add ddata parameter. Change all callers.
1283 (read_line_program, add_function_range): Likewise.
1284 (dwarf_lookup_pc): New static function, broken out of
1286 (dwarf_fileline): Call dwarf_lookup_pc.
1287 (build_dwarf_data): New static function.
1288 (backtrace_dwarf_add): New function.
1289 (backtrace_dwarf_initialize): Remove.
1290 * internal.h (backtrace_dwarf_initialize): Don't declare.
1291 (backtrace_dwarf_add): Declare.
1292 * configure, config.h.in: Rebuild.
1294 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1296 * btest.c (f23): Avoid uninitialized variable warning.
1298 2012-10-04 Ian Lance Taylor <iant@google.com>
1300 * dwarf.c: If the system header files do not declare strnlen,
1301 provide our own version.
1303 2012-10-03 Ian Lance Taylor <iant@google.com>
1305 * dwarf.c (read_uleb128): Fix overflow test.
1306 (read_sleb128): Likewise.
1307 (build_address_map): Don't change unit_buf.start.
1309 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1312 * configure.ac (EXTRA_FLAGS): New.
1313 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1314 * configure, Makefile.in: Regenerate.
1316 2012-09-29 Ian Lance Taylor <iant@google.com>
1319 * fileline.c (fileline_initialize): Pass errnum as -1 when
1320 reporting that we could not read executable information after a
1323 2012-09-27 Ian Lance Taylor <iant@google.com>
1326 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1327 * Makefile.am: Add dependencies for all objects.
1328 * configure, aclocal.m4, Makefile.in: Rebuild.
1330 2012-09-27 Ian Lance Taylor <iant@google.com>
1333 * elf.c (backtrace_initialize): Set *fileln_fn, not
1336 2012-09-19 Ian Lance Taylor <iant@google.com>
1338 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1339 as a target library.
1340 * configure: Rebuild.
1342 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1343 Ian Lance Taylor <iant@google.com>
1345 * configure.ac (GCC_HEADER_STDINT): Invoke.
1346 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1347 * btest.c: Don't include <stdint.h>.
1348 * dwarf.c: Likewise.
1349 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1351 2012-09-18 Ian Lance Taylor <iant@google.com>
1354 * Makefile.am (AM_CPPFLAGS): Define.
1355 (AM_CFLAGS): Remove -I options.
1356 * Makefile.in: Rebuild.
1358 2012-09-18 Ian Lance Taylor <iant@google.com>
1360 * posix.c (O_BINARY): Define if not defined.
1361 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1362 HAVE_FCNTL is defined.
1363 * configure.ac: Test for the fcntl function.
1364 * configure, config.h.in: Rebuild.
1366 2012-09-18 Ian Lance Taylor <iant@google.com>
1368 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1370 2012-09-18 Ian Lance Taylor <iant@google.com>
1372 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1374 2012-09-18 Ian Lance Taylor <iant@google.com>
1376 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1377 * mmapio.c: Don't define _GNU_SOURCE.
1378 * configure, config.h.in: Rebuild.
1380 2012-09-18 Ian Lance Taylor <iant@google.com>
1382 * configure.ac: Check whether strnlen is declared.
1383 * dwarf.c: Declare strnlen if not declared.
1384 * configure, config.h.in: Rebuild.
1386 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1388 * fileline.c: Include <stdlib.h>.
1391 2012-09-17 Ian Lance Taylor <iant@google.com>
1394 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1397 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1400 * nounwind.c (backtrace_simple): Add state parameter.
1402 2012-09-17 Ian Lance Taylor <iant@google.com>
1405 * unknown.c (unknown_fileline): Add state parameter, remove
1406 fileline_data parameter, name error_callback parameter.
1407 (backtrace_initialize): Add state parameter.
1409 2012-09-17 Ian Lance Taylor <iant@google.com>
1411 * Initial implementation.
1413 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1415 Copying and distribution of this file, with or without modification,
1416 are permitted in any medium without royalty provided the copyright
1417 notice and this notice are preserved.