1 2020-07-08 Ian Lance Taylor <iant@golang.org>
3 * configure.ac: Test linker support for DWARF5
4 * configure: Regenerate
6 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
9 * configure: Regenerated.
11 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
14 * configure: Regenerated.
16 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
18 * configure: Regenerated.
20 2020-05-13 Ian Lance Taylor <iant@golang.org>
22 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
24 2020-05-13 Ian Lance Taylor <iant@golang.org>
27 * posix.c (backtrace_open): Treat EACCESS like ENOENT.
29 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
31 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
32 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
33 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
35 * Makefile.in: Regenerated.
36 * configure: Likewise.
38 2020-05-11 Ian Lance Taylor <iant@golang.org>
41 * configure.ac: Check for getpagesize declaration.
42 * mmap.c: Declare getpagesize if necessary.
44 * configure: Regenerate.
45 * config.h.in: Regenerate.
46 * Makefile.in: Regenerate.
48 2020-05-09 Roland McGrath <mcgrathr@google.com>
50 * elf.c (elf_add): Bail early if there are no section headers at all.
52 2020-05-09 Ian Lance Taylor <iant@golang.org>
54 * elf.c (elf_add): Don't free strtab if an error occurs after
55 recording symbol information.
57 2020-05-09 Ian Lance Taylor <iant@golang.org>
61 * filetype.awk: Recognize Mach-O files.
62 * Makefile.am (FORMAT_FILES): Add macho.c.
63 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
64 (%.dSYM): New pattern target.
65 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
66 (test_macho_LDADD): New target.
67 (BUILDTESTS): Add test_macho.
68 (macho.lo): Add dependencies.
69 * configure.ac: Recognize macho file type. Check for
70 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
71 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
72 * Makefile.in: Regenerate.
73 * configure: Regenerate.
74 * config.h.in: Regenerate.
76 2020-05-09 Ian Lance Taylor <iant@golang.org>
78 * read.c (backtrace_get_view): Support short read.
80 2020-05-09 Ian Lance Taylor <iant@golang.org>
82 * elf.c (elf_add): If debug sections are very large or far apart,
83 read them individually rather than as a single view.
85 2020-05-08 Ian Lance Taylor <iant@golang.org>
87 * fileline.c (sysctl_exec_name): New static function.
88 (sysctl_exec_name1): New macro or static function.
89 (sysctl_exec_name2): Likewise.
90 (fileline_initialize): Try sysctl_exec_name[12].
91 * configure.ac: Check for sysctl args to fetch executable name.
92 * configure: Regenerate.
93 * config.h.in: Regenerate.
95 2020-02-15 Ian Lance Taylor <iant@golang.org>
97 * ztest.c (test_large): Update file to current libgo test file.
99 2020-02-03 Ian Lance Taylor <iant@golang.org>
101 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
102 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
103 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
104 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
105 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
106 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
107 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
108 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
109 (stest_alloc_CFLAGS): Likewise.
110 * Makefile.in: Regenerate.
111 * ztest.c (error_callback_compress): Mark vdata unused.
112 (test_large): Add casts to avoid warnings.
114 2020-01-01 Jakub Jelinek <jakub@redhat.com>
116 Update copyright years.
118 2019-12-13 Ian Lance Taylor <iant@golang.org>
121 * dwarf.c (struct attr): Add val field.
122 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
123 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
124 (struct line_header): Add addrsize field.
125 (struct line_header_format): Define.
126 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
128 (read_uint24): New static function.
129 (read_attribute): Add implicit_val parameter. Replace dwarf_str
130 and dwarf_str_size parameters with dwarf_sections parameter. Add
131 support for new DWARF 5 forms. Change all callers.
132 (resolve_string): New static function.
133 (resolve_addr_index): Likewise.
134 (read_abbrevs): Support DW_FORM_implicit_const.
135 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
136 and ranges_is_index fields.
137 (update_pcrange): Support DWARF 5 encodings.
138 (add_high_low_range): New static function, split out of
140 (add_ranges_from_ranges): Likewise.
141 (add_ranges_from_rnglists): New static function.
142 (add_ranges): Just call new helper functions.
143 (find_address_ranges): Use resolve_string for strings, after
144 reading all attributes. Handle new DWARF 5 attributes.
145 (build_address_map): Support DWARF 5 compilation units.
146 (read_v2_paths): New static function, split out of
148 (read_lnct): New static function.
149 (read_line_header_format_entries): Likewise.
150 (read_line_header): Add ddata parameter. Support DWARF 5 line
151 headers. Call new helper functions. Change all callers.
152 (read_line_program): Use addrsize from line program header. Don't
153 special case directory index 0 for DWARF 5.
154 (read_referenced_name): Use resolve_string.
155 (read_function_entry): Handle DWARF 5 encodings. Use
157 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
158 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
159 * elf.c (dwarf_section_names): Add new section names.
160 * pecoff.c (dwarf_section_names): Likewise.
161 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
163 * configure.ac: Define HAVE_DWARF5 automake conditional.
164 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
165 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
166 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
167 (dwarf5_alloc_LDADD): Likewise.
168 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
169 (CLEANFILES, clean-local): Define.
171 2019-12-08 Ian Lance Taylor <iant@golang.org>
173 * dwarf.c (struct pcrange): Define.
174 (update_pcrange, add_ranges): New static functions.
175 (add_unit_addr): Change signature to work with add_ranges. Don't
176 add base_address here.
177 (add_unit_ranges): Remove.
178 (find_address_ranges): Replace str/ranges parameters with
179 dwarf_sections. Use update_pcrange and add_ranges. Change all
181 (add_function_range): Change signature to work with add_ranges.
182 Don't add base_address here.
183 (add_function_ranges): Remove.
184 (read_function_entry): Use update_pcrange and add_ranges.
186 2019-12-04 Ian Lance Taylor <iant@golang.org>
188 * edtest.c (test1): Add noclone attribute.
190 2019-12-04 Ian Lance Taylor <iant@golang.org>
192 * internal.h (enum dwarf_section): Define.
193 (struct dwarf_sections): Define.
194 (backtrace_dwarf_add): Update declaration to replace specific
195 section parameters with dwarf_sections parameter.
196 * dwarf.c (struct dwarf_data): Replace specific section fields
197 with dwarf_sections field.
198 (read_attribute): Use dwarf_sections with altlink.
199 (build_address_map): Replace specific section parameters with
200 dwarf_sections parameter. Change all callers.
201 (read_line_info): Use dwarf_sections with ddata.
202 (read_referenced_name): Likewise.
203 (add_function_ranges): Likewise.
204 (read_function_entry): Likewise.
205 (read_function_info): Likewise.
206 (build_dwarf_data): Replace specific section parameters with
207 dwarf_sections parameter. Change all callers.
208 (backtrace_dwarf_add): Likewise.
209 * elf.c (enum debug_section): Remove.
210 (dwarf_section_names): Remove .zdebug names.
211 (elf_add): Track zsections separately. Build dwarf_sections.
212 * pecoff.c (enum debug_section): Remove.
213 (struct debug_section_info): Remove data field.
214 (coff_add): Build dwarf_sections.
215 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
216 references with DEBUG_xxx references.
217 (xcoff_add): Build dwarf_sections.
219 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
221 * configure: Regenerate.
223 2019-09-26 Ian Lance Taylor <iant@golang.org>
225 PR libbacktrace/91908
226 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
227 __sync_bool_compare_and_swap to void.
228 * xcoff.c (backtrace_initialize): Likewise.
230 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
232 * configure.ac: Remove references to spu.
233 * configure: Regenerate.
235 2019-05-24 Clement Chigot <clement.chigot@atos.net>
237 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
239 * Makefile.in: Regenerate.
241 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
243 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
245 * configure: Regenerate.
247 2019-03-11 Ian Lance Taylor <iant@golang.org>
249 PR libbacktrace/89669
250 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
252 * Makefile.in: Regenerate.
254 2019-02-26 Tom de Vries <tdevries@suse.de>
256 * btest.c (test5): Allow global.* as minimal symbol name for global.
258 2019-02-26 Tom de Vries <tdevries@suse.de>
260 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
261 * Makefile.in: Regenerate.
263 2019-02-12 Tom de Vries <tdevries@suse.de>
265 PR libbacktrace/81983
266 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
268 2019-02-10 Tom de Vries <tdevries@suse.de>
270 * Makefile.am (BUILDTESTS): Add btest_lto.
271 * Makefile.in: Regenerate.
272 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
273 __attribute__((noclone)).
275 2019-02-08 Tom de Vries <tdevries@suse.de>
277 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
278 * print.c (backtrace_print): Same.
279 * simple.c (backtrace_simple): Same.
281 2019-02-08 Tom de Vries <tdevries@suse.de>
283 PR libbacktrace/78063
284 * dwarf.c (build_address_map): Keep all parsed units.
285 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
287 2019-01-31 Tom de Vries <tdevries@suse.de>
289 PR libbacktrace/89136
290 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
291 'debugaltlink_name_len =+ 1'.
293 2019-01-29 Tom de Vries <tdevries@suse.de>
295 * install-debuginfo-for-buildid.sh.in: New script.
296 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
297 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
298 * Makefile.in: Regenerate.
299 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
300 (READELF): Set with AC_CHECK_PROG.
301 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
302 * configure: Regenerate.
303 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
304 (elf_open_debugfile_by_buildid): ... here.
306 2019-01-29 Tom de Vries <tdevries@suse.de>
308 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
310 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
311 (check_PROGRAMS): Add BUILDTESTS.
312 * Makefile.in: Regenerate.
314 2019-01-28 Tom de Vries <tdevries@suse.de>
316 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
317 Use $< to access prerequisite.
318 * Makefile.in: Regenerate.
320 2019-01-25 Nathan Sidwell <nathan@acm.org>
322 * elf.c (elf_add): Pass "" filename to recursive call with
325 2019-01-25 Tom de Vries <tdevries@suse.de>
327 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
329 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
330 * Makefile.in: Regenerate.
332 2019-01-25 Tom de Vries <tdevries@suse.de>
334 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
335 (TESTS): Rename dtest to btest_gnudebuglink.
336 * Makefile.in: Regenerate.
338 2019-01-23 Tom de Vries <tdevries@suse.de>
340 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
341 (units_search, find_unit): Use size_t for offset.
342 (build_address_map): Use size_t for unit_offset.
344 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
346 * allocfail.c (main): Increase portability of printf statement.
348 2019-01-18 Ian Lance Taylor <iant@golang.org>
350 PR libbacktrace/88890
351 * mmapio.c (backtrace_get_view): Change size parameter to
352 uint64_t. Check that value fits in size_t.
353 * read.c (backtrace_get_view): Likewise.
354 * internal.h (backtrace_get_view): Update declaration.
355 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
357 2019-01-17 Tom de Vries <tdevries@suse.de>
359 PR libbacktrace/82857
360 * configure.ac (DWZ): Set with AC_CHECK_PROG.
361 (HAVE_DWZ): Set with AM_CONDITIONAL.
362 * configure: Regenerate.
363 * Makefile.am (TESTS): Add btest_dwz.
364 * Makefile.in: Regenerate.
366 2019-01-17 Tom de Vries <tdevries@suse.de>
368 PR libbacktrace/82857
369 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
370 (read_attribute): Handle DW_FORM_GNU_ref_alt using
371 ATTR_VAL_REF_ALT_INFO.
372 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
374 2019-01-17 Tom de Vries <tdevries@suse.de>
376 * dwarf.c (struct unit): Add low_offset and high_offset fields.
377 (struct unit_vector): New type.
378 (struct dwarf_data): Add units and units_counts fields.
379 (find_unit): New function.
380 (find_address_ranges): Add and handle unit_tag parameter.
381 (build_address_map): Add and handle units_vec parameter.
382 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
385 2019-01-17 Tom de Vries <tdevries@suse.de>
387 PR libbacktrace/82857
388 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
391 2019-01-17 Tom de Vries <tdevries@suse.de>
393 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
394 (read_attribute): Add altlink parameter. Handle missing altlink for
395 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
396 (find_address_ranges, build_address_map, build_dwarf_data): Add and
397 handle altlink parameter.
398 (read_referenced_name, read_function_entry): Add argument to
401 2019-01-17 Tom de Vries <tdevries@suse.de>
403 * dwarf.c (struct dwarf_data): Add altlink field.
404 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
405 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
406 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
407 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
408 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
409 * xcoff.c (xcoff_add): Same.
411 2019-01-17 Tom de Vries <tdevries@suse.de>
413 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
414 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
415 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
416 argument to backtrace_dwarf_add call.
417 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
418 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
419 * xcoff.c (xcoff_add): Same.
421 2019-01-17 Tom de Vries <tdevries@suse.de>
423 * elf.c (elf_add): Add and handle with_buildid_data and
424 with_buildid_size parameters. Handle .gnu_debugaltlink section.
425 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
427 2019-01-16 Tom de Vries <tdevries@suse.de>
429 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
431 (read_referenced_name): ... here, and ...
432 (read_function_entry): ... here.
434 2019-01-16 Tom de Vries <tdevries@suse.de>
436 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
438 (read_function_entry): Same. Don't allow name found via
439 DW_AT_abstract_origin or case DW_AT_specification to override linkage
442 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
446 * backtrace.h: Mechanically replace "can not" with "cannot".
448 2019-01-01 Jakub Jelinek <jakub@redhat.com>
450 Update copyright years.
452 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
454 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
456 * Makefile.in: Regenerate.
458 2018-12-28 Tom de Vries <tdevries@suse.de>
460 * dwarf.c (build_address_map): Reuse unused units.
462 2018-12-28 Tom de Vries <tdevries@suse.de>
464 * dwarf.c (build_address_map): Simplify by removing local variable
467 2018-12-28 Ian Lance Taylor <iant@golang.org>
468 Tom de Vries <tdevries@suse.de>
470 PR libbacktrace/88063
471 * dwarf.c (free_unit_addrs_vector): Remove.
472 (build_address_map): Keep track of allocated units in vector. Free
473 allocated units and corresponding abbrevs upon failure. Remove now
474 redundant call to free_unit_addrs_vector. Free addrs vector upon
475 failure. Free allocated unit vector.
477 2018-12-28 Tom de Vries <tdevries@suse.de>
479 * dwarf.c (build_address_map): Free addrs vector upon failure.
481 2018-12-14 Tom de Vries <tdevries@suse.de>
484 * allocfail.sh: Remove "set -o pipefail".
486 2018-12-12 Tom de Vries <tdevries@suse.de>
488 * Makefile.am (TESTS): Add allocfail.sh.
489 (check_PROGRAMS): Add allocfail.
490 * Makefile.in: Regenerate.
491 * instrumented_alloc.c: New file. Redefine malloc and realloc.
493 * allocfail.c: New file.
494 * allocfail.sh: New file.
496 2018-11-30 Tom de Vries <tdevries@suse.de>
498 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
499 test_xcoff_64, test_pecoff and test_unknown.
500 * Makefile.in: Regenerate.
501 * test_format.c: New file.
503 2018-11-30 Tom de Vries <tdevries@suse.de>
505 * Makefile.am : Add _with_alloc version for each test in
507 * Makefile.in: Regenerate.
509 2018-11-30 Tom de Vries <tdevries@suse.de>
511 * internal.h (backtrace_vector_free): New static inline fuction,
513 * dwarf.c (read_line_info): ... here.
515 2018-11-28 Tom de Vries <tdevries@suse.de>
517 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
520 2018-11-27 Tom de Vries <tdevries@suse.de>
522 * mmap.c (backtrace_vector_release): Same.
523 * unittest.c (test1): Add check.
525 2018-11-27 Tom de Vries <tdevries@suse.de>
527 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
529 * Makefile.am (check_PROGRAMS): Add unittest.
530 * Makefile.in: Regenerate.
531 * unittest.c: New file.
533 2018-11-22 Tom de Vries <tdevries@suse.de>
535 * dwarf.c (read_initial_length): Factor out of ...
536 (build_address_map, read_line_info): ... here.
538 2018-11-21 Tom de Vries <tdevries@suse.de>
540 * dwarf.c (read_string): Factor out of ...
541 (read_attribute, read_line_header, read_line_program): ... here.
543 2018-10-31 Joseph Myers <joseph@codesourcery.com>
546 * Makefile.am: Include multilib.am.
547 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
548 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
550 2018-10-05 Ian Lance Taylor <iant@golang.org>
552 PR libbacktrace/87529
553 * backtrace.h: Document that backtrace_create_state should be
556 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
558 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
559 * Makefile.in: Regenerate.
560 * config.h.in: Likewise.
561 * configure: Likewise.
563 2018-08-01 Tony Reix <tony.reix@atos.net>
565 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
566 (struct xcoff_func, struct xcoff_func_vector): New structs.
567 (xcoff_syminfo): Drop leading dot from symbol name.
568 (xcoff_line_compare, xcoff_line_search): Remove.
569 (xcoff_func_compare, xcoff_func_search): New static functions.
570 (xcoff_lookup_pc): Search function table.
571 (xcoff_add_line, xcoff_process_linenos): Remove.
572 (xcoff_initialize_fileline): Build function table.
574 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
577 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
578 checking up to 36 bytes.
580 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
582 * configure: Regenerated.
584 2018-04-19 Jakub Jelinek <jakub@redhat.com>
586 * configure: Regenerated.
588 2018-04-17 Ian Lance Taylor <iant@golang.org>
590 * backtrace.c: Revert last two changes. Don't call mmap
593 2018-04-17 Ian Lance Taylor <iant@golang.org>
595 * backtrace.c: Include backtrace-supported.h before checking
596 BACKTRACE_USES_MALLOC.
598 2018-04-17 Ian Lance Taylor <iant@golang.org>
600 * backtrace.c (backtrace_full): When testing whether we can
601 allocate memory, call mmap directly, and munmap the memory.
603 2018-04-04 Jakub Jelinek <jakub@redhat.com>
606 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
607 big endian, only use 32-bit loads if endianity macros are predefined
608 and indicate big or little endian.
610 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
613 * configure: Regenerate.
615 2018-02-15 Jakub Jelinek <jakub@redhat.com>
618 * elf.c (SHT_PROGBITS): Undefine and define.
620 2018-02-14 Jakub Jelinek <jakub@redhat.com>
623 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
624 (struct elf_ppc64_opd_data): New type.
625 (elf_initialize_syminfo): Add opd argument, handle symbols
626 pointing into the PowerPC64 ELFv1 .opd section.
627 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
628 to structure with .opd data to elf_initialize_syminfo.
630 2018-01-31 Ian Lance Taylor <iant@golang.org>
632 * elf.c (elf_add): Close descriptor if we use a debugfile.
633 * btest.c (check_open_files): New static function.
634 (main): Call check_open_files.
636 2018-01-25 Ian Lance Taylor <iant@golang.org>
638 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
640 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
642 2018-01-25 Ian Lance Taylor <iant@golang.org>
644 * pecoff.c (coff_add): Only release syms_view if it is valid.
646 2018-01-25 Ian Lance Taylor <iant@golang.org>
648 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
650 2018-01-24 Ian Lance Taylor <iant@golang.org>
652 * pecoff.c (coff_add): Use coff_read4, not memcpy.
654 2018-01-24 Ian Lance Taylor <iant@golang.org>
657 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
660 2018-01-19 Tony Reix <tony.reix@atos.net>
662 * xcoff.c (xcoff_incl_compare): New function.
663 (xcoff_incl_search): New function.
664 (xcoff_process_linenos): Use bsearch to find include file.
665 (xcoff_initialize_fileline): Sort include file information.
667 2018-01-16 Ian Lance Taylor <iant@golang.org>
669 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
671 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
672 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
673 (elf_zlib_default_table): Update.
674 (elf_zlib_default_dist_table): New static array.
675 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
677 * ztest.c (struct zlib_test): Add uncompressed_len.
678 (tests): Initialize uncompressed_len field. Add new test case.
679 (test_samples): Use uncompressed_len field.
681 2018-01-03 Jakub Jelinek <jakub@redhat.com>
683 Update copyright years.
685 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
687 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
688 * aclocal.m4: Regenerate.
689 * Makefile.in: Likewise.
690 * configure: Likewise.
692 2017-10-06 Ian Lance Taylor <iant@golang.org>
694 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
695 zlib uncompress function.
697 2017-10-05 Ian Lance Taylor <iant@golang.org>
699 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
700 Read a four byte integer.
701 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
702 boundary before ever calling elf_zlib_fetch.
703 * ztest.c (test_large): Simplify print statements a bit.
705 2017-10-02 Ian Lance Taylor <iant@golang.org>
707 * ztest.c: #include <errno.h>.
708 (TEST_TIMING): Don't define, don't test.
709 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
710 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
711 (ZLIB_CLOCK_GETTIME_ARG): Define.
712 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
713 * Makefile.am: Likewise.
714 * configure, Makefile.in: Rebuild.
716 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
719 * Makefile.am: Append the content of clock_gettime_link to
721 * configure.ac: Test for the case that clock_gettime is in librt.
722 * Makefile.in: Regenerate.
723 * configure: Likewise.
726 * configure.ac: Check for clock_gettime.
727 * config.h.in: Regenerate.
728 * configure: Likewise.
729 * ztest.c (average_time, test_large): Conditionalize test timing
730 on clock_gettime availability.
732 2017-09-29 Tony Reix <tony.reix@atos.net>
734 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
735 (STYP_DWARF, SSUBTYP_DW*): Define.
736 (enum dwarf_section): Define.
737 (struct dwsect_info): Define.
738 (xcoff_add): Look for DWARF sections, pass them to
741 2017-09-28 Ian Lance Taylor <iant@golang.org>
744 * elf.c (__builtin_prefetch): Define if not __GNUC__.
746 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
747 (b_elf_chdr): Define type.
748 (enum debug_section): Add ZDEBUG_xxx values.
749 (debug_section_names): Add names for new sections.
750 (struct debug_section_info): Add compressed field.
751 (elf_zlib_failed, elf_zlib_fetch): New static functions.
752 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
753 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
754 (HUFFMAN_SECONDARY_SHIFT): Define.
755 (ZDEBUG_TABLE_SIZE): Define.
756 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
757 (final_next_secondary): New static variable if
758 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
759 (elf_zlib_inflate_table): New static function.
760 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
761 function to produce fixed Huffman table.
762 (elf_zlib_default_table): New static variable.
763 (elf_zlib_inflate): New static function.
764 (elf_zlib_verify_checksum): Likewise.
765 (elf_zlib_inflate_and_verify): Likewise.
766 (elf_uncompress_zdebug): Likewise.
767 (elf_uncompress_chdr): Likewise.
768 (backtrace_uncompress_zdebug): New extern function.
769 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
770 sections, and uncompress them.
771 * internal.h (backtrace_compress_zdebug): Declare.
773 * configure.ac: Check for -lz and check whether the linker
774 supports --compress-debug-sections.
775 * Makefile.am (ztest_SOURCES): New variable.
776 (ztest_CFLAGS, ztest_LDADD): New variables.
777 (check_PROGRAMS): Add ztest.
778 (ctestg_SOURCES): New variable.
779 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
780 (ctesta_SOURCES): New variable.
781 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
782 (check_PROGRAMS): Add ctestg and ctesta.
783 * configure, config.h.in, Makefile.in: Rebuild.
785 2017-09-22 Ian Lance Taylor <iant@golang.org>
788 * configure.ac: Check for lstat and readlink.
789 * elf.c (lstat, readlink): Provide dummy versions if real versions
791 * configure, config.h.in: Rebuild.
793 2017-09-21 Ian Lance Taylor <iant@google.com>
796 * elf.c (backtrace_initialize): Set pd.exe_filename.
798 2017-09-20 Ian Lance Taylor <iant@golang.org>
799 Denis Khalikov <d.khalikov@partner.samsung.com>
802 Support for external debug info.
803 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
804 (S_ISLNK): Define if not defined.
805 (xstrnlen): Define if strnlen is not available.
806 (b_elf_note): Define type.
807 (NT_GNU_BUILD_ID): Define macro.
808 (elf_crc32, elf_crc32_file): New static functions.
809 (elf_is_symlink, elf_readlink): New static functions.
810 (elf_open_debugfile_by_buildid): New static function.
811 (elf_try_debugfile): New static function.
812 (elf_find_debugfile_by_debuglink): New static function.
813 (elf_open_debugfile_by_debuglink): New static function.
814 (elf_add): Add filename and debuginfo parameters. Adjust all
815 callers. Look for external debug info notes, and try to fetch
816 debug info from external file.
817 (struct phdr_data): Add exe_filename field.
818 (phdr_callback): Pass filename to elf_add.
819 (backtrace_initialize): Add filename parameter.
820 * internal.h (backtrace_initialize): Add filename parameter.
821 * fileline.c (fileline_initialize): Pass filename to
822 backtrace_initialize.
823 * pecoff.c (fileline_initialize): Add unused filename parameter.
824 * unknown.c (fileline_initialize): Likewise.
825 * xcoff.c (fileline_initialize): Likewise.
826 * configure.ac: Check for objcopy --add-gnu-debuglink.
827 * Makefile.am (dtest): New test target.
828 * configure, Makefile.in: Rebuild.
830 2017-09-12 Steve Ellcey <sellcey@cavium.com>
833 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
834 * Makefile.in: Regenerate.
836 2017-09-12 Steve Ellcey <sellcey@cavium.com>
839 * libbacktrace/Makefile.in
840 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
842 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
845 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
847 2017-07-28 Tony Reix <tony.reix@atos.net>
849 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
851 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
853 * fileline.c (fileline_initialize): Print pid_t as long.
855 2017-07-26 Tony Reix <tony.reix@atos.net>
857 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
858 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
859 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
860 * configure, config.h.in: Regenerate.
862 2017-07-21 Tony Reix <tony.reix@atos.net>
864 * filetype.awk: Add AIX XCOFF type detection.
865 * configure.ac: Recognize xcoff format.
866 * Makefile.am (FORMAT_FILES): Add xcoff.c.
867 * fileline.c: Include <unistd.h>.
868 (fileline_initialize): Add case for AIX procfs.
870 * configure, Makefile.in: Rebuild.
872 2017-06-21 Richard Biener <rguenther@suse.de>
874 * configure.ac: Add AC_SYS_LARGEFILE.
875 * config.h.in: Regenerate.
876 * configure: Likewise.
878 2017-06-11 Ian Lance Taylor <iant@golang.org>
880 * elf.c (backtrace_initialize): Always set *fileline_fn.
882 * btest.c: Move support functions into testlib.c. Change calls to
883 check to pass file name.
884 * testlib.c: New file, copied from (part of) btest.c.
885 * testlib.h: New file, declarations for testlib.c.
886 * edtest.c: Use testlib.h and testlib.c.
887 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
888 * Makefile.am (btest_SOURCES): Add testlib.c.
889 (edtest_SOURCES): Likewise.
890 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
891 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
892 * configure, Makefile.in: Rebuild.
894 2017-05-19 Than McIntosh <thanm@google.com>
896 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
897 (read_line_header): Don't allocate dirs if dirs_count == 0.
898 * edtest.c: New file.
899 * edtest2.c: New file.
900 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
901 (check_PROGRAMS): Add edtest.
902 (edtest2_build.c, gen_edtest2_build): New targets.
903 * Makefile.in: Rebuild.
905 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
907 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
908 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
910 2017-01-01 Jakub Jelinek <jakub@redhat.com>
912 Update copyright years.
914 2016-11-15 Matthias Klose <doko@ubuntu.com>
916 * configure: Regenerate.
918 2016-09-11 Carlos Liam <carlos@aarzee.me>
920 * all: Remove meaningless trailing whitespace.
922 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
925 * elf.c (phdr_callback) [__i386__]: Add
926 __attribute__((__force_align_arg_pointer__)).
928 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
930 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
931 avoid possible crash.
932 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
933 missing debug info anymore.
935 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
937 * mmap.c (MAP_FAILED): Define if not defined.
939 2016-01-04 Jakub Jelinek <jakub@redhat.com>
941 Update copyright years.
943 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
945 * configure.ac: Specify that DJGPP do not have mmap
946 even when sys/mman.h exists.
947 * configure: Regenerate
949 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
952 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
953 * configure: Regenerate.
954 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
957 2015-09-17 Ian Lance Taylor <iant@google.com>
959 * posix.c (backtrace_open): Cast second argument of open() to int.
961 2015-09-11 Ian Lance Taylor <iant@google.com>
963 * Makefile.am (backtrace.lo): Depend on internal.h.
964 (sort.lo, stest.lo): Add explicit dependencies.
965 * Makefile.in: Rebuild.
967 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
969 * backtrace.c: #include <sys/types.h>.
971 2015-09-08 Ian Lance Taylor <iant@google.com>
974 * backtrace.c: #include "internal.h".
975 (struct backtrace_data): Add can_alloc field.
976 (unwind): If can_alloc is false, don't try to get file/line
978 (backtrace_full): Set can_alloc field in bdata.
979 * alloc.c (backtrace_alloc): Don't call error_callback if it is
981 * mmap.c (backtrace_alloc): Likewise.
982 * internal.h: Update comments for backtrace_alloc and
985 2015-09-08 Ian Lance Taylor <iant@google.com>
988 * mmap.c (backtrace_alloc): Correct test for mmap failure.
990 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
992 * configure.ac: For spu-*-* targets, set have_fcntl to no.
993 * configure: Regenerate.
995 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
997 * configure.ac: Remove [disable-shared] argument to LT_INIT.
998 Remove setting PIC_FLAG when building as target library.
999 * configure: Regenerate.
1001 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
1003 * configure.ac: Only compile with -fPIC if the target
1005 * configure: Regenerate.
1007 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1009 * configure.ac: Set have_mmap to no on spu-*-* targets.
1010 * configure: Regenerate.
1012 2015-08-13 Ian Lance Taylor <iant@google.com>
1014 * dwarf.c (read_function_entry): Add vec_inlined parameter.
1017 2015-06-11 Martin Sebor <msebor@redhat.com>
1020 * dwarf.c (struct line): Add new field idx.
1021 (line_compare): Use it.
1023 (read_line_info): Reset it.
1025 2015-05-29 Tristan Gingold <gingold@adacore.com>
1027 * pecoff.c: New file.
1028 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1029 * Makefile.in: Regenerate.
1030 * filetype.awk: Detect pecoff.
1031 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1033 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1035 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1036 * configure: Regenerate.
1037 * pecoff.c: New file.
1039 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1041 * Makefile.in: Regenerated with automake-1.11.6.
1042 * aclocal.m4: Likewise.
1043 * configure: Likewise.
1045 2015-01-24 Matthias Klose <doko@ubuntu.com>
1047 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1048 * configure: Regenerate.
1050 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1052 Update copyright years.
1054 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1057 * configure: Regenerated.
1059 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1061 * ChangeLog.jit: New.
1063 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1066 * configure: Regenerate.
1068 2014-10-23 Ian Lance Taylor <iant@google.com>
1070 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1071 Fix to return void *.
1073 2014-05-08 Ian Lance Taylor <iant@google.com>
1075 * mmap.c (backtrace_free): If freeing a large aligned block of
1076 memory, call munmap rather than holding onto it.
1077 (backtrace_vector_grow): When growing a vector, double the number
1078 of pages requested. When releasing the old version of a grown
1079 vector, pass the correct size to backtrace_free.
1081 2014-03-07 Ian Lance Taylor <iant@google.com>
1083 * sort.c (backtrace_qsort): Use middle element as pivot.
1085 2014-03-06 Ian Lance Taylor <iant@google.com>
1088 * stest.c: New file.
1089 * internal.h (backtrace_qsort): Declare.
1090 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1091 (read_line_info, read_function_entry): Likewise.
1092 (read_function_info, build_dwarf_data): Likewise.
1093 * elf.c (elf_initialize_syminfo): Likewise.
1094 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1095 (stest_SOURCES, stest_LDADD): Define.
1096 (check_PROGRAMS): Add stest.
1098 2014-02-07 Misty De Meo <misty@brew.sh>
1101 * configure.ac: Use AC_LINK_IFELSE in check for
1103 * configure: Regenerate.
1105 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1107 Update copyright years
1109 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1111 * elf.c (ET_DYN): Undefine and define again.
1112 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1113 return early -1 without closing the descriptor.
1114 (struct phdr_data): Add exe_descriptor.
1115 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1116 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1117 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1119 (backtrace_initialize): Adjust call to elf_add. If it returns
1120 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1122 2013-12-05 Ian Lance Taylor <iant@google.com>
1124 * alloc.c (backtrace_vector_finish): Add error_callback and data
1125 parameters. Call backtrace_vector_release. Return address base.
1126 * mmap.c (backtrace_vector_finish): Add error_callback and data
1127 parameters. Return address base.
1128 * dwarf.c (read_function_info): Get new address base from
1129 backtrace_vector_finish.
1130 * internal.h (backtrace_vector_finish): Update declaration.
1132 2013-11-27 Ian Lance Taylor <iant@google.com>
1134 * dwarf.c (find_address_ranges): New static function, broken out
1135 of build_address_map.
1136 (build_address_map): Call it.
1137 * btest.c (check): Check for missing filename or function, rather
1139 (f3): Check that enough frames were returned.
1141 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1143 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1144 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1146 * btest.c (struct symdata): Add size field.
1147 (callback_three): Add symsize argument. Copy it to the data->size
1149 (f23): Set symdata.size to 0.
1150 (test5): Likewise. If sizeof (int) > 1, lookup address of
1151 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1154 * atomic.c: Include sys/types.h.
1156 2013-11-18 Ian Lance Taylor <iant@google.com>
1158 * configure.ac: Check for support of __atomic extensions.
1159 * internal.h: Declare or #define atomic functions for use in
1161 * atomic.c: New file.
1162 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1163 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1164 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1165 (backtrace_initialize): Likewise.
1166 * fileline.c (fileline_initialize): Likewise.
1167 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1168 * configure, config.h.in, Makefile.in: Rebuild.
1170 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1172 * elf.c (SHN_UNDEF): Define.
1173 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1174 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1175 (elf_add): Adjust caller.
1177 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1179 2013-11-16 Ian Lance Taylor <iant@google.com>
1181 * backtrace.h (backtrace_create_state): Correct comment about
1184 2013-11-15 Ian Lance Taylor <iant@google.com>
1186 * backtrace.h (backtrace_syminfo): Update comment and parameter
1187 name to take any address, not just a PC value.
1188 * elf.c (STT_OBJECT): Define.
1189 (elf_nosyms): Rename parameter pc to addr.
1190 (elf_symbol_search): Rename local variable pc to addr.
1191 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1192 (elf_syminfo): Rename parameter pc to addr.
1193 * btest.c (global): New global variable.
1197 2013-10-17 Ian Lance Taylor <iant@google.com>
1199 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1202 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1204 * configure.ac: Add --enable-host-shared, setting up
1205 pre-existing PIC_FLAG variable within Makefile.am et al.
1206 * configure: Regenerate.
1208 2013-09-20 Alan Modra <amodra@gmail.com>
1210 * configure: Regenerate.
1212 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1214 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1216 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1218 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1219 dl_iterate_phdr callbacks.
1221 2013-03-25 Ian Lance Taylor <iant@google.com>
1223 * alloc.c: #include <sys/types.h>.
1226 2013-01-31 Ian Lance Taylor <iant@google.com>
1228 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1229 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1231 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1234 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1235 attribute was not seen.
1237 2013-01-16 Ian Lance Taylor <iant@google.com>
1239 * dwarf.c (struct unit): Add filename and abs_filename fields.
1240 (build_address_map): Set new fields when reading unit.
1241 (dwarf_lookup_pc): If we don't find an entry in the line table,
1242 just return the main file name.
1244 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1246 Update copyright years.
1248 2013-01-01 Ian Lance Taylor <iant@google.com>
1251 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1252 $(MULTIBUILDTOP)/../../gcc/include.
1253 * Makefile.in: Rebuild.
1255 2013-01-01 Ian Lance Taylor <iant@google.com>
1258 * mmap.c (backtrace_alloc): Don't call sync functions if not
1260 (backtrace_free): Likewise.
1262 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1264 * mmapio.c: Define MAP_FAILED if not defined.
1266 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1269 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1270 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1271 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1273 * Makefile.in: Regenerated.
1274 * configure: Regenerated.
1276 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1279 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1280 * Makefile.in: Regenerated.
1282 2012-11-20 Ian Lance Taylor <iant@google.com>
1284 * dwarf.c (read_attribute): Always clear val.
1286 2012-11-13 Ian Lance Taylor <iant@google.com>
1289 * configure.ac: Only add -Werror if building a target library.
1290 * configure: Rebuild.
1292 2012-11-12 Ian Lance Taylor <iant@google.com>
1293 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1294 Gerald Pfeifer <gerald@pfeifer.com>
1296 * configure.ac: Check for getexecname.
1297 * fileline.c: #include <errno.h>. Define getexecname if not
1299 (fileline_initialize): Try to find the executable in a few
1301 * print.c (error_callback): Only print the filename if it came
1302 from the backtrace state.
1303 * configure, config.h.in: Rebuild.
1305 2012-10-29 Ian Lance Taylor <iant@google.com>
1307 * mmap.c (backtrace_vector_release): Correct last patch: add
1310 2012-10-29 Ian Lance Taylor <iant@google.com>
1312 * mmap.c (backtrace_vector_release): Make sure freed block is
1313 aligned on 8-byte boundary.
1315 2012-10-26 Ian Lance Taylor <iant@google.com>
1318 * posix.c (backtrace_open): Add does_not_exist parameter.
1319 * elf.c (phdr_callback): Do not warn if shared library could not
1321 * fileline.c (fileline_initialize): Update calls to
1323 * internal.h (backtrace_open): Update declaration.
1325 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1328 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1329 * configure: Regenerate.
1331 2012-10-24 Ian Lance Taylor <iant@google.com>
1334 * configure.ac: Check whether -funwind-tables option works.
1335 * configure: Rebuild.
1337 2012-10-11 Ian Lance Taylor <iant@google.com>
1339 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1340 * configure: Rebuild.
1342 2012-10-10 Ian Lance Taylor <iant@google.com>
1344 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1347 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1349 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1351 2012-10-09 Ian Lance Taylor <iant@google.com>
1353 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1354 (backtrace_dwarf_add): Likewise.
1356 2012-10-09 Ian Lance Taylor <iant@google.com>
1358 Add support for tracing through shared libraries.
1359 * configure.ac: Check for link.h and dl_iterate_phdr.
1360 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1361 ELF macros before #defining them.
1362 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1364 (struct elf_syminfo_data): Add next field.
1365 (elf_initialize_syminfo): Initialize next field.
1366 (elf_add_syminfo_data): New static function.
1367 (elf_add): New static function, broken out of
1368 backtrace_initialize. Call backtrace_dwarf_add instead of
1369 backtrace_dwarf_initialize.
1370 (struct phdr_data): Define.
1371 (phdr_callback): New static function.
1372 (backtrace_initialize): Call elf_add.
1373 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1374 (add_unit_addr): Add base_address parameter. Change all callers.
1375 (add_unit_ranges, build_address_map): Likewise.
1376 (add_line): Add ddata parameter. Change all callers.
1377 (read_line_program, add_function_range): Likewise.
1378 (dwarf_lookup_pc): New static function, broken out of
1380 (dwarf_fileline): Call dwarf_lookup_pc.
1381 (build_dwarf_data): New static function.
1382 (backtrace_dwarf_add): New function.
1383 (backtrace_dwarf_initialize): Remove.
1384 * internal.h (backtrace_dwarf_initialize): Don't declare.
1385 (backtrace_dwarf_add): Declare.
1386 * configure, config.h.in: Rebuild.
1388 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1390 * btest.c (f23): Avoid uninitialized variable warning.
1392 2012-10-04 Ian Lance Taylor <iant@google.com>
1394 * dwarf.c: If the system header files do not declare strnlen,
1395 provide our own version.
1397 2012-10-03 Ian Lance Taylor <iant@google.com>
1399 * dwarf.c (read_uleb128): Fix overflow test.
1400 (read_sleb128): Likewise.
1401 (build_address_map): Don't change unit_buf.start.
1403 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1406 * configure.ac (EXTRA_FLAGS): New.
1407 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1408 * configure, Makefile.in: Regenerate.
1410 2012-09-29 Ian Lance Taylor <iant@google.com>
1413 * fileline.c (fileline_initialize): Pass errnum as -1 when
1414 reporting that we could not read executable information after a
1417 2012-09-27 Ian Lance Taylor <iant@google.com>
1420 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1421 * Makefile.am: Add dependencies for all objects.
1422 * configure, aclocal.m4, Makefile.in: Rebuild.
1424 2012-09-27 Ian Lance Taylor <iant@google.com>
1427 * elf.c (backtrace_initialize): Set *fileln_fn, not
1430 2012-09-19 Ian Lance Taylor <iant@google.com>
1432 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1433 as a target library.
1434 * configure: Rebuild.
1436 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1437 Ian Lance Taylor <iant@google.com>
1439 * configure.ac (GCC_HEADER_STDINT): Invoke.
1440 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1441 * btest.c: Don't include <stdint.h>.
1442 * dwarf.c: Likewise.
1443 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1445 2012-09-18 Ian Lance Taylor <iant@google.com>
1448 * Makefile.am (AM_CPPFLAGS): Define.
1449 (AM_CFLAGS): Remove -I options.
1450 * Makefile.in: Rebuild.
1452 2012-09-18 Ian Lance Taylor <iant@google.com>
1454 * posix.c (O_BINARY): Define if not defined.
1455 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1456 HAVE_FCNTL is defined.
1457 * configure.ac: Test for the fcntl function.
1458 * configure, config.h.in: Rebuild.
1460 2012-09-18 Ian Lance Taylor <iant@google.com>
1462 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1464 2012-09-18 Ian Lance Taylor <iant@google.com>
1466 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1468 2012-09-18 Ian Lance Taylor <iant@google.com>
1470 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1471 * mmapio.c: Don't define _GNU_SOURCE.
1472 * configure, config.h.in: Rebuild.
1474 2012-09-18 Ian Lance Taylor <iant@google.com>
1476 * configure.ac: Check whether strnlen is declared.
1477 * dwarf.c: Declare strnlen if not declared.
1478 * configure, config.h.in: Rebuild.
1480 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1482 * fileline.c: Include <stdlib.h>.
1485 2012-09-17 Ian Lance Taylor <iant@google.com>
1488 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1491 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1494 * nounwind.c (backtrace_simple): Add state parameter.
1496 2012-09-17 Ian Lance Taylor <iant@google.com>
1499 * unknown.c (unknown_fileline): Add state parameter, remove
1500 fileline_data parameter, name error_callback parameter.
1501 (backtrace_initialize): Add state parameter.
1503 2012-09-17 Ian Lance Taylor <iant@google.com>
1505 * Initial implementation.
1507 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1509 Copying and distribution of this file, with or without modification,
1510 are permitted in any medium without royalty provided the copyright
1511 notice and this notice are preserved.