1 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
4 * configure: Regenerated.
6 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
9 * configure: Regenerated.
11 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
13 * configure: Regenerated.
15 2020-05-13 Ian Lance Taylor <iant@golang.org>
17 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
19 2020-05-13 Ian Lance Taylor <iant@golang.org>
22 * posix.c (backtrace_open): Treat EACCESS like ENOENT.
24 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
26 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
27 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
28 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
30 * Makefile.in: Regenerated.
31 * configure: Likewise.
33 2020-05-11 Ian Lance Taylor <iant@golang.org>
36 * configure.ac: Check for getpagesize declaration.
37 * mmap.c: Declare getpagesize if necessary.
39 * configure: Regenerate.
40 * config.h.in: Regenerate.
41 * Makefile.in: Regenerate.
43 2020-05-09 Roland McGrath <mcgrathr@google.com>
45 * elf.c (elf_add): Bail early if there are no section headers at all.
47 2020-05-09 Ian Lance Taylor <iant@golang.org>
49 * elf.c (elf_add): Don't free strtab if an error occurs after
50 recording symbol information.
52 2020-05-09 Ian Lance Taylor <iant@golang.org>
56 * filetype.awk: Recognize Mach-O files.
57 * Makefile.am (FORMAT_FILES): Add macho.c.
58 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
59 (%.dSYM): New pattern target.
60 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
61 (test_macho_LDADD): New target.
62 (BUILDTESTS): Add test_macho.
63 (macho.lo): Add dependencies.
64 * configure.ac: Recognize macho file type. Check for
65 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
66 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
67 * Makefile.in: Regenerate.
68 * configure: Regenerate.
69 * config.h.in: Regenerate.
71 2020-05-09 Ian Lance Taylor <iant@golang.org>
73 * read.c (backtrace_get_view): Support short read.
75 2020-05-09 Ian Lance Taylor <iant@golang.org>
77 * elf.c (elf_add): If debug sections are very large or far apart,
78 read them individually rather than as a single view.
80 2020-05-08 Ian Lance Taylor <iant@golang.org>
82 * fileline.c (sysctl_exec_name): New static function.
83 (sysctl_exec_name1): New macro or static function.
84 (sysctl_exec_name2): Likewise.
85 (fileline_initialize): Try sysctl_exec_name[12].
86 * configure.ac: Check for sysctl args to fetch executable name.
87 * configure: Regenerate.
88 * config.h.in: Regenerate.
90 2020-02-15 Ian Lance Taylor <iant@golang.org>
92 * ztest.c (test_large): Update file to current libgo test file.
94 2020-02-03 Ian Lance Taylor <iant@golang.org>
96 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
97 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
98 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
99 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
100 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
101 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
102 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
103 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
104 (stest_alloc_CFLAGS): Likewise.
105 * Makefile.in: Regenerate.
106 * ztest.c (error_callback_compress): Mark vdata unused.
107 (test_large): Add casts to avoid warnings.
109 2020-01-01 Jakub Jelinek <jakub@redhat.com>
111 Update copyright years.
113 2019-12-13 Ian Lance Taylor <iant@golang.org>
116 * dwarf.c (struct attr): Add val field.
117 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
118 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
119 (struct line_header): Add addrsize field.
120 (struct line_header_format): Define.
121 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
123 (read_uint24): New static function.
124 (read_attribute): Add implicit_val parameter. Replace dwarf_str
125 and dwarf_str_size parameters with dwarf_sections parameter. Add
126 support for new DWARF 5 forms. Change all callers.
127 (resolve_string): New static function.
128 (resolve_addr_index): Likewise.
129 (read_abbrevs): Support DW_FORM_implicit_const.
130 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
131 and ranges_is_index fields.
132 (update_pcrange): Support DWARF 5 encodings.
133 (add_high_low_range): New static function, split out of
135 (add_ranges_from_ranges): Likewise.
136 (add_ranges_from_rnglists): New static function.
137 (add_ranges): Just call new helper functions.
138 (find_address_ranges): Use resolve_string for strings, after
139 reading all attributes. Handle new DWARF 5 attributes.
140 (build_address_map): Support DWARF 5 compilation units.
141 (read_v2_paths): New static function, split out of
143 (read_lnct): New static function.
144 (read_line_header_format_entries): Likewise.
145 (read_line_header): Add ddata parameter. Support DWARF 5 line
146 headers. Call new helper functions. Change all callers.
147 (read_line_program): Use addrsize from line program header. Don't
148 special case directory index 0 for DWARF 5.
149 (read_referenced_name): Use resolve_string.
150 (read_function_entry): Handle DWARF 5 encodings. Use
152 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
153 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
154 * elf.c (dwarf_section_names): Add new section names.
155 * pecoff.c (dwarf_section_names): Likewise.
156 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
158 * configure.ac: Define HAVE_DWARF5 automake conditional.
159 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
160 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
161 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
162 (dwarf5_alloc_LDADD): Likewise.
163 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
164 (CLEANFILES, clean-local): Define.
166 2019-12-08 Ian Lance Taylor <iant@golang.org>
168 * dwarf.c (struct pcrange): Define.
169 (update_pcrange, add_ranges): New static functions.
170 (add_unit_addr): Change signature to work with add_ranges. Don't
171 add base_address here.
172 (add_unit_ranges): Remove.
173 (find_address_ranges): Replace str/ranges parameters with
174 dwarf_sections. Use update_pcrange and add_ranges. Change all
176 (add_function_range): Change signature to work with add_ranges.
177 Don't add base_address here.
178 (add_function_ranges): Remove.
179 (read_function_entry): Use update_pcrange and add_ranges.
181 2019-12-04 Ian Lance Taylor <iant@golang.org>
183 * edtest.c (test1): Add noclone attribute.
185 2019-12-04 Ian Lance Taylor <iant@golang.org>
187 * internal.h (enum dwarf_section): Define.
188 (struct dwarf_sections): Define.
189 (backtrace_dwarf_add): Update declaration to replace specific
190 section parameters with dwarf_sections parameter.
191 * dwarf.c (struct dwarf_data): Replace specific section fields
192 with dwarf_sections field.
193 (read_attribute): Use dwarf_sections with altlink.
194 (build_address_map): Replace specific section parameters with
195 dwarf_sections parameter. Change all callers.
196 (read_line_info): Use dwarf_sections with ddata.
197 (read_referenced_name): Likewise.
198 (add_function_ranges): Likewise.
199 (read_function_entry): Likewise.
200 (read_function_info): Likewise.
201 (build_dwarf_data): Replace specific section parameters with
202 dwarf_sections parameter. Change all callers.
203 (backtrace_dwarf_add): Likewise.
204 * elf.c (enum debug_section): Remove.
205 (dwarf_section_names): Remove .zdebug names.
206 (elf_add): Track zsections separately. Build dwarf_sections.
207 * pecoff.c (enum debug_section): Remove.
208 (struct debug_section_info): Remove data field.
209 (coff_add): Build dwarf_sections.
210 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
211 references with DEBUG_xxx references.
212 (xcoff_add): Build dwarf_sections.
214 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
216 * configure: Regenerate.
218 2019-09-26 Ian Lance Taylor <iant@golang.org>
220 PR libbacktrace/91908
221 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
222 __sync_bool_compare_and_swap to void.
223 * xcoff.c (backtrace_initialize): Likewise.
225 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
227 * configure.ac: Remove references to spu.
228 * configure: Regenerate.
230 2019-05-24 Clement Chigot <clement.chigot@atos.net>
232 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
234 * Makefile.in: Regenerate.
236 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
238 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
240 * configure: Regenerate.
242 2019-03-11 Ian Lance Taylor <iant@golang.org>
244 PR libbacktrace/89669
245 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
247 * Makefile.in: Regenerate.
249 2019-02-26 Tom de Vries <tdevries@suse.de>
251 * btest.c (test5): Allow global.* as minimal symbol name for global.
253 2019-02-26 Tom de Vries <tdevries@suse.de>
255 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
256 * Makefile.in: Regenerate.
258 2019-02-12 Tom de Vries <tdevries@suse.de>
260 PR libbacktrace/81983
261 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
263 2019-02-10 Tom de Vries <tdevries@suse.de>
265 * Makefile.am (BUILDTESTS): Add btest_lto.
266 * Makefile.in: Regenerate.
267 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
268 __attribute__((noclone)).
270 2019-02-08 Tom de Vries <tdevries@suse.de>
272 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
273 * print.c (backtrace_print): Same.
274 * simple.c (backtrace_simple): Same.
276 2019-02-08 Tom de Vries <tdevries@suse.de>
278 PR libbacktrace/78063
279 * dwarf.c (build_address_map): Keep all parsed units.
280 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
282 2019-01-31 Tom de Vries <tdevries@suse.de>
284 PR libbacktrace/89136
285 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
286 'debugaltlink_name_len =+ 1'.
288 2019-01-29 Tom de Vries <tdevries@suse.de>
290 * install-debuginfo-for-buildid.sh.in: New script.
291 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
292 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
293 * Makefile.in: Regenerate.
294 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
295 (READELF): Set with AC_CHECK_PROG.
296 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
297 * configure: Regenerate.
298 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
299 (elf_open_debugfile_by_buildid): ... here.
301 2019-01-29 Tom de Vries <tdevries@suse.de>
303 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
305 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
306 (check_PROGRAMS): Add BUILDTESTS.
307 * Makefile.in: Regenerate.
309 2019-01-28 Tom de Vries <tdevries@suse.de>
311 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
312 Use $< to access prerequisite.
313 * Makefile.in: Regenerate.
315 2019-01-25 Nathan Sidwell <nathan@acm.org>
317 * elf.c (elf_add): Pass "" filename to recursive call with
320 2019-01-25 Tom de Vries <tdevries@suse.de>
322 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
324 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
325 * Makefile.in: Regenerate.
327 2019-01-25 Tom de Vries <tdevries@suse.de>
329 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
330 (TESTS): Rename dtest to btest_gnudebuglink.
331 * Makefile.in: Regenerate.
333 2019-01-23 Tom de Vries <tdevries@suse.de>
335 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
336 (units_search, find_unit): Use size_t for offset.
337 (build_address_map): Use size_t for unit_offset.
339 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
341 * allocfail.c (main): Increase portability of printf statement.
343 2019-01-18 Ian Lance Taylor <iant@golang.org>
345 PR libbacktrace/88890
346 * mmapio.c (backtrace_get_view): Change size parameter to
347 uint64_t. Check that value fits in size_t.
348 * read.c (backtrace_get_view): Likewise.
349 * internal.h (backtrace_get_view): Update declaration.
350 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
352 2019-01-17 Tom de Vries <tdevries@suse.de>
354 PR libbacktrace/82857
355 * configure.ac (DWZ): Set with AC_CHECK_PROG.
356 (HAVE_DWZ): Set with AM_CONDITIONAL.
357 * configure: Regenerate.
358 * Makefile.am (TESTS): Add btest_dwz.
359 * Makefile.in: Regenerate.
361 2019-01-17 Tom de Vries <tdevries@suse.de>
363 PR libbacktrace/82857
364 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
365 (read_attribute): Handle DW_FORM_GNU_ref_alt using
366 ATTR_VAL_REF_ALT_INFO.
367 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
369 2019-01-17 Tom de Vries <tdevries@suse.de>
371 * dwarf.c (struct unit): Add low_offset and high_offset fields.
372 (struct unit_vector): New type.
373 (struct dwarf_data): Add units and units_counts fields.
374 (find_unit): New function.
375 (find_address_ranges): Add and handle unit_tag parameter.
376 (build_address_map): Add and handle units_vec parameter.
377 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
380 2019-01-17 Tom de Vries <tdevries@suse.de>
382 PR libbacktrace/82857
383 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
386 2019-01-17 Tom de Vries <tdevries@suse.de>
388 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
389 (read_attribute): Add altlink parameter. Handle missing altlink for
390 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
391 (find_address_ranges, build_address_map, build_dwarf_data): Add and
392 handle altlink parameter.
393 (read_referenced_name, read_function_entry): Add argument to
396 2019-01-17 Tom de Vries <tdevries@suse.de>
398 * dwarf.c (struct dwarf_data): Add altlink field.
399 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
400 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
401 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
402 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
403 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
404 * xcoff.c (xcoff_add): Same.
406 2019-01-17 Tom de Vries <tdevries@suse.de>
408 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
409 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
410 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
411 argument to backtrace_dwarf_add call.
412 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
413 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
414 * xcoff.c (xcoff_add): Same.
416 2019-01-17 Tom de Vries <tdevries@suse.de>
418 * elf.c (elf_add): Add and handle with_buildid_data and
419 with_buildid_size parameters. Handle .gnu_debugaltlink section.
420 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
422 2019-01-16 Tom de Vries <tdevries@suse.de>
424 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
426 (read_referenced_name): ... here, and ...
427 (read_function_entry): ... here.
429 2019-01-16 Tom de Vries <tdevries@suse.de>
431 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
433 (read_function_entry): Same. Don't allow name found via
434 DW_AT_abstract_origin or case DW_AT_specification to override linkage
437 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
441 * backtrace.h: Mechanically replace "can not" with "cannot".
443 2019-01-01 Jakub Jelinek <jakub@redhat.com>
445 Update copyright years.
447 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
449 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
451 * Makefile.in: Regenerate.
453 2018-12-28 Tom de Vries <tdevries@suse.de>
455 * dwarf.c (build_address_map): Reuse unused units.
457 2018-12-28 Tom de Vries <tdevries@suse.de>
459 * dwarf.c (build_address_map): Simplify by removing local variable
462 2018-12-28 Ian Lance Taylor <iant@golang.org>
463 Tom de Vries <tdevries@suse.de>
465 PR libbacktrace/88063
466 * dwarf.c (free_unit_addrs_vector): Remove.
467 (build_address_map): Keep track of allocated units in vector. Free
468 allocated units and corresponding abbrevs upon failure. Remove now
469 redundant call to free_unit_addrs_vector. Free addrs vector upon
470 failure. Free allocated unit vector.
472 2018-12-28 Tom de Vries <tdevries@suse.de>
474 * dwarf.c (build_address_map): Free addrs vector upon failure.
476 2018-12-14 Tom de Vries <tdevries@suse.de>
479 * allocfail.sh: Remove "set -o pipefail".
481 2018-12-12 Tom de Vries <tdevries@suse.de>
483 * Makefile.am (TESTS): Add allocfail.sh.
484 (check_PROGRAMS): Add allocfail.
485 * Makefile.in: Regenerate.
486 * instrumented_alloc.c: New file. Redefine malloc and realloc.
488 * allocfail.c: New file.
489 * allocfail.sh: New file.
491 2018-11-30 Tom de Vries <tdevries@suse.de>
493 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
494 test_xcoff_64, test_pecoff and test_unknown.
495 * Makefile.in: Regenerate.
496 * test_format.c: New file.
498 2018-11-30 Tom de Vries <tdevries@suse.de>
500 * Makefile.am : Add _with_alloc version for each test in
502 * Makefile.in: Regenerate.
504 2018-11-30 Tom de Vries <tdevries@suse.de>
506 * internal.h (backtrace_vector_free): New static inline fuction,
508 * dwarf.c (read_line_info): ... here.
510 2018-11-28 Tom de Vries <tdevries@suse.de>
512 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
515 2018-11-27 Tom de Vries <tdevries@suse.de>
517 * mmap.c (backtrace_vector_release): Same.
518 * unittest.c (test1): Add check.
520 2018-11-27 Tom de Vries <tdevries@suse.de>
522 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
524 * Makefile.am (check_PROGRAMS): Add unittest.
525 * Makefile.in: Regenerate.
526 * unittest.c: New file.
528 2018-11-22 Tom de Vries <tdevries@suse.de>
530 * dwarf.c (read_initial_length): Factor out of ...
531 (build_address_map, read_line_info): ... here.
533 2018-11-21 Tom de Vries <tdevries@suse.de>
535 * dwarf.c (read_string): Factor out of ...
536 (read_attribute, read_line_header, read_line_program): ... here.
538 2018-10-31 Joseph Myers <joseph@codesourcery.com>
541 * Makefile.am: Include multilib.am.
542 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
543 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
545 2018-10-05 Ian Lance Taylor <iant@golang.org>
547 PR libbacktrace/87529
548 * backtrace.h: Document that backtrace_create_state should be
551 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
553 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
554 * Makefile.in: Regenerate.
555 * config.h.in: Likewise.
556 * configure: Likewise.
558 2018-08-01 Tony Reix <tony.reix@atos.net>
560 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
561 (struct xcoff_func, struct xcoff_func_vector): New structs.
562 (xcoff_syminfo): Drop leading dot from symbol name.
563 (xcoff_line_compare, xcoff_line_search): Remove.
564 (xcoff_func_compare, xcoff_func_search): New static functions.
565 (xcoff_lookup_pc): Search function table.
566 (xcoff_add_line, xcoff_process_linenos): Remove.
567 (xcoff_initialize_fileline): Build function table.
569 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
572 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
573 checking up to 36 bytes.
575 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
577 * configure: Regenerated.
579 2018-04-19 Jakub Jelinek <jakub@redhat.com>
581 * configure: Regenerated.
583 2018-04-17 Ian Lance Taylor <iant@golang.org>
585 * backtrace.c: Revert last two changes. Don't call mmap
588 2018-04-17 Ian Lance Taylor <iant@golang.org>
590 * backtrace.c: Include backtrace-supported.h before checking
591 BACKTRACE_USES_MALLOC.
593 2018-04-17 Ian Lance Taylor <iant@golang.org>
595 * backtrace.c (backtrace_full): When testing whether we can
596 allocate memory, call mmap directly, and munmap the memory.
598 2018-04-04 Jakub Jelinek <jakub@redhat.com>
601 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
602 big endian, only use 32-bit loads if endianity macros are predefined
603 and indicate big or little endian.
605 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
608 * configure: Regenerate.
610 2018-02-15 Jakub Jelinek <jakub@redhat.com>
613 * elf.c (SHT_PROGBITS): Undefine and define.
615 2018-02-14 Jakub Jelinek <jakub@redhat.com>
618 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
619 (struct elf_ppc64_opd_data): New type.
620 (elf_initialize_syminfo): Add opd argument, handle symbols
621 pointing into the PowerPC64 ELFv1 .opd section.
622 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
623 to structure with .opd data to elf_initialize_syminfo.
625 2018-01-31 Ian Lance Taylor <iant@golang.org>
627 * elf.c (elf_add): Close descriptor if we use a debugfile.
628 * btest.c (check_open_files): New static function.
629 (main): Call check_open_files.
631 2018-01-25 Ian Lance Taylor <iant@golang.org>
633 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
635 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
637 2018-01-25 Ian Lance Taylor <iant@golang.org>
639 * pecoff.c (coff_add): Only release syms_view if it is valid.
641 2018-01-25 Ian Lance Taylor <iant@golang.org>
643 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
645 2018-01-24 Ian Lance Taylor <iant@golang.org>
647 * pecoff.c (coff_add): Use coff_read4, not memcpy.
649 2018-01-24 Ian Lance Taylor <iant@golang.org>
652 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
655 2018-01-19 Tony Reix <tony.reix@atos.net>
657 * xcoff.c (xcoff_incl_compare): New function.
658 (xcoff_incl_search): New function.
659 (xcoff_process_linenos): Use bsearch to find include file.
660 (xcoff_initialize_fileline): Sort include file information.
662 2018-01-16 Ian Lance Taylor <iant@golang.org>
664 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
666 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
667 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
668 (elf_zlib_default_table): Update.
669 (elf_zlib_default_dist_table): New static array.
670 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
672 * ztest.c (struct zlib_test): Add uncompressed_len.
673 (tests): Initialize uncompressed_len field. Add new test case.
674 (test_samples): Use uncompressed_len field.
676 2018-01-03 Jakub Jelinek <jakub@redhat.com>
678 Update copyright years.
680 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
682 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
683 * aclocal.m4: Regenerate.
684 * Makefile.in: Likewise.
685 * configure: Likewise.
687 2017-10-06 Ian Lance Taylor <iant@golang.org>
689 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
690 zlib uncompress function.
692 2017-10-05 Ian Lance Taylor <iant@golang.org>
694 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
695 Read a four byte integer.
696 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
697 boundary before ever calling elf_zlib_fetch.
698 * ztest.c (test_large): Simplify print statements a bit.
700 2017-10-02 Ian Lance Taylor <iant@golang.org>
702 * ztest.c: #include <errno.h>.
703 (TEST_TIMING): Don't define, don't test.
704 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
705 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
706 (ZLIB_CLOCK_GETTIME_ARG): Define.
707 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
708 * Makefile.am: Likewise.
709 * configure, Makefile.in: Rebuild.
711 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
714 * Makefile.am: Append the content of clock_gettime_link to
716 * configure.ac: Test for the case that clock_gettime is in librt.
717 * Makefile.in: Regenerate.
718 * configure: Likewise.
721 * configure.ac: Check for clock_gettime.
722 * config.h.in: Regenerate.
723 * configure: Likewise.
724 * ztest.c (average_time, test_large): Conditionalize test timing
725 on clock_gettime availability.
727 2017-09-29 Tony Reix <tony.reix@atos.net>
729 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
730 (STYP_DWARF, SSUBTYP_DW*): Define.
731 (enum dwarf_section): Define.
732 (struct dwsect_info): Define.
733 (xcoff_add): Look for DWARF sections, pass them to
736 2017-09-28 Ian Lance Taylor <iant@golang.org>
739 * elf.c (__builtin_prefetch): Define if not __GNUC__.
741 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
742 (b_elf_chdr): Define type.
743 (enum debug_section): Add ZDEBUG_xxx values.
744 (debug_section_names): Add names for new sections.
745 (struct debug_section_info): Add compressed field.
746 (elf_zlib_failed, elf_zlib_fetch): New static functions.
747 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
748 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
749 (HUFFMAN_SECONDARY_SHIFT): Define.
750 (ZDEBUG_TABLE_SIZE): Define.
751 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
752 (final_next_secondary): New static variable if
753 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
754 (elf_zlib_inflate_table): New static function.
755 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
756 function to produce fixed Huffman table.
757 (elf_zlib_default_table): New static variable.
758 (elf_zlib_inflate): New static function.
759 (elf_zlib_verify_checksum): Likewise.
760 (elf_zlib_inflate_and_verify): Likewise.
761 (elf_uncompress_zdebug): Likewise.
762 (elf_uncompress_chdr): Likewise.
763 (backtrace_uncompress_zdebug): New extern function.
764 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
765 sections, and uncompress them.
766 * internal.h (backtrace_compress_zdebug): Declare.
768 * configure.ac: Check for -lz and check whether the linker
769 supports --compress-debug-sections.
770 * Makefile.am (ztest_SOURCES): New variable.
771 (ztest_CFLAGS, ztest_LDADD): New variables.
772 (check_PROGRAMS): Add ztest.
773 (ctestg_SOURCES): New variable.
774 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
775 (ctesta_SOURCES): New variable.
776 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
777 (check_PROGRAMS): Add ctestg and ctesta.
778 * configure, config.h.in, Makefile.in: Rebuild.
780 2017-09-22 Ian Lance Taylor <iant@golang.org>
783 * configure.ac: Check for lstat and readlink.
784 * elf.c (lstat, readlink): Provide dummy versions if real versions
786 * configure, config.h.in: Rebuild.
788 2017-09-21 Ian Lance Taylor <iant@google.com>
791 * elf.c (backtrace_initialize): Set pd.exe_filename.
793 2017-09-20 Ian Lance Taylor <iant@golang.org>
794 Denis Khalikov <d.khalikov@partner.samsung.com>
797 Support for external debug info.
798 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
799 (S_ISLNK): Define if not defined.
800 (xstrnlen): Define if strnlen is not available.
801 (b_elf_note): Define type.
802 (NT_GNU_BUILD_ID): Define macro.
803 (elf_crc32, elf_crc32_file): New static functions.
804 (elf_is_symlink, elf_readlink): New static functions.
805 (elf_open_debugfile_by_buildid): New static function.
806 (elf_try_debugfile): New static function.
807 (elf_find_debugfile_by_debuglink): New static function.
808 (elf_open_debugfile_by_debuglink): New static function.
809 (elf_add): Add filename and debuginfo parameters. Adjust all
810 callers. Look for external debug info notes, and try to fetch
811 debug info from external file.
812 (struct phdr_data): Add exe_filename field.
813 (phdr_callback): Pass filename to elf_add.
814 (backtrace_initialize): Add filename parameter.
815 * internal.h (backtrace_initialize): Add filename parameter.
816 * fileline.c (fileline_initialize): Pass filename to
817 backtrace_initialize.
818 * pecoff.c (fileline_initialize): Add unused filename parameter.
819 * unknown.c (fileline_initialize): Likewise.
820 * xcoff.c (fileline_initialize): Likewise.
821 * configure.ac: Check for objcopy --add-gnu-debuglink.
822 * Makefile.am (dtest): New test target.
823 * configure, Makefile.in: Rebuild.
825 2017-09-12 Steve Ellcey <sellcey@cavium.com>
828 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
829 * Makefile.in: Regenerate.
831 2017-09-12 Steve Ellcey <sellcey@cavium.com>
834 * libbacktrace/Makefile.in
835 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
837 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
840 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
842 2017-07-28 Tony Reix <tony.reix@atos.net>
844 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
846 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
848 * fileline.c (fileline_initialize): Print pid_t as long.
850 2017-07-26 Tony Reix <tony.reix@atos.net>
852 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
853 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
854 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
855 * configure, config.h.in: Regenerate.
857 2017-07-21 Tony Reix <tony.reix@atos.net>
859 * filetype.awk: Add AIX XCOFF type detection.
860 * configure.ac: Recognize xcoff format.
861 * Makefile.am (FORMAT_FILES): Add xcoff.c.
862 * fileline.c: Include <unistd.h>.
863 (fileline_initialize): Add case for AIX procfs.
865 * configure, Makefile.in: Rebuild.
867 2017-06-21 Richard Biener <rguenther@suse.de>
869 * configure.ac: Add AC_SYS_LARGEFILE.
870 * config.h.in: Regenerate.
871 * configure: Likewise.
873 2017-06-11 Ian Lance Taylor <iant@golang.org>
875 * elf.c (backtrace_initialize): Always set *fileline_fn.
877 * btest.c: Move support functions into testlib.c. Change calls to
878 check to pass file name.
879 * testlib.c: New file, copied from (part of) btest.c.
880 * testlib.h: New file, declarations for testlib.c.
881 * edtest.c: Use testlib.h and testlib.c.
882 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
883 * Makefile.am (btest_SOURCES): Add testlib.c.
884 (edtest_SOURCES): Likewise.
885 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
886 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
887 * configure, Makefile.in: Rebuild.
889 2017-05-19 Than McIntosh <thanm@google.com>
891 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
892 (read_line_header): Don't allocate dirs if dirs_count == 0.
893 * edtest.c: New file.
894 * edtest2.c: New file.
895 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
896 (check_PROGRAMS): Add edtest.
897 (edtest2_build.c, gen_edtest2_build): New targets.
898 * Makefile.in: Rebuild.
900 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
902 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
903 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
905 2017-01-01 Jakub Jelinek <jakub@redhat.com>
907 Update copyright years.
909 2016-11-15 Matthias Klose <doko@ubuntu.com>
911 * configure: Regenerate.
913 2016-09-11 Carlos Liam <carlos@aarzee.me>
915 * all: Remove meaningless trailing whitespace.
917 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
920 * elf.c (phdr_callback) [__i386__]: Add
921 __attribute__((__force_align_arg_pointer__)).
923 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
925 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
926 avoid possible crash.
927 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
928 missing debug info anymore.
930 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
932 * mmap.c (MAP_FAILED): Define if not defined.
934 2016-01-04 Jakub Jelinek <jakub@redhat.com>
936 Update copyright years.
938 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
940 * configure.ac: Specify that DJGPP do not have mmap
941 even when sys/mman.h exists.
942 * configure: Regenerate
944 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
947 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
948 * configure: Regenerate.
949 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
952 2015-09-17 Ian Lance Taylor <iant@google.com>
954 * posix.c (backtrace_open): Cast second argument of open() to int.
956 2015-09-11 Ian Lance Taylor <iant@google.com>
958 * Makefile.am (backtrace.lo): Depend on internal.h.
959 (sort.lo, stest.lo): Add explicit dependencies.
960 * Makefile.in: Rebuild.
962 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
964 * backtrace.c: #include <sys/types.h>.
966 2015-09-08 Ian Lance Taylor <iant@google.com>
969 * backtrace.c: #include "internal.h".
970 (struct backtrace_data): Add can_alloc field.
971 (unwind): If can_alloc is false, don't try to get file/line
973 (backtrace_full): Set can_alloc field in bdata.
974 * alloc.c (backtrace_alloc): Don't call error_callback if it is
976 * mmap.c (backtrace_alloc): Likewise.
977 * internal.h: Update comments for backtrace_alloc and
980 2015-09-08 Ian Lance Taylor <iant@google.com>
983 * mmap.c (backtrace_alloc): Correct test for mmap failure.
985 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
987 * configure.ac: For spu-*-* targets, set have_fcntl to no.
988 * configure: Regenerate.
990 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
992 * configure.ac: Remove [disable-shared] argument to LT_INIT.
993 Remove setting PIC_FLAG when building as target library.
994 * configure: Regenerate.
996 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
998 * configure.ac: Only compile with -fPIC if the target
1000 * configure: Regenerate.
1002 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1004 * configure.ac: Set have_mmap to no on spu-*-* targets.
1005 * configure: Regenerate.
1007 2015-08-13 Ian Lance Taylor <iant@google.com>
1009 * dwarf.c (read_function_entry): Add vec_inlined parameter.
1012 2015-06-11 Martin Sebor <msebor@redhat.com>
1015 * dwarf.c (struct line): Add new field idx.
1016 (line_compare): Use it.
1018 (read_line_info): Reset it.
1020 2015-05-29 Tristan Gingold <gingold@adacore.com>
1022 * pecoff.c: New file.
1023 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1024 * Makefile.in: Regenerate.
1025 * filetype.awk: Detect pecoff.
1026 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1028 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1030 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1031 * configure: Regenerate.
1032 * pecoff.c: New file.
1034 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1036 * Makefile.in: Regenerated with automake-1.11.6.
1037 * aclocal.m4: Likewise.
1038 * configure: Likewise.
1040 2015-01-24 Matthias Klose <doko@ubuntu.com>
1042 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1043 * configure: Regenerate.
1045 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1047 Update copyright years.
1049 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1052 * configure: Regenerated.
1054 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1056 * ChangeLog.jit: New.
1058 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1061 * configure: Regenerate.
1063 2014-10-23 Ian Lance Taylor <iant@google.com>
1065 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1066 Fix to return void *.
1068 2014-05-08 Ian Lance Taylor <iant@google.com>
1070 * mmap.c (backtrace_free): If freeing a large aligned block of
1071 memory, call munmap rather than holding onto it.
1072 (backtrace_vector_grow): When growing a vector, double the number
1073 of pages requested. When releasing the old version of a grown
1074 vector, pass the correct size to backtrace_free.
1076 2014-03-07 Ian Lance Taylor <iant@google.com>
1078 * sort.c (backtrace_qsort): Use middle element as pivot.
1080 2014-03-06 Ian Lance Taylor <iant@google.com>
1083 * stest.c: New file.
1084 * internal.h (backtrace_qsort): Declare.
1085 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1086 (read_line_info, read_function_entry): Likewise.
1087 (read_function_info, build_dwarf_data): Likewise.
1088 * elf.c (elf_initialize_syminfo): Likewise.
1089 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1090 (stest_SOURCES, stest_LDADD): Define.
1091 (check_PROGRAMS): Add stest.
1093 2014-02-07 Misty De Meo <misty@brew.sh>
1096 * configure.ac: Use AC_LINK_IFELSE in check for
1098 * configure: Regenerate.
1100 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1102 Update copyright years
1104 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1106 * elf.c (ET_DYN): Undefine and define again.
1107 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1108 return early -1 without closing the descriptor.
1109 (struct phdr_data): Add exe_descriptor.
1110 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1111 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1112 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1114 (backtrace_initialize): Adjust call to elf_add. If it returns
1115 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1117 2013-12-05 Ian Lance Taylor <iant@google.com>
1119 * alloc.c (backtrace_vector_finish): Add error_callback and data
1120 parameters. Call backtrace_vector_release. Return address base.
1121 * mmap.c (backtrace_vector_finish): Add error_callback and data
1122 parameters. Return address base.
1123 * dwarf.c (read_function_info): Get new address base from
1124 backtrace_vector_finish.
1125 * internal.h (backtrace_vector_finish): Update declaration.
1127 2013-11-27 Ian Lance Taylor <iant@google.com>
1129 * dwarf.c (find_address_ranges): New static function, broken out
1130 of build_address_map.
1131 (build_address_map): Call it.
1132 * btest.c (check): Check for missing filename or function, rather
1134 (f3): Check that enough frames were returned.
1136 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1138 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1139 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1141 * btest.c (struct symdata): Add size field.
1142 (callback_three): Add symsize argument. Copy it to the data->size
1144 (f23): Set symdata.size to 0.
1145 (test5): Likewise. If sizeof (int) > 1, lookup address of
1146 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1149 * atomic.c: Include sys/types.h.
1151 2013-11-18 Ian Lance Taylor <iant@google.com>
1153 * configure.ac: Check for support of __atomic extensions.
1154 * internal.h: Declare or #define atomic functions for use in
1156 * atomic.c: New file.
1157 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1158 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1159 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1160 (backtrace_initialize): Likewise.
1161 * fileline.c (fileline_initialize): Likewise.
1162 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1163 * configure, config.h.in, Makefile.in: Rebuild.
1165 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1167 * elf.c (SHN_UNDEF): Define.
1168 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1169 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1170 (elf_add): Adjust caller.
1172 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1174 2013-11-16 Ian Lance Taylor <iant@google.com>
1176 * backtrace.h (backtrace_create_state): Correct comment about
1179 2013-11-15 Ian Lance Taylor <iant@google.com>
1181 * backtrace.h (backtrace_syminfo): Update comment and parameter
1182 name to take any address, not just a PC value.
1183 * elf.c (STT_OBJECT): Define.
1184 (elf_nosyms): Rename parameter pc to addr.
1185 (elf_symbol_search): Rename local variable pc to addr.
1186 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1187 (elf_syminfo): Rename parameter pc to addr.
1188 * btest.c (global): New global variable.
1192 2013-10-17 Ian Lance Taylor <iant@google.com>
1194 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1197 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1199 * configure.ac: Add --enable-host-shared, setting up
1200 pre-existing PIC_FLAG variable within Makefile.am et al.
1201 * configure: Regenerate.
1203 2013-09-20 Alan Modra <amodra@gmail.com>
1205 * configure: Regenerate.
1207 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1209 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1211 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1213 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1214 dl_iterate_phdr callbacks.
1216 2013-03-25 Ian Lance Taylor <iant@google.com>
1218 * alloc.c: #include <sys/types.h>.
1221 2013-01-31 Ian Lance Taylor <iant@google.com>
1223 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1224 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1226 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1229 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1230 attribute was not seen.
1232 2013-01-16 Ian Lance Taylor <iant@google.com>
1234 * dwarf.c (struct unit): Add filename and abs_filename fields.
1235 (build_address_map): Set new fields when reading unit.
1236 (dwarf_lookup_pc): If we don't find an entry in the line table,
1237 just return the main file name.
1239 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1241 Update copyright years.
1243 2013-01-01 Ian Lance Taylor <iant@google.com>
1246 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1247 $(MULTIBUILDTOP)/../../gcc/include.
1248 * Makefile.in: Rebuild.
1250 2013-01-01 Ian Lance Taylor <iant@google.com>
1253 * mmap.c (backtrace_alloc): Don't call sync functions if not
1255 (backtrace_free): Likewise.
1257 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1259 * mmapio.c: Define MAP_FAILED if not defined.
1261 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1264 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1265 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1266 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1268 * Makefile.in: Regenerated.
1269 * configure: Regenerated.
1271 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1274 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1275 * Makefile.in: Regenerated.
1277 2012-11-20 Ian Lance Taylor <iant@google.com>
1279 * dwarf.c (read_attribute): Always clear val.
1281 2012-11-13 Ian Lance Taylor <iant@google.com>
1284 * configure.ac: Only add -Werror if building a target library.
1285 * configure: Rebuild.
1287 2012-11-12 Ian Lance Taylor <iant@google.com>
1288 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1289 Gerald Pfeifer <gerald@pfeifer.com>
1291 * configure.ac: Check for getexecname.
1292 * fileline.c: #include <errno.h>. Define getexecname if not
1294 (fileline_initialize): Try to find the executable in a few
1296 * print.c (error_callback): Only print the filename if it came
1297 from the backtrace state.
1298 * configure, config.h.in: Rebuild.
1300 2012-10-29 Ian Lance Taylor <iant@google.com>
1302 * mmap.c (backtrace_vector_release): Correct last patch: add
1305 2012-10-29 Ian Lance Taylor <iant@google.com>
1307 * mmap.c (backtrace_vector_release): Make sure freed block is
1308 aligned on 8-byte boundary.
1310 2012-10-26 Ian Lance Taylor <iant@google.com>
1313 * posix.c (backtrace_open): Add does_not_exist parameter.
1314 * elf.c (phdr_callback): Do not warn if shared library could not
1316 * fileline.c (fileline_initialize): Update calls to
1318 * internal.h (backtrace_open): Update declaration.
1320 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1323 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1324 * configure: Regenerate.
1326 2012-10-24 Ian Lance Taylor <iant@google.com>
1329 * configure.ac: Check whether -funwind-tables option works.
1330 * configure: Rebuild.
1332 2012-10-11 Ian Lance Taylor <iant@google.com>
1334 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1335 * configure: Rebuild.
1337 2012-10-10 Ian Lance Taylor <iant@google.com>
1339 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1342 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1344 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1346 2012-10-09 Ian Lance Taylor <iant@google.com>
1348 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1349 (backtrace_dwarf_add): Likewise.
1351 2012-10-09 Ian Lance Taylor <iant@google.com>
1353 Add support for tracing through shared libraries.
1354 * configure.ac: Check for link.h and dl_iterate_phdr.
1355 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1356 ELF macros before #defining them.
1357 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1359 (struct elf_syminfo_data): Add next field.
1360 (elf_initialize_syminfo): Initialize next field.
1361 (elf_add_syminfo_data): New static function.
1362 (elf_add): New static function, broken out of
1363 backtrace_initialize. Call backtrace_dwarf_add instead of
1364 backtrace_dwarf_initialize.
1365 (struct phdr_data): Define.
1366 (phdr_callback): New static function.
1367 (backtrace_initialize): Call elf_add.
1368 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1369 (add_unit_addr): Add base_address parameter. Change all callers.
1370 (add_unit_ranges, build_address_map): Likewise.
1371 (add_line): Add ddata parameter. Change all callers.
1372 (read_line_program, add_function_range): Likewise.
1373 (dwarf_lookup_pc): New static function, broken out of
1375 (dwarf_fileline): Call dwarf_lookup_pc.
1376 (build_dwarf_data): New static function.
1377 (backtrace_dwarf_add): New function.
1378 (backtrace_dwarf_initialize): Remove.
1379 * internal.h (backtrace_dwarf_initialize): Don't declare.
1380 (backtrace_dwarf_add): Declare.
1381 * configure, config.h.in: Rebuild.
1383 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1385 * btest.c (f23): Avoid uninitialized variable warning.
1387 2012-10-04 Ian Lance Taylor <iant@google.com>
1389 * dwarf.c: If the system header files do not declare strnlen,
1390 provide our own version.
1392 2012-10-03 Ian Lance Taylor <iant@google.com>
1394 * dwarf.c (read_uleb128): Fix overflow test.
1395 (read_sleb128): Likewise.
1396 (build_address_map): Don't change unit_buf.start.
1398 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1401 * configure.ac (EXTRA_FLAGS): New.
1402 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1403 * configure, Makefile.in: Regenerate.
1405 2012-09-29 Ian Lance Taylor <iant@google.com>
1408 * fileline.c (fileline_initialize): Pass errnum as -1 when
1409 reporting that we could not read executable information after a
1412 2012-09-27 Ian Lance Taylor <iant@google.com>
1415 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1416 * Makefile.am: Add dependencies for all objects.
1417 * configure, aclocal.m4, Makefile.in: Rebuild.
1419 2012-09-27 Ian Lance Taylor <iant@google.com>
1422 * elf.c (backtrace_initialize): Set *fileln_fn, not
1425 2012-09-19 Ian Lance Taylor <iant@google.com>
1427 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1428 as a target library.
1429 * configure: Rebuild.
1431 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1432 Ian Lance Taylor <iant@google.com>
1434 * configure.ac (GCC_HEADER_STDINT): Invoke.
1435 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1436 * btest.c: Don't include <stdint.h>.
1437 * dwarf.c: Likewise.
1438 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1440 2012-09-18 Ian Lance Taylor <iant@google.com>
1443 * Makefile.am (AM_CPPFLAGS): Define.
1444 (AM_CFLAGS): Remove -I options.
1445 * Makefile.in: Rebuild.
1447 2012-09-18 Ian Lance Taylor <iant@google.com>
1449 * posix.c (O_BINARY): Define if not defined.
1450 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1451 HAVE_FCNTL is defined.
1452 * configure.ac: Test for the fcntl function.
1453 * configure, config.h.in: Rebuild.
1455 2012-09-18 Ian Lance Taylor <iant@google.com>
1457 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1459 2012-09-18 Ian Lance Taylor <iant@google.com>
1461 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1463 2012-09-18 Ian Lance Taylor <iant@google.com>
1465 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1466 * mmapio.c: Don't define _GNU_SOURCE.
1467 * configure, config.h.in: Rebuild.
1469 2012-09-18 Ian Lance Taylor <iant@google.com>
1471 * configure.ac: Check whether strnlen is declared.
1472 * dwarf.c: Declare strnlen if not declared.
1473 * configure, config.h.in: Rebuild.
1475 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1477 * fileline.c: Include <stdlib.h>.
1480 2012-09-17 Ian Lance Taylor <iant@google.com>
1483 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1486 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1489 * nounwind.c (backtrace_simple): Add state parameter.
1491 2012-09-17 Ian Lance Taylor <iant@google.com>
1494 * unknown.c (unknown_fileline): Add state parameter, remove
1495 fileline_data parameter, name error_callback parameter.
1496 (backtrace_initialize): Add state parameter.
1498 2012-09-17 Ian Lance Taylor <iant@google.com>
1500 * Initial implementation.
1502 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1504 Copying and distribution of this file, with or without modification,
1505 are permitted in any medium without royalty provided the copyright
1506 notice and this notice are preserved.