1 2020-09-09 Ian Lance Taylor <iant@golang.org>
3 * pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
4 (coff_add): Determine and pass is_64.
6 2020-09-09 Ian Lance Taylor <iant@golang.org>
9 * fileline.c (macho_get_executable_path): New static function.
10 (fileline_initialize): Call macho_get_executable_path.
12 2020-09-09 Ian Lance Taylor <iant@golang.org>
14 * dwarf.c (function_addrs_search): Compare against the next entry
15 low address, not the high address.
16 (unit_addrs_search): Likewise.
17 (build_address_map): Add a trailing unit_addrs.
18 (read_function_entry): Add a trailing function_addrs.
19 (read_function_info): Likewise.
20 (report_inlined_functions): Search backward for function_addrs
22 (dwarf_lookup_pc): Search backward for unit_addrs and
23 function_addrs matches.
25 2020-09-08 Ian Lance Taylor <iant@golang.org>
27 * simple.c (simple_unwind): Correct comment spelling.
29 2020-09-08 Ian Lance Taylor <iant@golang.org>
31 * macho.c (macho_add_dsym): Make space for '/' in dsym. Use
32 correct length when freeing diralc.
34 2020-09-08 Ian Lance Taylor <iant@golang.org>
37 * macho.c (macho_add_fat): Correctly swap 32-bit file offset.
39 2020-09-08 Ian Lance Taylor <iant@golang.org>
42 * filetype.awk: Only match magic number at start of line.
44 2020-08-24 Ian Lance Taylor <iant@golang.org>
46 * macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
47 (MACH_O_MH_CIGAM_FAT_64): Define.
48 (struct macho_fat_arch_64): Define.
49 (macho_add_fat): Add and use is_64 parameter.
50 (macho_add): Recognize 64-bit fat files.
52 2020-07-30 H.J. Lu <hjl.tools@gmail.com>
55 * configure: Regenerated.
57 2020-07-08 Ian Lance Taylor <iant@golang.org>
59 * configure.ac: Test linker support for DWARF5
60 * configure: Regenerate
62 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
65 * configure: Regenerated.
67 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
70 * configure: Regenerated.
72 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
74 * configure: Regenerated.
76 2020-05-13 Ian Lance Taylor <iant@golang.org>
78 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
80 2020-05-13 Ian Lance Taylor <iant@golang.org>
83 * posix.c (backtrace_open): Treat EACCESS like ENOENT.
85 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
87 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
88 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
89 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
91 * Makefile.in: Regenerated.
92 * configure: Likewise.
94 2020-05-11 Ian Lance Taylor <iant@golang.org>
97 * configure.ac: Check for getpagesize declaration.
98 * mmap.c: Declare getpagesize if necessary.
100 * configure: Regenerate.
101 * config.h.in: Regenerate.
102 * Makefile.in: Regenerate.
104 2020-05-09 Roland McGrath <mcgrathr@google.com>
106 * elf.c (elf_add): Bail early if there are no section headers at all.
108 2020-05-09 Ian Lance Taylor <iant@golang.org>
110 * elf.c (elf_add): Don't free strtab if an error occurs after
111 recording symbol information.
113 2020-05-09 Ian Lance Taylor <iant@golang.org>
115 PR libbacktrace/88745
117 * filetype.awk: Recognize Mach-O files.
118 * Makefile.am (FORMAT_FILES): Add macho.c.
119 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
120 (%.dSYM): New pattern target.
121 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
122 (test_macho_LDADD): New target.
123 (BUILDTESTS): Add test_macho.
124 (macho.lo): Add dependencies.
125 * configure.ac: Recognize macho file type. Check for
126 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
127 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
128 * Makefile.in: Regenerate.
129 * configure: Regenerate.
130 * config.h.in: Regenerate.
132 2020-05-09 Ian Lance Taylor <iant@golang.org>
134 * read.c (backtrace_get_view): Support short read.
136 2020-05-09 Ian Lance Taylor <iant@golang.org>
138 * elf.c (elf_add): If debug sections are very large or far apart,
139 read them individually rather than as a single view.
141 2020-05-08 Ian Lance Taylor <iant@golang.org>
143 * fileline.c (sysctl_exec_name): New static function.
144 (sysctl_exec_name1): New macro or static function.
145 (sysctl_exec_name2): Likewise.
146 (fileline_initialize): Try sysctl_exec_name[12].
147 * configure.ac: Check for sysctl args to fetch executable name.
148 * configure: Regenerate.
149 * config.h.in: Regenerate.
151 2020-02-15 Ian Lance Taylor <iant@golang.org>
153 * ztest.c (test_large): Update file to current libgo test file.
155 2020-02-03 Ian Lance Taylor <iant@golang.org>
157 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
158 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
159 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
160 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
161 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
162 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
163 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
164 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
165 (stest_alloc_CFLAGS): Likewise.
166 * Makefile.in: Regenerate.
167 * ztest.c (error_callback_compress): Mark vdata unused.
168 (test_large): Add casts to avoid warnings.
170 2020-01-01 Jakub Jelinek <jakub@redhat.com>
172 Update copyright years.
174 2019-12-13 Ian Lance Taylor <iant@golang.org>
177 * dwarf.c (struct attr): Add val field.
178 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
179 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
180 (struct line_header): Add addrsize field.
181 (struct line_header_format): Define.
182 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
184 (read_uint24): New static function.
185 (read_attribute): Add implicit_val parameter. Replace dwarf_str
186 and dwarf_str_size parameters with dwarf_sections parameter. Add
187 support for new DWARF 5 forms. Change all callers.
188 (resolve_string): New static function.
189 (resolve_addr_index): Likewise.
190 (read_abbrevs): Support DW_FORM_implicit_const.
191 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
192 and ranges_is_index fields.
193 (update_pcrange): Support DWARF 5 encodings.
194 (add_high_low_range): New static function, split out of
196 (add_ranges_from_ranges): Likewise.
197 (add_ranges_from_rnglists): New static function.
198 (add_ranges): Just call new helper functions.
199 (find_address_ranges): Use resolve_string for strings, after
200 reading all attributes. Handle new DWARF 5 attributes.
201 (build_address_map): Support DWARF 5 compilation units.
202 (read_v2_paths): New static function, split out of
204 (read_lnct): New static function.
205 (read_line_header_format_entries): Likewise.
206 (read_line_header): Add ddata parameter. Support DWARF 5 line
207 headers. Call new helper functions. Change all callers.
208 (read_line_program): Use addrsize from line program header. Don't
209 special case directory index 0 for DWARF 5.
210 (read_referenced_name): Use resolve_string.
211 (read_function_entry): Handle DWARF 5 encodings. Use
213 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
214 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
215 * elf.c (dwarf_section_names): Add new section names.
216 * pecoff.c (dwarf_section_names): Likewise.
217 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
219 * configure.ac: Define HAVE_DWARF5 automake conditional.
220 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
221 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
222 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
223 (dwarf5_alloc_LDADD): Likewise.
224 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
225 (CLEANFILES, clean-local): Define.
227 2019-12-08 Ian Lance Taylor <iant@golang.org>
229 * dwarf.c (struct pcrange): Define.
230 (update_pcrange, add_ranges): New static functions.
231 (add_unit_addr): Change signature to work with add_ranges. Don't
232 add base_address here.
233 (add_unit_ranges): Remove.
234 (find_address_ranges): Replace str/ranges parameters with
235 dwarf_sections. Use update_pcrange and add_ranges. Change all
237 (add_function_range): Change signature to work with add_ranges.
238 Don't add base_address here.
239 (add_function_ranges): Remove.
240 (read_function_entry): Use update_pcrange and add_ranges.
242 2019-12-04 Ian Lance Taylor <iant@golang.org>
244 * edtest.c (test1): Add noclone attribute.
246 2019-12-04 Ian Lance Taylor <iant@golang.org>
248 * internal.h (enum dwarf_section): Define.
249 (struct dwarf_sections): Define.
250 (backtrace_dwarf_add): Update declaration to replace specific
251 section parameters with dwarf_sections parameter.
252 * dwarf.c (struct dwarf_data): Replace specific section fields
253 with dwarf_sections field.
254 (read_attribute): Use dwarf_sections with altlink.
255 (build_address_map): Replace specific section parameters with
256 dwarf_sections parameter. Change all callers.
257 (read_line_info): Use dwarf_sections with ddata.
258 (read_referenced_name): Likewise.
259 (add_function_ranges): Likewise.
260 (read_function_entry): Likewise.
261 (read_function_info): Likewise.
262 (build_dwarf_data): Replace specific section parameters with
263 dwarf_sections parameter. Change all callers.
264 (backtrace_dwarf_add): Likewise.
265 * elf.c (enum debug_section): Remove.
266 (dwarf_section_names): Remove .zdebug names.
267 (elf_add): Track zsections separately. Build dwarf_sections.
268 * pecoff.c (enum debug_section): Remove.
269 (struct debug_section_info): Remove data field.
270 (coff_add): Build dwarf_sections.
271 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
272 references with DEBUG_xxx references.
273 (xcoff_add): Build dwarf_sections.
275 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
277 * configure: Regenerate.
279 2019-09-26 Ian Lance Taylor <iant@golang.org>
281 PR libbacktrace/91908
282 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
283 __sync_bool_compare_and_swap to void.
284 * xcoff.c (backtrace_initialize): Likewise.
286 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
288 * configure.ac: Remove references to spu.
289 * configure: Regenerate.
291 2019-05-24 Clement Chigot <clement.chigot@atos.net>
293 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
295 * Makefile.in: Regenerate.
297 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
299 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
301 * configure: Regenerate.
303 2019-03-11 Ian Lance Taylor <iant@golang.org>
305 PR libbacktrace/89669
306 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
308 * Makefile.in: Regenerate.
310 2019-02-26 Tom de Vries <tdevries@suse.de>
312 * btest.c (test5): Allow global.* as minimal symbol name for global.
314 2019-02-26 Tom de Vries <tdevries@suse.de>
316 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
317 * Makefile.in: Regenerate.
319 2019-02-12 Tom de Vries <tdevries@suse.de>
321 PR libbacktrace/81983
322 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
324 2019-02-10 Tom de Vries <tdevries@suse.de>
326 * Makefile.am (BUILDTESTS): Add btest_lto.
327 * Makefile.in: Regenerate.
328 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
329 __attribute__((noclone)).
331 2019-02-08 Tom de Vries <tdevries@suse.de>
333 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
334 * print.c (backtrace_print): Same.
335 * simple.c (backtrace_simple): Same.
337 2019-02-08 Tom de Vries <tdevries@suse.de>
339 PR libbacktrace/78063
340 * dwarf.c (build_address_map): Keep all parsed units.
341 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
343 2019-01-31 Tom de Vries <tdevries@suse.de>
345 PR libbacktrace/89136
346 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
347 'debugaltlink_name_len =+ 1'.
349 2019-01-29 Tom de Vries <tdevries@suse.de>
351 * install-debuginfo-for-buildid.sh.in: New script.
352 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
353 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
354 * Makefile.in: Regenerate.
355 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
356 (READELF): Set with AC_CHECK_PROG.
357 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
358 * configure: Regenerate.
359 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
360 (elf_open_debugfile_by_buildid): ... here.
362 2019-01-29 Tom de Vries <tdevries@suse.de>
364 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
366 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
367 (check_PROGRAMS): Add BUILDTESTS.
368 * Makefile.in: Regenerate.
370 2019-01-28 Tom de Vries <tdevries@suse.de>
372 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
373 Use $< to access prerequisite.
374 * Makefile.in: Regenerate.
376 2019-01-25 Nathan Sidwell <nathan@acm.org>
378 * elf.c (elf_add): Pass "" filename to recursive call with
381 2019-01-25 Tom de Vries <tdevries@suse.de>
383 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
385 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
386 * Makefile.in: Regenerate.
388 2019-01-25 Tom de Vries <tdevries@suse.de>
390 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
391 (TESTS): Rename dtest to btest_gnudebuglink.
392 * Makefile.in: Regenerate.
394 2019-01-23 Tom de Vries <tdevries@suse.de>
396 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
397 (units_search, find_unit): Use size_t for offset.
398 (build_address_map): Use size_t for unit_offset.
400 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
402 * allocfail.c (main): Increase portability of printf statement.
404 2019-01-18 Ian Lance Taylor <iant@golang.org>
406 PR libbacktrace/88890
407 * mmapio.c (backtrace_get_view): Change size parameter to
408 uint64_t. Check that value fits in size_t.
409 * read.c (backtrace_get_view): Likewise.
410 * internal.h (backtrace_get_view): Update declaration.
411 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
413 2019-01-17 Tom de Vries <tdevries@suse.de>
415 PR libbacktrace/82857
416 * configure.ac (DWZ): Set with AC_CHECK_PROG.
417 (HAVE_DWZ): Set with AM_CONDITIONAL.
418 * configure: Regenerate.
419 * Makefile.am (TESTS): Add btest_dwz.
420 * Makefile.in: Regenerate.
422 2019-01-17 Tom de Vries <tdevries@suse.de>
424 PR libbacktrace/82857
425 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
426 (read_attribute): Handle DW_FORM_GNU_ref_alt using
427 ATTR_VAL_REF_ALT_INFO.
428 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
430 2019-01-17 Tom de Vries <tdevries@suse.de>
432 * dwarf.c (struct unit): Add low_offset and high_offset fields.
433 (struct unit_vector): New type.
434 (struct dwarf_data): Add units and units_counts fields.
435 (find_unit): New function.
436 (find_address_ranges): Add and handle unit_tag parameter.
437 (build_address_map): Add and handle units_vec parameter.
438 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
441 2019-01-17 Tom de Vries <tdevries@suse.de>
443 PR libbacktrace/82857
444 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
447 2019-01-17 Tom de Vries <tdevries@suse.de>
449 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
450 (read_attribute): Add altlink parameter. Handle missing altlink for
451 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
452 (find_address_ranges, build_address_map, build_dwarf_data): Add and
453 handle altlink parameter.
454 (read_referenced_name, read_function_entry): Add argument to
457 2019-01-17 Tom de Vries <tdevries@suse.de>
459 * dwarf.c (struct dwarf_data): Add altlink field.
460 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
461 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
462 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
463 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
464 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
465 * xcoff.c (xcoff_add): Same.
467 2019-01-17 Tom de Vries <tdevries@suse.de>
469 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
470 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
471 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
472 argument to backtrace_dwarf_add call.
473 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
474 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
475 * xcoff.c (xcoff_add): Same.
477 2019-01-17 Tom de Vries <tdevries@suse.de>
479 * elf.c (elf_add): Add and handle with_buildid_data and
480 with_buildid_size parameters. Handle .gnu_debugaltlink section.
481 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
483 2019-01-16 Tom de Vries <tdevries@suse.de>
485 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
487 (read_referenced_name): ... here, and ...
488 (read_function_entry): ... here.
490 2019-01-16 Tom de Vries <tdevries@suse.de>
492 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
494 (read_function_entry): Same. Don't allow name found via
495 DW_AT_abstract_origin or case DW_AT_specification to override linkage
498 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
502 * backtrace.h: Mechanically replace "can not" with "cannot".
504 2019-01-01 Jakub Jelinek <jakub@redhat.com>
506 Update copyright years.
508 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
510 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
512 * Makefile.in: Regenerate.
514 2018-12-28 Tom de Vries <tdevries@suse.de>
516 * dwarf.c (build_address_map): Reuse unused units.
518 2018-12-28 Tom de Vries <tdevries@suse.de>
520 * dwarf.c (build_address_map): Simplify by removing local variable
523 2018-12-28 Ian Lance Taylor <iant@golang.org>
524 Tom de Vries <tdevries@suse.de>
526 PR libbacktrace/88063
527 * dwarf.c (free_unit_addrs_vector): Remove.
528 (build_address_map): Keep track of allocated units in vector. Free
529 allocated units and corresponding abbrevs upon failure. Remove now
530 redundant call to free_unit_addrs_vector. Free addrs vector upon
531 failure. Free allocated unit vector.
533 2018-12-28 Tom de Vries <tdevries@suse.de>
535 * dwarf.c (build_address_map): Free addrs vector upon failure.
537 2018-12-14 Tom de Vries <tdevries@suse.de>
540 * allocfail.sh: Remove "set -o pipefail".
542 2018-12-12 Tom de Vries <tdevries@suse.de>
544 * Makefile.am (TESTS): Add allocfail.sh.
545 (check_PROGRAMS): Add allocfail.
546 * Makefile.in: Regenerate.
547 * instrumented_alloc.c: New file. Redefine malloc and realloc.
549 * allocfail.c: New file.
550 * allocfail.sh: New file.
552 2018-11-30 Tom de Vries <tdevries@suse.de>
554 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
555 test_xcoff_64, test_pecoff and test_unknown.
556 * Makefile.in: Regenerate.
557 * test_format.c: New file.
559 2018-11-30 Tom de Vries <tdevries@suse.de>
561 * Makefile.am : Add _with_alloc version for each test in
563 * Makefile.in: Regenerate.
565 2018-11-30 Tom de Vries <tdevries@suse.de>
567 * internal.h (backtrace_vector_free): New static inline fuction,
569 * dwarf.c (read_line_info): ... here.
571 2018-11-28 Tom de Vries <tdevries@suse.de>
573 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
576 2018-11-27 Tom de Vries <tdevries@suse.de>
578 * mmap.c (backtrace_vector_release): Same.
579 * unittest.c (test1): Add check.
581 2018-11-27 Tom de Vries <tdevries@suse.de>
583 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
585 * Makefile.am (check_PROGRAMS): Add unittest.
586 * Makefile.in: Regenerate.
587 * unittest.c: New file.
589 2018-11-22 Tom de Vries <tdevries@suse.de>
591 * dwarf.c (read_initial_length): Factor out of ...
592 (build_address_map, read_line_info): ... here.
594 2018-11-21 Tom de Vries <tdevries@suse.de>
596 * dwarf.c (read_string): Factor out of ...
597 (read_attribute, read_line_header, read_line_program): ... here.
599 2018-10-31 Joseph Myers <joseph@codesourcery.com>
602 * Makefile.am: Include multilib.am.
603 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
604 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
606 2018-10-05 Ian Lance Taylor <iant@golang.org>
608 PR libbacktrace/87529
609 * backtrace.h: Document that backtrace_create_state should be
612 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
614 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
615 * Makefile.in: Regenerate.
616 * config.h.in: Likewise.
617 * configure: Likewise.
619 2018-08-01 Tony Reix <tony.reix@atos.net>
621 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
622 (struct xcoff_func, struct xcoff_func_vector): New structs.
623 (xcoff_syminfo): Drop leading dot from symbol name.
624 (xcoff_line_compare, xcoff_line_search): Remove.
625 (xcoff_func_compare, xcoff_func_search): New static functions.
626 (xcoff_lookup_pc): Search function table.
627 (xcoff_add_line, xcoff_process_linenos): Remove.
628 (xcoff_initialize_fileline): Build function table.
630 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
633 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
634 checking up to 36 bytes.
636 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
638 * configure: Regenerated.
640 2018-04-19 Jakub Jelinek <jakub@redhat.com>
642 * configure: Regenerated.
644 2018-04-17 Ian Lance Taylor <iant@golang.org>
646 * backtrace.c: Revert last two changes. Don't call mmap
649 2018-04-17 Ian Lance Taylor <iant@golang.org>
651 * backtrace.c: Include backtrace-supported.h before checking
652 BACKTRACE_USES_MALLOC.
654 2018-04-17 Ian Lance Taylor <iant@golang.org>
656 * backtrace.c (backtrace_full): When testing whether we can
657 allocate memory, call mmap directly, and munmap the memory.
659 2018-04-04 Jakub Jelinek <jakub@redhat.com>
662 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
663 big endian, only use 32-bit loads if endianity macros are predefined
664 and indicate big or little endian.
666 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
669 * configure: Regenerate.
671 2018-02-15 Jakub Jelinek <jakub@redhat.com>
674 * elf.c (SHT_PROGBITS): Undefine and define.
676 2018-02-14 Jakub Jelinek <jakub@redhat.com>
679 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
680 (struct elf_ppc64_opd_data): New type.
681 (elf_initialize_syminfo): Add opd argument, handle symbols
682 pointing into the PowerPC64 ELFv1 .opd section.
683 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
684 to structure with .opd data to elf_initialize_syminfo.
686 2018-01-31 Ian Lance Taylor <iant@golang.org>
688 * elf.c (elf_add): Close descriptor if we use a debugfile.
689 * btest.c (check_open_files): New static function.
690 (main): Call check_open_files.
692 2018-01-25 Ian Lance Taylor <iant@golang.org>
694 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
696 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
698 2018-01-25 Ian Lance Taylor <iant@golang.org>
700 * pecoff.c (coff_add): Only release syms_view if it is valid.
702 2018-01-25 Ian Lance Taylor <iant@golang.org>
704 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
706 2018-01-24 Ian Lance Taylor <iant@golang.org>
708 * pecoff.c (coff_add): Use coff_read4, not memcpy.
710 2018-01-24 Ian Lance Taylor <iant@golang.org>
713 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
716 2018-01-19 Tony Reix <tony.reix@atos.net>
718 * xcoff.c (xcoff_incl_compare): New function.
719 (xcoff_incl_search): New function.
720 (xcoff_process_linenos): Use bsearch to find include file.
721 (xcoff_initialize_fileline): Sort include file information.
723 2018-01-16 Ian Lance Taylor <iant@golang.org>
725 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
727 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
728 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
729 (elf_zlib_default_table): Update.
730 (elf_zlib_default_dist_table): New static array.
731 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
733 * ztest.c (struct zlib_test): Add uncompressed_len.
734 (tests): Initialize uncompressed_len field. Add new test case.
735 (test_samples): Use uncompressed_len field.
737 2018-01-03 Jakub Jelinek <jakub@redhat.com>
739 Update copyright years.
741 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
743 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
744 * aclocal.m4: Regenerate.
745 * Makefile.in: Likewise.
746 * configure: Likewise.
748 2017-10-06 Ian Lance Taylor <iant@golang.org>
750 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
751 zlib uncompress function.
753 2017-10-05 Ian Lance Taylor <iant@golang.org>
755 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
756 Read a four byte integer.
757 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
758 boundary before ever calling elf_zlib_fetch.
759 * ztest.c (test_large): Simplify print statements a bit.
761 2017-10-02 Ian Lance Taylor <iant@golang.org>
763 * ztest.c: #include <errno.h>.
764 (TEST_TIMING): Don't define, don't test.
765 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
766 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
767 (ZLIB_CLOCK_GETTIME_ARG): Define.
768 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
769 * Makefile.am: Likewise.
770 * configure, Makefile.in: Rebuild.
772 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
775 * Makefile.am: Append the content of clock_gettime_link to
777 * configure.ac: Test for the case that clock_gettime is in librt.
778 * Makefile.in: Regenerate.
779 * configure: Likewise.
782 * configure.ac: Check for clock_gettime.
783 * config.h.in: Regenerate.
784 * configure: Likewise.
785 * ztest.c (average_time, test_large): Conditionalize test timing
786 on clock_gettime availability.
788 2017-09-29 Tony Reix <tony.reix@atos.net>
790 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
791 (STYP_DWARF, SSUBTYP_DW*): Define.
792 (enum dwarf_section): Define.
793 (struct dwsect_info): Define.
794 (xcoff_add): Look for DWARF sections, pass them to
797 2017-09-28 Ian Lance Taylor <iant@golang.org>
800 * elf.c (__builtin_prefetch): Define if not __GNUC__.
802 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
803 (b_elf_chdr): Define type.
804 (enum debug_section): Add ZDEBUG_xxx values.
805 (debug_section_names): Add names for new sections.
806 (struct debug_section_info): Add compressed field.
807 (elf_zlib_failed, elf_zlib_fetch): New static functions.
808 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
809 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
810 (HUFFMAN_SECONDARY_SHIFT): Define.
811 (ZDEBUG_TABLE_SIZE): Define.
812 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
813 (final_next_secondary): New static variable if
814 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
815 (elf_zlib_inflate_table): New static function.
816 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
817 function to produce fixed Huffman table.
818 (elf_zlib_default_table): New static variable.
819 (elf_zlib_inflate): New static function.
820 (elf_zlib_verify_checksum): Likewise.
821 (elf_zlib_inflate_and_verify): Likewise.
822 (elf_uncompress_zdebug): Likewise.
823 (elf_uncompress_chdr): Likewise.
824 (backtrace_uncompress_zdebug): New extern function.
825 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
826 sections, and uncompress them.
827 * internal.h (backtrace_compress_zdebug): Declare.
829 * configure.ac: Check for -lz and check whether the linker
830 supports --compress-debug-sections.
831 * Makefile.am (ztest_SOURCES): New variable.
832 (ztest_CFLAGS, ztest_LDADD): New variables.
833 (check_PROGRAMS): Add ztest.
834 (ctestg_SOURCES): New variable.
835 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
836 (ctesta_SOURCES): New variable.
837 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
838 (check_PROGRAMS): Add ctestg and ctesta.
839 * configure, config.h.in, Makefile.in: Rebuild.
841 2017-09-22 Ian Lance Taylor <iant@golang.org>
844 * configure.ac: Check for lstat and readlink.
845 * elf.c (lstat, readlink): Provide dummy versions if real versions
847 * configure, config.h.in: Rebuild.
849 2017-09-21 Ian Lance Taylor <iant@google.com>
852 * elf.c (backtrace_initialize): Set pd.exe_filename.
854 2017-09-20 Ian Lance Taylor <iant@golang.org>
855 Denis Khalikov <d.khalikov@partner.samsung.com>
858 Support for external debug info.
859 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
860 (S_ISLNK): Define if not defined.
861 (xstrnlen): Define if strnlen is not available.
862 (b_elf_note): Define type.
863 (NT_GNU_BUILD_ID): Define macro.
864 (elf_crc32, elf_crc32_file): New static functions.
865 (elf_is_symlink, elf_readlink): New static functions.
866 (elf_open_debugfile_by_buildid): New static function.
867 (elf_try_debugfile): New static function.
868 (elf_find_debugfile_by_debuglink): New static function.
869 (elf_open_debugfile_by_debuglink): New static function.
870 (elf_add): Add filename and debuginfo parameters. Adjust all
871 callers. Look for external debug info notes, and try to fetch
872 debug info from external file.
873 (struct phdr_data): Add exe_filename field.
874 (phdr_callback): Pass filename to elf_add.
875 (backtrace_initialize): Add filename parameter.
876 * internal.h (backtrace_initialize): Add filename parameter.
877 * fileline.c (fileline_initialize): Pass filename to
878 backtrace_initialize.
879 * pecoff.c (fileline_initialize): Add unused filename parameter.
880 * unknown.c (fileline_initialize): Likewise.
881 * xcoff.c (fileline_initialize): Likewise.
882 * configure.ac: Check for objcopy --add-gnu-debuglink.
883 * Makefile.am (dtest): New test target.
884 * configure, Makefile.in: Rebuild.
886 2017-09-12 Steve Ellcey <sellcey@cavium.com>
889 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
890 * Makefile.in: Regenerate.
892 2017-09-12 Steve Ellcey <sellcey@cavium.com>
895 * libbacktrace/Makefile.in
896 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
898 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
901 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
903 2017-07-28 Tony Reix <tony.reix@atos.net>
905 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
907 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
909 * fileline.c (fileline_initialize): Print pid_t as long.
911 2017-07-26 Tony Reix <tony.reix@atos.net>
913 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
914 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
915 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
916 * configure, config.h.in: Regenerate.
918 2017-07-21 Tony Reix <tony.reix@atos.net>
920 * filetype.awk: Add AIX XCOFF type detection.
921 * configure.ac: Recognize xcoff format.
922 * Makefile.am (FORMAT_FILES): Add xcoff.c.
923 * fileline.c: Include <unistd.h>.
924 (fileline_initialize): Add case for AIX procfs.
926 * configure, Makefile.in: Rebuild.
928 2017-06-21 Richard Biener <rguenther@suse.de>
930 * configure.ac: Add AC_SYS_LARGEFILE.
931 * config.h.in: Regenerate.
932 * configure: Likewise.
934 2017-06-11 Ian Lance Taylor <iant@golang.org>
936 * elf.c (backtrace_initialize): Always set *fileline_fn.
938 * btest.c: Move support functions into testlib.c. Change calls to
939 check to pass file name.
940 * testlib.c: New file, copied from (part of) btest.c.
941 * testlib.h: New file, declarations for testlib.c.
942 * edtest.c: Use testlib.h and testlib.c.
943 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
944 * Makefile.am (btest_SOURCES): Add testlib.c.
945 (edtest_SOURCES): Likewise.
946 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
947 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
948 * configure, Makefile.in: Rebuild.
950 2017-05-19 Than McIntosh <thanm@google.com>
952 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
953 (read_line_header): Don't allocate dirs if dirs_count == 0.
954 * edtest.c: New file.
955 * edtest2.c: New file.
956 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
957 (check_PROGRAMS): Add edtest.
958 (edtest2_build.c, gen_edtest2_build): New targets.
959 * Makefile.in: Rebuild.
961 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
963 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
964 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
966 2017-01-01 Jakub Jelinek <jakub@redhat.com>
968 Update copyright years.
970 2016-11-15 Matthias Klose <doko@ubuntu.com>
972 * configure: Regenerate.
974 2016-09-11 Carlos Liam <carlos@aarzee.me>
976 * all: Remove meaningless trailing whitespace.
978 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
981 * elf.c (phdr_callback) [__i386__]: Add
982 __attribute__((__force_align_arg_pointer__)).
984 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
986 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
987 avoid possible crash.
988 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
989 missing debug info anymore.
991 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
993 * mmap.c (MAP_FAILED): Define if not defined.
995 2016-01-04 Jakub Jelinek <jakub@redhat.com>
997 Update copyright years.
999 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
1001 * configure.ac: Specify that DJGPP do not have mmap
1002 even when sys/mman.h exists.
1003 * configure: Regenerate
1005 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
1007 PR libgfortran/68115
1008 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
1009 * configure: Regenerate.
1010 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
1013 2015-09-17 Ian Lance Taylor <iant@google.com>
1015 * posix.c (backtrace_open): Cast second argument of open() to int.
1017 2015-09-11 Ian Lance Taylor <iant@google.com>
1019 * Makefile.am (backtrace.lo): Depend on internal.h.
1020 (sort.lo, stest.lo): Add explicit dependencies.
1021 * Makefile.in: Rebuild.
1023 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
1025 * backtrace.c: #include <sys/types.h>.
1027 2015-09-08 Ian Lance Taylor <iant@google.com>
1030 * backtrace.c: #include "internal.h".
1031 (struct backtrace_data): Add can_alloc field.
1032 (unwind): If can_alloc is false, don't try to get file/line
1034 (backtrace_full): Set can_alloc field in bdata.
1035 * alloc.c (backtrace_alloc): Don't call error_callback if it is
1037 * mmap.c (backtrace_alloc): Likewise.
1038 * internal.h: Update comments for backtrace_alloc and
1041 2015-09-08 Ian Lance Taylor <iant@google.com>
1044 * mmap.c (backtrace_alloc): Correct test for mmap failure.
1046 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1048 * configure.ac: For spu-*-* targets, set have_fcntl to no.
1049 * configure: Regenerate.
1051 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1053 * configure.ac: Remove [disable-shared] argument to LT_INIT.
1054 Remove setting PIC_FLAG when building as target library.
1055 * configure: Regenerate.
1057 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
1059 * configure.ac: Only compile with -fPIC if the target
1061 * configure: Regenerate.
1063 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1065 * configure.ac: Set have_mmap to no on spu-*-* targets.
1066 * configure: Regenerate.
1068 2015-08-13 Ian Lance Taylor <iant@google.com>
1070 * dwarf.c (read_function_entry): Add vec_inlined parameter.
1073 2015-06-11 Martin Sebor <msebor@redhat.com>
1076 * dwarf.c (struct line): Add new field idx.
1077 (line_compare): Use it.
1079 (read_line_info): Reset it.
1081 2015-05-29 Tristan Gingold <gingold@adacore.com>
1083 * pecoff.c: New file.
1084 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1085 * Makefile.in: Regenerate.
1086 * filetype.awk: Detect pecoff.
1087 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1089 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1091 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1092 * configure: Regenerate.
1093 * pecoff.c: New file.
1095 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1097 * Makefile.in: Regenerated with automake-1.11.6.
1098 * aclocal.m4: Likewise.
1099 * configure: Likewise.
1101 2015-01-24 Matthias Klose <doko@ubuntu.com>
1103 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1104 * configure: Regenerate.
1106 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1108 Update copyright years.
1110 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1113 * configure: Regenerated.
1115 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1117 * ChangeLog.jit: New.
1119 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1122 * configure: Regenerate.
1124 2014-10-23 Ian Lance Taylor <iant@google.com>
1126 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1127 Fix to return void *.
1129 2014-05-08 Ian Lance Taylor <iant@google.com>
1131 * mmap.c (backtrace_free): If freeing a large aligned block of
1132 memory, call munmap rather than holding onto it.
1133 (backtrace_vector_grow): When growing a vector, double the number
1134 of pages requested. When releasing the old version of a grown
1135 vector, pass the correct size to backtrace_free.
1137 2014-03-07 Ian Lance Taylor <iant@google.com>
1139 * sort.c (backtrace_qsort): Use middle element as pivot.
1141 2014-03-06 Ian Lance Taylor <iant@google.com>
1144 * stest.c: New file.
1145 * internal.h (backtrace_qsort): Declare.
1146 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1147 (read_line_info, read_function_entry): Likewise.
1148 (read_function_info, build_dwarf_data): Likewise.
1149 * elf.c (elf_initialize_syminfo): Likewise.
1150 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1151 (stest_SOURCES, stest_LDADD): Define.
1152 (check_PROGRAMS): Add stest.
1154 2014-02-07 Misty De Meo <misty@brew.sh>
1157 * configure.ac: Use AC_LINK_IFELSE in check for
1159 * configure: Regenerate.
1161 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1163 Update copyright years
1165 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1167 * elf.c (ET_DYN): Undefine and define again.
1168 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1169 return early -1 without closing the descriptor.
1170 (struct phdr_data): Add exe_descriptor.
1171 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1172 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1173 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1175 (backtrace_initialize): Adjust call to elf_add. If it returns
1176 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1178 2013-12-05 Ian Lance Taylor <iant@google.com>
1180 * alloc.c (backtrace_vector_finish): Add error_callback and data
1181 parameters. Call backtrace_vector_release. Return address base.
1182 * mmap.c (backtrace_vector_finish): Add error_callback and data
1183 parameters. Return address base.
1184 * dwarf.c (read_function_info): Get new address base from
1185 backtrace_vector_finish.
1186 * internal.h (backtrace_vector_finish): Update declaration.
1188 2013-11-27 Ian Lance Taylor <iant@google.com>
1190 * dwarf.c (find_address_ranges): New static function, broken out
1191 of build_address_map.
1192 (build_address_map): Call it.
1193 * btest.c (check): Check for missing filename or function, rather
1195 (f3): Check that enough frames were returned.
1197 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1199 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1200 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1202 * btest.c (struct symdata): Add size field.
1203 (callback_three): Add symsize argument. Copy it to the data->size
1205 (f23): Set symdata.size to 0.
1206 (test5): Likewise. If sizeof (int) > 1, lookup address of
1207 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1210 * atomic.c: Include sys/types.h.
1212 2013-11-18 Ian Lance Taylor <iant@google.com>
1214 * configure.ac: Check for support of __atomic extensions.
1215 * internal.h: Declare or #define atomic functions for use in
1217 * atomic.c: New file.
1218 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1219 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1220 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1221 (backtrace_initialize): Likewise.
1222 * fileline.c (fileline_initialize): Likewise.
1223 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1224 * configure, config.h.in, Makefile.in: Rebuild.
1226 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1228 * elf.c (SHN_UNDEF): Define.
1229 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1230 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1231 (elf_add): Adjust caller.
1233 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1235 2013-11-16 Ian Lance Taylor <iant@google.com>
1237 * backtrace.h (backtrace_create_state): Correct comment about
1240 2013-11-15 Ian Lance Taylor <iant@google.com>
1242 * backtrace.h (backtrace_syminfo): Update comment and parameter
1243 name to take any address, not just a PC value.
1244 * elf.c (STT_OBJECT): Define.
1245 (elf_nosyms): Rename parameter pc to addr.
1246 (elf_symbol_search): Rename local variable pc to addr.
1247 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1248 (elf_syminfo): Rename parameter pc to addr.
1249 * btest.c (global): New global variable.
1253 2013-10-17 Ian Lance Taylor <iant@google.com>
1255 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1258 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1260 * configure.ac: Add --enable-host-shared, setting up
1261 pre-existing PIC_FLAG variable within Makefile.am et al.
1262 * configure: Regenerate.
1264 2013-09-20 Alan Modra <amodra@gmail.com>
1266 * configure: Regenerate.
1268 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1270 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1272 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1274 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1275 dl_iterate_phdr callbacks.
1277 2013-03-25 Ian Lance Taylor <iant@google.com>
1279 * alloc.c: #include <sys/types.h>.
1282 2013-01-31 Ian Lance Taylor <iant@google.com>
1284 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1285 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1287 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1290 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1291 attribute was not seen.
1293 2013-01-16 Ian Lance Taylor <iant@google.com>
1295 * dwarf.c (struct unit): Add filename and abs_filename fields.
1296 (build_address_map): Set new fields when reading unit.
1297 (dwarf_lookup_pc): If we don't find an entry in the line table,
1298 just return the main file name.
1300 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1302 Update copyright years.
1304 2013-01-01 Ian Lance Taylor <iant@google.com>
1307 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1308 $(MULTIBUILDTOP)/../../gcc/include.
1309 * Makefile.in: Rebuild.
1311 2013-01-01 Ian Lance Taylor <iant@google.com>
1314 * mmap.c (backtrace_alloc): Don't call sync functions if not
1316 (backtrace_free): Likewise.
1318 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1320 * mmapio.c: Define MAP_FAILED if not defined.
1322 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1325 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1326 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1327 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1329 * Makefile.in: Regenerated.
1330 * configure: Regenerated.
1332 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1335 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1336 * Makefile.in: Regenerated.
1338 2012-11-20 Ian Lance Taylor <iant@google.com>
1340 * dwarf.c (read_attribute): Always clear val.
1342 2012-11-13 Ian Lance Taylor <iant@google.com>
1345 * configure.ac: Only add -Werror if building a target library.
1346 * configure: Rebuild.
1348 2012-11-12 Ian Lance Taylor <iant@google.com>
1349 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1350 Gerald Pfeifer <gerald@pfeifer.com>
1352 * configure.ac: Check for getexecname.
1353 * fileline.c: #include <errno.h>. Define getexecname if not
1355 (fileline_initialize): Try to find the executable in a few
1357 * print.c (error_callback): Only print the filename if it came
1358 from the backtrace state.
1359 * configure, config.h.in: Rebuild.
1361 2012-10-29 Ian Lance Taylor <iant@google.com>
1363 * mmap.c (backtrace_vector_release): Correct last patch: add
1366 2012-10-29 Ian Lance Taylor <iant@google.com>
1368 * mmap.c (backtrace_vector_release): Make sure freed block is
1369 aligned on 8-byte boundary.
1371 2012-10-26 Ian Lance Taylor <iant@google.com>
1374 * posix.c (backtrace_open): Add does_not_exist parameter.
1375 * elf.c (phdr_callback): Do not warn if shared library could not
1377 * fileline.c (fileline_initialize): Update calls to
1379 * internal.h (backtrace_open): Update declaration.
1381 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1384 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1385 * configure: Regenerate.
1387 2012-10-24 Ian Lance Taylor <iant@google.com>
1390 * configure.ac: Check whether -funwind-tables option works.
1391 * configure: Rebuild.
1393 2012-10-11 Ian Lance Taylor <iant@google.com>
1395 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1396 * configure: Rebuild.
1398 2012-10-10 Ian Lance Taylor <iant@google.com>
1400 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1403 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1405 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1407 2012-10-09 Ian Lance Taylor <iant@google.com>
1409 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1410 (backtrace_dwarf_add): Likewise.
1412 2012-10-09 Ian Lance Taylor <iant@google.com>
1414 Add support for tracing through shared libraries.
1415 * configure.ac: Check for link.h and dl_iterate_phdr.
1416 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1417 ELF macros before #defining them.
1418 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1420 (struct elf_syminfo_data): Add next field.
1421 (elf_initialize_syminfo): Initialize next field.
1422 (elf_add_syminfo_data): New static function.
1423 (elf_add): New static function, broken out of
1424 backtrace_initialize. Call backtrace_dwarf_add instead of
1425 backtrace_dwarf_initialize.
1426 (struct phdr_data): Define.
1427 (phdr_callback): New static function.
1428 (backtrace_initialize): Call elf_add.
1429 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1430 (add_unit_addr): Add base_address parameter. Change all callers.
1431 (add_unit_ranges, build_address_map): Likewise.
1432 (add_line): Add ddata parameter. Change all callers.
1433 (read_line_program, add_function_range): Likewise.
1434 (dwarf_lookup_pc): New static function, broken out of
1436 (dwarf_fileline): Call dwarf_lookup_pc.
1437 (build_dwarf_data): New static function.
1438 (backtrace_dwarf_add): New function.
1439 (backtrace_dwarf_initialize): Remove.
1440 * internal.h (backtrace_dwarf_initialize): Don't declare.
1441 (backtrace_dwarf_add): Declare.
1442 * configure, config.h.in: Rebuild.
1444 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1446 * btest.c (f23): Avoid uninitialized variable warning.
1448 2012-10-04 Ian Lance Taylor <iant@google.com>
1450 * dwarf.c: If the system header files do not declare strnlen,
1451 provide our own version.
1453 2012-10-03 Ian Lance Taylor <iant@google.com>
1455 * dwarf.c (read_uleb128): Fix overflow test.
1456 (read_sleb128): Likewise.
1457 (build_address_map): Don't change unit_buf.start.
1459 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1462 * configure.ac (EXTRA_FLAGS): New.
1463 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1464 * configure, Makefile.in: Regenerate.
1466 2012-09-29 Ian Lance Taylor <iant@google.com>
1469 * fileline.c (fileline_initialize): Pass errnum as -1 when
1470 reporting that we could not read executable information after a
1473 2012-09-27 Ian Lance Taylor <iant@google.com>
1476 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1477 * Makefile.am: Add dependencies for all objects.
1478 * configure, aclocal.m4, Makefile.in: Rebuild.
1480 2012-09-27 Ian Lance Taylor <iant@google.com>
1483 * elf.c (backtrace_initialize): Set *fileln_fn, not
1486 2012-09-19 Ian Lance Taylor <iant@google.com>
1488 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1489 as a target library.
1490 * configure: Rebuild.
1492 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1493 Ian Lance Taylor <iant@google.com>
1495 * configure.ac (GCC_HEADER_STDINT): Invoke.
1496 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1497 * btest.c: Don't include <stdint.h>.
1498 * dwarf.c: Likewise.
1499 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1501 2012-09-18 Ian Lance Taylor <iant@google.com>
1504 * Makefile.am (AM_CPPFLAGS): Define.
1505 (AM_CFLAGS): Remove -I options.
1506 * Makefile.in: Rebuild.
1508 2012-09-18 Ian Lance Taylor <iant@google.com>
1510 * posix.c (O_BINARY): Define if not defined.
1511 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1512 HAVE_FCNTL is defined.
1513 * configure.ac: Test for the fcntl function.
1514 * configure, config.h.in: Rebuild.
1516 2012-09-18 Ian Lance Taylor <iant@google.com>
1518 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1520 2012-09-18 Ian Lance Taylor <iant@google.com>
1522 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1524 2012-09-18 Ian Lance Taylor <iant@google.com>
1526 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1527 * mmapio.c: Don't define _GNU_SOURCE.
1528 * configure, config.h.in: Rebuild.
1530 2012-09-18 Ian Lance Taylor <iant@google.com>
1532 * configure.ac: Check whether strnlen is declared.
1533 * dwarf.c: Declare strnlen if not declared.
1534 * configure, config.h.in: Rebuild.
1536 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1538 * fileline.c: Include <stdlib.h>.
1541 2012-09-17 Ian Lance Taylor <iant@google.com>
1544 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1547 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1550 * nounwind.c (backtrace_simple): Add state parameter.
1552 2012-09-17 Ian Lance Taylor <iant@google.com>
1555 * unknown.c (unknown_fileline): Add state parameter, remove
1556 fileline_data parameter, name error_callback parameter.
1557 (backtrace_initialize): Add state parameter.
1559 2012-09-17 Ian Lance Taylor <iant@google.com>
1561 * Initial implementation.
1563 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1565 Copying and distribution of this file, with or without modification,
1566 are permitted in any medium without royalty provided the copyright
1567 notice and this notice are preserved.