1 2020-05-11 Ian Lance Taylor <iant@golang.org>
4 * configure.ac: Check for getpagesize declaration.
5 * mmap.c: Declare getpagesize if necessary.
7 * configure: Regenerate.
8 * config.h.in: Regenerate.
9 * Makefile.in: Regenerate.
11 2020-05-09 Roland McGrath <mcgrathr@google.com>
13 * elf.c (elf_add): Bail early if there are no section headers at all.
15 2020-05-09 Ian Lance Taylor <iant@golang.org>
17 * elf.c (elf_add): Don't free strtab if an error occurs after
18 recording symbol information.
20 2020-05-09 Ian Lance Taylor <iant@golang.org>
24 * filetype.awk: Recognize Mach-O files.
25 * Makefile.am (FORMAT_FILES): Add macho.c.
26 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
27 (%.dSYM): New pattern target.
28 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
29 (test_macho_LDADD): New target.
30 (BUILDTESTS): Add test_macho.
31 (macho.lo): Add dependencies.
32 * configure.ac: Recognize macho file type. Check for
33 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
34 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
35 * Makefile.in: Regenerate.
36 * configure: Regenerate.
37 * config.h.in: Regenerate.
39 2020-05-09 Ian Lance Taylor <iant@golang.org>
41 * read.c (backtrace_get_view): Support short read.
43 2020-05-09 Ian Lance Taylor <iant@golang.org>
45 * elf.c (elf_add): If debug sections are very large or far apart,
46 read them individually rather than as a single view.
48 2020-05-08 Ian Lance Taylor <iant@golang.org>
50 * fileline.c (sysctl_exec_name): New static function.
51 (sysctl_exec_name1): New macro or static function.
52 (sysctl_exec_name2): Likewise.
53 (fileline_initialize): Try sysctl_exec_name[12].
54 * configure.ac: Check for sysctl args to fetch executable name.
55 * configure: Regenerate.
56 * config.h.in: Regenerate.
58 2020-02-15 Ian Lance Taylor <iant@golang.org>
60 * ztest.c (test_large): Update file to current libgo test file.
62 2020-02-03 Ian Lance Taylor <iant@golang.org>
64 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
65 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
66 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
67 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
68 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
69 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
70 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
71 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
72 (stest_alloc_CFLAGS): Likewise.
73 * Makefile.in: Regenerate.
74 * ztest.c (error_callback_compress): Mark vdata unused.
75 (test_large): Add casts to avoid warnings.
77 2020-01-01 Jakub Jelinek <jakub@redhat.com>
79 Update copyright years.
81 2019-12-13 Ian Lance Taylor <iant@golang.org>
84 * dwarf.c (struct attr): Add val field.
85 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
86 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
87 (struct line_header): Add addrsize field.
88 (struct line_header_format): Define.
89 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
91 (read_uint24): New static function.
92 (read_attribute): Add implicit_val parameter. Replace dwarf_str
93 and dwarf_str_size parameters with dwarf_sections parameter. Add
94 support for new DWARF 5 forms. Change all callers.
95 (resolve_string): New static function.
96 (resolve_addr_index): Likewise.
97 (read_abbrevs): Support DW_FORM_implicit_const.
98 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
99 and ranges_is_index fields.
100 (update_pcrange): Support DWARF 5 encodings.
101 (add_high_low_range): New static function, split out of
103 (add_ranges_from_ranges): Likewise.
104 (add_ranges_from_rnglists): New static function.
105 (add_ranges): Just call new helper functions.
106 (find_address_ranges): Use resolve_string for strings, after
107 reading all attributes. Handle new DWARF 5 attributes.
108 (build_address_map): Support DWARF 5 compilation units.
109 (read_v2_paths): New static function, split out of
111 (read_lnct): New static function.
112 (read_line_header_format_entries): Likewise.
113 (read_line_header): Add ddata parameter. Support DWARF 5 line
114 headers. Call new helper functions. Change all callers.
115 (read_line_program): Use addrsize from line program header. Don't
116 special case directory index 0 for DWARF 5.
117 (read_referenced_name): Use resolve_string.
118 (read_function_entry): Handle DWARF 5 encodings. Use
120 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
121 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
122 * elf.c (dwarf_section_names): Add new section names.
123 * pecoff.c (dwarf_section_names): Likewise.
124 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
126 * configure.ac: Define HAVE_DWARF5 automake conditional.
127 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
128 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
129 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
130 (dwarf5_alloc_LDADD): Likewise.
131 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
132 (CLEANFILES, clean-local): Define.
134 2019-12-08 Ian Lance Taylor <iant@golang.org>
136 * dwarf.c (struct pcrange): Define.
137 (update_pcrange, add_ranges): New static functions.
138 (add_unit_addr): Change signature to work with add_ranges. Don't
139 add base_address here.
140 (add_unit_ranges): Remove.
141 (find_address_ranges): Replace str/ranges parameters with
142 dwarf_sections. Use update_pcrange and add_ranges. Change all
144 (add_function_range): Change signature to work with add_ranges.
145 Don't add base_address here.
146 (add_function_ranges): Remove.
147 (read_function_entry): Use update_pcrange and add_ranges.
149 2019-12-04 Ian Lance Taylor <iant@golang.org>
151 * edtest.c (test1): Add noclone attribute.
153 2019-12-04 Ian Lance Taylor <iant@golang.org>
155 * internal.h (enum dwarf_section): Define.
156 (struct dwarf_sections): Define.
157 (backtrace_dwarf_add): Update declaration to replace specific
158 section parameters with dwarf_sections parameter.
159 * dwarf.c (struct dwarf_data): Replace specific section fields
160 with dwarf_sections field.
161 (read_attribute): Use dwarf_sections with altlink.
162 (build_address_map): Replace specific section parameters with
163 dwarf_sections parameter. Change all callers.
164 (read_line_info): Use dwarf_sections with ddata.
165 (read_referenced_name): Likewise.
166 (add_function_ranges): Likewise.
167 (read_function_entry): Likewise.
168 (read_function_info): Likewise.
169 (build_dwarf_data): Replace specific section parameters with
170 dwarf_sections parameter. Change all callers.
171 (backtrace_dwarf_add): Likewise.
172 * elf.c (enum debug_section): Remove.
173 (dwarf_section_names): Remove .zdebug names.
174 (elf_add): Track zsections separately. Build dwarf_sections.
175 * pecoff.c (enum debug_section): Remove.
176 (struct debug_section_info): Remove data field.
177 (coff_add): Build dwarf_sections.
178 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
179 references with DEBUG_xxx references.
180 (xcoff_add): Build dwarf_sections.
182 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
184 * configure: Regenerate.
186 2019-09-26 Ian Lance Taylor <iant@golang.org>
188 PR libbacktrace/91908
189 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
190 __sync_bool_compare_and_swap to void.
191 * xcoff.c (backtrace_initialize): Likewise.
193 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
195 * configure.ac: Remove references to spu.
196 * configure: Regenerate.
198 2019-05-24 Clement Chigot <clement.chigot@atos.net>
200 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
202 * Makefile.in: Regenerate.
204 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
206 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
208 * configure: Regenerate.
210 2019-03-11 Ian Lance Taylor <iant@golang.org>
212 PR libbacktrace/89669
213 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
215 * Makefile.in: Regenerate.
217 2019-02-26 Tom de Vries <tdevries@suse.de>
219 * btest.c (test5): Allow global.* as minimal symbol name for global.
221 2019-02-26 Tom de Vries <tdevries@suse.de>
223 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
224 * Makefile.in: Regenerate.
226 2019-02-12 Tom de Vries <tdevries@suse.de>
228 PR libbacktrace/81983
229 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
231 2019-02-10 Tom de Vries <tdevries@suse.de>
233 * Makefile.am (BUILDTESTS): Add btest_lto.
234 * Makefile.in: Regenerate.
235 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
236 __attribute__((noclone)).
238 2019-02-08 Tom de Vries <tdevries@suse.de>
240 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
241 * print.c (backtrace_print): Same.
242 * simple.c (backtrace_simple): Same.
244 2019-02-08 Tom de Vries <tdevries@suse.de>
246 PR libbacktrace/78063
247 * dwarf.c (build_address_map): Keep all parsed units.
248 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
250 2019-01-31 Tom de Vries <tdevries@suse.de>
252 PR libbacktrace/89136
253 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
254 'debugaltlink_name_len =+ 1'.
256 2019-01-29 Tom de Vries <tdevries@suse.de>
258 * install-debuginfo-for-buildid.sh.in: New script.
259 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
260 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
261 * Makefile.in: Regenerate.
262 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
263 (READELF): Set with AC_CHECK_PROG.
264 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
265 * configure: Regenerate.
266 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
267 (elf_open_debugfile_by_buildid): ... here.
269 2019-01-29 Tom de Vries <tdevries@suse.de>
271 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
273 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
274 (check_PROGRAMS): Add BUILDTESTS.
275 * Makefile.in: Regenerate.
277 2019-01-28 Tom de Vries <tdevries@suse.de>
279 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
280 Use $< to access prerequisite.
281 * Makefile.in: Regenerate.
283 2019-01-25 Nathan Sidwell <nathan@acm.org>
285 * elf.c (elf_add): Pass "" filename to recursive call with
288 2019-01-25 Tom de Vries <tdevries@suse.de>
290 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
292 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
293 * Makefile.in: Regenerate.
295 2019-01-25 Tom de Vries <tdevries@suse.de>
297 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
298 (TESTS): Rename dtest to btest_gnudebuglink.
299 * Makefile.in: Regenerate.
301 2019-01-23 Tom de Vries <tdevries@suse.de>
303 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
304 (units_search, find_unit): Use size_t for offset.
305 (build_address_map): Use size_t for unit_offset.
307 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
309 * allocfail.c (main): Increase portability of printf statement.
311 2019-01-18 Ian Lance Taylor <iant@golang.org>
313 PR libbacktrace/88890
314 * mmapio.c (backtrace_get_view): Change size parameter to
315 uint64_t. Check that value fits in size_t.
316 * read.c (backtrace_get_view): Likewise.
317 * internal.h (backtrace_get_view): Update declaration.
318 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
320 2019-01-17 Tom de Vries <tdevries@suse.de>
322 PR libbacktrace/82857
323 * configure.ac (DWZ): Set with AC_CHECK_PROG.
324 (HAVE_DWZ): Set with AM_CONDITIONAL.
325 * configure: Regenerate.
326 * Makefile.am (TESTS): Add btest_dwz.
327 * Makefile.in: Regenerate.
329 2019-01-17 Tom de Vries <tdevries@suse.de>
331 PR libbacktrace/82857
332 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
333 (read_attribute): Handle DW_FORM_GNU_ref_alt using
334 ATTR_VAL_REF_ALT_INFO.
335 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
337 2019-01-17 Tom de Vries <tdevries@suse.de>
339 * dwarf.c (struct unit): Add low_offset and high_offset fields.
340 (struct unit_vector): New type.
341 (struct dwarf_data): Add units and units_counts fields.
342 (find_unit): New function.
343 (find_address_ranges): Add and handle unit_tag parameter.
344 (build_address_map): Add and handle units_vec parameter.
345 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
348 2019-01-17 Tom de Vries <tdevries@suse.de>
350 PR libbacktrace/82857
351 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
354 2019-01-17 Tom de Vries <tdevries@suse.de>
356 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
357 (read_attribute): Add altlink parameter. Handle missing altlink for
358 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
359 (find_address_ranges, build_address_map, build_dwarf_data): Add and
360 handle altlink parameter.
361 (read_referenced_name, read_function_entry): Add argument to
364 2019-01-17 Tom de Vries <tdevries@suse.de>
366 * dwarf.c (struct dwarf_data): Add altlink field.
367 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
368 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
369 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
370 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
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 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
377 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
378 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
379 argument to backtrace_dwarf_add call.
380 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
381 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
382 * xcoff.c (xcoff_add): Same.
384 2019-01-17 Tom de Vries <tdevries@suse.de>
386 * elf.c (elf_add): Add and handle with_buildid_data and
387 with_buildid_size parameters. Handle .gnu_debugaltlink section.
388 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
390 2019-01-16 Tom de Vries <tdevries@suse.de>
392 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
394 (read_referenced_name): ... here, and ...
395 (read_function_entry): ... here.
397 2019-01-16 Tom de Vries <tdevries@suse.de>
399 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
401 (read_function_entry): Same. Don't allow name found via
402 DW_AT_abstract_origin or case DW_AT_specification to override linkage
405 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
409 * backtrace.h: Mechanically replace "can not" with "cannot".
411 2019-01-01 Jakub Jelinek <jakub@redhat.com>
413 Update copyright years.
415 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
417 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
419 * Makefile.in: Regenerate.
421 2018-12-28 Tom de Vries <tdevries@suse.de>
423 * dwarf.c (build_address_map): Reuse unused units.
425 2018-12-28 Tom de Vries <tdevries@suse.de>
427 * dwarf.c (build_address_map): Simplify by removing local variable
430 2018-12-28 Ian Lance Taylor <iant@golang.org>
431 Tom de Vries <tdevries@suse.de>
433 PR libbacktrace/88063
434 * dwarf.c (free_unit_addrs_vector): Remove.
435 (build_address_map): Keep track of allocated units in vector. Free
436 allocated units and corresponding abbrevs upon failure. Remove now
437 redundant call to free_unit_addrs_vector. Free addrs vector upon
438 failure. Free allocated unit vector.
440 2018-12-28 Tom de Vries <tdevries@suse.de>
442 * dwarf.c (build_address_map): Free addrs vector upon failure.
444 2018-12-14 Tom de Vries <tdevries@suse.de>
447 * allocfail.sh: Remove "set -o pipefail".
449 2018-12-12 Tom de Vries <tdevries@suse.de>
451 * Makefile.am (TESTS): Add allocfail.sh.
452 (check_PROGRAMS): Add allocfail.
453 * Makefile.in: Regenerate.
454 * instrumented_alloc.c: New file. Redefine malloc and realloc.
456 * allocfail.c: New file.
457 * allocfail.sh: New file.
459 2018-11-30 Tom de Vries <tdevries@suse.de>
461 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
462 test_xcoff_64, test_pecoff and test_unknown.
463 * Makefile.in: Regenerate.
464 * test_format.c: New file.
466 2018-11-30 Tom de Vries <tdevries@suse.de>
468 * Makefile.am : Add _with_alloc version for each test in
470 * Makefile.in: Regenerate.
472 2018-11-30 Tom de Vries <tdevries@suse.de>
474 * internal.h (backtrace_vector_free): New static inline fuction,
476 * dwarf.c (read_line_info): ... here.
478 2018-11-28 Tom de Vries <tdevries@suse.de>
480 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
483 2018-11-27 Tom de Vries <tdevries@suse.de>
485 * mmap.c (backtrace_vector_release): Same.
486 * unittest.c (test1): Add check.
488 2018-11-27 Tom de Vries <tdevries@suse.de>
490 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
492 * Makefile.am (check_PROGRAMS): Add unittest.
493 * Makefile.in: Regenerate.
494 * unittest.c: New file.
496 2018-11-22 Tom de Vries <tdevries@suse.de>
498 * dwarf.c (read_initial_length): Factor out of ...
499 (build_address_map, read_line_info): ... here.
501 2018-11-21 Tom de Vries <tdevries@suse.de>
503 * dwarf.c (read_string): Factor out of ...
504 (read_attribute, read_line_header, read_line_program): ... here.
506 2018-10-31 Joseph Myers <joseph@codesourcery.com>
509 * Makefile.am: Include multilib.am.
510 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
511 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
513 2018-10-05 Ian Lance Taylor <iant@golang.org>
515 PR libbacktrace/87529
516 * backtrace.h: Document that backtrace_create_state should be
519 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
521 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
522 * Makefile.in: Regenerate.
523 * config.h.in: Likewise.
524 * configure: Likewise.
526 2018-08-01 Tony Reix <tony.reix@atos.net>
528 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
529 (struct xcoff_func, struct xcoff_func_vector): New structs.
530 (xcoff_syminfo): Drop leading dot from symbol name.
531 (xcoff_line_compare, xcoff_line_search): Remove.
532 (xcoff_func_compare, xcoff_func_search): New static functions.
533 (xcoff_lookup_pc): Search function table.
534 (xcoff_add_line, xcoff_process_linenos): Remove.
535 (xcoff_initialize_fileline): Build function table.
537 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
540 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
541 checking up to 36 bytes.
543 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
545 * configure: Regenerated.
547 2018-04-19 Jakub Jelinek <jakub@redhat.com>
549 * configure: Regenerated.
551 2018-04-17 Ian Lance Taylor <iant@golang.org>
553 * backtrace.c: Revert last two changes. Don't call mmap
556 2018-04-17 Ian Lance Taylor <iant@golang.org>
558 * backtrace.c: Include backtrace-supported.h before checking
559 BACKTRACE_USES_MALLOC.
561 2018-04-17 Ian Lance Taylor <iant@golang.org>
563 * backtrace.c (backtrace_full): When testing whether we can
564 allocate memory, call mmap directly, and munmap the memory.
566 2018-04-04 Jakub Jelinek <jakub@redhat.com>
569 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
570 big endian, only use 32-bit loads if endianity macros are predefined
571 and indicate big or little endian.
573 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
576 * configure: Regenerate.
578 2018-02-15 Jakub Jelinek <jakub@redhat.com>
581 * elf.c (SHT_PROGBITS): Undefine and define.
583 2018-02-14 Jakub Jelinek <jakub@redhat.com>
586 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
587 (struct elf_ppc64_opd_data): New type.
588 (elf_initialize_syminfo): Add opd argument, handle symbols
589 pointing into the PowerPC64 ELFv1 .opd section.
590 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
591 to structure with .opd data to elf_initialize_syminfo.
593 2018-01-31 Ian Lance Taylor <iant@golang.org>
595 * elf.c (elf_add): Close descriptor if we use a debugfile.
596 * btest.c (check_open_files): New static function.
597 (main): Call check_open_files.
599 2018-01-25 Ian Lance Taylor <iant@golang.org>
601 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
603 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
605 2018-01-25 Ian Lance Taylor <iant@golang.org>
607 * pecoff.c (coff_add): Only release syms_view if it is valid.
609 2018-01-25 Ian Lance Taylor <iant@golang.org>
611 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
613 2018-01-24 Ian Lance Taylor <iant@golang.org>
615 * pecoff.c (coff_add): Use coff_read4, not memcpy.
617 2018-01-24 Ian Lance Taylor <iant@golang.org>
620 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
623 2018-01-19 Tony Reix <tony.reix@atos.net>
625 * xcoff.c (xcoff_incl_compare): New function.
626 (xcoff_incl_search): New function.
627 (xcoff_process_linenos): Use bsearch to find include file.
628 (xcoff_initialize_fileline): Sort include file information.
630 2018-01-16 Ian Lance Taylor <iant@golang.org>
632 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
634 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
635 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
636 (elf_zlib_default_table): Update.
637 (elf_zlib_default_dist_table): New static array.
638 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
640 * ztest.c (struct zlib_test): Add uncompressed_len.
641 (tests): Initialize uncompressed_len field. Add new test case.
642 (test_samples): Use uncompressed_len field.
644 2018-01-03 Jakub Jelinek <jakub@redhat.com>
646 Update copyright years.
648 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
650 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
651 * aclocal.m4: Regenerate.
652 * Makefile.in: Likewise.
653 * configure: Likewise.
655 2017-10-06 Ian Lance Taylor <iant@golang.org>
657 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
658 zlib uncompress function.
660 2017-10-05 Ian Lance Taylor <iant@golang.org>
662 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
663 Read a four byte integer.
664 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
665 boundary before ever calling elf_zlib_fetch.
666 * ztest.c (test_large): Simplify print statements a bit.
668 2017-10-02 Ian Lance Taylor <iant@golang.org>
670 * ztest.c: #include <errno.h>.
671 (TEST_TIMING): Don't define, don't test.
672 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
673 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
674 (ZLIB_CLOCK_GETTIME_ARG): Define.
675 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
676 * Makefile.am: Likewise.
677 * configure, Makefile.in: Rebuild.
679 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
682 * Makefile.am: Append the content of clock_gettime_link to
684 * configure.ac: Test for the case that clock_gettime is in librt.
685 * Makefile.in: Regenerate.
686 * configure: Likewise.
689 * configure.ac: Check for clock_gettime.
690 * config.h.in: Regenerate.
691 * configure: Likewise.
692 * ztest.c (average_time, test_large): Conditionalize test timing
693 on clock_gettime availability.
695 2017-09-29 Tony Reix <tony.reix@atos.net>
697 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
698 (STYP_DWARF, SSUBTYP_DW*): Define.
699 (enum dwarf_section): Define.
700 (struct dwsect_info): Define.
701 (xcoff_add): Look for DWARF sections, pass them to
704 2017-09-28 Ian Lance Taylor <iant@golang.org>
707 * elf.c (__builtin_prefetch): Define if not __GNUC__.
709 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
710 (b_elf_chdr): Define type.
711 (enum debug_section): Add ZDEBUG_xxx values.
712 (debug_section_names): Add names for new sections.
713 (struct debug_section_info): Add compressed field.
714 (elf_zlib_failed, elf_zlib_fetch): New static functions.
715 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
716 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
717 (HUFFMAN_SECONDARY_SHIFT): Define.
718 (ZDEBUG_TABLE_SIZE): Define.
719 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
720 (final_next_secondary): New static variable if
721 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
722 (elf_zlib_inflate_table): New static function.
723 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
724 function to produce fixed Huffman table.
725 (elf_zlib_default_table): New static variable.
726 (elf_zlib_inflate): New static function.
727 (elf_zlib_verify_checksum): Likewise.
728 (elf_zlib_inflate_and_verify): Likewise.
729 (elf_uncompress_zdebug): Likewise.
730 (elf_uncompress_chdr): Likewise.
731 (backtrace_uncompress_zdebug): New extern function.
732 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
733 sections, and uncompress them.
734 * internal.h (backtrace_compress_zdebug): Declare.
736 * configure.ac: Check for -lz and check whether the linker
737 supports --compress-debug-sections.
738 * Makefile.am (ztest_SOURCES): New variable.
739 (ztest_CFLAGS, ztest_LDADD): New variables.
740 (check_PROGRAMS): Add ztest.
741 (ctestg_SOURCES): New variable.
742 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
743 (ctesta_SOURCES): New variable.
744 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
745 (check_PROGRAMS): Add ctestg and ctesta.
746 * configure, config.h.in, Makefile.in: Rebuild.
748 2017-09-22 Ian Lance Taylor <iant@golang.org>
751 * configure.ac: Check for lstat and readlink.
752 * elf.c (lstat, readlink): Provide dummy versions if real versions
754 * configure, config.h.in: Rebuild.
756 2017-09-21 Ian Lance Taylor <iant@google.com>
759 * elf.c (backtrace_initialize): Set pd.exe_filename.
761 2017-09-20 Ian Lance Taylor <iant@golang.org>
762 Denis Khalikov <d.khalikov@partner.samsung.com>
765 Support for external debug info.
766 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
767 (S_ISLNK): Define if not defined.
768 (xstrnlen): Define if strnlen is not available.
769 (b_elf_note): Define type.
770 (NT_GNU_BUILD_ID): Define macro.
771 (elf_crc32, elf_crc32_file): New static functions.
772 (elf_is_symlink, elf_readlink): New static functions.
773 (elf_open_debugfile_by_buildid): New static function.
774 (elf_try_debugfile): New static function.
775 (elf_find_debugfile_by_debuglink): New static function.
776 (elf_open_debugfile_by_debuglink): New static function.
777 (elf_add): Add filename and debuginfo parameters. Adjust all
778 callers. Look for external debug info notes, and try to fetch
779 debug info from external file.
780 (struct phdr_data): Add exe_filename field.
781 (phdr_callback): Pass filename to elf_add.
782 (backtrace_initialize): Add filename parameter.
783 * internal.h (backtrace_initialize): Add filename parameter.
784 * fileline.c (fileline_initialize): Pass filename to
785 backtrace_initialize.
786 * pecoff.c (fileline_initialize): Add unused filename parameter.
787 * unknown.c (fileline_initialize): Likewise.
788 * xcoff.c (fileline_initialize): Likewise.
789 * configure.ac: Check for objcopy --add-gnu-debuglink.
790 * Makefile.am (dtest): New test target.
791 * configure, Makefile.in: Rebuild.
793 2017-09-12 Steve Ellcey <sellcey@cavium.com>
796 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
797 * Makefile.in: Regenerate.
799 2017-09-12 Steve Ellcey <sellcey@cavium.com>
802 * libbacktrace/Makefile.in
803 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
805 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
808 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
810 2017-07-28 Tony Reix <tony.reix@atos.net>
812 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
814 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
816 * fileline.c (fileline_initialize): Print pid_t as long.
818 2017-07-26 Tony Reix <tony.reix@atos.net>
820 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
821 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
822 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
823 * configure, config.h.in: Regenerate.
825 2017-07-21 Tony Reix <tony.reix@atos.net>
827 * filetype.awk: Add AIX XCOFF type detection.
828 * configure.ac: Recognize xcoff format.
829 * Makefile.am (FORMAT_FILES): Add xcoff.c.
830 * fileline.c: Include <unistd.h>.
831 (fileline_initialize): Add case for AIX procfs.
833 * configure, Makefile.in: Rebuild.
835 2017-06-21 Richard Biener <rguenther@suse.de>
837 * configure.ac: Add AC_SYS_LARGEFILE.
838 * config.h.in: Regenerate.
839 * configure: Likewise.
841 2017-06-11 Ian Lance Taylor <iant@golang.org>
843 * elf.c (backtrace_initialize): Always set *fileline_fn.
845 * btest.c: Move support functions into testlib.c. Change calls to
846 check to pass file name.
847 * testlib.c: New file, copied from (part of) btest.c.
848 * testlib.h: New file, declarations for testlib.c.
849 * edtest.c: Use testlib.h and testlib.c.
850 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
851 * Makefile.am (btest_SOURCES): Add testlib.c.
852 (edtest_SOURCES): Likewise.
853 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
854 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
855 * configure, Makefile.in: Rebuild.
857 2017-05-19 Than McIntosh <thanm@google.com>
859 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
860 (read_line_header): Don't allocate dirs if dirs_count == 0.
861 * edtest.c: New file.
862 * edtest2.c: New file.
863 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
864 (check_PROGRAMS): Add edtest.
865 (edtest2_build.c, gen_edtest2_build): New targets.
866 * Makefile.in: Rebuild.
868 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
870 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
871 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
873 2017-01-01 Jakub Jelinek <jakub@redhat.com>
875 Update copyright years.
877 2016-11-15 Matthias Klose <doko@ubuntu.com>
879 * configure: Regenerate.
881 2016-09-11 Carlos Liam <carlos@aarzee.me>
883 * all: Remove meaningless trailing whitespace.
885 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
888 * elf.c (phdr_callback) [__i386__]: Add
889 __attribute__((__force_align_arg_pointer__)).
891 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
893 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
894 avoid possible crash.
895 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
896 missing debug info anymore.
898 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
900 * mmap.c (MAP_FAILED): Define if not defined.
902 2016-01-04 Jakub Jelinek <jakub@redhat.com>
904 Update copyright years.
906 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
908 * configure.ac: Specify that DJGPP do not have mmap
909 even when sys/mman.h exists.
910 * configure: Regenerate
912 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
915 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
916 * configure: Regenerate.
917 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
920 2015-09-17 Ian Lance Taylor <iant@google.com>
922 * posix.c (backtrace_open): Cast second argument of open() to int.
924 2015-09-11 Ian Lance Taylor <iant@google.com>
926 * Makefile.am (backtrace.lo): Depend on internal.h.
927 (sort.lo, stest.lo): Add explicit dependencies.
928 * Makefile.in: Rebuild.
930 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
932 * backtrace.c: #include <sys/types.h>.
934 2015-09-08 Ian Lance Taylor <iant@google.com>
937 * backtrace.c: #include "internal.h".
938 (struct backtrace_data): Add can_alloc field.
939 (unwind): If can_alloc is false, don't try to get file/line
941 (backtrace_full): Set can_alloc field in bdata.
942 * alloc.c (backtrace_alloc): Don't call error_callback if it is
944 * mmap.c (backtrace_alloc): Likewise.
945 * internal.h: Update comments for backtrace_alloc and
948 2015-09-08 Ian Lance Taylor <iant@google.com>
951 * mmap.c (backtrace_alloc): Correct test for mmap failure.
953 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
955 * configure.ac: For spu-*-* targets, set have_fcntl to no.
956 * configure: Regenerate.
958 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
960 * configure.ac: Remove [disable-shared] argument to LT_INIT.
961 Remove setting PIC_FLAG when building as target library.
962 * configure: Regenerate.
964 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
966 * configure.ac: Only compile with -fPIC if the target
968 * configure: Regenerate.
970 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
972 * configure.ac: Set have_mmap to no on spu-*-* targets.
973 * configure: Regenerate.
975 2015-08-13 Ian Lance Taylor <iant@google.com>
977 * dwarf.c (read_function_entry): Add vec_inlined parameter.
980 2015-06-11 Martin Sebor <msebor@redhat.com>
983 * dwarf.c (struct line): Add new field idx.
984 (line_compare): Use it.
986 (read_line_info): Reset it.
988 2015-05-29 Tristan Gingold <gingold@adacore.com>
990 * pecoff.c: New file.
991 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
992 * Makefile.in: Regenerate.
993 * filetype.awk: Detect pecoff.
994 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
996 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
998 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
999 * configure: Regenerate.
1000 * pecoff.c: New file.
1002 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1004 * Makefile.in: Regenerated with automake-1.11.6.
1005 * aclocal.m4: Likewise.
1006 * configure: Likewise.
1008 2015-01-24 Matthias Klose <doko@ubuntu.com>
1010 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1011 * configure: Regenerate.
1013 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1015 Update copyright years.
1017 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1020 * configure: Regenerated.
1022 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1024 * ChangeLog.jit: New.
1026 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1029 * configure: Regenerate.
1031 2014-10-23 Ian Lance Taylor <iant@google.com>
1033 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1034 Fix to return void *.
1036 2014-05-08 Ian Lance Taylor <iant@google.com>
1038 * mmap.c (backtrace_free): If freeing a large aligned block of
1039 memory, call munmap rather than holding onto it.
1040 (backtrace_vector_grow): When growing a vector, double the number
1041 of pages requested. When releasing the old version of a grown
1042 vector, pass the correct size to backtrace_free.
1044 2014-03-07 Ian Lance Taylor <iant@google.com>
1046 * sort.c (backtrace_qsort): Use middle element as pivot.
1048 2014-03-06 Ian Lance Taylor <iant@google.com>
1051 * stest.c: New file.
1052 * internal.h (backtrace_qsort): Declare.
1053 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1054 (read_line_info, read_function_entry): Likewise.
1055 (read_function_info, build_dwarf_data): Likewise.
1056 * elf.c (elf_initialize_syminfo): Likewise.
1057 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1058 (stest_SOURCES, stest_LDADD): Define.
1059 (check_PROGRAMS): Add stest.
1061 2014-02-07 Misty De Meo <misty@brew.sh>
1064 * configure.ac: Use AC_LINK_IFELSE in check for
1066 * configure: Regenerate.
1068 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1070 Update copyright years
1072 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1074 * elf.c (ET_DYN): Undefine and define again.
1075 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1076 return early -1 without closing the descriptor.
1077 (struct phdr_data): Add exe_descriptor.
1078 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1079 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1080 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1082 (backtrace_initialize): Adjust call to elf_add. If it returns
1083 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1085 2013-12-05 Ian Lance Taylor <iant@google.com>
1087 * alloc.c (backtrace_vector_finish): Add error_callback and data
1088 parameters. Call backtrace_vector_release. Return address base.
1089 * mmap.c (backtrace_vector_finish): Add error_callback and data
1090 parameters. Return address base.
1091 * dwarf.c (read_function_info): Get new address base from
1092 backtrace_vector_finish.
1093 * internal.h (backtrace_vector_finish): Update declaration.
1095 2013-11-27 Ian Lance Taylor <iant@google.com>
1097 * dwarf.c (find_address_ranges): New static function, broken out
1098 of build_address_map.
1099 (build_address_map): Call it.
1100 * btest.c (check): Check for missing filename or function, rather
1102 (f3): Check that enough frames were returned.
1104 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1106 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1107 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1109 * btest.c (struct symdata): Add size field.
1110 (callback_three): Add symsize argument. Copy it to the data->size
1112 (f23): Set symdata.size to 0.
1113 (test5): Likewise. If sizeof (int) > 1, lookup address of
1114 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1117 * atomic.c: Include sys/types.h.
1119 2013-11-18 Ian Lance Taylor <iant@google.com>
1121 * configure.ac: Check for support of __atomic extensions.
1122 * internal.h: Declare or #define atomic functions for use in
1124 * atomic.c: New file.
1125 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1126 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1127 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1128 (backtrace_initialize): Likewise.
1129 * fileline.c (fileline_initialize): Likewise.
1130 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1131 * configure, config.h.in, Makefile.in: Rebuild.
1133 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1135 * elf.c (SHN_UNDEF): Define.
1136 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1137 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1138 (elf_add): Adjust caller.
1140 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1142 2013-11-16 Ian Lance Taylor <iant@google.com>
1144 * backtrace.h (backtrace_create_state): Correct comment about
1147 2013-11-15 Ian Lance Taylor <iant@google.com>
1149 * backtrace.h (backtrace_syminfo): Update comment and parameter
1150 name to take any address, not just a PC value.
1151 * elf.c (STT_OBJECT): Define.
1152 (elf_nosyms): Rename parameter pc to addr.
1153 (elf_symbol_search): Rename local variable pc to addr.
1154 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1155 (elf_syminfo): Rename parameter pc to addr.
1156 * btest.c (global): New global variable.
1160 2013-10-17 Ian Lance Taylor <iant@google.com>
1162 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1165 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1167 * configure.ac: Add --enable-host-shared, setting up
1168 pre-existing PIC_FLAG variable within Makefile.am et al.
1169 * configure: Regenerate.
1171 2013-09-20 Alan Modra <amodra@gmail.com>
1173 * configure: Regenerate.
1175 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1177 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1179 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1181 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1182 dl_iterate_phdr callbacks.
1184 2013-03-25 Ian Lance Taylor <iant@google.com>
1186 * alloc.c: #include <sys/types.h>.
1189 2013-01-31 Ian Lance Taylor <iant@google.com>
1191 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1192 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1194 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1197 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1198 attribute was not seen.
1200 2013-01-16 Ian Lance Taylor <iant@google.com>
1202 * dwarf.c (struct unit): Add filename and abs_filename fields.
1203 (build_address_map): Set new fields when reading unit.
1204 (dwarf_lookup_pc): If we don't find an entry in the line table,
1205 just return the main file name.
1207 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1209 Update copyright years.
1211 2013-01-01 Ian Lance Taylor <iant@google.com>
1214 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1215 $(MULTIBUILDTOP)/../../gcc/include.
1216 * Makefile.in: Rebuild.
1218 2013-01-01 Ian Lance Taylor <iant@google.com>
1221 * mmap.c (backtrace_alloc): Don't call sync functions if not
1223 (backtrace_free): Likewise.
1225 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1227 * mmapio.c: Define MAP_FAILED if not defined.
1229 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1232 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1233 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1234 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1236 * Makefile.in: Regenerated.
1237 * configure: Regenerated.
1239 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1242 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1243 * Makefile.in: Regenerated.
1245 2012-11-20 Ian Lance Taylor <iant@google.com>
1247 * dwarf.c (read_attribute): Always clear val.
1249 2012-11-13 Ian Lance Taylor <iant@google.com>
1252 * configure.ac: Only add -Werror if building a target library.
1253 * configure: Rebuild.
1255 2012-11-12 Ian Lance Taylor <iant@google.com>
1256 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1257 Gerald Pfeifer <gerald@pfeifer.com>
1259 * configure.ac: Check for getexecname.
1260 * fileline.c: #include <errno.h>. Define getexecname if not
1262 (fileline_initialize): Try to find the executable in a few
1264 * print.c (error_callback): Only print the filename if it came
1265 from the backtrace state.
1266 * configure, config.h.in: Rebuild.
1268 2012-10-29 Ian Lance Taylor <iant@google.com>
1270 * mmap.c (backtrace_vector_release): Correct last patch: add
1273 2012-10-29 Ian Lance Taylor <iant@google.com>
1275 * mmap.c (backtrace_vector_release): Make sure freed block is
1276 aligned on 8-byte boundary.
1278 2012-10-26 Ian Lance Taylor <iant@google.com>
1281 * posix.c (backtrace_open): Add does_not_exist parameter.
1282 * elf.c (phdr_callback): Do not warn if shared library could not
1284 * fileline.c (fileline_initialize): Update calls to
1286 * internal.h (backtrace_open): Update declaration.
1288 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1291 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1292 * configure: Regenerate.
1294 2012-10-24 Ian Lance Taylor <iant@google.com>
1297 * configure.ac: Check whether -funwind-tables option works.
1298 * configure: Rebuild.
1300 2012-10-11 Ian Lance Taylor <iant@google.com>
1302 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1303 * configure: Rebuild.
1305 2012-10-10 Ian Lance Taylor <iant@google.com>
1307 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1310 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1312 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1314 2012-10-09 Ian Lance Taylor <iant@google.com>
1316 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1317 (backtrace_dwarf_add): Likewise.
1319 2012-10-09 Ian Lance Taylor <iant@google.com>
1321 Add support for tracing through shared libraries.
1322 * configure.ac: Check for link.h and dl_iterate_phdr.
1323 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1324 ELF macros before #defining them.
1325 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1327 (struct elf_syminfo_data): Add next field.
1328 (elf_initialize_syminfo): Initialize next field.
1329 (elf_add_syminfo_data): New static function.
1330 (elf_add): New static function, broken out of
1331 backtrace_initialize. Call backtrace_dwarf_add instead of
1332 backtrace_dwarf_initialize.
1333 (struct phdr_data): Define.
1334 (phdr_callback): New static function.
1335 (backtrace_initialize): Call elf_add.
1336 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1337 (add_unit_addr): Add base_address parameter. Change all callers.
1338 (add_unit_ranges, build_address_map): Likewise.
1339 (add_line): Add ddata parameter. Change all callers.
1340 (read_line_program, add_function_range): Likewise.
1341 (dwarf_lookup_pc): New static function, broken out of
1343 (dwarf_fileline): Call dwarf_lookup_pc.
1344 (build_dwarf_data): New static function.
1345 (backtrace_dwarf_add): New function.
1346 (backtrace_dwarf_initialize): Remove.
1347 * internal.h (backtrace_dwarf_initialize): Don't declare.
1348 (backtrace_dwarf_add): Declare.
1349 * configure, config.h.in: Rebuild.
1351 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1353 * btest.c (f23): Avoid uninitialized variable warning.
1355 2012-10-04 Ian Lance Taylor <iant@google.com>
1357 * dwarf.c: If the system header files do not declare strnlen,
1358 provide our own version.
1360 2012-10-03 Ian Lance Taylor <iant@google.com>
1362 * dwarf.c (read_uleb128): Fix overflow test.
1363 (read_sleb128): Likewise.
1364 (build_address_map): Don't change unit_buf.start.
1366 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1369 * configure.ac (EXTRA_FLAGS): New.
1370 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1371 * configure, Makefile.in: Regenerate.
1373 2012-09-29 Ian Lance Taylor <iant@google.com>
1376 * fileline.c (fileline_initialize): Pass errnum as -1 when
1377 reporting that we could not read executable information after a
1380 2012-09-27 Ian Lance Taylor <iant@google.com>
1383 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1384 * Makefile.am: Add dependencies for all objects.
1385 * configure, aclocal.m4, Makefile.in: Rebuild.
1387 2012-09-27 Ian Lance Taylor <iant@google.com>
1390 * elf.c (backtrace_initialize): Set *fileln_fn, not
1393 2012-09-19 Ian Lance Taylor <iant@google.com>
1395 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1396 as a target library.
1397 * configure: Rebuild.
1399 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1400 Ian Lance Taylor <iant@google.com>
1402 * configure.ac (GCC_HEADER_STDINT): Invoke.
1403 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1404 * btest.c: Don't include <stdint.h>.
1405 * dwarf.c: Likewise.
1406 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1408 2012-09-18 Ian Lance Taylor <iant@google.com>
1411 * Makefile.am (AM_CPPFLAGS): Define.
1412 (AM_CFLAGS): Remove -I options.
1413 * Makefile.in: Rebuild.
1415 2012-09-18 Ian Lance Taylor <iant@google.com>
1417 * posix.c (O_BINARY): Define if not defined.
1418 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1419 HAVE_FCNTL is defined.
1420 * configure.ac: Test for the fcntl function.
1421 * configure, config.h.in: Rebuild.
1423 2012-09-18 Ian Lance Taylor <iant@google.com>
1425 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1427 2012-09-18 Ian Lance Taylor <iant@google.com>
1429 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1431 2012-09-18 Ian Lance Taylor <iant@google.com>
1433 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1434 * mmapio.c: Don't define _GNU_SOURCE.
1435 * configure, config.h.in: Rebuild.
1437 2012-09-18 Ian Lance Taylor <iant@google.com>
1439 * configure.ac: Check whether strnlen is declared.
1440 * dwarf.c: Declare strnlen if not declared.
1441 * configure, config.h.in: Rebuild.
1443 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1445 * fileline.c: Include <stdlib.h>.
1448 2012-09-17 Ian Lance Taylor <iant@google.com>
1451 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1454 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1457 * nounwind.c (backtrace_simple): Add state parameter.
1459 2012-09-17 Ian Lance Taylor <iant@google.com>
1462 * unknown.c (unknown_fileline): Add state parameter, remove
1463 fileline_data parameter, name error_callback parameter.
1464 (backtrace_initialize): Add state parameter.
1466 2012-09-17 Ian Lance Taylor <iant@google.com>
1468 * Initial implementation.
1470 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1472 Copying and distribution of this file, with or without modification,
1473 are permitted in any medium without royalty provided the copyright
1474 notice and this notice are preserved.