1 2020-05-08 Ian Lance Taylor <iant@golang.org>
3 * fileline.c (sysctl_exec_name): New static function.
4 (sysctl_exec_name1): New macro or static function.
5 (sysctl_exec_name2): Likewise.
6 (fileline_initialize): Try sysctl_exec_name[12].
7 * configure.ac: Check for sysctl args to fetch executable name.
8 * configure: Regenerate.
9 * config.h.in: Regenerate.
11 2020-02-15 Ian Lance Taylor <iant@golang.org>
13 * ztest.c (test_large): Update file to current libgo test file.
15 2020-02-03 Ian Lance Taylor <iant@golang.org>
17 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
18 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
19 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
20 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
21 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
22 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
23 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
24 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
25 (stest_alloc_CFLAGS): Likewise.
26 * Makefile.in: Regenerate.
27 * ztest.c (error_callback_compress): Mark vdata unused.
28 (test_large): Add casts to avoid warnings.
30 2020-01-01 Jakub Jelinek <jakub@redhat.com>
32 Update copyright years.
34 2019-12-13 Ian Lance Taylor <iant@golang.org>
37 * dwarf.c (struct attr): Add val field.
38 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
39 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
40 (struct line_header): Add addrsize field.
41 (struct line_header_format): Define.
42 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
44 (read_uint24): New static function.
45 (read_attribute): Add implicit_val parameter. Replace dwarf_str
46 and dwarf_str_size parameters with dwarf_sections parameter. Add
47 support for new DWARF 5 forms. Change all callers.
48 (resolve_string): New static function.
49 (resolve_addr_index): Likewise.
50 (read_abbrevs): Support DW_FORM_implicit_const.
51 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
52 and ranges_is_index fields.
53 (update_pcrange): Support DWARF 5 encodings.
54 (add_high_low_range): New static function, split out of
56 (add_ranges_from_ranges): Likewise.
57 (add_ranges_from_rnglists): New static function.
58 (add_ranges): Just call new helper functions.
59 (find_address_ranges): Use resolve_string for strings, after
60 reading all attributes. Handle new DWARF 5 attributes.
61 (build_address_map): Support DWARF 5 compilation units.
62 (read_v2_paths): New static function, split out of
64 (read_lnct): New static function.
65 (read_line_header_format_entries): Likewise.
66 (read_line_header): Add ddata parameter. Support DWARF 5 line
67 headers. Call new helper functions. Change all callers.
68 (read_line_program): Use addrsize from line program header. Don't
69 special case directory index 0 for DWARF 5.
70 (read_referenced_name): Use resolve_string.
71 (read_function_entry): Handle DWARF 5 encodings. Use
73 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
74 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
75 * elf.c (dwarf_section_names): Add new section names.
76 * pecoff.c (dwarf_section_names): Likewise.
77 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
79 * configure.ac: Define HAVE_DWARF5 automake conditional.
80 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
81 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
82 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
83 (dwarf5_alloc_LDADD): Likewise.
84 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
85 (CLEANFILES, clean-local): Define.
87 2019-12-08 Ian Lance Taylor <iant@golang.org>
89 * dwarf.c (struct pcrange): Define.
90 (update_pcrange, add_ranges): New static functions.
91 (add_unit_addr): Change signature to work with add_ranges. Don't
92 add base_address here.
93 (add_unit_ranges): Remove.
94 (find_address_ranges): Replace str/ranges parameters with
95 dwarf_sections. Use update_pcrange and add_ranges. Change all
97 (add_function_range): Change signature to work with add_ranges.
98 Don't add base_address here.
99 (add_function_ranges): Remove.
100 (read_function_entry): Use update_pcrange and add_ranges.
102 2019-12-04 Ian Lance Taylor <iant@golang.org>
104 * edtest.c (test1): Add noclone attribute.
106 2019-12-04 Ian Lance Taylor <iant@golang.org>
108 * internal.h (enum dwarf_section): Define.
109 (struct dwarf_sections): Define.
110 (backtrace_dwarf_add): Update declaration to replace specific
111 section parameters with dwarf_sections parameter.
112 * dwarf.c (struct dwarf_data): Replace specific section fields
113 with dwarf_sections field.
114 (read_attribute): Use dwarf_sections with altlink.
115 (build_address_map): Replace specific section parameters with
116 dwarf_sections parameter. Change all callers.
117 (read_line_info): Use dwarf_sections with ddata.
118 (read_referenced_name): Likewise.
119 (add_function_ranges): Likewise.
120 (read_function_entry): Likewise.
121 (read_function_info): Likewise.
122 (build_dwarf_data): Replace specific section parameters with
123 dwarf_sections parameter. Change all callers.
124 (backtrace_dwarf_add): Likewise.
125 * elf.c (enum debug_section): Remove.
126 (dwarf_section_names): Remove .zdebug names.
127 (elf_add): Track zsections separately. Build dwarf_sections.
128 * pecoff.c (enum debug_section): Remove.
129 (struct debug_section_info): Remove data field.
130 (coff_add): Build dwarf_sections.
131 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
132 references with DEBUG_xxx references.
133 (xcoff_add): Build dwarf_sections.
135 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
137 * configure: Regenerate.
139 2019-09-26 Ian Lance Taylor <iant@golang.org>
141 PR libbacktrace/91908
142 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
143 __sync_bool_compare_and_swap to void.
144 * xcoff.c (backtrace_initialize): Likewise.
146 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
148 * configure.ac: Remove references to spu.
149 * configure: Regenerate.
151 2019-05-24 Clement Chigot <clement.chigot@atos.net>
153 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
155 * Makefile.in: Regenerate.
157 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
159 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
161 * configure: Regenerate.
163 2019-03-11 Ian Lance Taylor <iant@golang.org>
165 PR libbacktrace/89669
166 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
168 * Makefile.in: Regenerate.
170 2019-02-26 Tom de Vries <tdevries@suse.de>
172 * btest.c (test5): Allow global.* as minimal symbol name for global.
174 2019-02-26 Tom de Vries <tdevries@suse.de>
176 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
177 * Makefile.in: Regenerate.
179 2019-02-12 Tom de Vries <tdevries@suse.de>
181 PR libbacktrace/81983
182 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
184 2019-02-10 Tom de Vries <tdevries@suse.de>
186 * Makefile.am (BUILDTESTS): Add btest_lto.
187 * Makefile.in: Regenerate.
188 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
189 __attribute__((noclone)).
191 2019-02-08 Tom de Vries <tdevries@suse.de>
193 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
194 * print.c (backtrace_print): Same.
195 * simple.c (backtrace_simple): Same.
197 2019-02-08 Tom de Vries <tdevries@suse.de>
199 PR libbacktrace/78063
200 * dwarf.c (build_address_map): Keep all parsed units.
201 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
203 2019-01-31 Tom de Vries <tdevries@suse.de>
205 PR libbacktrace/89136
206 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
207 'debugaltlink_name_len =+ 1'.
209 2019-01-29 Tom de Vries <tdevries@suse.de>
211 * install-debuginfo-for-buildid.sh.in: New script.
212 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
213 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
214 * Makefile.in: Regenerate.
215 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
216 (READELF): Set with AC_CHECK_PROG.
217 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
218 * configure: Regenerate.
219 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
220 (elf_open_debugfile_by_buildid): ... here.
222 2019-01-29 Tom de Vries <tdevries@suse.de>
224 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
226 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
227 (check_PROGRAMS): Add BUILDTESTS.
228 * Makefile.in: Regenerate.
230 2019-01-28 Tom de Vries <tdevries@suse.de>
232 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
233 Use $< to access prerequisite.
234 * Makefile.in: Regenerate.
236 2019-01-25 Nathan Sidwell <nathan@acm.org>
238 * elf.c (elf_add): Pass "" filename to recursive call with
241 2019-01-25 Tom de Vries <tdevries@suse.de>
243 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
245 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
246 * Makefile.in: Regenerate.
248 2019-01-25 Tom de Vries <tdevries@suse.de>
250 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
251 (TESTS): Rename dtest to btest_gnudebuglink.
252 * Makefile.in: Regenerate.
254 2019-01-23 Tom de Vries <tdevries@suse.de>
256 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
257 (units_search, find_unit): Use size_t for offset.
258 (build_address_map): Use size_t for unit_offset.
260 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
262 * allocfail.c (main): Increase portability of printf statement.
264 2019-01-18 Ian Lance Taylor <iant@golang.org>
266 PR libbacktrace/88890
267 * mmapio.c (backtrace_get_view): Change size parameter to
268 uint64_t. Check that value fits in size_t.
269 * read.c (backtrace_get_view): Likewise.
270 * internal.h (backtrace_get_view): Update declaration.
271 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
273 2019-01-17 Tom de Vries <tdevries@suse.de>
275 PR libbacktrace/82857
276 * configure.ac (DWZ): Set with AC_CHECK_PROG.
277 (HAVE_DWZ): Set with AM_CONDITIONAL.
278 * configure: Regenerate.
279 * Makefile.am (TESTS): Add btest_dwz.
280 * Makefile.in: Regenerate.
282 2019-01-17 Tom de Vries <tdevries@suse.de>
284 PR libbacktrace/82857
285 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
286 (read_attribute): Handle DW_FORM_GNU_ref_alt using
287 ATTR_VAL_REF_ALT_INFO.
288 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
290 2019-01-17 Tom de Vries <tdevries@suse.de>
292 * dwarf.c (struct unit): Add low_offset and high_offset fields.
293 (struct unit_vector): New type.
294 (struct dwarf_data): Add units and units_counts fields.
295 (find_unit): New function.
296 (find_address_ranges): Add and handle unit_tag parameter.
297 (build_address_map): Add and handle units_vec parameter.
298 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
301 2019-01-17 Tom de Vries <tdevries@suse.de>
303 PR libbacktrace/82857
304 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
307 2019-01-17 Tom de Vries <tdevries@suse.de>
309 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
310 (read_attribute): Add altlink parameter. Handle missing altlink for
311 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
312 (find_address_ranges, build_address_map, build_dwarf_data): Add and
313 handle altlink parameter.
314 (read_referenced_name, read_function_entry): Add argument to
317 2019-01-17 Tom de Vries <tdevries@suse.de>
319 * dwarf.c (struct dwarf_data): Add altlink field.
320 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
321 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
322 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
323 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
324 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
325 * xcoff.c (xcoff_add): Same.
327 2019-01-17 Tom de Vries <tdevries@suse.de>
329 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
330 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
331 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
332 argument to backtrace_dwarf_add call.
333 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
334 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
335 * xcoff.c (xcoff_add): Same.
337 2019-01-17 Tom de Vries <tdevries@suse.de>
339 * elf.c (elf_add): Add and handle with_buildid_data and
340 with_buildid_size parameters. Handle .gnu_debugaltlink section.
341 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
343 2019-01-16 Tom de Vries <tdevries@suse.de>
345 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
347 (read_referenced_name): ... here, and ...
348 (read_function_entry): ... here.
350 2019-01-16 Tom de Vries <tdevries@suse.de>
352 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
354 (read_function_entry): Same. Don't allow name found via
355 DW_AT_abstract_origin or case DW_AT_specification to override linkage
358 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
362 * backtrace.h: Mechanically replace "can not" with "cannot".
364 2019-01-01 Jakub Jelinek <jakub@redhat.com>
366 Update copyright years.
368 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
370 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
372 * Makefile.in: Regenerate.
374 2018-12-28 Tom de Vries <tdevries@suse.de>
376 * dwarf.c (build_address_map): Reuse unused units.
378 2018-12-28 Tom de Vries <tdevries@suse.de>
380 * dwarf.c (build_address_map): Simplify by removing local variable
383 2018-12-28 Ian Lance Taylor <iant@golang.org>
384 Tom de Vries <tdevries@suse.de>
386 PR libbacktrace/88063
387 * dwarf.c (free_unit_addrs_vector): Remove.
388 (build_address_map): Keep track of allocated units in vector. Free
389 allocated units and corresponding abbrevs upon failure. Remove now
390 redundant call to free_unit_addrs_vector. Free addrs vector upon
391 failure. Free allocated unit vector.
393 2018-12-28 Tom de Vries <tdevries@suse.de>
395 * dwarf.c (build_address_map): Free addrs vector upon failure.
397 2018-12-14 Tom de Vries <tdevries@suse.de>
400 * allocfail.sh: Remove "set -o pipefail".
402 2018-12-12 Tom de Vries <tdevries@suse.de>
404 * Makefile.am (TESTS): Add allocfail.sh.
405 (check_PROGRAMS): Add allocfail.
406 * Makefile.in: Regenerate.
407 * instrumented_alloc.c: New file. Redefine malloc and realloc.
409 * allocfail.c: New file.
410 * allocfail.sh: New file.
412 2018-11-30 Tom de Vries <tdevries@suse.de>
414 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
415 test_xcoff_64, test_pecoff and test_unknown.
416 * Makefile.in: Regenerate.
417 * test_format.c: New file.
419 2018-11-30 Tom de Vries <tdevries@suse.de>
421 * Makefile.am : Add _with_alloc version for each test in
423 * Makefile.in: Regenerate.
425 2018-11-30 Tom de Vries <tdevries@suse.de>
427 * internal.h (backtrace_vector_free): New static inline fuction,
429 * dwarf.c (read_line_info): ... here.
431 2018-11-28 Tom de Vries <tdevries@suse.de>
433 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
436 2018-11-27 Tom de Vries <tdevries@suse.de>
438 * mmap.c (backtrace_vector_release): Same.
439 * unittest.c (test1): Add check.
441 2018-11-27 Tom de Vries <tdevries@suse.de>
443 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
445 * Makefile.am (check_PROGRAMS): Add unittest.
446 * Makefile.in: Regenerate.
447 * unittest.c: New file.
449 2018-11-22 Tom de Vries <tdevries@suse.de>
451 * dwarf.c (read_initial_length): Factor out of ...
452 (build_address_map, read_line_info): ... here.
454 2018-11-21 Tom de Vries <tdevries@suse.de>
456 * dwarf.c (read_string): Factor out of ...
457 (read_attribute, read_line_header, read_line_program): ... here.
459 2018-10-31 Joseph Myers <joseph@codesourcery.com>
462 * Makefile.am: Include multilib.am.
463 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
464 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
466 2018-10-05 Ian Lance Taylor <iant@golang.org>
468 PR libbacktrace/87529
469 * backtrace.h: Document that backtrace_create_state should be
472 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
474 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
475 * Makefile.in: Regenerate.
476 * config.h.in: Likewise.
477 * configure: Likewise.
479 2018-08-01 Tony Reix <tony.reix@atos.net>
481 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
482 (struct xcoff_func, struct xcoff_func_vector): New structs.
483 (xcoff_syminfo): Drop leading dot from symbol name.
484 (xcoff_line_compare, xcoff_line_search): Remove.
485 (xcoff_func_compare, xcoff_func_search): New static functions.
486 (xcoff_lookup_pc): Search function table.
487 (xcoff_add_line, xcoff_process_linenos): Remove.
488 (xcoff_initialize_fileline): Build function table.
490 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
493 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
494 checking up to 36 bytes.
496 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
498 * configure: Regenerated.
500 2018-04-19 Jakub Jelinek <jakub@redhat.com>
502 * configure: Regenerated.
504 2018-04-17 Ian Lance Taylor <iant@golang.org>
506 * backtrace.c: Revert last two changes. Don't call mmap
509 2018-04-17 Ian Lance Taylor <iant@golang.org>
511 * backtrace.c: Include backtrace-supported.h before checking
512 BACKTRACE_USES_MALLOC.
514 2018-04-17 Ian Lance Taylor <iant@golang.org>
516 * backtrace.c (backtrace_full): When testing whether we can
517 allocate memory, call mmap directly, and munmap the memory.
519 2018-04-04 Jakub Jelinek <jakub@redhat.com>
522 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
523 big endian, only use 32-bit loads if endianity macros are predefined
524 and indicate big or little endian.
526 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
529 * configure: Regenerate.
531 2018-02-15 Jakub Jelinek <jakub@redhat.com>
534 * elf.c (SHT_PROGBITS): Undefine and define.
536 2018-02-14 Jakub Jelinek <jakub@redhat.com>
539 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
540 (struct elf_ppc64_opd_data): New type.
541 (elf_initialize_syminfo): Add opd argument, handle symbols
542 pointing into the PowerPC64 ELFv1 .opd section.
543 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
544 to structure with .opd data to elf_initialize_syminfo.
546 2018-01-31 Ian Lance Taylor <iant@golang.org>
548 * elf.c (elf_add): Close descriptor if we use a debugfile.
549 * btest.c (check_open_files): New static function.
550 (main): Call check_open_files.
552 2018-01-25 Ian Lance Taylor <iant@golang.org>
554 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
556 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
558 2018-01-25 Ian Lance Taylor <iant@golang.org>
560 * pecoff.c (coff_add): Only release syms_view if it is valid.
562 2018-01-25 Ian Lance Taylor <iant@golang.org>
564 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
566 2018-01-24 Ian Lance Taylor <iant@golang.org>
568 * pecoff.c (coff_add): Use coff_read4, not memcpy.
570 2018-01-24 Ian Lance Taylor <iant@golang.org>
573 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
576 2018-01-19 Tony Reix <tony.reix@atos.net>
578 * xcoff.c (xcoff_incl_compare): New function.
579 (xcoff_incl_search): New function.
580 (xcoff_process_linenos): Use bsearch to find include file.
581 (xcoff_initialize_fileline): Sort include file information.
583 2018-01-16 Ian Lance Taylor <iant@golang.org>
585 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
587 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
588 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
589 (elf_zlib_default_table): Update.
590 (elf_zlib_default_dist_table): New static array.
591 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
593 * ztest.c (struct zlib_test): Add uncompressed_len.
594 (tests): Initialize uncompressed_len field. Add new test case.
595 (test_samples): Use uncompressed_len field.
597 2018-01-03 Jakub Jelinek <jakub@redhat.com>
599 Update copyright years.
601 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
603 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
604 * aclocal.m4: Regenerate.
605 * Makefile.in: Likewise.
606 * configure: Likewise.
608 2017-10-06 Ian Lance Taylor <iant@golang.org>
610 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
611 zlib uncompress function.
613 2017-10-05 Ian Lance Taylor <iant@golang.org>
615 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
616 Read a four byte integer.
617 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
618 boundary before ever calling elf_zlib_fetch.
619 * ztest.c (test_large): Simplify print statements a bit.
621 2017-10-02 Ian Lance Taylor <iant@golang.org>
623 * ztest.c: #include <errno.h>.
624 (TEST_TIMING): Don't define, don't test.
625 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
626 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
627 (ZLIB_CLOCK_GETTIME_ARG): Define.
628 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
629 * Makefile.am: Likewise.
630 * configure, Makefile.in: Rebuild.
632 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
635 * Makefile.am: Append the content of clock_gettime_link to
637 * configure.ac: Test for the case that clock_gettime is in librt.
638 * Makefile.in: Regenerate.
639 * configure: Likewise.
642 * configure.ac: Check for clock_gettime.
643 * config.h.in: Regenerate.
644 * configure: Likewise.
645 * ztest.c (average_time, test_large): Conditionalize test timing
646 on clock_gettime availability.
648 2017-09-29 Tony Reix <tony.reix@atos.net>
650 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
651 (STYP_DWARF, SSUBTYP_DW*): Define.
652 (enum dwarf_section): Define.
653 (struct dwsect_info): Define.
654 (xcoff_add): Look for DWARF sections, pass them to
657 2017-09-28 Ian Lance Taylor <iant@golang.org>
660 * elf.c (__builtin_prefetch): Define if not __GNUC__.
662 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
663 (b_elf_chdr): Define type.
664 (enum debug_section): Add ZDEBUG_xxx values.
665 (debug_section_names): Add names for new sections.
666 (struct debug_section_info): Add compressed field.
667 (elf_zlib_failed, elf_zlib_fetch): New static functions.
668 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
669 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
670 (HUFFMAN_SECONDARY_SHIFT): Define.
671 (ZDEBUG_TABLE_SIZE): Define.
672 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
673 (final_next_secondary): New static variable if
674 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
675 (elf_zlib_inflate_table): New static function.
676 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
677 function to produce fixed Huffman table.
678 (elf_zlib_default_table): New static variable.
679 (elf_zlib_inflate): New static function.
680 (elf_zlib_verify_checksum): Likewise.
681 (elf_zlib_inflate_and_verify): Likewise.
682 (elf_uncompress_zdebug): Likewise.
683 (elf_uncompress_chdr): Likewise.
684 (backtrace_uncompress_zdebug): New extern function.
685 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
686 sections, and uncompress them.
687 * internal.h (backtrace_compress_zdebug): Declare.
689 * configure.ac: Check for -lz and check whether the linker
690 supports --compress-debug-sections.
691 * Makefile.am (ztest_SOURCES): New variable.
692 (ztest_CFLAGS, ztest_LDADD): New variables.
693 (check_PROGRAMS): Add ztest.
694 (ctestg_SOURCES): New variable.
695 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
696 (ctesta_SOURCES): New variable.
697 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
698 (check_PROGRAMS): Add ctestg and ctesta.
699 * configure, config.h.in, Makefile.in: Rebuild.
701 2017-09-22 Ian Lance Taylor <iant@golang.org>
704 * configure.ac: Check for lstat and readlink.
705 * elf.c (lstat, readlink): Provide dummy versions if real versions
707 * configure, config.h.in: Rebuild.
709 2017-09-21 Ian Lance Taylor <iant@google.com>
712 * elf.c (backtrace_initialize): Set pd.exe_filename.
714 2017-09-20 Ian Lance Taylor <iant@golang.org>
715 Denis Khalikov <d.khalikov@partner.samsung.com>
718 Support for external debug info.
719 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
720 (S_ISLNK): Define if not defined.
721 (xstrnlen): Define if strnlen is not available.
722 (b_elf_note): Define type.
723 (NT_GNU_BUILD_ID): Define macro.
724 (elf_crc32, elf_crc32_file): New static functions.
725 (elf_is_symlink, elf_readlink): New static functions.
726 (elf_open_debugfile_by_buildid): New static function.
727 (elf_try_debugfile): New static function.
728 (elf_find_debugfile_by_debuglink): New static function.
729 (elf_open_debugfile_by_debuglink): New static function.
730 (elf_add): Add filename and debuginfo parameters. Adjust all
731 callers. Look for external debug info notes, and try to fetch
732 debug info from external file.
733 (struct phdr_data): Add exe_filename field.
734 (phdr_callback): Pass filename to elf_add.
735 (backtrace_initialize): Add filename parameter.
736 * internal.h (backtrace_initialize): Add filename parameter.
737 * fileline.c (fileline_initialize): Pass filename to
738 backtrace_initialize.
739 * pecoff.c (fileline_initialize): Add unused filename parameter.
740 * unknown.c (fileline_initialize): Likewise.
741 * xcoff.c (fileline_initialize): Likewise.
742 * configure.ac: Check for objcopy --add-gnu-debuglink.
743 * Makefile.am (dtest): New test target.
744 * configure, Makefile.in: Rebuild.
746 2017-09-12 Steve Ellcey <sellcey@cavium.com>
749 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
750 * Makefile.in: Regenerate.
752 2017-09-12 Steve Ellcey <sellcey@cavium.com>
755 * libbacktrace/Makefile.in
756 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
758 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
761 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
763 2017-07-28 Tony Reix <tony.reix@atos.net>
765 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
767 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
769 * fileline.c (fileline_initialize): Print pid_t as long.
771 2017-07-26 Tony Reix <tony.reix@atos.net>
773 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
774 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
775 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
776 * configure, config.h.in: Regenerate.
778 2017-07-21 Tony Reix <tony.reix@atos.net>
780 * filetype.awk: Add AIX XCOFF type detection.
781 * configure.ac: Recognize xcoff format.
782 * Makefile.am (FORMAT_FILES): Add xcoff.c.
783 * fileline.c: Include <unistd.h>.
784 (fileline_initialize): Add case for AIX procfs.
786 * configure, Makefile.in: Rebuild.
788 2017-06-21 Richard Biener <rguenther@suse.de>
790 * configure.ac: Add AC_SYS_LARGEFILE.
791 * config.h.in: Regenerate.
792 * configure: Likewise.
794 2017-06-11 Ian Lance Taylor <iant@golang.org>
796 * elf.c (backtrace_initialize): Always set *fileline_fn.
798 * btest.c: Move support functions into testlib.c. Change calls to
799 check to pass file name.
800 * testlib.c: New file, copied from (part of) btest.c.
801 * testlib.h: New file, declarations for testlib.c.
802 * edtest.c: Use testlib.h and testlib.c.
803 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
804 * Makefile.am (btest_SOURCES): Add testlib.c.
805 (edtest_SOURCES): Likewise.
806 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
807 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
808 * configure, Makefile.in: Rebuild.
810 2017-05-19 Than McIntosh <thanm@google.com>
812 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
813 (read_line_header): Don't allocate dirs if dirs_count == 0.
814 * edtest.c: New file.
815 * edtest2.c: New file.
816 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
817 (check_PROGRAMS): Add edtest.
818 (edtest2_build.c, gen_edtest2_build): New targets.
819 * Makefile.in: Rebuild.
821 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
823 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
824 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
826 2017-01-01 Jakub Jelinek <jakub@redhat.com>
828 Update copyright years.
830 2016-11-15 Matthias Klose <doko@ubuntu.com>
832 * configure: Regenerate.
834 2016-09-11 Carlos Liam <carlos@aarzee.me>
836 * all: Remove meaningless trailing whitespace.
838 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
841 * elf.c (phdr_callback) [__i386__]: Add
842 __attribute__((__force_align_arg_pointer__)).
844 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
846 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
847 avoid possible crash.
848 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
849 missing debug info anymore.
851 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
853 * mmap.c (MAP_FAILED): Define if not defined.
855 2016-01-04 Jakub Jelinek <jakub@redhat.com>
857 Update copyright years.
859 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
861 * configure.ac: Specify that DJGPP do not have mmap
862 even when sys/mman.h exists.
863 * configure: Regenerate
865 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
868 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
869 * configure: Regenerate.
870 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
873 2015-09-17 Ian Lance Taylor <iant@google.com>
875 * posix.c (backtrace_open): Cast second argument of open() to int.
877 2015-09-11 Ian Lance Taylor <iant@google.com>
879 * Makefile.am (backtrace.lo): Depend on internal.h.
880 (sort.lo, stest.lo): Add explicit dependencies.
881 * Makefile.in: Rebuild.
883 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
885 * backtrace.c: #include <sys/types.h>.
887 2015-09-08 Ian Lance Taylor <iant@google.com>
890 * backtrace.c: #include "internal.h".
891 (struct backtrace_data): Add can_alloc field.
892 (unwind): If can_alloc is false, don't try to get file/line
894 (backtrace_full): Set can_alloc field in bdata.
895 * alloc.c (backtrace_alloc): Don't call error_callback if it is
897 * mmap.c (backtrace_alloc): Likewise.
898 * internal.h: Update comments for backtrace_alloc and
901 2015-09-08 Ian Lance Taylor <iant@google.com>
904 * mmap.c (backtrace_alloc): Correct test for mmap failure.
906 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
908 * configure.ac: For spu-*-* targets, set have_fcntl to no.
909 * configure: Regenerate.
911 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
913 * configure.ac: Remove [disable-shared] argument to LT_INIT.
914 Remove setting PIC_FLAG when building as target library.
915 * configure: Regenerate.
917 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
919 * configure.ac: Only compile with -fPIC if the target
921 * configure: Regenerate.
923 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
925 * configure.ac: Set have_mmap to no on spu-*-* targets.
926 * configure: Regenerate.
928 2015-08-13 Ian Lance Taylor <iant@google.com>
930 * dwarf.c (read_function_entry): Add vec_inlined parameter.
933 2015-06-11 Martin Sebor <msebor@redhat.com>
936 * dwarf.c (struct line): Add new field idx.
937 (line_compare): Use it.
939 (read_line_info): Reset it.
941 2015-05-29 Tristan Gingold <gingold@adacore.com>
943 * pecoff.c: New file.
944 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
945 * Makefile.in: Regenerate.
946 * filetype.awk: Detect pecoff.
947 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
949 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
951 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
952 * configure: Regenerate.
953 * pecoff.c: New file.
955 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
957 * Makefile.in: Regenerated with automake-1.11.6.
958 * aclocal.m4: Likewise.
959 * configure: Likewise.
961 2015-01-24 Matthias Klose <doko@ubuntu.com>
963 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
964 * configure: Regenerate.
966 2015-01-05 Jakub Jelinek <jakub@redhat.com>
968 Update copyright years.
970 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
973 * configure: Regenerated.
975 2014-11-11 David Malcolm <dmalcolm@redhat.com>
977 * ChangeLog.jit: New.
979 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
982 * configure: Regenerate.
984 2014-10-23 Ian Lance Taylor <iant@google.com>
986 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
987 Fix to return void *.
989 2014-05-08 Ian Lance Taylor <iant@google.com>
991 * mmap.c (backtrace_free): If freeing a large aligned block of
992 memory, call munmap rather than holding onto it.
993 (backtrace_vector_grow): When growing a vector, double the number
994 of pages requested. When releasing the old version of a grown
995 vector, pass the correct size to backtrace_free.
997 2014-03-07 Ian Lance Taylor <iant@google.com>
999 * sort.c (backtrace_qsort): Use middle element as pivot.
1001 2014-03-06 Ian Lance Taylor <iant@google.com>
1004 * stest.c: New file.
1005 * internal.h (backtrace_qsort): Declare.
1006 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1007 (read_line_info, read_function_entry): Likewise.
1008 (read_function_info, build_dwarf_data): Likewise.
1009 * elf.c (elf_initialize_syminfo): Likewise.
1010 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1011 (stest_SOURCES, stest_LDADD): Define.
1012 (check_PROGRAMS): Add stest.
1014 2014-02-07 Misty De Meo <misty@brew.sh>
1017 * configure.ac: Use AC_LINK_IFELSE in check for
1019 * configure: Regenerate.
1021 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1023 Update copyright years
1025 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1027 * elf.c (ET_DYN): Undefine and define again.
1028 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1029 return early -1 without closing the descriptor.
1030 (struct phdr_data): Add exe_descriptor.
1031 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1032 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1033 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1035 (backtrace_initialize): Adjust call to elf_add. If it returns
1036 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1038 2013-12-05 Ian Lance Taylor <iant@google.com>
1040 * alloc.c (backtrace_vector_finish): Add error_callback and data
1041 parameters. Call backtrace_vector_release. Return address base.
1042 * mmap.c (backtrace_vector_finish): Add error_callback and data
1043 parameters. Return address base.
1044 * dwarf.c (read_function_info): Get new address base from
1045 backtrace_vector_finish.
1046 * internal.h (backtrace_vector_finish): Update declaration.
1048 2013-11-27 Ian Lance Taylor <iant@google.com>
1050 * dwarf.c (find_address_ranges): New static function, broken out
1051 of build_address_map.
1052 (build_address_map): Call it.
1053 * btest.c (check): Check for missing filename or function, rather
1055 (f3): Check that enough frames were returned.
1057 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1059 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1060 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1062 * btest.c (struct symdata): Add size field.
1063 (callback_three): Add symsize argument. Copy it to the data->size
1065 (f23): Set symdata.size to 0.
1066 (test5): Likewise. If sizeof (int) > 1, lookup address of
1067 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1070 * atomic.c: Include sys/types.h.
1072 2013-11-18 Ian Lance Taylor <iant@google.com>
1074 * configure.ac: Check for support of __atomic extensions.
1075 * internal.h: Declare or #define atomic functions for use in
1077 * atomic.c: New file.
1078 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1079 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1080 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1081 (backtrace_initialize): Likewise.
1082 * fileline.c (fileline_initialize): Likewise.
1083 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1084 * configure, config.h.in, Makefile.in: Rebuild.
1086 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1088 * elf.c (SHN_UNDEF): Define.
1089 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1090 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1091 (elf_add): Adjust caller.
1093 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1095 2013-11-16 Ian Lance Taylor <iant@google.com>
1097 * backtrace.h (backtrace_create_state): Correct comment about
1100 2013-11-15 Ian Lance Taylor <iant@google.com>
1102 * backtrace.h (backtrace_syminfo): Update comment and parameter
1103 name to take any address, not just a PC value.
1104 * elf.c (STT_OBJECT): Define.
1105 (elf_nosyms): Rename parameter pc to addr.
1106 (elf_symbol_search): Rename local variable pc to addr.
1107 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1108 (elf_syminfo): Rename parameter pc to addr.
1109 * btest.c (global): New global variable.
1113 2013-10-17 Ian Lance Taylor <iant@google.com>
1115 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1118 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1120 * configure.ac: Add --enable-host-shared, setting up
1121 pre-existing PIC_FLAG variable within Makefile.am et al.
1122 * configure: Regenerate.
1124 2013-09-20 Alan Modra <amodra@gmail.com>
1126 * configure: Regenerate.
1128 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1130 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1132 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1134 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1135 dl_iterate_phdr callbacks.
1137 2013-03-25 Ian Lance Taylor <iant@google.com>
1139 * alloc.c: #include <sys/types.h>.
1142 2013-01-31 Ian Lance Taylor <iant@google.com>
1144 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1145 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1147 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1150 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1151 attribute was not seen.
1153 2013-01-16 Ian Lance Taylor <iant@google.com>
1155 * dwarf.c (struct unit): Add filename and abs_filename fields.
1156 (build_address_map): Set new fields when reading unit.
1157 (dwarf_lookup_pc): If we don't find an entry in the line table,
1158 just return the main file name.
1160 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1162 Update copyright years.
1164 2013-01-01 Ian Lance Taylor <iant@google.com>
1167 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1168 $(MULTIBUILDTOP)/../../gcc/include.
1169 * Makefile.in: Rebuild.
1171 2013-01-01 Ian Lance Taylor <iant@google.com>
1174 * mmap.c (backtrace_alloc): Don't call sync functions if not
1176 (backtrace_free): Likewise.
1178 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1180 * mmapio.c: Define MAP_FAILED if not defined.
1182 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1185 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1186 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1187 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1189 * Makefile.in: Regenerated.
1190 * configure: Regenerated.
1192 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1195 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1196 * Makefile.in: Regenerated.
1198 2012-11-20 Ian Lance Taylor <iant@google.com>
1200 * dwarf.c (read_attribute): Always clear val.
1202 2012-11-13 Ian Lance Taylor <iant@google.com>
1205 * configure.ac: Only add -Werror if building a target library.
1206 * configure: Rebuild.
1208 2012-11-12 Ian Lance Taylor <iant@google.com>
1209 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1210 Gerald Pfeifer <gerald@pfeifer.com>
1212 * configure.ac: Check for getexecname.
1213 * fileline.c: #include <errno.h>. Define getexecname if not
1215 (fileline_initialize): Try to find the executable in a few
1217 * print.c (error_callback): Only print the filename if it came
1218 from the backtrace state.
1219 * configure, config.h.in: Rebuild.
1221 2012-10-29 Ian Lance Taylor <iant@google.com>
1223 * mmap.c (backtrace_vector_release): Correct last patch: add
1226 2012-10-29 Ian Lance Taylor <iant@google.com>
1228 * mmap.c (backtrace_vector_release): Make sure freed block is
1229 aligned on 8-byte boundary.
1231 2012-10-26 Ian Lance Taylor <iant@google.com>
1234 * posix.c (backtrace_open): Add does_not_exist parameter.
1235 * elf.c (phdr_callback): Do not warn if shared library could not
1237 * fileline.c (fileline_initialize): Update calls to
1239 * internal.h (backtrace_open): Update declaration.
1241 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1244 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1245 * configure: Regenerate.
1247 2012-10-24 Ian Lance Taylor <iant@google.com>
1250 * configure.ac: Check whether -funwind-tables option works.
1251 * configure: Rebuild.
1253 2012-10-11 Ian Lance Taylor <iant@google.com>
1255 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1256 * configure: Rebuild.
1258 2012-10-10 Ian Lance Taylor <iant@google.com>
1260 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1263 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1265 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1267 2012-10-09 Ian Lance Taylor <iant@google.com>
1269 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1270 (backtrace_dwarf_add): Likewise.
1272 2012-10-09 Ian Lance Taylor <iant@google.com>
1274 Add support for tracing through shared libraries.
1275 * configure.ac: Check for link.h and dl_iterate_phdr.
1276 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1277 ELF macros before #defining them.
1278 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1280 (struct elf_syminfo_data): Add next field.
1281 (elf_initialize_syminfo): Initialize next field.
1282 (elf_add_syminfo_data): New static function.
1283 (elf_add): New static function, broken out of
1284 backtrace_initialize. Call backtrace_dwarf_add instead of
1285 backtrace_dwarf_initialize.
1286 (struct phdr_data): Define.
1287 (phdr_callback): New static function.
1288 (backtrace_initialize): Call elf_add.
1289 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1290 (add_unit_addr): Add base_address parameter. Change all callers.
1291 (add_unit_ranges, build_address_map): Likewise.
1292 (add_line): Add ddata parameter. Change all callers.
1293 (read_line_program, add_function_range): Likewise.
1294 (dwarf_lookup_pc): New static function, broken out of
1296 (dwarf_fileline): Call dwarf_lookup_pc.
1297 (build_dwarf_data): New static function.
1298 (backtrace_dwarf_add): New function.
1299 (backtrace_dwarf_initialize): Remove.
1300 * internal.h (backtrace_dwarf_initialize): Don't declare.
1301 (backtrace_dwarf_add): Declare.
1302 * configure, config.h.in: Rebuild.
1304 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1306 * btest.c (f23): Avoid uninitialized variable warning.
1308 2012-10-04 Ian Lance Taylor <iant@google.com>
1310 * dwarf.c: If the system header files do not declare strnlen,
1311 provide our own version.
1313 2012-10-03 Ian Lance Taylor <iant@google.com>
1315 * dwarf.c (read_uleb128): Fix overflow test.
1316 (read_sleb128): Likewise.
1317 (build_address_map): Don't change unit_buf.start.
1319 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1322 * configure.ac (EXTRA_FLAGS): New.
1323 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1324 * configure, Makefile.in: Regenerate.
1326 2012-09-29 Ian Lance Taylor <iant@google.com>
1329 * fileline.c (fileline_initialize): Pass errnum as -1 when
1330 reporting that we could not read executable information after a
1333 2012-09-27 Ian Lance Taylor <iant@google.com>
1336 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1337 * Makefile.am: Add dependencies for all objects.
1338 * configure, aclocal.m4, Makefile.in: Rebuild.
1340 2012-09-27 Ian Lance Taylor <iant@google.com>
1343 * elf.c (backtrace_initialize): Set *fileln_fn, not
1346 2012-09-19 Ian Lance Taylor <iant@google.com>
1348 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1349 as a target library.
1350 * configure: Rebuild.
1352 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1353 Ian Lance Taylor <iant@google.com>
1355 * configure.ac (GCC_HEADER_STDINT): Invoke.
1356 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1357 * btest.c: Don't include <stdint.h>.
1358 * dwarf.c: Likewise.
1359 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1361 2012-09-18 Ian Lance Taylor <iant@google.com>
1364 * Makefile.am (AM_CPPFLAGS): Define.
1365 (AM_CFLAGS): Remove -I options.
1366 * Makefile.in: Rebuild.
1368 2012-09-18 Ian Lance Taylor <iant@google.com>
1370 * posix.c (O_BINARY): Define if not defined.
1371 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1372 HAVE_FCNTL is defined.
1373 * configure.ac: Test for the fcntl function.
1374 * configure, config.h.in: Rebuild.
1376 2012-09-18 Ian Lance Taylor <iant@google.com>
1378 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1380 2012-09-18 Ian Lance Taylor <iant@google.com>
1382 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1384 2012-09-18 Ian Lance Taylor <iant@google.com>
1386 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1387 * mmapio.c: Don't define _GNU_SOURCE.
1388 * configure, config.h.in: Rebuild.
1390 2012-09-18 Ian Lance Taylor <iant@google.com>
1392 * configure.ac: Check whether strnlen is declared.
1393 * dwarf.c: Declare strnlen if not declared.
1394 * configure, config.h.in: Rebuild.
1396 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1398 * fileline.c: Include <stdlib.h>.
1401 2012-09-17 Ian Lance Taylor <iant@google.com>
1404 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1407 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1410 * nounwind.c (backtrace_simple): Add state parameter.
1412 2012-09-17 Ian Lance Taylor <iant@google.com>
1415 * unknown.c (unknown_fileline): Add state parameter, remove
1416 fileline_data parameter, name error_callback parameter.
1417 (backtrace_initialize): Add state parameter.
1419 2012-09-17 Ian Lance Taylor <iant@google.com>
1421 * Initial implementation.
1423 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1425 Copying and distribution of this file, with or without modification,
1426 are permitted in any medium without royalty provided the copyright
1427 notice and this notice are preserved.