1 2020-08-24 Ian Lance Taylor <iant@golang.org>
3 * macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
4 (MACH_O_MH_CIGAM_FAT_64): Define.
5 (struct macho_fat_arch_64): Define.
6 (macho_add_fat): Add and use is_64 parameter.
7 (macho_add): Recognize 64-bit fat files.
9 2020-07-30 H.J. Lu <hjl.tools@gmail.com>
12 * configure: Regenerated.
14 2020-07-08 Ian Lance Taylor <iant@golang.org>
16 * configure.ac: Test linker support for DWARF5
17 * configure: Regenerate
19 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
22 * configure: Regenerated.
24 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
27 * configure: Regenerated.
29 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
31 * configure: Regenerated.
33 2020-05-13 Ian Lance Taylor <iant@golang.org>
35 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
37 2020-05-13 Ian Lance Taylor <iant@golang.org>
40 * posix.c (backtrace_open): Treat EACCESS like ENOENT.
42 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
44 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
45 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
46 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
48 * Makefile.in: Regenerated.
49 * configure: Likewise.
51 2020-05-11 Ian Lance Taylor <iant@golang.org>
54 * configure.ac: Check for getpagesize declaration.
55 * mmap.c: Declare getpagesize if necessary.
57 * configure: Regenerate.
58 * config.h.in: Regenerate.
59 * Makefile.in: Regenerate.
61 2020-05-09 Roland McGrath <mcgrathr@google.com>
63 * elf.c (elf_add): Bail early if there are no section headers at all.
65 2020-05-09 Ian Lance Taylor <iant@golang.org>
67 * elf.c (elf_add): Don't free strtab if an error occurs after
68 recording symbol information.
70 2020-05-09 Ian Lance Taylor <iant@golang.org>
74 * filetype.awk: Recognize Mach-O files.
75 * Makefile.am (FORMAT_FILES): Add macho.c.
76 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
77 (%.dSYM): New pattern target.
78 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
79 (test_macho_LDADD): New target.
80 (BUILDTESTS): Add test_macho.
81 (macho.lo): Add dependencies.
82 * configure.ac: Recognize macho file type. Check for
83 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
84 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
85 * Makefile.in: Regenerate.
86 * configure: Regenerate.
87 * config.h.in: Regenerate.
89 2020-05-09 Ian Lance Taylor <iant@golang.org>
91 * read.c (backtrace_get_view): Support short read.
93 2020-05-09 Ian Lance Taylor <iant@golang.org>
95 * elf.c (elf_add): If debug sections are very large or far apart,
96 read them individually rather than as a single view.
98 2020-05-08 Ian Lance Taylor <iant@golang.org>
100 * fileline.c (sysctl_exec_name): New static function.
101 (sysctl_exec_name1): New macro or static function.
102 (sysctl_exec_name2): Likewise.
103 (fileline_initialize): Try sysctl_exec_name[12].
104 * configure.ac: Check for sysctl args to fetch executable name.
105 * configure: Regenerate.
106 * config.h.in: Regenerate.
108 2020-02-15 Ian Lance Taylor <iant@golang.org>
110 * ztest.c (test_large): Update file to current libgo test file.
112 2020-02-03 Ian Lance Taylor <iant@golang.org>
114 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
115 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
116 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
117 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
118 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
119 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
120 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
121 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
122 (stest_alloc_CFLAGS): Likewise.
123 * Makefile.in: Regenerate.
124 * ztest.c (error_callback_compress): Mark vdata unused.
125 (test_large): Add casts to avoid warnings.
127 2020-01-01 Jakub Jelinek <jakub@redhat.com>
129 Update copyright years.
131 2019-12-13 Ian Lance Taylor <iant@golang.org>
134 * dwarf.c (struct attr): Add val field.
135 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
136 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
137 (struct line_header): Add addrsize field.
138 (struct line_header_format): Define.
139 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
141 (read_uint24): New static function.
142 (read_attribute): Add implicit_val parameter. Replace dwarf_str
143 and dwarf_str_size parameters with dwarf_sections parameter. Add
144 support for new DWARF 5 forms. Change all callers.
145 (resolve_string): New static function.
146 (resolve_addr_index): Likewise.
147 (read_abbrevs): Support DW_FORM_implicit_const.
148 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
149 and ranges_is_index fields.
150 (update_pcrange): Support DWARF 5 encodings.
151 (add_high_low_range): New static function, split out of
153 (add_ranges_from_ranges): Likewise.
154 (add_ranges_from_rnglists): New static function.
155 (add_ranges): Just call new helper functions.
156 (find_address_ranges): Use resolve_string for strings, after
157 reading all attributes. Handle new DWARF 5 attributes.
158 (build_address_map): Support DWARF 5 compilation units.
159 (read_v2_paths): New static function, split out of
161 (read_lnct): New static function.
162 (read_line_header_format_entries): Likewise.
163 (read_line_header): Add ddata parameter. Support DWARF 5 line
164 headers. Call new helper functions. Change all callers.
165 (read_line_program): Use addrsize from line program header. Don't
166 special case directory index 0 for DWARF 5.
167 (read_referenced_name): Use resolve_string.
168 (read_function_entry): Handle DWARF 5 encodings. Use
170 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
171 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
172 * elf.c (dwarf_section_names): Add new section names.
173 * pecoff.c (dwarf_section_names): Likewise.
174 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
176 * configure.ac: Define HAVE_DWARF5 automake conditional.
177 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
178 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
179 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
180 (dwarf5_alloc_LDADD): Likewise.
181 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
182 (CLEANFILES, clean-local): Define.
184 2019-12-08 Ian Lance Taylor <iant@golang.org>
186 * dwarf.c (struct pcrange): Define.
187 (update_pcrange, add_ranges): New static functions.
188 (add_unit_addr): Change signature to work with add_ranges. Don't
189 add base_address here.
190 (add_unit_ranges): Remove.
191 (find_address_ranges): Replace str/ranges parameters with
192 dwarf_sections. Use update_pcrange and add_ranges. Change all
194 (add_function_range): Change signature to work with add_ranges.
195 Don't add base_address here.
196 (add_function_ranges): Remove.
197 (read_function_entry): Use update_pcrange and add_ranges.
199 2019-12-04 Ian Lance Taylor <iant@golang.org>
201 * edtest.c (test1): Add noclone attribute.
203 2019-12-04 Ian Lance Taylor <iant@golang.org>
205 * internal.h (enum dwarf_section): Define.
206 (struct dwarf_sections): Define.
207 (backtrace_dwarf_add): Update declaration to replace specific
208 section parameters with dwarf_sections parameter.
209 * dwarf.c (struct dwarf_data): Replace specific section fields
210 with dwarf_sections field.
211 (read_attribute): Use dwarf_sections with altlink.
212 (build_address_map): Replace specific section parameters with
213 dwarf_sections parameter. Change all callers.
214 (read_line_info): Use dwarf_sections with ddata.
215 (read_referenced_name): Likewise.
216 (add_function_ranges): Likewise.
217 (read_function_entry): Likewise.
218 (read_function_info): Likewise.
219 (build_dwarf_data): Replace specific section parameters with
220 dwarf_sections parameter. Change all callers.
221 (backtrace_dwarf_add): Likewise.
222 * elf.c (enum debug_section): Remove.
223 (dwarf_section_names): Remove .zdebug names.
224 (elf_add): Track zsections separately. Build dwarf_sections.
225 * pecoff.c (enum debug_section): Remove.
226 (struct debug_section_info): Remove data field.
227 (coff_add): Build dwarf_sections.
228 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
229 references with DEBUG_xxx references.
230 (xcoff_add): Build dwarf_sections.
232 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
234 * configure: Regenerate.
236 2019-09-26 Ian Lance Taylor <iant@golang.org>
238 PR libbacktrace/91908
239 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
240 __sync_bool_compare_and_swap to void.
241 * xcoff.c (backtrace_initialize): Likewise.
243 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
245 * configure.ac: Remove references to spu.
246 * configure: Regenerate.
248 2019-05-24 Clement Chigot <clement.chigot@atos.net>
250 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
252 * Makefile.in: Regenerate.
254 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
256 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
258 * configure: Regenerate.
260 2019-03-11 Ian Lance Taylor <iant@golang.org>
262 PR libbacktrace/89669
263 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
265 * Makefile.in: Regenerate.
267 2019-02-26 Tom de Vries <tdevries@suse.de>
269 * btest.c (test5): Allow global.* as minimal symbol name for global.
271 2019-02-26 Tom de Vries <tdevries@suse.de>
273 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
274 * Makefile.in: Regenerate.
276 2019-02-12 Tom de Vries <tdevries@suse.de>
278 PR libbacktrace/81983
279 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
281 2019-02-10 Tom de Vries <tdevries@suse.de>
283 * Makefile.am (BUILDTESTS): Add btest_lto.
284 * Makefile.in: Regenerate.
285 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
286 __attribute__((noclone)).
288 2019-02-08 Tom de Vries <tdevries@suse.de>
290 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
291 * print.c (backtrace_print): Same.
292 * simple.c (backtrace_simple): Same.
294 2019-02-08 Tom de Vries <tdevries@suse.de>
296 PR libbacktrace/78063
297 * dwarf.c (build_address_map): Keep all parsed units.
298 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
300 2019-01-31 Tom de Vries <tdevries@suse.de>
302 PR libbacktrace/89136
303 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
304 'debugaltlink_name_len =+ 1'.
306 2019-01-29 Tom de Vries <tdevries@suse.de>
308 * install-debuginfo-for-buildid.sh.in: New script.
309 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
310 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
311 * Makefile.in: Regenerate.
312 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
313 (READELF): Set with AC_CHECK_PROG.
314 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
315 * configure: Regenerate.
316 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
317 (elf_open_debugfile_by_buildid): ... here.
319 2019-01-29 Tom de Vries <tdevries@suse.de>
321 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
323 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
324 (check_PROGRAMS): Add BUILDTESTS.
325 * Makefile.in: Regenerate.
327 2019-01-28 Tom de Vries <tdevries@suse.de>
329 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
330 Use $< to access prerequisite.
331 * Makefile.in: Regenerate.
333 2019-01-25 Nathan Sidwell <nathan@acm.org>
335 * elf.c (elf_add): Pass "" filename to recursive call with
338 2019-01-25 Tom de Vries <tdevries@suse.de>
340 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
342 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
343 * Makefile.in: Regenerate.
345 2019-01-25 Tom de Vries <tdevries@suse.de>
347 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
348 (TESTS): Rename dtest to btest_gnudebuglink.
349 * Makefile.in: Regenerate.
351 2019-01-23 Tom de Vries <tdevries@suse.de>
353 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
354 (units_search, find_unit): Use size_t for offset.
355 (build_address_map): Use size_t for unit_offset.
357 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
359 * allocfail.c (main): Increase portability of printf statement.
361 2019-01-18 Ian Lance Taylor <iant@golang.org>
363 PR libbacktrace/88890
364 * mmapio.c (backtrace_get_view): Change size parameter to
365 uint64_t. Check that value fits in size_t.
366 * read.c (backtrace_get_view): Likewise.
367 * internal.h (backtrace_get_view): Update declaration.
368 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
370 2019-01-17 Tom de Vries <tdevries@suse.de>
372 PR libbacktrace/82857
373 * configure.ac (DWZ): Set with AC_CHECK_PROG.
374 (HAVE_DWZ): Set with AM_CONDITIONAL.
375 * configure: Regenerate.
376 * Makefile.am (TESTS): Add btest_dwz.
377 * Makefile.in: Regenerate.
379 2019-01-17 Tom de Vries <tdevries@suse.de>
381 PR libbacktrace/82857
382 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
383 (read_attribute): Handle DW_FORM_GNU_ref_alt using
384 ATTR_VAL_REF_ALT_INFO.
385 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
387 2019-01-17 Tom de Vries <tdevries@suse.de>
389 * dwarf.c (struct unit): Add low_offset and high_offset fields.
390 (struct unit_vector): New type.
391 (struct dwarf_data): Add units and units_counts fields.
392 (find_unit): New function.
393 (find_address_ranges): Add and handle unit_tag parameter.
394 (build_address_map): Add and handle units_vec parameter.
395 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
398 2019-01-17 Tom de Vries <tdevries@suse.de>
400 PR libbacktrace/82857
401 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
404 2019-01-17 Tom de Vries <tdevries@suse.de>
406 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
407 (read_attribute): Add altlink parameter. Handle missing altlink for
408 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
409 (find_address_ranges, build_address_map, build_dwarf_data): Add and
410 handle altlink parameter.
411 (read_referenced_name, read_function_entry): Add argument to
414 2019-01-17 Tom de Vries <tdevries@suse.de>
416 * dwarf.c (struct dwarf_data): Add altlink field.
417 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
418 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
419 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
420 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
421 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
422 * xcoff.c (xcoff_add): Same.
424 2019-01-17 Tom de Vries <tdevries@suse.de>
426 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
427 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
428 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
429 argument to backtrace_dwarf_add call.
430 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
431 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
432 * xcoff.c (xcoff_add): Same.
434 2019-01-17 Tom de Vries <tdevries@suse.de>
436 * elf.c (elf_add): Add and handle with_buildid_data and
437 with_buildid_size parameters. Handle .gnu_debugaltlink section.
438 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
440 2019-01-16 Tom de Vries <tdevries@suse.de>
442 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
444 (read_referenced_name): ... here, and ...
445 (read_function_entry): ... here.
447 2019-01-16 Tom de Vries <tdevries@suse.de>
449 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
451 (read_function_entry): Same. Don't allow name found via
452 DW_AT_abstract_origin or case DW_AT_specification to override linkage
455 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
459 * backtrace.h: Mechanically replace "can not" with "cannot".
461 2019-01-01 Jakub Jelinek <jakub@redhat.com>
463 Update copyright years.
465 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
467 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
469 * Makefile.in: Regenerate.
471 2018-12-28 Tom de Vries <tdevries@suse.de>
473 * dwarf.c (build_address_map): Reuse unused units.
475 2018-12-28 Tom de Vries <tdevries@suse.de>
477 * dwarf.c (build_address_map): Simplify by removing local variable
480 2018-12-28 Ian Lance Taylor <iant@golang.org>
481 Tom de Vries <tdevries@suse.de>
483 PR libbacktrace/88063
484 * dwarf.c (free_unit_addrs_vector): Remove.
485 (build_address_map): Keep track of allocated units in vector. Free
486 allocated units and corresponding abbrevs upon failure. Remove now
487 redundant call to free_unit_addrs_vector. Free addrs vector upon
488 failure. Free allocated unit vector.
490 2018-12-28 Tom de Vries <tdevries@suse.de>
492 * dwarf.c (build_address_map): Free addrs vector upon failure.
494 2018-12-14 Tom de Vries <tdevries@suse.de>
497 * allocfail.sh: Remove "set -o pipefail".
499 2018-12-12 Tom de Vries <tdevries@suse.de>
501 * Makefile.am (TESTS): Add allocfail.sh.
502 (check_PROGRAMS): Add allocfail.
503 * Makefile.in: Regenerate.
504 * instrumented_alloc.c: New file. Redefine malloc and realloc.
506 * allocfail.c: New file.
507 * allocfail.sh: New file.
509 2018-11-30 Tom de Vries <tdevries@suse.de>
511 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
512 test_xcoff_64, test_pecoff and test_unknown.
513 * Makefile.in: Regenerate.
514 * test_format.c: New file.
516 2018-11-30 Tom de Vries <tdevries@suse.de>
518 * Makefile.am : Add _with_alloc version for each test in
520 * Makefile.in: Regenerate.
522 2018-11-30 Tom de Vries <tdevries@suse.de>
524 * internal.h (backtrace_vector_free): New static inline fuction,
526 * dwarf.c (read_line_info): ... here.
528 2018-11-28 Tom de Vries <tdevries@suse.de>
530 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
533 2018-11-27 Tom de Vries <tdevries@suse.de>
535 * mmap.c (backtrace_vector_release): Same.
536 * unittest.c (test1): Add check.
538 2018-11-27 Tom de Vries <tdevries@suse.de>
540 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
542 * Makefile.am (check_PROGRAMS): Add unittest.
543 * Makefile.in: Regenerate.
544 * unittest.c: New file.
546 2018-11-22 Tom de Vries <tdevries@suse.de>
548 * dwarf.c (read_initial_length): Factor out of ...
549 (build_address_map, read_line_info): ... here.
551 2018-11-21 Tom de Vries <tdevries@suse.de>
553 * dwarf.c (read_string): Factor out of ...
554 (read_attribute, read_line_header, read_line_program): ... here.
556 2018-10-31 Joseph Myers <joseph@codesourcery.com>
559 * Makefile.am: Include multilib.am.
560 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
561 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
563 2018-10-05 Ian Lance Taylor <iant@golang.org>
565 PR libbacktrace/87529
566 * backtrace.h: Document that backtrace_create_state should be
569 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
571 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
572 * Makefile.in: Regenerate.
573 * config.h.in: Likewise.
574 * configure: Likewise.
576 2018-08-01 Tony Reix <tony.reix@atos.net>
578 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
579 (struct xcoff_func, struct xcoff_func_vector): New structs.
580 (xcoff_syminfo): Drop leading dot from symbol name.
581 (xcoff_line_compare, xcoff_line_search): Remove.
582 (xcoff_func_compare, xcoff_func_search): New static functions.
583 (xcoff_lookup_pc): Search function table.
584 (xcoff_add_line, xcoff_process_linenos): Remove.
585 (xcoff_initialize_fileline): Build function table.
587 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
590 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
591 checking up to 36 bytes.
593 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
595 * configure: Regenerated.
597 2018-04-19 Jakub Jelinek <jakub@redhat.com>
599 * configure: Regenerated.
601 2018-04-17 Ian Lance Taylor <iant@golang.org>
603 * backtrace.c: Revert last two changes. Don't call mmap
606 2018-04-17 Ian Lance Taylor <iant@golang.org>
608 * backtrace.c: Include backtrace-supported.h before checking
609 BACKTRACE_USES_MALLOC.
611 2018-04-17 Ian Lance Taylor <iant@golang.org>
613 * backtrace.c (backtrace_full): When testing whether we can
614 allocate memory, call mmap directly, and munmap the memory.
616 2018-04-04 Jakub Jelinek <jakub@redhat.com>
619 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
620 big endian, only use 32-bit loads if endianity macros are predefined
621 and indicate big or little endian.
623 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
626 * configure: Regenerate.
628 2018-02-15 Jakub Jelinek <jakub@redhat.com>
631 * elf.c (SHT_PROGBITS): Undefine and define.
633 2018-02-14 Jakub Jelinek <jakub@redhat.com>
636 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
637 (struct elf_ppc64_opd_data): New type.
638 (elf_initialize_syminfo): Add opd argument, handle symbols
639 pointing into the PowerPC64 ELFv1 .opd section.
640 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
641 to structure with .opd data to elf_initialize_syminfo.
643 2018-01-31 Ian Lance Taylor <iant@golang.org>
645 * elf.c (elf_add): Close descriptor if we use a debugfile.
646 * btest.c (check_open_files): New static function.
647 (main): Call check_open_files.
649 2018-01-25 Ian Lance Taylor <iant@golang.org>
651 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
653 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
655 2018-01-25 Ian Lance Taylor <iant@golang.org>
657 * pecoff.c (coff_add): Only release syms_view if it is valid.
659 2018-01-25 Ian Lance Taylor <iant@golang.org>
661 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
663 2018-01-24 Ian Lance Taylor <iant@golang.org>
665 * pecoff.c (coff_add): Use coff_read4, not memcpy.
667 2018-01-24 Ian Lance Taylor <iant@golang.org>
670 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
673 2018-01-19 Tony Reix <tony.reix@atos.net>
675 * xcoff.c (xcoff_incl_compare): New function.
676 (xcoff_incl_search): New function.
677 (xcoff_process_linenos): Use bsearch to find include file.
678 (xcoff_initialize_fileline): Sort include file information.
680 2018-01-16 Ian Lance Taylor <iant@golang.org>
682 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
684 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
685 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
686 (elf_zlib_default_table): Update.
687 (elf_zlib_default_dist_table): New static array.
688 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
690 * ztest.c (struct zlib_test): Add uncompressed_len.
691 (tests): Initialize uncompressed_len field. Add new test case.
692 (test_samples): Use uncompressed_len field.
694 2018-01-03 Jakub Jelinek <jakub@redhat.com>
696 Update copyright years.
698 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
700 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
701 * aclocal.m4: Regenerate.
702 * Makefile.in: Likewise.
703 * configure: Likewise.
705 2017-10-06 Ian Lance Taylor <iant@golang.org>
707 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
708 zlib uncompress function.
710 2017-10-05 Ian Lance Taylor <iant@golang.org>
712 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
713 Read a four byte integer.
714 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
715 boundary before ever calling elf_zlib_fetch.
716 * ztest.c (test_large): Simplify print statements a bit.
718 2017-10-02 Ian Lance Taylor <iant@golang.org>
720 * ztest.c: #include <errno.h>.
721 (TEST_TIMING): Don't define, don't test.
722 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
723 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
724 (ZLIB_CLOCK_GETTIME_ARG): Define.
725 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
726 * Makefile.am: Likewise.
727 * configure, Makefile.in: Rebuild.
729 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
732 * Makefile.am: Append the content of clock_gettime_link to
734 * configure.ac: Test for the case that clock_gettime is in librt.
735 * Makefile.in: Regenerate.
736 * configure: Likewise.
739 * configure.ac: Check for clock_gettime.
740 * config.h.in: Regenerate.
741 * configure: Likewise.
742 * ztest.c (average_time, test_large): Conditionalize test timing
743 on clock_gettime availability.
745 2017-09-29 Tony Reix <tony.reix@atos.net>
747 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
748 (STYP_DWARF, SSUBTYP_DW*): Define.
749 (enum dwarf_section): Define.
750 (struct dwsect_info): Define.
751 (xcoff_add): Look for DWARF sections, pass them to
754 2017-09-28 Ian Lance Taylor <iant@golang.org>
757 * elf.c (__builtin_prefetch): Define if not __GNUC__.
759 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
760 (b_elf_chdr): Define type.
761 (enum debug_section): Add ZDEBUG_xxx values.
762 (debug_section_names): Add names for new sections.
763 (struct debug_section_info): Add compressed field.
764 (elf_zlib_failed, elf_zlib_fetch): New static functions.
765 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
766 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
767 (HUFFMAN_SECONDARY_SHIFT): Define.
768 (ZDEBUG_TABLE_SIZE): Define.
769 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
770 (final_next_secondary): New static variable if
771 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
772 (elf_zlib_inflate_table): New static function.
773 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
774 function to produce fixed Huffman table.
775 (elf_zlib_default_table): New static variable.
776 (elf_zlib_inflate): New static function.
777 (elf_zlib_verify_checksum): Likewise.
778 (elf_zlib_inflate_and_verify): Likewise.
779 (elf_uncompress_zdebug): Likewise.
780 (elf_uncompress_chdr): Likewise.
781 (backtrace_uncompress_zdebug): New extern function.
782 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
783 sections, and uncompress them.
784 * internal.h (backtrace_compress_zdebug): Declare.
786 * configure.ac: Check for -lz and check whether the linker
787 supports --compress-debug-sections.
788 * Makefile.am (ztest_SOURCES): New variable.
789 (ztest_CFLAGS, ztest_LDADD): New variables.
790 (check_PROGRAMS): Add ztest.
791 (ctestg_SOURCES): New variable.
792 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
793 (ctesta_SOURCES): New variable.
794 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
795 (check_PROGRAMS): Add ctestg and ctesta.
796 * configure, config.h.in, Makefile.in: Rebuild.
798 2017-09-22 Ian Lance Taylor <iant@golang.org>
801 * configure.ac: Check for lstat and readlink.
802 * elf.c (lstat, readlink): Provide dummy versions if real versions
804 * configure, config.h.in: Rebuild.
806 2017-09-21 Ian Lance Taylor <iant@google.com>
809 * elf.c (backtrace_initialize): Set pd.exe_filename.
811 2017-09-20 Ian Lance Taylor <iant@golang.org>
812 Denis Khalikov <d.khalikov@partner.samsung.com>
815 Support for external debug info.
816 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
817 (S_ISLNK): Define if not defined.
818 (xstrnlen): Define if strnlen is not available.
819 (b_elf_note): Define type.
820 (NT_GNU_BUILD_ID): Define macro.
821 (elf_crc32, elf_crc32_file): New static functions.
822 (elf_is_symlink, elf_readlink): New static functions.
823 (elf_open_debugfile_by_buildid): New static function.
824 (elf_try_debugfile): New static function.
825 (elf_find_debugfile_by_debuglink): New static function.
826 (elf_open_debugfile_by_debuglink): New static function.
827 (elf_add): Add filename and debuginfo parameters. Adjust all
828 callers. Look for external debug info notes, and try to fetch
829 debug info from external file.
830 (struct phdr_data): Add exe_filename field.
831 (phdr_callback): Pass filename to elf_add.
832 (backtrace_initialize): Add filename parameter.
833 * internal.h (backtrace_initialize): Add filename parameter.
834 * fileline.c (fileline_initialize): Pass filename to
835 backtrace_initialize.
836 * pecoff.c (fileline_initialize): Add unused filename parameter.
837 * unknown.c (fileline_initialize): Likewise.
838 * xcoff.c (fileline_initialize): Likewise.
839 * configure.ac: Check for objcopy --add-gnu-debuglink.
840 * Makefile.am (dtest): New test target.
841 * configure, Makefile.in: Rebuild.
843 2017-09-12 Steve Ellcey <sellcey@cavium.com>
846 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
847 * Makefile.in: Regenerate.
849 2017-09-12 Steve Ellcey <sellcey@cavium.com>
852 * libbacktrace/Makefile.in
853 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
855 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
858 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
860 2017-07-28 Tony Reix <tony.reix@atos.net>
862 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
864 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
866 * fileline.c (fileline_initialize): Print pid_t as long.
868 2017-07-26 Tony Reix <tony.reix@atos.net>
870 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
871 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
872 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
873 * configure, config.h.in: Regenerate.
875 2017-07-21 Tony Reix <tony.reix@atos.net>
877 * filetype.awk: Add AIX XCOFF type detection.
878 * configure.ac: Recognize xcoff format.
879 * Makefile.am (FORMAT_FILES): Add xcoff.c.
880 * fileline.c: Include <unistd.h>.
881 (fileline_initialize): Add case for AIX procfs.
883 * configure, Makefile.in: Rebuild.
885 2017-06-21 Richard Biener <rguenther@suse.de>
887 * configure.ac: Add AC_SYS_LARGEFILE.
888 * config.h.in: Regenerate.
889 * configure: Likewise.
891 2017-06-11 Ian Lance Taylor <iant@golang.org>
893 * elf.c (backtrace_initialize): Always set *fileline_fn.
895 * btest.c: Move support functions into testlib.c. Change calls to
896 check to pass file name.
897 * testlib.c: New file, copied from (part of) btest.c.
898 * testlib.h: New file, declarations for testlib.c.
899 * edtest.c: Use testlib.h and testlib.c.
900 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
901 * Makefile.am (btest_SOURCES): Add testlib.c.
902 (edtest_SOURCES): Likewise.
903 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
904 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
905 * configure, Makefile.in: Rebuild.
907 2017-05-19 Than McIntosh <thanm@google.com>
909 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
910 (read_line_header): Don't allocate dirs if dirs_count == 0.
911 * edtest.c: New file.
912 * edtest2.c: New file.
913 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
914 (check_PROGRAMS): Add edtest.
915 (edtest2_build.c, gen_edtest2_build): New targets.
916 * Makefile.in: Rebuild.
918 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
920 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
921 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
923 2017-01-01 Jakub Jelinek <jakub@redhat.com>
925 Update copyright years.
927 2016-11-15 Matthias Klose <doko@ubuntu.com>
929 * configure: Regenerate.
931 2016-09-11 Carlos Liam <carlos@aarzee.me>
933 * all: Remove meaningless trailing whitespace.
935 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
938 * elf.c (phdr_callback) [__i386__]: Add
939 __attribute__((__force_align_arg_pointer__)).
941 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
943 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
944 avoid possible crash.
945 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
946 missing debug info anymore.
948 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
950 * mmap.c (MAP_FAILED): Define if not defined.
952 2016-01-04 Jakub Jelinek <jakub@redhat.com>
954 Update copyright years.
956 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
958 * configure.ac: Specify that DJGPP do not have mmap
959 even when sys/mman.h exists.
960 * configure: Regenerate
962 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
965 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
966 * configure: Regenerate.
967 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
970 2015-09-17 Ian Lance Taylor <iant@google.com>
972 * posix.c (backtrace_open): Cast second argument of open() to int.
974 2015-09-11 Ian Lance Taylor <iant@google.com>
976 * Makefile.am (backtrace.lo): Depend on internal.h.
977 (sort.lo, stest.lo): Add explicit dependencies.
978 * Makefile.in: Rebuild.
980 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
982 * backtrace.c: #include <sys/types.h>.
984 2015-09-08 Ian Lance Taylor <iant@google.com>
987 * backtrace.c: #include "internal.h".
988 (struct backtrace_data): Add can_alloc field.
989 (unwind): If can_alloc is false, don't try to get file/line
991 (backtrace_full): Set can_alloc field in bdata.
992 * alloc.c (backtrace_alloc): Don't call error_callback if it is
994 * mmap.c (backtrace_alloc): Likewise.
995 * internal.h: Update comments for backtrace_alloc and
998 2015-09-08 Ian Lance Taylor <iant@google.com>
1001 * mmap.c (backtrace_alloc): Correct test for mmap failure.
1003 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1005 * configure.ac: For spu-*-* targets, set have_fcntl to no.
1006 * configure: Regenerate.
1008 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1010 * configure.ac: Remove [disable-shared] argument to LT_INIT.
1011 Remove setting PIC_FLAG when building as target library.
1012 * configure: Regenerate.
1014 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
1016 * configure.ac: Only compile with -fPIC if the target
1018 * configure: Regenerate.
1020 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1022 * configure.ac: Set have_mmap to no on spu-*-* targets.
1023 * configure: Regenerate.
1025 2015-08-13 Ian Lance Taylor <iant@google.com>
1027 * dwarf.c (read_function_entry): Add vec_inlined parameter.
1030 2015-06-11 Martin Sebor <msebor@redhat.com>
1033 * dwarf.c (struct line): Add new field idx.
1034 (line_compare): Use it.
1036 (read_line_info): Reset it.
1038 2015-05-29 Tristan Gingold <gingold@adacore.com>
1040 * pecoff.c: New file.
1041 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1042 * Makefile.in: Regenerate.
1043 * filetype.awk: Detect pecoff.
1044 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1046 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1048 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1049 * configure: Regenerate.
1050 * pecoff.c: New file.
1052 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1054 * Makefile.in: Regenerated with automake-1.11.6.
1055 * aclocal.m4: Likewise.
1056 * configure: Likewise.
1058 2015-01-24 Matthias Klose <doko@ubuntu.com>
1060 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1061 * configure: Regenerate.
1063 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1065 Update copyright years.
1067 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1070 * configure: Regenerated.
1072 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1074 * ChangeLog.jit: New.
1076 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1079 * configure: Regenerate.
1081 2014-10-23 Ian Lance Taylor <iant@google.com>
1083 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1084 Fix to return void *.
1086 2014-05-08 Ian Lance Taylor <iant@google.com>
1088 * mmap.c (backtrace_free): If freeing a large aligned block of
1089 memory, call munmap rather than holding onto it.
1090 (backtrace_vector_grow): When growing a vector, double the number
1091 of pages requested. When releasing the old version of a grown
1092 vector, pass the correct size to backtrace_free.
1094 2014-03-07 Ian Lance Taylor <iant@google.com>
1096 * sort.c (backtrace_qsort): Use middle element as pivot.
1098 2014-03-06 Ian Lance Taylor <iant@google.com>
1101 * stest.c: New file.
1102 * internal.h (backtrace_qsort): Declare.
1103 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1104 (read_line_info, read_function_entry): Likewise.
1105 (read_function_info, build_dwarf_data): Likewise.
1106 * elf.c (elf_initialize_syminfo): Likewise.
1107 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1108 (stest_SOURCES, stest_LDADD): Define.
1109 (check_PROGRAMS): Add stest.
1111 2014-02-07 Misty De Meo <misty@brew.sh>
1114 * configure.ac: Use AC_LINK_IFELSE in check for
1116 * configure: Regenerate.
1118 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1120 Update copyright years
1122 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1124 * elf.c (ET_DYN): Undefine and define again.
1125 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1126 return early -1 without closing the descriptor.
1127 (struct phdr_data): Add exe_descriptor.
1128 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1129 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1130 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1132 (backtrace_initialize): Adjust call to elf_add. If it returns
1133 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1135 2013-12-05 Ian Lance Taylor <iant@google.com>
1137 * alloc.c (backtrace_vector_finish): Add error_callback and data
1138 parameters. Call backtrace_vector_release. Return address base.
1139 * mmap.c (backtrace_vector_finish): Add error_callback and data
1140 parameters. Return address base.
1141 * dwarf.c (read_function_info): Get new address base from
1142 backtrace_vector_finish.
1143 * internal.h (backtrace_vector_finish): Update declaration.
1145 2013-11-27 Ian Lance Taylor <iant@google.com>
1147 * dwarf.c (find_address_ranges): New static function, broken out
1148 of build_address_map.
1149 (build_address_map): Call it.
1150 * btest.c (check): Check for missing filename or function, rather
1152 (f3): Check that enough frames were returned.
1154 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1156 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1157 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1159 * btest.c (struct symdata): Add size field.
1160 (callback_three): Add symsize argument. Copy it to the data->size
1162 (f23): Set symdata.size to 0.
1163 (test5): Likewise. If sizeof (int) > 1, lookup address of
1164 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1167 * atomic.c: Include sys/types.h.
1169 2013-11-18 Ian Lance Taylor <iant@google.com>
1171 * configure.ac: Check for support of __atomic extensions.
1172 * internal.h: Declare or #define atomic functions for use in
1174 * atomic.c: New file.
1175 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1176 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1177 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1178 (backtrace_initialize): Likewise.
1179 * fileline.c (fileline_initialize): Likewise.
1180 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1181 * configure, config.h.in, Makefile.in: Rebuild.
1183 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1185 * elf.c (SHN_UNDEF): Define.
1186 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1187 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1188 (elf_add): Adjust caller.
1190 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1192 2013-11-16 Ian Lance Taylor <iant@google.com>
1194 * backtrace.h (backtrace_create_state): Correct comment about
1197 2013-11-15 Ian Lance Taylor <iant@google.com>
1199 * backtrace.h (backtrace_syminfo): Update comment and parameter
1200 name to take any address, not just a PC value.
1201 * elf.c (STT_OBJECT): Define.
1202 (elf_nosyms): Rename parameter pc to addr.
1203 (elf_symbol_search): Rename local variable pc to addr.
1204 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1205 (elf_syminfo): Rename parameter pc to addr.
1206 * btest.c (global): New global variable.
1210 2013-10-17 Ian Lance Taylor <iant@google.com>
1212 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1215 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1217 * configure.ac: Add --enable-host-shared, setting up
1218 pre-existing PIC_FLAG variable within Makefile.am et al.
1219 * configure: Regenerate.
1221 2013-09-20 Alan Modra <amodra@gmail.com>
1223 * configure: Regenerate.
1225 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1227 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1229 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1231 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1232 dl_iterate_phdr callbacks.
1234 2013-03-25 Ian Lance Taylor <iant@google.com>
1236 * alloc.c: #include <sys/types.h>.
1239 2013-01-31 Ian Lance Taylor <iant@google.com>
1241 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1242 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1244 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1247 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1248 attribute was not seen.
1250 2013-01-16 Ian Lance Taylor <iant@google.com>
1252 * dwarf.c (struct unit): Add filename and abs_filename fields.
1253 (build_address_map): Set new fields when reading unit.
1254 (dwarf_lookup_pc): If we don't find an entry in the line table,
1255 just return the main file name.
1257 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1259 Update copyright years.
1261 2013-01-01 Ian Lance Taylor <iant@google.com>
1264 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1265 $(MULTIBUILDTOP)/../../gcc/include.
1266 * Makefile.in: Rebuild.
1268 2013-01-01 Ian Lance Taylor <iant@google.com>
1271 * mmap.c (backtrace_alloc): Don't call sync functions if not
1273 (backtrace_free): Likewise.
1275 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1277 * mmapio.c: Define MAP_FAILED if not defined.
1279 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1282 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1283 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1284 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1286 * Makefile.in: Regenerated.
1287 * configure: Regenerated.
1289 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1292 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1293 * Makefile.in: Regenerated.
1295 2012-11-20 Ian Lance Taylor <iant@google.com>
1297 * dwarf.c (read_attribute): Always clear val.
1299 2012-11-13 Ian Lance Taylor <iant@google.com>
1302 * configure.ac: Only add -Werror if building a target library.
1303 * configure: Rebuild.
1305 2012-11-12 Ian Lance Taylor <iant@google.com>
1306 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1307 Gerald Pfeifer <gerald@pfeifer.com>
1309 * configure.ac: Check for getexecname.
1310 * fileline.c: #include <errno.h>. Define getexecname if not
1312 (fileline_initialize): Try to find the executable in a few
1314 * print.c (error_callback): Only print the filename if it came
1315 from the backtrace state.
1316 * configure, config.h.in: Rebuild.
1318 2012-10-29 Ian Lance Taylor <iant@google.com>
1320 * mmap.c (backtrace_vector_release): Correct last patch: add
1323 2012-10-29 Ian Lance Taylor <iant@google.com>
1325 * mmap.c (backtrace_vector_release): Make sure freed block is
1326 aligned on 8-byte boundary.
1328 2012-10-26 Ian Lance Taylor <iant@google.com>
1331 * posix.c (backtrace_open): Add does_not_exist parameter.
1332 * elf.c (phdr_callback): Do not warn if shared library could not
1334 * fileline.c (fileline_initialize): Update calls to
1336 * internal.h (backtrace_open): Update declaration.
1338 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1341 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1342 * configure: Regenerate.
1344 2012-10-24 Ian Lance Taylor <iant@google.com>
1347 * configure.ac: Check whether -funwind-tables option works.
1348 * configure: Rebuild.
1350 2012-10-11 Ian Lance Taylor <iant@google.com>
1352 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1353 * configure: Rebuild.
1355 2012-10-10 Ian Lance Taylor <iant@google.com>
1357 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1360 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1362 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1364 2012-10-09 Ian Lance Taylor <iant@google.com>
1366 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1367 (backtrace_dwarf_add): Likewise.
1369 2012-10-09 Ian Lance Taylor <iant@google.com>
1371 Add support for tracing through shared libraries.
1372 * configure.ac: Check for link.h and dl_iterate_phdr.
1373 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1374 ELF macros before #defining them.
1375 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1377 (struct elf_syminfo_data): Add next field.
1378 (elf_initialize_syminfo): Initialize next field.
1379 (elf_add_syminfo_data): New static function.
1380 (elf_add): New static function, broken out of
1381 backtrace_initialize. Call backtrace_dwarf_add instead of
1382 backtrace_dwarf_initialize.
1383 (struct phdr_data): Define.
1384 (phdr_callback): New static function.
1385 (backtrace_initialize): Call elf_add.
1386 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1387 (add_unit_addr): Add base_address parameter. Change all callers.
1388 (add_unit_ranges, build_address_map): Likewise.
1389 (add_line): Add ddata parameter. Change all callers.
1390 (read_line_program, add_function_range): Likewise.
1391 (dwarf_lookup_pc): New static function, broken out of
1393 (dwarf_fileline): Call dwarf_lookup_pc.
1394 (build_dwarf_data): New static function.
1395 (backtrace_dwarf_add): New function.
1396 (backtrace_dwarf_initialize): Remove.
1397 * internal.h (backtrace_dwarf_initialize): Don't declare.
1398 (backtrace_dwarf_add): Declare.
1399 * configure, config.h.in: Rebuild.
1401 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1403 * btest.c (f23): Avoid uninitialized variable warning.
1405 2012-10-04 Ian Lance Taylor <iant@google.com>
1407 * dwarf.c: If the system header files do not declare strnlen,
1408 provide our own version.
1410 2012-10-03 Ian Lance Taylor <iant@google.com>
1412 * dwarf.c (read_uleb128): Fix overflow test.
1413 (read_sleb128): Likewise.
1414 (build_address_map): Don't change unit_buf.start.
1416 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1419 * configure.ac (EXTRA_FLAGS): New.
1420 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1421 * configure, Makefile.in: Regenerate.
1423 2012-09-29 Ian Lance Taylor <iant@google.com>
1426 * fileline.c (fileline_initialize): Pass errnum as -1 when
1427 reporting that we could not read executable information after a
1430 2012-09-27 Ian Lance Taylor <iant@google.com>
1433 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1434 * Makefile.am: Add dependencies for all objects.
1435 * configure, aclocal.m4, Makefile.in: Rebuild.
1437 2012-09-27 Ian Lance Taylor <iant@google.com>
1440 * elf.c (backtrace_initialize): Set *fileln_fn, not
1443 2012-09-19 Ian Lance Taylor <iant@google.com>
1445 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1446 as a target library.
1447 * configure: Rebuild.
1449 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1450 Ian Lance Taylor <iant@google.com>
1452 * configure.ac (GCC_HEADER_STDINT): Invoke.
1453 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1454 * btest.c: Don't include <stdint.h>.
1455 * dwarf.c: Likewise.
1456 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1458 2012-09-18 Ian Lance Taylor <iant@google.com>
1461 * Makefile.am (AM_CPPFLAGS): Define.
1462 (AM_CFLAGS): Remove -I options.
1463 * Makefile.in: Rebuild.
1465 2012-09-18 Ian Lance Taylor <iant@google.com>
1467 * posix.c (O_BINARY): Define if not defined.
1468 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1469 HAVE_FCNTL is defined.
1470 * configure.ac: Test for the fcntl function.
1471 * configure, config.h.in: Rebuild.
1473 2012-09-18 Ian Lance Taylor <iant@google.com>
1475 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1477 2012-09-18 Ian Lance Taylor <iant@google.com>
1479 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1481 2012-09-18 Ian Lance Taylor <iant@google.com>
1483 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1484 * mmapio.c: Don't define _GNU_SOURCE.
1485 * configure, config.h.in: Rebuild.
1487 2012-09-18 Ian Lance Taylor <iant@google.com>
1489 * configure.ac: Check whether strnlen is declared.
1490 * dwarf.c: Declare strnlen if not declared.
1491 * configure, config.h.in: Rebuild.
1493 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1495 * fileline.c: Include <stdlib.h>.
1498 2012-09-17 Ian Lance Taylor <iant@google.com>
1501 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1504 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1507 * nounwind.c (backtrace_simple): Add state parameter.
1509 2012-09-17 Ian Lance Taylor <iant@google.com>
1512 * unknown.c (unknown_fileline): Add state parameter, remove
1513 fileline_data parameter, name error_callback parameter.
1514 (backtrace_initialize): Add state parameter.
1516 2012-09-17 Ian Lance Taylor <iant@google.com>
1518 * Initial implementation.
1520 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1522 Copying and distribution of this file, with or without modification,
1523 are permitted in any medium without royalty provided the copyright
1524 notice and this notice are preserved.