1 2020-05-09 Ian Lance Taylor <iant@golang.org>
3 * elf.c (elf_add): Don't free strtab if an error occurs after
4 recording symbol information.
6 2020-05-09 Ian Lance Taylor <iant@golang.org>
10 * filetype.awk: Recognize Mach-O files.
11 * Makefile.am (FORMAT_FILES): Add macho.c.
12 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
13 (%.dSYM): New pattern target.
14 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
15 (test_macho_LDADD): New target.
16 (BUILDTESTS): Add test_macho.
17 (macho.lo): Add dependencies.
18 * configure.ac: Recognize macho file type. Check for
19 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
20 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
21 * Makefile.in: Regenerate.
22 * configure: Regenerate.
23 * config.h.in: Regenerate.
25 2020-05-09 Ian Lance Taylor <iant@golang.org>
27 * read.c (backtrace_get_view): Support short read.
29 2020-05-09 Ian Lance Taylor <iant@golang.org>
31 * elf.c (elf_add): If debug sections are very large or far apart,
32 read them individually rather than as a single view.
34 2020-05-08 Ian Lance Taylor <iant@golang.org>
36 * fileline.c (sysctl_exec_name): New static function.
37 (sysctl_exec_name1): New macro or static function.
38 (sysctl_exec_name2): Likewise.
39 (fileline_initialize): Try sysctl_exec_name[12].
40 * configure.ac: Check for sysctl args to fetch executable name.
41 * configure: Regenerate.
42 * config.h.in: Regenerate.
44 2020-02-15 Ian Lance Taylor <iant@golang.org>
46 * ztest.c (test_large): Update file to current libgo test file.
48 2020-02-03 Ian Lance Taylor <iant@golang.org>
50 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
51 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
52 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
53 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
54 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
55 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
56 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
57 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
58 (stest_alloc_CFLAGS): Likewise.
59 * Makefile.in: Regenerate.
60 * ztest.c (error_callback_compress): Mark vdata unused.
61 (test_large): Add casts to avoid warnings.
63 2020-01-01 Jakub Jelinek <jakub@redhat.com>
65 Update copyright years.
67 2019-12-13 Ian Lance Taylor <iant@golang.org>
70 * dwarf.c (struct attr): Add val field.
71 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
72 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
73 (struct line_header): Add addrsize field.
74 (struct line_header_format): Define.
75 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
77 (read_uint24): New static function.
78 (read_attribute): Add implicit_val parameter. Replace dwarf_str
79 and dwarf_str_size parameters with dwarf_sections parameter. Add
80 support for new DWARF 5 forms. Change all callers.
81 (resolve_string): New static function.
82 (resolve_addr_index): Likewise.
83 (read_abbrevs): Support DW_FORM_implicit_const.
84 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
85 and ranges_is_index fields.
86 (update_pcrange): Support DWARF 5 encodings.
87 (add_high_low_range): New static function, split out of
89 (add_ranges_from_ranges): Likewise.
90 (add_ranges_from_rnglists): New static function.
91 (add_ranges): Just call new helper functions.
92 (find_address_ranges): Use resolve_string for strings, after
93 reading all attributes. Handle new DWARF 5 attributes.
94 (build_address_map): Support DWARF 5 compilation units.
95 (read_v2_paths): New static function, split out of
97 (read_lnct): New static function.
98 (read_line_header_format_entries): Likewise.
99 (read_line_header): Add ddata parameter. Support DWARF 5 line
100 headers. Call new helper functions. Change all callers.
101 (read_line_program): Use addrsize from line program header. Don't
102 special case directory index 0 for DWARF 5.
103 (read_referenced_name): Use resolve_string.
104 (read_function_entry): Handle DWARF 5 encodings. Use
106 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
107 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
108 * elf.c (dwarf_section_names): Add new section names.
109 * pecoff.c (dwarf_section_names): Likewise.
110 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
112 * configure.ac: Define HAVE_DWARF5 automake conditional.
113 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
114 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
115 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
116 (dwarf5_alloc_LDADD): Likewise.
117 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
118 (CLEANFILES, clean-local): Define.
120 2019-12-08 Ian Lance Taylor <iant@golang.org>
122 * dwarf.c (struct pcrange): Define.
123 (update_pcrange, add_ranges): New static functions.
124 (add_unit_addr): Change signature to work with add_ranges. Don't
125 add base_address here.
126 (add_unit_ranges): Remove.
127 (find_address_ranges): Replace str/ranges parameters with
128 dwarf_sections. Use update_pcrange and add_ranges. Change all
130 (add_function_range): Change signature to work with add_ranges.
131 Don't add base_address here.
132 (add_function_ranges): Remove.
133 (read_function_entry): Use update_pcrange and add_ranges.
135 2019-12-04 Ian Lance Taylor <iant@golang.org>
137 * edtest.c (test1): Add noclone attribute.
139 2019-12-04 Ian Lance Taylor <iant@golang.org>
141 * internal.h (enum dwarf_section): Define.
142 (struct dwarf_sections): Define.
143 (backtrace_dwarf_add): Update declaration to replace specific
144 section parameters with dwarf_sections parameter.
145 * dwarf.c (struct dwarf_data): Replace specific section fields
146 with dwarf_sections field.
147 (read_attribute): Use dwarf_sections with altlink.
148 (build_address_map): Replace specific section parameters with
149 dwarf_sections parameter. Change all callers.
150 (read_line_info): Use dwarf_sections with ddata.
151 (read_referenced_name): Likewise.
152 (add_function_ranges): Likewise.
153 (read_function_entry): Likewise.
154 (read_function_info): Likewise.
155 (build_dwarf_data): Replace specific section parameters with
156 dwarf_sections parameter. Change all callers.
157 (backtrace_dwarf_add): Likewise.
158 * elf.c (enum debug_section): Remove.
159 (dwarf_section_names): Remove .zdebug names.
160 (elf_add): Track zsections separately. Build dwarf_sections.
161 * pecoff.c (enum debug_section): Remove.
162 (struct debug_section_info): Remove data field.
163 (coff_add): Build dwarf_sections.
164 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
165 references with DEBUG_xxx references.
166 (xcoff_add): Build dwarf_sections.
168 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
170 * configure: Regenerate.
172 2019-09-26 Ian Lance Taylor <iant@golang.org>
174 PR libbacktrace/91908
175 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
176 __sync_bool_compare_and_swap to void.
177 * xcoff.c (backtrace_initialize): Likewise.
179 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
181 * configure.ac: Remove references to spu.
182 * configure: Regenerate.
184 2019-05-24 Clement Chigot <clement.chigot@atos.net>
186 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
188 * Makefile.in: Regenerate.
190 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
192 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
194 * configure: Regenerate.
196 2019-03-11 Ian Lance Taylor <iant@golang.org>
198 PR libbacktrace/89669
199 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
201 * Makefile.in: Regenerate.
203 2019-02-26 Tom de Vries <tdevries@suse.de>
205 * btest.c (test5): Allow global.* as minimal symbol name for global.
207 2019-02-26 Tom de Vries <tdevries@suse.de>
209 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
210 * Makefile.in: Regenerate.
212 2019-02-12 Tom de Vries <tdevries@suse.de>
214 PR libbacktrace/81983
215 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
217 2019-02-10 Tom de Vries <tdevries@suse.de>
219 * Makefile.am (BUILDTESTS): Add btest_lto.
220 * Makefile.in: Regenerate.
221 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
222 __attribute__((noclone)).
224 2019-02-08 Tom de Vries <tdevries@suse.de>
226 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
227 * print.c (backtrace_print): Same.
228 * simple.c (backtrace_simple): Same.
230 2019-02-08 Tom de Vries <tdevries@suse.de>
232 PR libbacktrace/78063
233 * dwarf.c (build_address_map): Keep all parsed units.
234 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
236 2019-01-31 Tom de Vries <tdevries@suse.de>
238 PR libbacktrace/89136
239 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
240 'debugaltlink_name_len =+ 1'.
242 2019-01-29 Tom de Vries <tdevries@suse.de>
244 * install-debuginfo-for-buildid.sh.in: New script.
245 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
246 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
247 * Makefile.in: Regenerate.
248 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
249 (READELF): Set with AC_CHECK_PROG.
250 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
251 * configure: Regenerate.
252 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
253 (elf_open_debugfile_by_buildid): ... here.
255 2019-01-29 Tom de Vries <tdevries@suse.de>
257 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
259 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
260 (check_PROGRAMS): Add BUILDTESTS.
261 * Makefile.in: Regenerate.
263 2019-01-28 Tom de Vries <tdevries@suse.de>
265 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
266 Use $< to access prerequisite.
267 * Makefile.in: Regenerate.
269 2019-01-25 Nathan Sidwell <nathan@acm.org>
271 * elf.c (elf_add): Pass "" filename to recursive call with
274 2019-01-25 Tom de Vries <tdevries@suse.de>
276 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
278 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
279 * Makefile.in: Regenerate.
281 2019-01-25 Tom de Vries <tdevries@suse.de>
283 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
284 (TESTS): Rename dtest to btest_gnudebuglink.
285 * Makefile.in: Regenerate.
287 2019-01-23 Tom de Vries <tdevries@suse.de>
289 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
290 (units_search, find_unit): Use size_t for offset.
291 (build_address_map): Use size_t for unit_offset.
293 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
295 * allocfail.c (main): Increase portability of printf statement.
297 2019-01-18 Ian Lance Taylor <iant@golang.org>
299 PR libbacktrace/88890
300 * mmapio.c (backtrace_get_view): Change size parameter to
301 uint64_t. Check that value fits in size_t.
302 * read.c (backtrace_get_view): Likewise.
303 * internal.h (backtrace_get_view): Update declaration.
304 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
306 2019-01-17 Tom de Vries <tdevries@suse.de>
308 PR libbacktrace/82857
309 * configure.ac (DWZ): Set with AC_CHECK_PROG.
310 (HAVE_DWZ): Set with AM_CONDITIONAL.
311 * configure: Regenerate.
312 * Makefile.am (TESTS): Add btest_dwz.
313 * Makefile.in: Regenerate.
315 2019-01-17 Tom de Vries <tdevries@suse.de>
317 PR libbacktrace/82857
318 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
319 (read_attribute): Handle DW_FORM_GNU_ref_alt using
320 ATTR_VAL_REF_ALT_INFO.
321 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
323 2019-01-17 Tom de Vries <tdevries@suse.de>
325 * dwarf.c (struct unit): Add low_offset and high_offset fields.
326 (struct unit_vector): New type.
327 (struct dwarf_data): Add units and units_counts fields.
328 (find_unit): New function.
329 (find_address_ranges): Add and handle unit_tag parameter.
330 (build_address_map): Add and handle units_vec parameter.
331 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
334 2019-01-17 Tom de Vries <tdevries@suse.de>
336 PR libbacktrace/82857
337 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
340 2019-01-17 Tom de Vries <tdevries@suse.de>
342 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
343 (read_attribute): Add altlink parameter. Handle missing altlink for
344 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
345 (find_address_ranges, build_address_map, build_dwarf_data): Add and
346 handle altlink parameter.
347 (read_referenced_name, read_function_entry): Add argument to
350 2019-01-17 Tom de Vries <tdevries@suse.de>
352 * dwarf.c (struct dwarf_data): Add altlink field.
353 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
354 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
355 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
356 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
357 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
358 * xcoff.c (xcoff_add): Same.
360 2019-01-17 Tom de Vries <tdevries@suse.de>
362 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
363 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
364 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
365 argument to backtrace_dwarf_add call.
366 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
367 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
368 * xcoff.c (xcoff_add): Same.
370 2019-01-17 Tom de Vries <tdevries@suse.de>
372 * elf.c (elf_add): Add and handle with_buildid_data and
373 with_buildid_size parameters. Handle .gnu_debugaltlink section.
374 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
376 2019-01-16 Tom de Vries <tdevries@suse.de>
378 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
380 (read_referenced_name): ... here, and ...
381 (read_function_entry): ... here.
383 2019-01-16 Tom de Vries <tdevries@suse.de>
385 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
387 (read_function_entry): Same. Don't allow name found via
388 DW_AT_abstract_origin or case DW_AT_specification to override linkage
391 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
395 * backtrace.h: Mechanically replace "can not" with "cannot".
397 2019-01-01 Jakub Jelinek <jakub@redhat.com>
399 Update copyright years.
401 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
403 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
405 * Makefile.in: Regenerate.
407 2018-12-28 Tom de Vries <tdevries@suse.de>
409 * dwarf.c (build_address_map): Reuse unused units.
411 2018-12-28 Tom de Vries <tdevries@suse.de>
413 * dwarf.c (build_address_map): Simplify by removing local variable
416 2018-12-28 Ian Lance Taylor <iant@golang.org>
417 Tom de Vries <tdevries@suse.de>
419 PR libbacktrace/88063
420 * dwarf.c (free_unit_addrs_vector): Remove.
421 (build_address_map): Keep track of allocated units in vector. Free
422 allocated units and corresponding abbrevs upon failure. Remove now
423 redundant call to free_unit_addrs_vector. Free addrs vector upon
424 failure. Free allocated unit vector.
426 2018-12-28 Tom de Vries <tdevries@suse.de>
428 * dwarf.c (build_address_map): Free addrs vector upon failure.
430 2018-12-14 Tom de Vries <tdevries@suse.de>
433 * allocfail.sh: Remove "set -o pipefail".
435 2018-12-12 Tom de Vries <tdevries@suse.de>
437 * Makefile.am (TESTS): Add allocfail.sh.
438 (check_PROGRAMS): Add allocfail.
439 * Makefile.in: Regenerate.
440 * instrumented_alloc.c: New file. Redefine malloc and realloc.
442 * allocfail.c: New file.
443 * allocfail.sh: New file.
445 2018-11-30 Tom de Vries <tdevries@suse.de>
447 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
448 test_xcoff_64, test_pecoff and test_unknown.
449 * Makefile.in: Regenerate.
450 * test_format.c: New file.
452 2018-11-30 Tom de Vries <tdevries@suse.de>
454 * Makefile.am : Add _with_alloc version for each test in
456 * Makefile.in: Regenerate.
458 2018-11-30 Tom de Vries <tdevries@suse.de>
460 * internal.h (backtrace_vector_free): New static inline fuction,
462 * dwarf.c (read_line_info): ... here.
464 2018-11-28 Tom de Vries <tdevries@suse.de>
466 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
469 2018-11-27 Tom de Vries <tdevries@suse.de>
471 * mmap.c (backtrace_vector_release): Same.
472 * unittest.c (test1): Add check.
474 2018-11-27 Tom de Vries <tdevries@suse.de>
476 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
478 * Makefile.am (check_PROGRAMS): Add unittest.
479 * Makefile.in: Regenerate.
480 * unittest.c: New file.
482 2018-11-22 Tom de Vries <tdevries@suse.de>
484 * dwarf.c (read_initial_length): Factor out of ...
485 (build_address_map, read_line_info): ... here.
487 2018-11-21 Tom de Vries <tdevries@suse.de>
489 * dwarf.c (read_string): Factor out of ...
490 (read_attribute, read_line_header, read_line_program): ... here.
492 2018-10-31 Joseph Myers <joseph@codesourcery.com>
495 * Makefile.am: Include multilib.am.
496 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
497 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
499 2018-10-05 Ian Lance Taylor <iant@golang.org>
501 PR libbacktrace/87529
502 * backtrace.h: Document that backtrace_create_state should be
505 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
507 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
508 * Makefile.in: Regenerate.
509 * config.h.in: Likewise.
510 * configure: Likewise.
512 2018-08-01 Tony Reix <tony.reix@atos.net>
514 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
515 (struct xcoff_func, struct xcoff_func_vector): New structs.
516 (xcoff_syminfo): Drop leading dot from symbol name.
517 (xcoff_line_compare, xcoff_line_search): Remove.
518 (xcoff_func_compare, xcoff_func_search): New static functions.
519 (xcoff_lookup_pc): Search function table.
520 (xcoff_add_line, xcoff_process_linenos): Remove.
521 (xcoff_initialize_fileline): Build function table.
523 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
526 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
527 checking up to 36 bytes.
529 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
531 * configure: Regenerated.
533 2018-04-19 Jakub Jelinek <jakub@redhat.com>
535 * configure: Regenerated.
537 2018-04-17 Ian Lance Taylor <iant@golang.org>
539 * backtrace.c: Revert last two changes. Don't call mmap
542 2018-04-17 Ian Lance Taylor <iant@golang.org>
544 * backtrace.c: Include backtrace-supported.h before checking
545 BACKTRACE_USES_MALLOC.
547 2018-04-17 Ian Lance Taylor <iant@golang.org>
549 * backtrace.c (backtrace_full): When testing whether we can
550 allocate memory, call mmap directly, and munmap the memory.
552 2018-04-04 Jakub Jelinek <jakub@redhat.com>
555 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
556 big endian, only use 32-bit loads if endianity macros are predefined
557 and indicate big or little endian.
559 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
562 * configure: Regenerate.
564 2018-02-15 Jakub Jelinek <jakub@redhat.com>
567 * elf.c (SHT_PROGBITS): Undefine and define.
569 2018-02-14 Jakub Jelinek <jakub@redhat.com>
572 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
573 (struct elf_ppc64_opd_data): New type.
574 (elf_initialize_syminfo): Add opd argument, handle symbols
575 pointing into the PowerPC64 ELFv1 .opd section.
576 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
577 to structure with .opd data to elf_initialize_syminfo.
579 2018-01-31 Ian Lance Taylor <iant@golang.org>
581 * elf.c (elf_add): Close descriptor if we use a debugfile.
582 * btest.c (check_open_files): New static function.
583 (main): Call check_open_files.
585 2018-01-25 Ian Lance Taylor <iant@golang.org>
587 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
589 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
591 2018-01-25 Ian Lance Taylor <iant@golang.org>
593 * pecoff.c (coff_add): Only release syms_view if it is valid.
595 2018-01-25 Ian Lance Taylor <iant@golang.org>
597 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
599 2018-01-24 Ian Lance Taylor <iant@golang.org>
601 * pecoff.c (coff_add): Use coff_read4, not memcpy.
603 2018-01-24 Ian Lance Taylor <iant@golang.org>
606 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
609 2018-01-19 Tony Reix <tony.reix@atos.net>
611 * xcoff.c (xcoff_incl_compare): New function.
612 (xcoff_incl_search): New function.
613 (xcoff_process_linenos): Use bsearch to find include file.
614 (xcoff_initialize_fileline): Sort include file information.
616 2018-01-16 Ian Lance Taylor <iant@golang.org>
618 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
620 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
621 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
622 (elf_zlib_default_table): Update.
623 (elf_zlib_default_dist_table): New static array.
624 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
626 * ztest.c (struct zlib_test): Add uncompressed_len.
627 (tests): Initialize uncompressed_len field. Add new test case.
628 (test_samples): Use uncompressed_len field.
630 2018-01-03 Jakub Jelinek <jakub@redhat.com>
632 Update copyright years.
634 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
636 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
637 * aclocal.m4: Regenerate.
638 * Makefile.in: Likewise.
639 * configure: Likewise.
641 2017-10-06 Ian Lance Taylor <iant@golang.org>
643 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
644 zlib uncompress function.
646 2017-10-05 Ian Lance Taylor <iant@golang.org>
648 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
649 Read a four byte integer.
650 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
651 boundary before ever calling elf_zlib_fetch.
652 * ztest.c (test_large): Simplify print statements a bit.
654 2017-10-02 Ian Lance Taylor <iant@golang.org>
656 * ztest.c: #include <errno.h>.
657 (TEST_TIMING): Don't define, don't test.
658 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
659 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
660 (ZLIB_CLOCK_GETTIME_ARG): Define.
661 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
662 * Makefile.am: Likewise.
663 * configure, Makefile.in: Rebuild.
665 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
668 * Makefile.am: Append the content of clock_gettime_link to
670 * configure.ac: Test for the case that clock_gettime is in librt.
671 * Makefile.in: Regenerate.
672 * configure: Likewise.
675 * configure.ac: Check for clock_gettime.
676 * config.h.in: Regenerate.
677 * configure: Likewise.
678 * ztest.c (average_time, test_large): Conditionalize test timing
679 on clock_gettime availability.
681 2017-09-29 Tony Reix <tony.reix@atos.net>
683 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
684 (STYP_DWARF, SSUBTYP_DW*): Define.
685 (enum dwarf_section): Define.
686 (struct dwsect_info): Define.
687 (xcoff_add): Look for DWARF sections, pass them to
690 2017-09-28 Ian Lance Taylor <iant@golang.org>
693 * elf.c (__builtin_prefetch): Define if not __GNUC__.
695 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
696 (b_elf_chdr): Define type.
697 (enum debug_section): Add ZDEBUG_xxx values.
698 (debug_section_names): Add names for new sections.
699 (struct debug_section_info): Add compressed field.
700 (elf_zlib_failed, elf_zlib_fetch): New static functions.
701 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
702 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
703 (HUFFMAN_SECONDARY_SHIFT): Define.
704 (ZDEBUG_TABLE_SIZE): Define.
705 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
706 (final_next_secondary): New static variable if
707 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
708 (elf_zlib_inflate_table): New static function.
709 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
710 function to produce fixed Huffman table.
711 (elf_zlib_default_table): New static variable.
712 (elf_zlib_inflate): New static function.
713 (elf_zlib_verify_checksum): Likewise.
714 (elf_zlib_inflate_and_verify): Likewise.
715 (elf_uncompress_zdebug): Likewise.
716 (elf_uncompress_chdr): Likewise.
717 (backtrace_uncompress_zdebug): New extern function.
718 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
719 sections, and uncompress them.
720 * internal.h (backtrace_compress_zdebug): Declare.
722 * configure.ac: Check for -lz and check whether the linker
723 supports --compress-debug-sections.
724 * Makefile.am (ztest_SOURCES): New variable.
725 (ztest_CFLAGS, ztest_LDADD): New variables.
726 (check_PROGRAMS): Add ztest.
727 (ctestg_SOURCES): New variable.
728 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
729 (ctesta_SOURCES): New variable.
730 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
731 (check_PROGRAMS): Add ctestg and ctesta.
732 * configure, config.h.in, Makefile.in: Rebuild.
734 2017-09-22 Ian Lance Taylor <iant@golang.org>
737 * configure.ac: Check for lstat and readlink.
738 * elf.c (lstat, readlink): Provide dummy versions if real versions
740 * configure, config.h.in: Rebuild.
742 2017-09-21 Ian Lance Taylor <iant@google.com>
745 * elf.c (backtrace_initialize): Set pd.exe_filename.
747 2017-09-20 Ian Lance Taylor <iant@golang.org>
748 Denis Khalikov <d.khalikov@partner.samsung.com>
751 Support for external debug info.
752 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
753 (S_ISLNK): Define if not defined.
754 (xstrnlen): Define if strnlen is not available.
755 (b_elf_note): Define type.
756 (NT_GNU_BUILD_ID): Define macro.
757 (elf_crc32, elf_crc32_file): New static functions.
758 (elf_is_symlink, elf_readlink): New static functions.
759 (elf_open_debugfile_by_buildid): New static function.
760 (elf_try_debugfile): New static function.
761 (elf_find_debugfile_by_debuglink): New static function.
762 (elf_open_debugfile_by_debuglink): New static function.
763 (elf_add): Add filename and debuginfo parameters. Adjust all
764 callers. Look for external debug info notes, and try to fetch
765 debug info from external file.
766 (struct phdr_data): Add exe_filename field.
767 (phdr_callback): Pass filename to elf_add.
768 (backtrace_initialize): Add filename parameter.
769 * internal.h (backtrace_initialize): Add filename parameter.
770 * fileline.c (fileline_initialize): Pass filename to
771 backtrace_initialize.
772 * pecoff.c (fileline_initialize): Add unused filename parameter.
773 * unknown.c (fileline_initialize): Likewise.
774 * xcoff.c (fileline_initialize): Likewise.
775 * configure.ac: Check for objcopy --add-gnu-debuglink.
776 * Makefile.am (dtest): New test target.
777 * configure, Makefile.in: Rebuild.
779 2017-09-12 Steve Ellcey <sellcey@cavium.com>
782 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
783 * Makefile.in: Regenerate.
785 2017-09-12 Steve Ellcey <sellcey@cavium.com>
788 * libbacktrace/Makefile.in
789 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
791 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
794 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
796 2017-07-28 Tony Reix <tony.reix@atos.net>
798 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
800 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
802 * fileline.c (fileline_initialize): Print pid_t as long.
804 2017-07-26 Tony Reix <tony.reix@atos.net>
806 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
807 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
808 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
809 * configure, config.h.in: Regenerate.
811 2017-07-21 Tony Reix <tony.reix@atos.net>
813 * filetype.awk: Add AIX XCOFF type detection.
814 * configure.ac: Recognize xcoff format.
815 * Makefile.am (FORMAT_FILES): Add xcoff.c.
816 * fileline.c: Include <unistd.h>.
817 (fileline_initialize): Add case for AIX procfs.
819 * configure, Makefile.in: Rebuild.
821 2017-06-21 Richard Biener <rguenther@suse.de>
823 * configure.ac: Add AC_SYS_LARGEFILE.
824 * config.h.in: Regenerate.
825 * configure: Likewise.
827 2017-06-11 Ian Lance Taylor <iant@golang.org>
829 * elf.c (backtrace_initialize): Always set *fileline_fn.
831 * btest.c: Move support functions into testlib.c. Change calls to
832 check to pass file name.
833 * testlib.c: New file, copied from (part of) btest.c.
834 * testlib.h: New file, declarations for testlib.c.
835 * edtest.c: Use testlib.h and testlib.c.
836 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
837 * Makefile.am (btest_SOURCES): Add testlib.c.
838 (edtest_SOURCES): Likewise.
839 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
840 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
841 * configure, Makefile.in: Rebuild.
843 2017-05-19 Than McIntosh <thanm@google.com>
845 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
846 (read_line_header): Don't allocate dirs if dirs_count == 0.
847 * edtest.c: New file.
848 * edtest2.c: New file.
849 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
850 (check_PROGRAMS): Add edtest.
851 (edtest2_build.c, gen_edtest2_build): New targets.
852 * Makefile.in: Rebuild.
854 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
856 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
857 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
859 2017-01-01 Jakub Jelinek <jakub@redhat.com>
861 Update copyright years.
863 2016-11-15 Matthias Klose <doko@ubuntu.com>
865 * configure: Regenerate.
867 2016-09-11 Carlos Liam <carlos@aarzee.me>
869 * all: Remove meaningless trailing whitespace.
871 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
874 * elf.c (phdr_callback) [__i386__]: Add
875 __attribute__((__force_align_arg_pointer__)).
877 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
879 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
880 avoid possible crash.
881 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
882 missing debug info anymore.
884 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
886 * mmap.c (MAP_FAILED): Define if not defined.
888 2016-01-04 Jakub Jelinek <jakub@redhat.com>
890 Update copyright years.
892 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
894 * configure.ac: Specify that DJGPP do not have mmap
895 even when sys/mman.h exists.
896 * configure: Regenerate
898 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
901 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
902 * configure: Regenerate.
903 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
906 2015-09-17 Ian Lance Taylor <iant@google.com>
908 * posix.c (backtrace_open): Cast second argument of open() to int.
910 2015-09-11 Ian Lance Taylor <iant@google.com>
912 * Makefile.am (backtrace.lo): Depend on internal.h.
913 (sort.lo, stest.lo): Add explicit dependencies.
914 * Makefile.in: Rebuild.
916 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
918 * backtrace.c: #include <sys/types.h>.
920 2015-09-08 Ian Lance Taylor <iant@google.com>
923 * backtrace.c: #include "internal.h".
924 (struct backtrace_data): Add can_alloc field.
925 (unwind): If can_alloc is false, don't try to get file/line
927 (backtrace_full): Set can_alloc field in bdata.
928 * alloc.c (backtrace_alloc): Don't call error_callback if it is
930 * mmap.c (backtrace_alloc): Likewise.
931 * internal.h: Update comments for backtrace_alloc and
934 2015-09-08 Ian Lance Taylor <iant@google.com>
937 * mmap.c (backtrace_alloc): Correct test for mmap failure.
939 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
941 * configure.ac: For spu-*-* targets, set have_fcntl to no.
942 * configure: Regenerate.
944 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
946 * configure.ac: Remove [disable-shared] argument to LT_INIT.
947 Remove setting PIC_FLAG when building as target library.
948 * configure: Regenerate.
950 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
952 * configure.ac: Only compile with -fPIC if the target
954 * configure: Regenerate.
956 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
958 * configure.ac: Set have_mmap to no on spu-*-* targets.
959 * configure: Regenerate.
961 2015-08-13 Ian Lance Taylor <iant@google.com>
963 * dwarf.c (read_function_entry): Add vec_inlined parameter.
966 2015-06-11 Martin Sebor <msebor@redhat.com>
969 * dwarf.c (struct line): Add new field idx.
970 (line_compare): Use it.
972 (read_line_info): Reset it.
974 2015-05-29 Tristan Gingold <gingold@adacore.com>
976 * pecoff.c: New file.
977 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
978 * Makefile.in: Regenerate.
979 * filetype.awk: Detect pecoff.
980 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
982 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
984 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
985 * configure: Regenerate.
986 * pecoff.c: New file.
988 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
990 * Makefile.in: Regenerated with automake-1.11.6.
991 * aclocal.m4: Likewise.
992 * configure: Likewise.
994 2015-01-24 Matthias Klose <doko@ubuntu.com>
996 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
997 * configure: Regenerate.
999 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1001 Update copyright years.
1003 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1006 * configure: Regenerated.
1008 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1010 * ChangeLog.jit: New.
1012 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1015 * configure: Regenerate.
1017 2014-10-23 Ian Lance Taylor <iant@google.com>
1019 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1020 Fix to return void *.
1022 2014-05-08 Ian Lance Taylor <iant@google.com>
1024 * mmap.c (backtrace_free): If freeing a large aligned block of
1025 memory, call munmap rather than holding onto it.
1026 (backtrace_vector_grow): When growing a vector, double the number
1027 of pages requested. When releasing the old version of a grown
1028 vector, pass the correct size to backtrace_free.
1030 2014-03-07 Ian Lance Taylor <iant@google.com>
1032 * sort.c (backtrace_qsort): Use middle element as pivot.
1034 2014-03-06 Ian Lance Taylor <iant@google.com>
1037 * stest.c: New file.
1038 * internal.h (backtrace_qsort): Declare.
1039 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1040 (read_line_info, read_function_entry): Likewise.
1041 (read_function_info, build_dwarf_data): Likewise.
1042 * elf.c (elf_initialize_syminfo): Likewise.
1043 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1044 (stest_SOURCES, stest_LDADD): Define.
1045 (check_PROGRAMS): Add stest.
1047 2014-02-07 Misty De Meo <misty@brew.sh>
1050 * configure.ac: Use AC_LINK_IFELSE in check for
1052 * configure: Regenerate.
1054 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1056 Update copyright years
1058 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1060 * elf.c (ET_DYN): Undefine and define again.
1061 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1062 return early -1 without closing the descriptor.
1063 (struct phdr_data): Add exe_descriptor.
1064 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1065 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1066 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1068 (backtrace_initialize): Adjust call to elf_add. If it returns
1069 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1071 2013-12-05 Ian Lance Taylor <iant@google.com>
1073 * alloc.c (backtrace_vector_finish): Add error_callback and data
1074 parameters. Call backtrace_vector_release. Return address base.
1075 * mmap.c (backtrace_vector_finish): Add error_callback and data
1076 parameters. Return address base.
1077 * dwarf.c (read_function_info): Get new address base from
1078 backtrace_vector_finish.
1079 * internal.h (backtrace_vector_finish): Update declaration.
1081 2013-11-27 Ian Lance Taylor <iant@google.com>
1083 * dwarf.c (find_address_ranges): New static function, broken out
1084 of build_address_map.
1085 (build_address_map): Call it.
1086 * btest.c (check): Check for missing filename or function, rather
1088 (f3): Check that enough frames were returned.
1090 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1092 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1093 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1095 * btest.c (struct symdata): Add size field.
1096 (callback_three): Add symsize argument. Copy it to the data->size
1098 (f23): Set symdata.size to 0.
1099 (test5): Likewise. If sizeof (int) > 1, lookup address of
1100 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1103 * atomic.c: Include sys/types.h.
1105 2013-11-18 Ian Lance Taylor <iant@google.com>
1107 * configure.ac: Check for support of __atomic extensions.
1108 * internal.h: Declare or #define atomic functions for use in
1110 * atomic.c: New file.
1111 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1112 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1113 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1114 (backtrace_initialize): Likewise.
1115 * fileline.c (fileline_initialize): Likewise.
1116 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1117 * configure, config.h.in, Makefile.in: Rebuild.
1119 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1121 * elf.c (SHN_UNDEF): Define.
1122 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1123 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1124 (elf_add): Adjust caller.
1126 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1128 2013-11-16 Ian Lance Taylor <iant@google.com>
1130 * backtrace.h (backtrace_create_state): Correct comment about
1133 2013-11-15 Ian Lance Taylor <iant@google.com>
1135 * backtrace.h (backtrace_syminfo): Update comment and parameter
1136 name to take any address, not just a PC value.
1137 * elf.c (STT_OBJECT): Define.
1138 (elf_nosyms): Rename parameter pc to addr.
1139 (elf_symbol_search): Rename local variable pc to addr.
1140 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1141 (elf_syminfo): Rename parameter pc to addr.
1142 * btest.c (global): New global variable.
1146 2013-10-17 Ian Lance Taylor <iant@google.com>
1148 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1151 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1153 * configure.ac: Add --enable-host-shared, setting up
1154 pre-existing PIC_FLAG variable within Makefile.am et al.
1155 * configure: Regenerate.
1157 2013-09-20 Alan Modra <amodra@gmail.com>
1159 * configure: Regenerate.
1161 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1163 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1165 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1167 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1168 dl_iterate_phdr callbacks.
1170 2013-03-25 Ian Lance Taylor <iant@google.com>
1172 * alloc.c: #include <sys/types.h>.
1175 2013-01-31 Ian Lance Taylor <iant@google.com>
1177 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1178 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1180 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1183 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1184 attribute was not seen.
1186 2013-01-16 Ian Lance Taylor <iant@google.com>
1188 * dwarf.c (struct unit): Add filename and abs_filename fields.
1189 (build_address_map): Set new fields when reading unit.
1190 (dwarf_lookup_pc): If we don't find an entry in the line table,
1191 just return the main file name.
1193 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1195 Update copyright years.
1197 2013-01-01 Ian Lance Taylor <iant@google.com>
1200 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1201 $(MULTIBUILDTOP)/../../gcc/include.
1202 * Makefile.in: Rebuild.
1204 2013-01-01 Ian Lance Taylor <iant@google.com>
1207 * mmap.c (backtrace_alloc): Don't call sync functions if not
1209 (backtrace_free): Likewise.
1211 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1213 * mmapio.c: Define MAP_FAILED if not defined.
1215 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1218 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1219 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1220 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1222 * Makefile.in: Regenerated.
1223 * configure: Regenerated.
1225 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1228 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1229 * Makefile.in: Regenerated.
1231 2012-11-20 Ian Lance Taylor <iant@google.com>
1233 * dwarf.c (read_attribute): Always clear val.
1235 2012-11-13 Ian Lance Taylor <iant@google.com>
1238 * configure.ac: Only add -Werror if building a target library.
1239 * configure: Rebuild.
1241 2012-11-12 Ian Lance Taylor <iant@google.com>
1242 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1243 Gerald Pfeifer <gerald@pfeifer.com>
1245 * configure.ac: Check for getexecname.
1246 * fileline.c: #include <errno.h>. Define getexecname if not
1248 (fileline_initialize): Try to find the executable in a few
1250 * print.c (error_callback): Only print the filename if it came
1251 from the backtrace state.
1252 * configure, config.h.in: Rebuild.
1254 2012-10-29 Ian Lance Taylor <iant@google.com>
1256 * mmap.c (backtrace_vector_release): Correct last patch: add
1259 2012-10-29 Ian Lance Taylor <iant@google.com>
1261 * mmap.c (backtrace_vector_release): Make sure freed block is
1262 aligned on 8-byte boundary.
1264 2012-10-26 Ian Lance Taylor <iant@google.com>
1267 * posix.c (backtrace_open): Add does_not_exist parameter.
1268 * elf.c (phdr_callback): Do not warn if shared library could not
1270 * fileline.c (fileline_initialize): Update calls to
1272 * internal.h (backtrace_open): Update declaration.
1274 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1277 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1278 * configure: Regenerate.
1280 2012-10-24 Ian Lance Taylor <iant@google.com>
1283 * configure.ac: Check whether -funwind-tables option works.
1284 * configure: Rebuild.
1286 2012-10-11 Ian Lance Taylor <iant@google.com>
1288 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1289 * configure: Rebuild.
1291 2012-10-10 Ian Lance Taylor <iant@google.com>
1293 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1296 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1298 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1300 2012-10-09 Ian Lance Taylor <iant@google.com>
1302 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1303 (backtrace_dwarf_add): Likewise.
1305 2012-10-09 Ian Lance Taylor <iant@google.com>
1307 Add support for tracing through shared libraries.
1308 * configure.ac: Check for link.h and dl_iterate_phdr.
1309 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1310 ELF macros before #defining them.
1311 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1313 (struct elf_syminfo_data): Add next field.
1314 (elf_initialize_syminfo): Initialize next field.
1315 (elf_add_syminfo_data): New static function.
1316 (elf_add): New static function, broken out of
1317 backtrace_initialize. Call backtrace_dwarf_add instead of
1318 backtrace_dwarf_initialize.
1319 (struct phdr_data): Define.
1320 (phdr_callback): New static function.
1321 (backtrace_initialize): Call elf_add.
1322 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1323 (add_unit_addr): Add base_address parameter. Change all callers.
1324 (add_unit_ranges, build_address_map): Likewise.
1325 (add_line): Add ddata parameter. Change all callers.
1326 (read_line_program, add_function_range): Likewise.
1327 (dwarf_lookup_pc): New static function, broken out of
1329 (dwarf_fileline): Call dwarf_lookup_pc.
1330 (build_dwarf_data): New static function.
1331 (backtrace_dwarf_add): New function.
1332 (backtrace_dwarf_initialize): Remove.
1333 * internal.h (backtrace_dwarf_initialize): Don't declare.
1334 (backtrace_dwarf_add): Declare.
1335 * configure, config.h.in: Rebuild.
1337 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1339 * btest.c (f23): Avoid uninitialized variable warning.
1341 2012-10-04 Ian Lance Taylor <iant@google.com>
1343 * dwarf.c: If the system header files do not declare strnlen,
1344 provide our own version.
1346 2012-10-03 Ian Lance Taylor <iant@google.com>
1348 * dwarf.c (read_uleb128): Fix overflow test.
1349 (read_sleb128): Likewise.
1350 (build_address_map): Don't change unit_buf.start.
1352 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1355 * configure.ac (EXTRA_FLAGS): New.
1356 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1357 * configure, Makefile.in: Regenerate.
1359 2012-09-29 Ian Lance Taylor <iant@google.com>
1362 * fileline.c (fileline_initialize): Pass errnum as -1 when
1363 reporting that we could not read executable information after a
1366 2012-09-27 Ian Lance Taylor <iant@google.com>
1369 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1370 * Makefile.am: Add dependencies for all objects.
1371 * configure, aclocal.m4, Makefile.in: Rebuild.
1373 2012-09-27 Ian Lance Taylor <iant@google.com>
1376 * elf.c (backtrace_initialize): Set *fileln_fn, not
1379 2012-09-19 Ian Lance Taylor <iant@google.com>
1381 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1382 as a target library.
1383 * configure: Rebuild.
1385 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1386 Ian Lance Taylor <iant@google.com>
1388 * configure.ac (GCC_HEADER_STDINT): Invoke.
1389 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1390 * btest.c: Don't include <stdint.h>.
1391 * dwarf.c: Likewise.
1392 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1394 2012-09-18 Ian Lance Taylor <iant@google.com>
1397 * Makefile.am (AM_CPPFLAGS): Define.
1398 (AM_CFLAGS): Remove -I options.
1399 * Makefile.in: Rebuild.
1401 2012-09-18 Ian Lance Taylor <iant@google.com>
1403 * posix.c (O_BINARY): Define if not defined.
1404 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1405 HAVE_FCNTL is defined.
1406 * configure.ac: Test for the fcntl function.
1407 * configure, config.h.in: Rebuild.
1409 2012-09-18 Ian Lance Taylor <iant@google.com>
1411 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1413 2012-09-18 Ian Lance Taylor <iant@google.com>
1415 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1417 2012-09-18 Ian Lance Taylor <iant@google.com>
1419 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1420 * mmapio.c: Don't define _GNU_SOURCE.
1421 * configure, config.h.in: Rebuild.
1423 2012-09-18 Ian Lance Taylor <iant@google.com>
1425 * configure.ac: Check whether strnlen is declared.
1426 * dwarf.c: Declare strnlen if not declared.
1427 * configure, config.h.in: Rebuild.
1429 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1431 * fileline.c: Include <stdlib.h>.
1434 2012-09-17 Ian Lance Taylor <iant@google.com>
1437 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1440 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1443 * nounwind.c (backtrace_simple): Add state parameter.
1445 2012-09-17 Ian Lance Taylor <iant@google.com>
1448 * unknown.c (unknown_fileline): Add state parameter, remove
1449 fileline_data parameter, name error_callback parameter.
1450 (backtrace_initialize): Add state parameter.
1452 2012-09-17 Ian Lance Taylor <iant@google.com>
1454 * Initial implementation.
1456 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1458 Copying and distribution of this file, with or without modification,
1459 are permitted in any medium without royalty provided the copyright
1460 notice and this notice are preserved.