1 2020-05-09 Roland McGrath <mcgrathr@google.com>
3 * elf.c (elf_add): Bail early if there are no section headers at all.
5 2020-05-09 Ian Lance Taylor <iant@golang.org>
7 * elf.c (elf_add): Don't free strtab if an error occurs after
8 recording symbol information.
10 2020-05-09 Ian Lance Taylor <iant@golang.org>
14 * filetype.awk: Recognize Mach-O files.
15 * Makefile.am (FORMAT_FILES): Add macho.c.
16 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
17 (%.dSYM): New pattern target.
18 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
19 (test_macho_LDADD): New target.
20 (BUILDTESTS): Add test_macho.
21 (macho.lo): Add dependencies.
22 * configure.ac: Recognize macho file type. Check for
23 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
24 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
25 * Makefile.in: Regenerate.
26 * configure: Regenerate.
27 * config.h.in: Regenerate.
29 2020-05-09 Ian Lance Taylor <iant@golang.org>
31 * read.c (backtrace_get_view): Support short read.
33 2020-05-09 Ian Lance Taylor <iant@golang.org>
35 * elf.c (elf_add): If debug sections are very large or far apart,
36 read them individually rather than as a single view.
38 2020-05-08 Ian Lance Taylor <iant@golang.org>
40 * fileline.c (sysctl_exec_name): New static function.
41 (sysctl_exec_name1): New macro or static function.
42 (sysctl_exec_name2): Likewise.
43 (fileline_initialize): Try sysctl_exec_name[12].
44 * configure.ac: Check for sysctl args to fetch executable name.
45 * configure: Regenerate.
46 * config.h.in: Regenerate.
48 2020-02-15 Ian Lance Taylor <iant@golang.org>
50 * ztest.c (test_large): Update file to current libgo test file.
52 2020-02-03 Ian Lance Taylor <iant@golang.org>
54 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
55 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
56 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
57 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
58 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
59 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
60 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
61 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
62 (stest_alloc_CFLAGS): Likewise.
63 * Makefile.in: Regenerate.
64 * ztest.c (error_callback_compress): Mark vdata unused.
65 (test_large): Add casts to avoid warnings.
67 2020-01-01 Jakub Jelinek <jakub@redhat.com>
69 Update copyright years.
71 2019-12-13 Ian Lance Taylor <iant@golang.org>
74 * dwarf.c (struct attr): Add val field.
75 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
76 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
77 (struct line_header): Add addrsize field.
78 (struct line_header_format): Define.
79 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
81 (read_uint24): New static function.
82 (read_attribute): Add implicit_val parameter. Replace dwarf_str
83 and dwarf_str_size parameters with dwarf_sections parameter. Add
84 support for new DWARF 5 forms. Change all callers.
85 (resolve_string): New static function.
86 (resolve_addr_index): Likewise.
87 (read_abbrevs): Support DW_FORM_implicit_const.
88 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
89 and ranges_is_index fields.
90 (update_pcrange): Support DWARF 5 encodings.
91 (add_high_low_range): New static function, split out of
93 (add_ranges_from_ranges): Likewise.
94 (add_ranges_from_rnglists): New static function.
95 (add_ranges): Just call new helper functions.
96 (find_address_ranges): Use resolve_string for strings, after
97 reading all attributes. Handle new DWARF 5 attributes.
98 (build_address_map): Support DWARF 5 compilation units.
99 (read_v2_paths): New static function, split out of
101 (read_lnct): New static function.
102 (read_line_header_format_entries): Likewise.
103 (read_line_header): Add ddata parameter. Support DWARF 5 line
104 headers. Call new helper functions. Change all callers.
105 (read_line_program): Use addrsize from line program header. Don't
106 special case directory index 0 for DWARF 5.
107 (read_referenced_name): Use resolve_string.
108 (read_function_entry): Handle DWARF 5 encodings. Use
110 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
111 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
112 * elf.c (dwarf_section_names): Add new section names.
113 * pecoff.c (dwarf_section_names): Likewise.
114 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
116 * configure.ac: Define HAVE_DWARF5 automake conditional.
117 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
118 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
119 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
120 (dwarf5_alloc_LDADD): Likewise.
121 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
122 (CLEANFILES, clean-local): Define.
124 2019-12-08 Ian Lance Taylor <iant@golang.org>
126 * dwarf.c (struct pcrange): Define.
127 (update_pcrange, add_ranges): New static functions.
128 (add_unit_addr): Change signature to work with add_ranges. Don't
129 add base_address here.
130 (add_unit_ranges): Remove.
131 (find_address_ranges): Replace str/ranges parameters with
132 dwarf_sections. Use update_pcrange and add_ranges. Change all
134 (add_function_range): Change signature to work with add_ranges.
135 Don't add base_address here.
136 (add_function_ranges): Remove.
137 (read_function_entry): Use update_pcrange and add_ranges.
139 2019-12-04 Ian Lance Taylor <iant@golang.org>
141 * edtest.c (test1): Add noclone attribute.
143 2019-12-04 Ian Lance Taylor <iant@golang.org>
145 * internal.h (enum dwarf_section): Define.
146 (struct dwarf_sections): Define.
147 (backtrace_dwarf_add): Update declaration to replace specific
148 section parameters with dwarf_sections parameter.
149 * dwarf.c (struct dwarf_data): Replace specific section fields
150 with dwarf_sections field.
151 (read_attribute): Use dwarf_sections with altlink.
152 (build_address_map): Replace specific section parameters with
153 dwarf_sections parameter. Change all callers.
154 (read_line_info): Use dwarf_sections with ddata.
155 (read_referenced_name): Likewise.
156 (add_function_ranges): Likewise.
157 (read_function_entry): Likewise.
158 (read_function_info): Likewise.
159 (build_dwarf_data): Replace specific section parameters with
160 dwarf_sections parameter. Change all callers.
161 (backtrace_dwarf_add): Likewise.
162 * elf.c (enum debug_section): Remove.
163 (dwarf_section_names): Remove .zdebug names.
164 (elf_add): Track zsections separately. Build dwarf_sections.
165 * pecoff.c (enum debug_section): Remove.
166 (struct debug_section_info): Remove data field.
167 (coff_add): Build dwarf_sections.
168 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
169 references with DEBUG_xxx references.
170 (xcoff_add): Build dwarf_sections.
172 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
174 * configure: Regenerate.
176 2019-09-26 Ian Lance Taylor <iant@golang.org>
178 PR libbacktrace/91908
179 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
180 __sync_bool_compare_and_swap to void.
181 * xcoff.c (backtrace_initialize): Likewise.
183 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
185 * configure.ac: Remove references to spu.
186 * configure: Regenerate.
188 2019-05-24 Clement Chigot <clement.chigot@atos.net>
190 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
192 * Makefile.in: Regenerate.
194 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
196 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
198 * configure: Regenerate.
200 2019-03-11 Ian Lance Taylor <iant@golang.org>
202 PR libbacktrace/89669
203 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
205 * Makefile.in: Regenerate.
207 2019-02-26 Tom de Vries <tdevries@suse.de>
209 * btest.c (test5): Allow global.* as minimal symbol name for global.
211 2019-02-26 Tom de Vries <tdevries@suse.de>
213 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
214 * Makefile.in: Regenerate.
216 2019-02-12 Tom de Vries <tdevries@suse.de>
218 PR libbacktrace/81983
219 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
221 2019-02-10 Tom de Vries <tdevries@suse.de>
223 * Makefile.am (BUILDTESTS): Add btest_lto.
224 * Makefile.in: Regenerate.
225 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
226 __attribute__((noclone)).
228 2019-02-08 Tom de Vries <tdevries@suse.de>
230 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
231 * print.c (backtrace_print): Same.
232 * simple.c (backtrace_simple): Same.
234 2019-02-08 Tom de Vries <tdevries@suse.de>
236 PR libbacktrace/78063
237 * dwarf.c (build_address_map): Keep all parsed units.
238 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
240 2019-01-31 Tom de Vries <tdevries@suse.de>
242 PR libbacktrace/89136
243 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
244 'debugaltlink_name_len =+ 1'.
246 2019-01-29 Tom de Vries <tdevries@suse.de>
248 * install-debuginfo-for-buildid.sh.in: New script.
249 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
250 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
251 * Makefile.in: Regenerate.
252 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
253 (READELF): Set with AC_CHECK_PROG.
254 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
255 * configure: Regenerate.
256 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
257 (elf_open_debugfile_by_buildid): ... here.
259 2019-01-29 Tom de Vries <tdevries@suse.de>
261 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
263 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
264 (check_PROGRAMS): Add BUILDTESTS.
265 * Makefile.in: Regenerate.
267 2019-01-28 Tom de Vries <tdevries@suse.de>
269 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
270 Use $< to access prerequisite.
271 * Makefile.in: Regenerate.
273 2019-01-25 Nathan Sidwell <nathan@acm.org>
275 * elf.c (elf_add): Pass "" filename to recursive call with
278 2019-01-25 Tom de Vries <tdevries@suse.de>
280 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
282 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
283 * Makefile.in: Regenerate.
285 2019-01-25 Tom de Vries <tdevries@suse.de>
287 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
288 (TESTS): Rename dtest to btest_gnudebuglink.
289 * Makefile.in: Regenerate.
291 2019-01-23 Tom de Vries <tdevries@suse.de>
293 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
294 (units_search, find_unit): Use size_t for offset.
295 (build_address_map): Use size_t for unit_offset.
297 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
299 * allocfail.c (main): Increase portability of printf statement.
301 2019-01-18 Ian Lance Taylor <iant@golang.org>
303 PR libbacktrace/88890
304 * mmapio.c (backtrace_get_view): Change size parameter to
305 uint64_t. Check that value fits in size_t.
306 * read.c (backtrace_get_view): Likewise.
307 * internal.h (backtrace_get_view): Update declaration.
308 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
310 2019-01-17 Tom de Vries <tdevries@suse.de>
312 PR libbacktrace/82857
313 * configure.ac (DWZ): Set with AC_CHECK_PROG.
314 (HAVE_DWZ): Set with AM_CONDITIONAL.
315 * configure: Regenerate.
316 * Makefile.am (TESTS): Add btest_dwz.
317 * Makefile.in: Regenerate.
319 2019-01-17 Tom de Vries <tdevries@suse.de>
321 PR libbacktrace/82857
322 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
323 (read_attribute): Handle DW_FORM_GNU_ref_alt using
324 ATTR_VAL_REF_ALT_INFO.
325 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
327 2019-01-17 Tom de Vries <tdevries@suse.de>
329 * dwarf.c (struct unit): Add low_offset and high_offset fields.
330 (struct unit_vector): New type.
331 (struct dwarf_data): Add units and units_counts fields.
332 (find_unit): New function.
333 (find_address_ranges): Add and handle unit_tag parameter.
334 (build_address_map): Add and handle units_vec parameter.
335 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
338 2019-01-17 Tom de Vries <tdevries@suse.de>
340 PR libbacktrace/82857
341 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
344 2019-01-17 Tom de Vries <tdevries@suse.de>
346 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
347 (read_attribute): Add altlink parameter. Handle missing altlink for
348 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
349 (find_address_ranges, build_address_map, build_dwarf_data): Add and
350 handle altlink parameter.
351 (read_referenced_name, read_function_entry): Add argument to
354 2019-01-17 Tom de Vries <tdevries@suse.de>
356 * dwarf.c (struct dwarf_data): Add altlink field.
357 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
358 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
359 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
360 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
361 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
362 * xcoff.c (xcoff_add): Same.
364 2019-01-17 Tom de Vries <tdevries@suse.de>
366 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
367 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
368 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
369 argument to backtrace_dwarf_add call.
370 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
371 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
372 * xcoff.c (xcoff_add): Same.
374 2019-01-17 Tom de Vries <tdevries@suse.de>
376 * elf.c (elf_add): Add and handle with_buildid_data and
377 with_buildid_size parameters. Handle .gnu_debugaltlink section.
378 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
380 2019-01-16 Tom de Vries <tdevries@suse.de>
382 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
384 (read_referenced_name): ... here, and ...
385 (read_function_entry): ... here.
387 2019-01-16 Tom de Vries <tdevries@suse.de>
389 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
391 (read_function_entry): Same. Don't allow name found via
392 DW_AT_abstract_origin or case DW_AT_specification to override linkage
395 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
399 * backtrace.h: Mechanically replace "can not" with "cannot".
401 2019-01-01 Jakub Jelinek <jakub@redhat.com>
403 Update copyright years.
405 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
407 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
409 * Makefile.in: Regenerate.
411 2018-12-28 Tom de Vries <tdevries@suse.de>
413 * dwarf.c (build_address_map): Reuse unused units.
415 2018-12-28 Tom de Vries <tdevries@suse.de>
417 * dwarf.c (build_address_map): Simplify by removing local variable
420 2018-12-28 Ian Lance Taylor <iant@golang.org>
421 Tom de Vries <tdevries@suse.de>
423 PR libbacktrace/88063
424 * dwarf.c (free_unit_addrs_vector): Remove.
425 (build_address_map): Keep track of allocated units in vector. Free
426 allocated units and corresponding abbrevs upon failure. Remove now
427 redundant call to free_unit_addrs_vector. Free addrs vector upon
428 failure. Free allocated unit vector.
430 2018-12-28 Tom de Vries <tdevries@suse.de>
432 * dwarf.c (build_address_map): Free addrs vector upon failure.
434 2018-12-14 Tom de Vries <tdevries@suse.de>
437 * allocfail.sh: Remove "set -o pipefail".
439 2018-12-12 Tom de Vries <tdevries@suse.de>
441 * Makefile.am (TESTS): Add allocfail.sh.
442 (check_PROGRAMS): Add allocfail.
443 * Makefile.in: Regenerate.
444 * instrumented_alloc.c: New file. Redefine malloc and realloc.
446 * allocfail.c: New file.
447 * allocfail.sh: New file.
449 2018-11-30 Tom de Vries <tdevries@suse.de>
451 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
452 test_xcoff_64, test_pecoff and test_unknown.
453 * Makefile.in: Regenerate.
454 * test_format.c: New file.
456 2018-11-30 Tom de Vries <tdevries@suse.de>
458 * Makefile.am : Add _with_alloc version for each test in
460 * Makefile.in: Regenerate.
462 2018-11-30 Tom de Vries <tdevries@suse.de>
464 * internal.h (backtrace_vector_free): New static inline fuction,
466 * dwarf.c (read_line_info): ... here.
468 2018-11-28 Tom de Vries <tdevries@suse.de>
470 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
473 2018-11-27 Tom de Vries <tdevries@suse.de>
475 * mmap.c (backtrace_vector_release): Same.
476 * unittest.c (test1): Add check.
478 2018-11-27 Tom de Vries <tdevries@suse.de>
480 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
482 * Makefile.am (check_PROGRAMS): Add unittest.
483 * Makefile.in: Regenerate.
484 * unittest.c: New file.
486 2018-11-22 Tom de Vries <tdevries@suse.de>
488 * dwarf.c (read_initial_length): Factor out of ...
489 (build_address_map, read_line_info): ... here.
491 2018-11-21 Tom de Vries <tdevries@suse.de>
493 * dwarf.c (read_string): Factor out of ...
494 (read_attribute, read_line_header, read_line_program): ... here.
496 2018-10-31 Joseph Myers <joseph@codesourcery.com>
499 * Makefile.am: Include multilib.am.
500 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
501 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
503 2018-10-05 Ian Lance Taylor <iant@golang.org>
505 PR libbacktrace/87529
506 * backtrace.h: Document that backtrace_create_state should be
509 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
511 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
512 * Makefile.in: Regenerate.
513 * config.h.in: Likewise.
514 * configure: Likewise.
516 2018-08-01 Tony Reix <tony.reix@atos.net>
518 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
519 (struct xcoff_func, struct xcoff_func_vector): New structs.
520 (xcoff_syminfo): Drop leading dot from symbol name.
521 (xcoff_line_compare, xcoff_line_search): Remove.
522 (xcoff_func_compare, xcoff_func_search): New static functions.
523 (xcoff_lookup_pc): Search function table.
524 (xcoff_add_line, xcoff_process_linenos): Remove.
525 (xcoff_initialize_fileline): Build function table.
527 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
530 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
531 checking up to 36 bytes.
533 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
535 * configure: Regenerated.
537 2018-04-19 Jakub Jelinek <jakub@redhat.com>
539 * configure: Regenerated.
541 2018-04-17 Ian Lance Taylor <iant@golang.org>
543 * backtrace.c: Revert last two changes. Don't call mmap
546 2018-04-17 Ian Lance Taylor <iant@golang.org>
548 * backtrace.c: Include backtrace-supported.h before checking
549 BACKTRACE_USES_MALLOC.
551 2018-04-17 Ian Lance Taylor <iant@golang.org>
553 * backtrace.c (backtrace_full): When testing whether we can
554 allocate memory, call mmap directly, and munmap the memory.
556 2018-04-04 Jakub Jelinek <jakub@redhat.com>
559 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
560 big endian, only use 32-bit loads if endianity macros are predefined
561 and indicate big or little endian.
563 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
566 * configure: Regenerate.
568 2018-02-15 Jakub Jelinek <jakub@redhat.com>
571 * elf.c (SHT_PROGBITS): Undefine and define.
573 2018-02-14 Jakub Jelinek <jakub@redhat.com>
576 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
577 (struct elf_ppc64_opd_data): New type.
578 (elf_initialize_syminfo): Add opd argument, handle symbols
579 pointing into the PowerPC64 ELFv1 .opd section.
580 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
581 to structure with .opd data to elf_initialize_syminfo.
583 2018-01-31 Ian Lance Taylor <iant@golang.org>
585 * elf.c (elf_add): Close descriptor if we use a debugfile.
586 * btest.c (check_open_files): New static function.
587 (main): Call check_open_files.
589 2018-01-25 Ian Lance Taylor <iant@golang.org>
591 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
593 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
595 2018-01-25 Ian Lance Taylor <iant@golang.org>
597 * pecoff.c (coff_add): Only release syms_view if it is valid.
599 2018-01-25 Ian Lance Taylor <iant@golang.org>
601 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
603 2018-01-24 Ian Lance Taylor <iant@golang.org>
605 * pecoff.c (coff_add): Use coff_read4, not memcpy.
607 2018-01-24 Ian Lance Taylor <iant@golang.org>
610 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
613 2018-01-19 Tony Reix <tony.reix@atos.net>
615 * xcoff.c (xcoff_incl_compare): New function.
616 (xcoff_incl_search): New function.
617 (xcoff_process_linenos): Use bsearch to find include file.
618 (xcoff_initialize_fileline): Sort include file information.
620 2018-01-16 Ian Lance Taylor <iant@golang.org>
622 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
624 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
625 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
626 (elf_zlib_default_table): Update.
627 (elf_zlib_default_dist_table): New static array.
628 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
630 * ztest.c (struct zlib_test): Add uncompressed_len.
631 (tests): Initialize uncompressed_len field. Add new test case.
632 (test_samples): Use uncompressed_len field.
634 2018-01-03 Jakub Jelinek <jakub@redhat.com>
636 Update copyright years.
638 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
640 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
641 * aclocal.m4: Regenerate.
642 * Makefile.in: Likewise.
643 * configure: Likewise.
645 2017-10-06 Ian Lance Taylor <iant@golang.org>
647 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
648 zlib uncompress function.
650 2017-10-05 Ian Lance Taylor <iant@golang.org>
652 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
653 Read a four byte integer.
654 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
655 boundary before ever calling elf_zlib_fetch.
656 * ztest.c (test_large): Simplify print statements a bit.
658 2017-10-02 Ian Lance Taylor <iant@golang.org>
660 * ztest.c: #include <errno.h>.
661 (TEST_TIMING): Don't define, don't test.
662 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
663 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
664 (ZLIB_CLOCK_GETTIME_ARG): Define.
665 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
666 * Makefile.am: Likewise.
667 * configure, Makefile.in: Rebuild.
669 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
672 * Makefile.am: Append the content of clock_gettime_link to
674 * configure.ac: Test for the case that clock_gettime is in librt.
675 * Makefile.in: Regenerate.
676 * configure: Likewise.
679 * configure.ac: Check for clock_gettime.
680 * config.h.in: Regenerate.
681 * configure: Likewise.
682 * ztest.c (average_time, test_large): Conditionalize test timing
683 on clock_gettime availability.
685 2017-09-29 Tony Reix <tony.reix@atos.net>
687 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
688 (STYP_DWARF, SSUBTYP_DW*): Define.
689 (enum dwarf_section): Define.
690 (struct dwsect_info): Define.
691 (xcoff_add): Look for DWARF sections, pass them to
694 2017-09-28 Ian Lance Taylor <iant@golang.org>
697 * elf.c (__builtin_prefetch): Define if not __GNUC__.
699 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
700 (b_elf_chdr): Define type.
701 (enum debug_section): Add ZDEBUG_xxx values.
702 (debug_section_names): Add names for new sections.
703 (struct debug_section_info): Add compressed field.
704 (elf_zlib_failed, elf_zlib_fetch): New static functions.
705 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
706 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
707 (HUFFMAN_SECONDARY_SHIFT): Define.
708 (ZDEBUG_TABLE_SIZE): Define.
709 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
710 (final_next_secondary): New static variable if
711 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
712 (elf_zlib_inflate_table): New static function.
713 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
714 function to produce fixed Huffman table.
715 (elf_zlib_default_table): New static variable.
716 (elf_zlib_inflate): New static function.
717 (elf_zlib_verify_checksum): Likewise.
718 (elf_zlib_inflate_and_verify): Likewise.
719 (elf_uncompress_zdebug): Likewise.
720 (elf_uncompress_chdr): Likewise.
721 (backtrace_uncompress_zdebug): New extern function.
722 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
723 sections, and uncompress them.
724 * internal.h (backtrace_compress_zdebug): Declare.
726 * configure.ac: Check for -lz and check whether the linker
727 supports --compress-debug-sections.
728 * Makefile.am (ztest_SOURCES): New variable.
729 (ztest_CFLAGS, ztest_LDADD): New variables.
730 (check_PROGRAMS): Add ztest.
731 (ctestg_SOURCES): New variable.
732 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
733 (ctesta_SOURCES): New variable.
734 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
735 (check_PROGRAMS): Add ctestg and ctesta.
736 * configure, config.h.in, Makefile.in: Rebuild.
738 2017-09-22 Ian Lance Taylor <iant@golang.org>
741 * configure.ac: Check for lstat and readlink.
742 * elf.c (lstat, readlink): Provide dummy versions if real versions
744 * configure, config.h.in: Rebuild.
746 2017-09-21 Ian Lance Taylor <iant@google.com>
749 * elf.c (backtrace_initialize): Set pd.exe_filename.
751 2017-09-20 Ian Lance Taylor <iant@golang.org>
752 Denis Khalikov <d.khalikov@partner.samsung.com>
755 Support for external debug info.
756 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
757 (S_ISLNK): Define if not defined.
758 (xstrnlen): Define if strnlen is not available.
759 (b_elf_note): Define type.
760 (NT_GNU_BUILD_ID): Define macro.
761 (elf_crc32, elf_crc32_file): New static functions.
762 (elf_is_symlink, elf_readlink): New static functions.
763 (elf_open_debugfile_by_buildid): New static function.
764 (elf_try_debugfile): New static function.
765 (elf_find_debugfile_by_debuglink): New static function.
766 (elf_open_debugfile_by_debuglink): New static function.
767 (elf_add): Add filename and debuginfo parameters. Adjust all
768 callers. Look for external debug info notes, and try to fetch
769 debug info from external file.
770 (struct phdr_data): Add exe_filename field.
771 (phdr_callback): Pass filename to elf_add.
772 (backtrace_initialize): Add filename parameter.
773 * internal.h (backtrace_initialize): Add filename parameter.
774 * fileline.c (fileline_initialize): Pass filename to
775 backtrace_initialize.
776 * pecoff.c (fileline_initialize): Add unused filename parameter.
777 * unknown.c (fileline_initialize): Likewise.
778 * xcoff.c (fileline_initialize): Likewise.
779 * configure.ac: Check for objcopy --add-gnu-debuglink.
780 * Makefile.am (dtest): New test target.
781 * configure, Makefile.in: Rebuild.
783 2017-09-12 Steve Ellcey <sellcey@cavium.com>
786 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
787 * Makefile.in: Regenerate.
789 2017-09-12 Steve Ellcey <sellcey@cavium.com>
792 * libbacktrace/Makefile.in
793 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
795 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
798 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
800 2017-07-28 Tony Reix <tony.reix@atos.net>
802 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
804 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
806 * fileline.c (fileline_initialize): Print pid_t as long.
808 2017-07-26 Tony Reix <tony.reix@atos.net>
810 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
811 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
812 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
813 * configure, config.h.in: Regenerate.
815 2017-07-21 Tony Reix <tony.reix@atos.net>
817 * filetype.awk: Add AIX XCOFF type detection.
818 * configure.ac: Recognize xcoff format.
819 * Makefile.am (FORMAT_FILES): Add xcoff.c.
820 * fileline.c: Include <unistd.h>.
821 (fileline_initialize): Add case for AIX procfs.
823 * configure, Makefile.in: Rebuild.
825 2017-06-21 Richard Biener <rguenther@suse.de>
827 * configure.ac: Add AC_SYS_LARGEFILE.
828 * config.h.in: Regenerate.
829 * configure: Likewise.
831 2017-06-11 Ian Lance Taylor <iant@golang.org>
833 * elf.c (backtrace_initialize): Always set *fileline_fn.
835 * btest.c: Move support functions into testlib.c. Change calls to
836 check to pass file name.
837 * testlib.c: New file, copied from (part of) btest.c.
838 * testlib.h: New file, declarations for testlib.c.
839 * edtest.c: Use testlib.h and testlib.c.
840 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
841 * Makefile.am (btest_SOURCES): Add testlib.c.
842 (edtest_SOURCES): Likewise.
843 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
844 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
845 * configure, Makefile.in: Rebuild.
847 2017-05-19 Than McIntosh <thanm@google.com>
849 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
850 (read_line_header): Don't allocate dirs if dirs_count == 0.
851 * edtest.c: New file.
852 * edtest2.c: New file.
853 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
854 (check_PROGRAMS): Add edtest.
855 (edtest2_build.c, gen_edtest2_build): New targets.
856 * Makefile.in: Rebuild.
858 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
860 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
861 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
863 2017-01-01 Jakub Jelinek <jakub@redhat.com>
865 Update copyright years.
867 2016-11-15 Matthias Klose <doko@ubuntu.com>
869 * configure: Regenerate.
871 2016-09-11 Carlos Liam <carlos@aarzee.me>
873 * all: Remove meaningless trailing whitespace.
875 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
878 * elf.c (phdr_callback) [__i386__]: Add
879 __attribute__((__force_align_arg_pointer__)).
881 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
883 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
884 avoid possible crash.
885 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
886 missing debug info anymore.
888 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
890 * mmap.c (MAP_FAILED): Define if not defined.
892 2016-01-04 Jakub Jelinek <jakub@redhat.com>
894 Update copyright years.
896 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
898 * configure.ac: Specify that DJGPP do not have mmap
899 even when sys/mman.h exists.
900 * configure: Regenerate
902 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
905 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
906 * configure: Regenerate.
907 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
910 2015-09-17 Ian Lance Taylor <iant@google.com>
912 * posix.c (backtrace_open): Cast second argument of open() to int.
914 2015-09-11 Ian Lance Taylor <iant@google.com>
916 * Makefile.am (backtrace.lo): Depend on internal.h.
917 (sort.lo, stest.lo): Add explicit dependencies.
918 * Makefile.in: Rebuild.
920 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
922 * backtrace.c: #include <sys/types.h>.
924 2015-09-08 Ian Lance Taylor <iant@google.com>
927 * backtrace.c: #include "internal.h".
928 (struct backtrace_data): Add can_alloc field.
929 (unwind): If can_alloc is false, don't try to get file/line
931 (backtrace_full): Set can_alloc field in bdata.
932 * alloc.c (backtrace_alloc): Don't call error_callback if it is
934 * mmap.c (backtrace_alloc): Likewise.
935 * internal.h: Update comments for backtrace_alloc and
938 2015-09-08 Ian Lance Taylor <iant@google.com>
941 * mmap.c (backtrace_alloc): Correct test for mmap failure.
943 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
945 * configure.ac: For spu-*-* targets, set have_fcntl to no.
946 * configure: Regenerate.
948 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
950 * configure.ac: Remove [disable-shared] argument to LT_INIT.
951 Remove setting PIC_FLAG when building as target library.
952 * configure: Regenerate.
954 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
956 * configure.ac: Only compile with -fPIC if the target
958 * configure: Regenerate.
960 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
962 * configure.ac: Set have_mmap to no on spu-*-* targets.
963 * configure: Regenerate.
965 2015-08-13 Ian Lance Taylor <iant@google.com>
967 * dwarf.c (read_function_entry): Add vec_inlined parameter.
970 2015-06-11 Martin Sebor <msebor@redhat.com>
973 * dwarf.c (struct line): Add new field idx.
974 (line_compare): Use it.
976 (read_line_info): Reset it.
978 2015-05-29 Tristan Gingold <gingold@adacore.com>
980 * pecoff.c: New file.
981 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
982 * Makefile.in: Regenerate.
983 * filetype.awk: Detect pecoff.
984 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
986 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
988 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
989 * configure: Regenerate.
990 * pecoff.c: New file.
992 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
994 * Makefile.in: Regenerated with automake-1.11.6.
995 * aclocal.m4: Likewise.
996 * configure: Likewise.
998 2015-01-24 Matthias Klose <doko@ubuntu.com>
1000 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1001 * configure: Regenerate.
1003 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1005 Update copyright years.
1007 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1010 * configure: Regenerated.
1012 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1014 * ChangeLog.jit: New.
1016 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1019 * configure: Regenerate.
1021 2014-10-23 Ian Lance Taylor <iant@google.com>
1023 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1024 Fix to return void *.
1026 2014-05-08 Ian Lance Taylor <iant@google.com>
1028 * mmap.c (backtrace_free): If freeing a large aligned block of
1029 memory, call munmap rather than holding onto it.
1030 (backtrace_vector_grow): When growing a vector, double the number
1031 of pages requested. When releasing the old version of a grown
1032 vector, pass the correct size to backtrace_free.
1034 2014-03-07 Ian Lance Taylor <iant@google.com>
1036 * sort.c (backtrace_qsort): Use middle element as pivot.
1038 2014-03-06 Ian Lance Taylor <iant@google.com>
1041 * stest.c: New file.
1042 * internal.h (backtrace_qsort): Declare.
1043 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1044 (read_line_info, read_function_entry): Likewise.
1045 (read_function_info, build_dwarf_data): Likewise.
1046 * elf.c (elf_initialize_syminfo): Likewise.
1047 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1048 (stest_SOURCES, stest_LDADD): Define.
1049 (check_PROGRAMS): Add stest.
1051 2014-02-07 Misty De Meo <misty@brew.sh>
1054 * configure.ac: Use AC_LINK_IFELSE in check for
1056 * configure: Regenerate.
1058 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1060 Update copyright years
1062 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1064 * elf.c (ET_DYN): Undefine and define again.
1065 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1066 return early -1 without closing the descriptor.
1067 (struct phdr_data): Add exe_descriptor.
1068 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1069 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1070 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1072 (backtrace_initialize): Adjust call to elf_add. If it returns
1073 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1075 2013-12-05 Ian Lance Taylor <iant@google.com>
1077 * alloc.c (backtrace_vector_finish): Add error_callback and data
1078 parameters. Call backtrace_vector_release. Return address base.
1079 * mmap.c (backtrace_vector_finish): Add error_callback and data
1080 parameters. Return address base.
1081 * dwarf.c (read_function_info): Get new address base from
1082 backtrace_vector_finish.
1083 * internal.h (backtrace_vector_finish): Update declaration.
1085 2013-11-27 Ian Lance Taylor <iant@google.com>
1087 * dwarf.c (find_address_ranges): New static function, broken out
1088 of build_address_map.
1089 (build_address_map): Call it.
1090 * btest.c (check): Check for missing filename or function, rather
1092 (f3): Check that enough frames were returned.
1094 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1096 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1097 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1099 * btest.c (struct symdata): Add size field.
1100 (callback_three): Add symsize argument. Copy it to the data->size
1102 (f23): Set symdata.size to 0.
1103 (test5): Likewise. If sizeof (int) > 1, lookup address of
1104 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1107 * atomic.c: Include sys/types.h.
1109 2013-11-18 Ian Lance Taylor <iant@google.com>
1111 * configure.ac: Check for support of __atomic extensions.
1112 * internal.h: Declare or #define atomic functions for use in
1114 * atomic.c: New file.
1115 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1116 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1117 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1118 (backtrace_initialize): Likewise.
1119 * fileline.c (fileline_initialize): Likewise.
1120 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1121 * configure, config.h.in, Makefile.in: Rebuild.
1123 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1125 * elf.c (SHN_UNDEF): Define.
1126 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1127 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1128 (elf_add): Adjust caller.
1130 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1132 2013-11-16 Ian Lance Taylor <iant@google.com>
1134 * backtrace.h (backtrace_create_state): Correct comment about
1137 2013-11-15 Ian Lance Taylor <iant@google.com>
1139 * backtrace.h (backtrace_syminfo): Update comment and parameter
1140 name to take any address, not just a PC value.
1141 * elf.c (STT_OBJECT): Define.
1142 (elf_nosyms): Rename parameter pc to addr.
1143 (elf_symbol_search): Rename local variable pc to addr.
1144 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1145 (elf_syminfo): Rename parameter pc to addr.
1146 * btest.c (global): New global variable.
1150 2013-10-17 Ian Lance Taylor <iant@google.com>
1152 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1155 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1157 * configure.ac: Add --enable-host-shared, setting up
1158 pre-existing PIC_FLAG variable within Makefile.am et al.
1159 * configure: Regenerate.
1161 2013-09-20 Alan Modra <amodra@gmail.com>
1163 * configure: Regenerate.
1165 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1167 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1169 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1171 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1172 dl_iterate_phdr callbacks.
1174 2013-03-25 Ian Lance Taylor <iant@google.com>
1176 * alloc.c: #include <sys/types.h>.
1179 2013-01-31 Ian Lance Taylor <iant@google.com>
1181 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1182 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1184 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1187 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1188 attribute was not seen.
1190 2013-01-16 Ian Lance Taylor <iant@google.com>
1192 * dwarf.c (struct unit): Add filename and abs_filename fields.
1193 (build_address_map): Set new fields when reading unit.
1194 (dwarf_lookup_pc): If we don't find an entry in the line table,
1195 just return the main file name.
1197 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1199 Update copyright years.
1201 2013-01-01 Ian Lance Taylor <iant@google.com>
1204 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1205 $(MULTIBUILDTOP)/../../gcc/include.
1206 * Makefile.in: Rebuild.
1208 2013-01-01 Ian Lance Taylor <iant@google.com>
1211 * mmap.c (backtrace_alloc): Don't call sync functions if not
1213 (backtrace_free): Likewise.
1215 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1217 * mmapio.c: Define MAP_FAILED if not defined.
1219 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1222 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1223 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1224 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1226 * Makefile.in: Regenerated.
1227 * configure: Regenerated.
1229 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1232 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1233 * Makefile.in: Regenerated.
1235 2012-11-20 Ian Lance Taylor <iant@google.com>
1237 * dwarf.c (read_attribute): Always clear val.
1239 2012-11-13 Ian Lance Taylor <iant@google.com>
1242 * configure.ac: Only add -Werror if building a target library.
1243 * configure: Rebuild.
1245 2012-11-12 Ian Lance Taylor <iant@google.com>
1246 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1247 Gerald Pfeifer <gerald@pfeifer.com>
1249 * configure.ac: Check for getexecname.
1250 * fileline.c: #include <errno.h>. Define getexecname if not
1252 (fileline_initialize): Try to find the executable in a few
1254 * print.c (error_callback): Only print the filename if it came
1255 from the backtrace state.
1256 * configure, config.h.in: Rebuild.
1258 2012-10-29 Ian Lance Taylor <iant@google.com>
1260 * mmap.c (backtrace_vector_release): Correct last patch: add
1263 2012-10-29 Ian Lance Taylor <iant@google.com>
1265 * mmap.c (backtrace_vector_release): Make sure freed block is
1266 aligned on 8-byte boundary.
1268 2012-10-26 Ian Lance Taylor <iant@google.com>
1271 * posix.c (backtrace_open): Add does_not_exist parameter.
1272 * elf.c (phdr_callback): Do not warn if shared library could not
1274 * fileline.c (fileline_initialize): Update calls to
1276 * internal.h (backtrace_open): Update declaration.
1278 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1281 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1282 * configure: Regenerate.
1284 2012-10-24 Ian Lance Taylor <iant@google.com>
1287 * configure.ac: Check whether -funwind-tables option works.
1288 * configure: Rebuild.
1290 2012-10-11 Ian Lance Taylor <iant@google.com>
1292 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1293 * configure: Rebuild.
1295 2012-10-10 Ian Lance Taylor <iant@google.com>
1297 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1300 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1302 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1304 2012-10-09 Ian Lance Taylor <iant@google.com>
1306 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1307 (backtrace_dwarf_add): Likewise.
1309 2012-10-09 Ian Lance Taylor <iant@google.com>
1311 Add support for tracing through shared libraries.
1312 * configure.ac: Check for link.h and dl_iterate_phdr.
1313 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1314 ELF macros before #defining them.
1315 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1317 (struct elf_syminfo_data): Add next field.
1318 (elf_initialize_syminfo): Initialize next field.
1319 (elf_add_syminfo_data): New static function.
1320 (elf_add): New static function, broken out of
1321 backtrace_initialize. Call backtrace_dwarf_add instead of
1322 backtrace_dwarf_initialize.
1323 (struct phdr_data): Define.
1324 (phdr_callback): New static function.
1325 (backtrace_initialize): Call elf_add.
1326 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1327 (add_unit_addr): Add base_address parameter. Change all callers.
1328 (add_unit_ranges, build_address_map): Likewise.
1329 (add_line): Add ddata parameter. Change all callers.
1330 (read_line_program, add_function_range): Likewise.
1331 (dwarf_lookup_pc): New static function, broken out of
1333 (dwarf_fileline): Call dwarf_lookup_pc.
1334 (build_dwarf_data): New static function.
1335 (backtrace_dwarf_add): New function.
1336 (backtrace_dwarf_initialize): Remove.
1337 * internal.h (backtrace_dwarf_initialize): Don't declare.
1338 (backtrace_dwarf_add): Declare.
1339 * configure, config.h.in: Rebuild.
1341 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1343 * btest.c (f23): Avoid uninitialized variable warning.
1345 2012-10-04 Ian Lance Taylor <iant@google.com>
1347 * dwarf.c: If the system header files do not declare strnlen,
1348 provide our own version.
1350 2012-10-03 Ian Lance Taylor <iant@google.com>
1352 * dwarf.c (read_uleb128): Fix overflow test.
1353 (read_sleb128): Likewise.
1354 (build_address_map): Don't change unit_buf.start.
1356 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1359 * configure.ac (EXTRA_FLAGS): New.
1360 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1361 * configure, Makefile.in: Regenerate.
1363 2012-09-29 Ian Lance Taylor <iant@google.com>
1366 * fileline.c (fileline_initialize): Pass errnum as -1 when
1367 reporting that we could not read executable information after a
1370 2012-09-27 Ian Lance Taylor <iant@google.com>
1373 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1374 * Makefile.am: Add dependencies for all objects.
1375 * configure, aclocal.m4, Makefile.in: Rebuild.
1377 2012-09-27 Ian Lance Taylor <iant@google.com>
1380 * elf.c (backtrace_initialize): Set *fileln_fn, not
1383 2012-09-19 Ian Lance Taylor <iant@google.com>
1385 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1386 as a target library.
1387 * configure: Rebuild.
1389 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1390 Ian Lance Taylor <iant@google.com>
1392 * configure.ac (GCC_HEADER_STDINT): Invoke.
1393 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1394 * btest.c: Don't include <stdint.h>.
1395 * dwarf.c: Likewise.
1396 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1398 2012-09-18 Ian Lance Taylor <iant@google.com>
1401 * Makefile.am (AM_CPPFLAGS): Define.
1402 (AM_CFLAGS): Remove -I options.
1403 * Makefile.in: Rebuild.
1405 2012-09-18 Ian Lance Taylor <iant@google.com>
1407 * posix.c (O_BINARY): Define if not defined.
1408 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1409 HAVE_FCNTL is defined.
1410 * configure.ac: Test for the fcntl function.
1411 * configure, config.h.in: Rebuild.
1413 2012-09-18 Ian Lance Taylor <iant@google.com>
1415 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1417 2012-09-18 Ian Lance Taylor <iant@google.com>
1419 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1421 2012-09-18 Ian Lance Taylor <iant@google.com>
1423 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1424 * mmapio.c: Don't define _GNU_SOURCE.
1425 * configure, config.h.in: Rebuild.
1427 2012-09-18 Ian Lance Taylor <iant@google.com>
1429 * configure.ac: Check whether strnlen is declared.
1430 * dwarf.c: Declare strnlen if not declared.
1431 * configure, config.h.in: Rebuild.
1433 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1435 * fileline.c: Include <stdlib.h>.
1438 2012-09-17 Ian Lance Taylor <iant@google.com>
1441 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1444 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1447 * nounwind.c (backtrace_simple): Add state parameter.
1449 2012-09-17 Ian Lance Taylor <iant@google.com>
1452 * unknown.c (unknown_fileline): Add state parameter, remove
1453 fileline_data parameter, name error_callback parameter.
1454 (backtrace_initialize): Add state parameter.
1456 2012-09-17 Ian Lance Taylor <iant@google.com>
1458 * Initial implementation.
1460 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1462 Copying and distribution of this file, with or without modification,
1463 are permitted in any medium without royalty provided the copyright
1464 notice and this notice are preserved.