Daily bump.
[gcc.git] / libbacktrace / ChangeLog
1 2020-07-08 Ian Lance Taylor <iant@golang.org>
2
3 * configure.ac: Test linker support for DWARF5
4 * configure: Regenerate
5
6 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
7
8 PR bootstrap/95413
9 * configure: Regenerated.
10
11 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
12
13 PR bootstrap/95147
14 * configure: Regenerated.
15
16 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
17
18 * configure: Regenerated.
19
20 2020-05-13 Ian Lance Taylor <iant@golang.org>
21
22 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
23
24 2020-05-13 Ian Lance Taylor <iant@golang.org>
25
26 PR go/95061
27 * posix.c (backtrace_open): Treat EACCESS like ENOENT.
28
29 2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
30
31 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
32 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
33 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
34 enabled.
35 * Makefile.in: Regenerated.
36 * configure: Likewise.
37
38 2020-05-11 Ian Lance Taylor <iant@golang.org>
39
40 PR libbacktrace/95012
41 * configure.ac: Check for getpagesize declaration.
42 * mmap.c: Declare getpagesize if necessary.
43 * mmapio.c: Likewise.
44 * configure: Regenerate.
45 * config.h.in: Regenerate.
46 * Makefile.in: Regenerate.
47
48 2020-05-09 Roland McGrath <mcgrathr@google.com>
49
50 * elf.c (elf_add): Bail early if there are no section headers at all.
51
52 2020-05-09 Ian Lance Taylor <iant@golang.org>
53
54 * elf.c (elf_add): Don't free strtab if an error occurs after
55 recording symbol information.
56
57 2020-05-09 Ian Lance Taylor <iant@golang.org>
58
59 PR libbacktrace/88745
60 * macho.c: New file.
61 * filetype.awk: Recognize Mach-O files.
62 * Makefile.am (FORMAT_FILES): Add macho.c.
63 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
64 (%.dSYM): New pattern target.
65 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
66 (test_macho_LDADD): New target.
67 (BUILDTESTS): Add test_macho.
68 (macho.lo): Add dependencies.
69 * configure.ac: Recognize macho file type. Check for
70 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
71 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
72 * Makefile.in: Regenerate.
73 * configure: Regenerate.
74 * config.h.in: Regenerate.
75
76 2020-05-09 Ian Lance Taylor <iant@golang.org>
77
78 * read.c (backtrace_get_view): Support short read.
79
80 2020-05-09 Ian Lance Taylor <iant@golang.org>
81
82 * elf.c (elf_add): If debug sections are very large or far apart,
83 read them individually rather than as a single view.
84
85 2020-05-08 Ian Lance Taylor <iant@golang.org>
86
87 * fileline.c (sysctl_exec_name): New static function.
88 (sysctl_exec_name1): New macro or static function.
89 (sysctl_exec_name2): Likewise.
90 (fileline_initialize): Try sysctl_exec_name[12].
91 * configure.ac: Check for sysctl args to fetch executable name.
92 * configure: Regenerate.
93 * config.h.in: Regenerate.
94
95 2020-02-15 Ian Lance Taylor <iant@golang.org>
96
97 * ztest.c (test_large): Update file to current libgo test file.
98
99 2020-02-03 Ian Lance Taylor <iant@golang.org>
100
101 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
102 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
103 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
104 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
105 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
106 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
107 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
108 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
109 (stest_alloc_CFLAGS): Likewise.
110 * Makefile.in: Regenerate.
111 * ztest.c (error_callback_compress): Mark vdata unused.
112 (test_large): Add casts to avoid warnings.
113
114 2020-01-01 Jakub Jelinek <jakub@redhat.com>
115
116 Update copyright years.
117
118 2019-12-13 Ian Lance Taylor <iant@golang.org>
119
120 Add DWARF 5 support.
121 * dwarf.c (struct attr): Add val field.
122 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
123 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
124 (struct line_header): Add addrsize field.
125 (struct line_header_format): Define.
126 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
127 fields.
128 (read_uint24): New static function.
129 (read_attribute): Add implicit_val parameter. Replace dwarf_str
130 and dwarf_str_size parameters with dwarf_sections parameter. Add
131 support for new DWARF 5 forms. Change all callers.
132 (resolve_string): New static function.
133 (resolve_addr_index): Likewise.
134 (read_abbrevs): Support DW_FORM_implicit_const.
135 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
136 and ranges_is_index fields.
137 (update_pcrange): Support DWARF 5 encodings.
138 (add_high_low_range): New static function, split out of
139 add_ranges.
140 (add_ranges_from_ranges): Likewise.
141 (add_ranges_from_rnglists): New static function.
142 (add_ranges): Just call new helper functions.
143 (find_address_ranges): Use resolve_string for strings, after
144 reading all attributes. Handle new DWARF 5 attributes.
145 (build_address_map): Support DWARF 5 compilation units.
146 (read_v2_paths): New static function, split out of
147 read_line_header.
148 (read_lnct): New static function.
149 (read_line_header_format_entries): Likewise.
150 (read_line_header): Add ddata parameter. Support DWARF 5 line
151 headers. Call new helper functions. Change all callers.
152 (read_line_program): Use addrsize from line program header. Don't
153 special case directory index 0 for DWARF 5.
154 (read_referenced_name): Use resolve_string.
155 (read_function_entry): Handle DWARF 5 encodings. Use
156 resolve_string.
157 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
158 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
159 * elf.c (dwarf_section_names): Add new section names.
160 * pecoff.c (dwarf_section_names): Likewise.
161 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
162 fields.
163 * configure.ac: Define HAVE_DWARF5 automake conditional.
164 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
165 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
166 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
167 (dwarf5_alloc_LDADD): Likewise.
168 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
169 (CLEANFILES, clean-local): Define.
170
171 2019-12-08 Ian Lance Taylor <iant@golang.org>
172
173 * dwarf.c (struct pcrange): Define.
174 (update_pcrange, add_ranges): New static functions.
175 (add_unit_addr): Change signature to work with add_ranges. Don't
176 add base_address here.
177 (add_unit_ranges): Remove.
178 (find_address_ranges): Replace str/ranges parameters with
179 dwarf_sections. Use update_pcrange and add_ranges. Change all
180 callers.
181 (add_function_range): Change signature to work with add_ranges.
182 Don't add base_address here.
183 (add_function_ranges): Remove.
184 (read_function_entry): Use update_pcrange and add_ranges.
185
186 2019-12-04 Ian Lance Taylor <iant@golang.org>
187
188 * edtest.c (test1): Add noclone attribute.
189
190 2019-12-04 Ian Lance Taylor <iant@golang.org>
191
192 * internal.h (enum dwarf_section): Define.
193 (struct dwarf_sections): Define.
194 (backtrace_dwarf_add): Update declaration to replace specific
195 section parameters with dwarf_sections parameter.
196 * dwarf.c (struct dwarf_data): Replace specific section fields
197 with dwarf_sections field.
198 (read_attribute): Use dwarf_sections with altlink.
199 (build_address_map): Replace specific section parameters with
200 dwarf_sections parameter. Change all callers.
201 (read_line_info): Use dwarf_sections with ddata.
202 (read_referenced_name): Likewise.
203 (add_function_ranges): Likewise.
204 (read_function_entry): Likewise.
205 (read_function_info): Likewise.
206 (build_dwarf_data): Replace specific section parameters with
207 dwarf_sections parameter. Change all callers.
208 (backtrace_dwarf_add): Likewise.
209 * elf.c (enum debug_section): Remove.
210 (dwarf_section_names): Remove .zdebug names.
211 (elf_add): Track zsections separately. Build dwarf_sections.
212 * pecoff.c (enum debug_section): Remove.
213 (struct debug_section_info): Remove data field.
214 (coff_add): Build dwarf_sections.
215 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
216 references with DEBUG_xxx references.
217 (xcoff_add): Build dwarf_sections.
218
219 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
220
221 * configure: Regenerate.
222
223 2019-09-26 Ian Lance Taylor <iant@golang.org>
224
225 PR libbacktrace/91908
226 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
227 __sync_bool_compare_and_swap to void.
228 * xcoff.c (backtrace_initialize): Likewise.
229
230 2019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
231
232 * configure.ac: Remove references to spu.
233 * configure: Regenerate.
234
235 2019-05-24 Clement Chigot <clement.chigot@atos.net>
236
237 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
238 test_elf_64.
239 * Makefile.in: Regenerate.
240
241 2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
242
243 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
244 handling.
245 * configure: Regenerate.
246
247 2019-03-11 Ian Lance Taylor <iant@golang.org>
248
249 PR libbacktrace/89669
250 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
251 HAVE_ELF.
252 * Makefile.in: Regenerate.
253
254 2019-02-26 Tom de Vries <tdevries@suse.de>
255
256 * btest.c (test5): Allow global.* as minimal symbol name for global.
257
258 2019-02-26 Tom de Vries <tdevries@suse.de>
259
260 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
261 * Makefile.in: Regenerate.
262
263 2019-02-12 Tom de Vries <tdevries@suse.de>
264
265 PR libbacktrace/81983
266 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
267
268 2019-02-10 Tom de Vries <tdevries@suse.de>
269
270 * Makefile.am (BUILDTESTS): Add btest_lto.
271 * Makefile.in: Regenerate.
272 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
273 __attribute__((noclone)).
274
275 2019-02-08 Tom de Vries <tdevries@suse.de>
276
277 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
278 * print.c (backtrace_print): Same.
279 * simple.c (backtrace_simple): Same.
280
281 2019-02-08 Tom de Vries <tdevries@suse.de>
282
283 PR libbacktrace/78063
284 * dwarf.c (build_address_map): Keep all parsed units.
285 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
286
287 2019-01-31 Tom de Vries <tdevries@suse.de>
288
289 PR libbacktrace/89136
290 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
291 'debugaltlink_name_len =+ 1'.
292
293 2019-01-29 Tom de Vries <tdevries@suse.de>
294
295 * install-debuginfo-for-buildid.sh.in: New script.
296 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
297 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
298 * Makefile.in: Regenerate.
299 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
300 (READELF): Set with AC_CHECK_PROG.
301 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
302 * configure: Regenerate.
303 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
304 (elf_open_debugfile_by_buildid): ... here.
305
306 2019-01-29 Tom de Vries <tdevries@suse.de>
307
308 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
309 allocfail.
310 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
311 (check_PROGRAMS): Add BUILDTESTS.
312 * Makefile.in: Regenerate.
313
314 2019-01-28 Tom de Vries <tdevries@suse.de>
315
316 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
317 Use $< to access prerequisite.
318 * Makefile.in: Regenerate.
319
320 2019-01-25 Nathan Sidwell <nathan@acm.org>
321
322 * elf.c (elf_add): Pass "" filename to recursive call with
323 separated debug.
324
325 2019-01-25 Tom de Vries <tdevries@suse.de>
326
327 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
328 filename == "".
329 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
330 * Makefile.in: Regenerate.
331
332 2019-01-25 Tom de Vries <tdevries@suse.de>
333
334 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
335 (TESTS): Rename dtest to btest_gnudebuglink.
336 * Makefile.in: Regenerate.
337
338 2019-01-23 Tom de Vries <tdevries@suse.de>
339
340 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
341 (units_search, find_unit): Use size_t for offset.
342 (build_address_map): Use size_t for unit_offset.
343
344 2019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
345
346 * allocfail.c (main): Increase portability of printf statement.
347
348 2019-01-18 Ian Lance Taylor <iant@golang.org>
349
350 PR libbacktrace/88890
351 * mmapio.c (backtrace_get_view): Change size parameter to
352 uint64_t. Check that value fits in size_t.
353 * read.c (backtrace_get_view): Likewise.
354 * internal.h (backtrace_get_view): Update declaration.
355 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
356
357 2019-01-17 Tom de Vries <tdevries@suse.de>
358
359 PR libbacktrace/82857
360 * configure.ac (DWZ): Set with AC_CHECK_PROG.
361 (HAVE_DWZ): Set with AM_CONDITIONAL.
362 * configure: Regenerate.
363 * Makefile.am (TESTS): Add btest_dwz.
364 * Makefile.in: Regenerate.
365
366 2019-01-17 Tom de Vries <tdevries@suse.de>
367
368 PR libbacktrace/82857
369 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
370 (read_attribute): Handle DW_FORM_GNU_ref_alt using
371 ATTR_VAL_REF_ALT_INFO.
372 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
373
374 2019-01-17 Tom de Vries <tdevries@suse.de>
375
376 * dwarf.c (struct unit): Add low_offset and high_offset fields.
377 (struct unit_vector): New type.
378 (struct dwarf_data): Add units and units_counts fields.
379 (find_unit): New function.
380 (find_address_ranges): Add and handle unit_tag parameter.
381 (build_address_map): Add and handle units_vec parameter.
382 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
383 units vector.
384
385 2019-01-17 Tom de Vries <tdevries@suse.de>
386
387 PR libbacktrace/82857
388 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
389 using altlink.
390
391 2019-01-17 Tom de Vries <tdevries@suse.de>
392
393 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
394 (read_attribute): Add altlink parameter. Handle missing altlink for
395 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
396 (find_address_ranges, build_address_map, build_dwarf_data): Add and
397 handle altlink parameter.
398 (read_referenced_name, read_function_entry): Add argument to
399 read_attribute call.
400
401 2019-01-17 Tom de Vries <tdevries@suse.de>
402
403 * dwarf.c (struct dwarf_data): Add altlink field.
404 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
405 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
406 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
407 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
408 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
409 * xcoff.c (xcoff_add): Same.
410
411 2019-01-17 Tom de Vries <tdevries@suse.de>
412
413 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
414 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
415 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
416 argument to backtrace_dwarf_add call.
417 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
418 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
419 * xcoff.c (xcoff_add): Same.
420
421 2019-01-17 Tom de Vries <tdevries@suse.de>
422
423 * elf.c (elf_add): Add and handle with_buildid_data and
424 with_buildid_size parameters. Handle .gnu_debugaltlink section.
425 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
426
427 2019-01-16 Tom de Vries <tdevries@suse.de>
428
429 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
430 of ...
431 (read_referenced_name): ... here, and ...
432 (read_function_entry): ... here.
433
434 2019-01-16 Tom de Vries <tdevries@suse.de>
435
436 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
437 name.
438 (read_function_entry): Same. Don't allow name found via
439 DW_AT_abstract_origin or case DW_AT_specification to override linkage
440 name.
441
442 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
443
444 PR other/16615
445
446 * backtrace.h: Mechanically replace "can not" with "cannot".
447
448 2019-01-01 Jakub Jelinek <jakub@redhat.com>
449
450 Update copyright years.
451
452 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
453
454 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
455 in sed pattern.
456 * Makefile.in: Regenerate.
457
458 2018-12-28 Tom de Vries <tdevries@suse.de>
459
460 * dwarf.c (build_address_map): Reuse unused units.
461
462 2018-12-28 Tom de Vries <tdevries@suse.de>
463
464 * dwarf.c (build_address_map): Simplify by removing local variable
465 abbrevs.
466
467 2018-12-28 Ian Lance Taylor <iant@golang.org>
468 Tom de Vries <tdevries@suse.de>
469
470 PR libbacktrace/88063
471 * dwarf.c (free_unit_addrs_vector): Remove.
472 (build_address_map): Keep track of allocated units in vector. Free
473 allocated units and corresponding abbrevs upon failure. Remove now
474 redundant call to free_unit_addrs_vector. Free addrs vector upon
475 failure. Free allocated unit vector.
476
477 2018-12-28 Tom de Vries <tdevries@suse.de>
478
479 * dwarf.c (build_address_map): Free addrs vector upon failure.
480
481 2018-12-14 Tom de Vries <tdevries@suse.de>
482
483 PR testsuite/88491
484 * allocfail.sh: Remove "set -o pipefail".
485
486 2018-12-12 Tom de Vries <tdevries@suse.de>
487
488 * Makefile.am (TESTS): Add allocfail.sh.
489 (check_PROGRAMS): Add allocfail.
490 * Makefile.in: Regenerate.
491 * instrumented_alloc.c: New file. Redefine malloc and realloc.
492 Include alloc.c.
493 * allocfail.c: New file.
494 * allocfail.sh: New file.
495
496 2018-11-30 Tom de Vries <tdevries@suse.de>
497
498 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
499 test_xcoff_64, test_pecoff and test_unknown.
500 * Makefile.in: Regenerate.
501 * test_format.c: New file.
502
503 2018-11-30 Tom de Vries <tdevries@suse.de>
504
505 * Makefile.am : Add _with_alloc version for each test in
506 check_PROGRAMS.
507 * Makefile.in: Regenerate.
508
509 2018-11-30 Tom de Vries <tdevries@suse.de>
510
511 * internal.h (backtrace_vector_free): New static inline fuction,
512 factored out of ...
513 * dwarf.c (read_line_info): ... here.
514
515 2018-11-28 Tom de Vries <tdevries@suse.de>
516
517 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
518 failure.
519
520 2018-11-27 Tom de Vries <tdevries@suse.de>
521
522 * mmap.c (backtrace_vector_release): Same.
523 * unittest.c (test1): Add check.
524
525 2018-11-27 Tom de Vries <tdevries@suse.de>
526
527 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
528 instead of realloc.
529 * Makefile.am (check_PROGRAMS): Add unittest.
530 * Makefile.in: Regenerate.
531 * unittest.c: New file.
532
533 2018-11-22 Tom de Vries <tdevries@suse.de>
534
535 * dwarf.c (read_initial_length): Factor out of ...
536 (build_address_map, read_line_info): ... here.
537
538 2018-11-21 Tom de Vries <tdevries@suse.de>
539
540 * dwarf.c (read_string): Factor out of ...
541 (read_attribute, read_line_header, read_line_program): ... here.
542
543 2018-10-31 Joseph Myers <joseph@codesourcery.com>
544
545 PR bootstrap/82856
546 * Makefile.am: Include multilib.am.
547 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
548 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
549
550 2018-10-05 Ian Lance Taylor <iant@golang.org>
551
552 PR libbacktrace/87529
553 * backtrace.h: Document that backtrace_create_state should be
554 called only once.
555
556 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
557
558 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
559 * Makefile.in: Regenerate.
560 * config.h.in: Likewise.
561 * configure: Likewise.
562
563 2018-08-01 Tony Reix <tony.reix@atos.net>
564
565 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
566 (struct xcoff_func, struct xcoff_func_vector): New structs.
567 (xcoff_syminfo): Drop leading dot from symbol name.
568 (xcoff_line_compare, xcoff_line_search): Remove.
569 (xcoff_func_compare, xcoff_func_search): New static functions.
570 (xcoff_lookup_pc): Search function table.
571 (xcoff_add_line, xcoff_process_linenos): Remove.
572 (xcoff_initialize_fileline): Build function table.
573
574 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
575
576 PR other/86198
577 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
578 checking up to 36 bytes.
579
580 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
581
582 * configure: Regenerated.
583
584 2018-04-19 Jakub Jelinek <jakub@redhat.com>
585
586 * configure: Regenerated.
587
588 2018-04-17 Ian Lance Taylor <iant@golang.org>
589
590 * backtrace.c: Revert last two changes. Don't call mmap
591 directly.
592
593 2018-04-17 Ian Lance Taylor <iant@golang.org>
594
595 * backtrace.c: Include backtrace-supported.h before checking
596 BACKTRACE_USES_MALLOC.
597
598 2018-04-17 Ian Lance Taylor <iant@golang.org>
599
600 * backtrace.c (backtrace_full): When testing whether we can
601 allocate memory, call mmap directly, and munmap the memory.
602
603 2018-04-04 Jakub Jelinek <jakub@redhat.com>
604
605 PR other/85161
606 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
607 big endian, only use 32-bit loads if endianity macros are predefined
608 and indicate big or little endian.
609
610 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
611
612 PR target/84148
613 * configure: Regenerate.
614
615 2018-02-15 Jakub Jelinek <jakub@redhat.com>
616
617 PR other/82368
618 * elf.c (SHT_PROGBITS): Undefine and define.
619
620 2018-02-14 Jakub Jelinek <jakub@redhat.com>
621
622 PR other/82368
623 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
624 (struct elf_ppc64_opd_data): New type.
625 (elf_initialize_syminfo): Add opd argument, handle symbols
626 pointing into the PowerPC64 ELFv1 .opd section.
627 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
628 to structure with .opd data to elf_initialize_syminfo.
629
630 2018-01-31 Ian Lance Taylor <iant@golang.org>
631
632 * elf.c (elf_add): Close descriptor if we use a debugfile.
633 * btest.c (check_open_files): New static function.
634 (main): Call check_open_files.
635
636 2018-01-25 Ian Lance Taylor <iant@golang.org>
637
638 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
639 desired CRC is zero.
640 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
641
642 2018-01-25 Ian Lance Taylor <iant@golang.org>
643
644 * pecoff.c (coff_add): Only release syms_view if it is valid.
645
646 2018-01-25 Ian Lance Taylor <iant@golang.org>
647
648 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
649
650 2018-01-24 Ian Lance Taylor <iant@golang.org>
651
652 * pecoff.c (coff_add): Use coff_read4, not memcpy.
653
654 2018-01-24 Ian Lance Taylor <iant@golang.org>
655
656 PR other/68239
657 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
658 on the free list.
659
660 2018-01-19 Tony Reix <tony.reix@atos.net>
661
662 * xcoff.c (xcoff_incl_compare): New function.
663 (xcoff_incl_search): New function.
664 (xcoff_process_linenos): Use bsearch to find include file.
665 (xcoff_initialize_fileline): Sort include file information.
666
667 2018-01-16 Ian Lance Taylor <iant@golang.org>
668
669 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
670 288.
671 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
672 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
673 (elf_zlib_default_table): Update.
674 (elf_zlib_default_dist_table): New static array.
675 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
676 for block type 1.
677 * ztest.c (struct zlib_test): Add uncompressed_len.
678 (tests): Initialize uncompressed_len field. Add new test case.
679 (test_samples): Use uncompressed_len field.
680
681 2018-01-03 Jakub Jelinek <jakub@redhat.com>
682
683 Update copyright years.
684
685 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
686
687 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
688 * aclocal.m4: Regenerate.
689 * Makefile.in: Likewise.
690 * configure: Likewise.
691
692 2017-10-06 Ian Lance Taylor <iant@golang.org>
693
694 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
695 zlib uncompress function.
696
697 2017-10-05 Ian Lance Taylor <iant@golang.org>
698
699 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
700 Read a four byte integer.
701 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
702 boundary before ever calling elf_zlib_fetch.
703 * ztest.c (test_large): Simplify print statements a bit.
704
705 2017-10-02 Ian Lance Taylor <iant@golang.org>
706
707 * ztest.c: #include <errno.h>.
708 (TEST_TIMING): Don't define, don't test.
709 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
710 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
711 (ZLIB_CLOCK_GETTIME_ARG): Define.
712 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
713 * Makefile.am: Likewise.
714 * configure, Makefile.in: Rebuild.
715
716 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
717
718 PR other/67165
719 * Makefile.am: Append the content of clock_gettime_link to
720 ztest_LDADD.
721 * configure.ac: Test for the case that clock_gettime is in librt.
722 * Makefile.in: Regenerate.
723 * configure: Likewise.
724
725 PR other/67165
726 * configure.ac: Check for clock_gettime.
727 * config.h.in: Regenerate.
728 * configure: Likewise.
729 * ztest.c (average_time, test_large): Conditionalize test timing
730 on clock_gettime availability.
731
732 2017-09-29 Tony Reix <tony.reix@atos.net>
733
734 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
735 (STYP_DWARF, SSUBTYP_DW*): Define.
736 (enum dwarf_section): Define.
737 (struct dwsect_info): Define.
738 (xcoff_add): Look for DWARF sections, pass them to
739 backtrace_dwarf_add.
740
741 2017-09-28 Ian Lance Taylor <iant@golang.org>
742
743 PR other/67165
744 * elf.c (__builtin_prefetch): Define if not __GNUC__.
745 (unlikely): Define.
746 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
747 (b_elf_chdr): Define type.
748 (enum debug_section): Add ZDEBUG_xxx values.
749 (debug_section_names): Add names for new sections.
750 (struct debug_section_info): Add compressed field.
751 (elf_zlib_failed, elf_zlib_fetch): New static functions.
752 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
753 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
754 (HUFFMAN_SECONDARY_SHIFT): Define.
755 (ZDEBUG_TABLE_SIZE): Define.
756 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
757 (final_next_secondary): New static variable if
758 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
759 (elf_zlib_inflate_table): New static function.
760 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
761 function to produce fixed Huffman table.
762 (elf_zlib_default_table): New static variable.
763 (elf_zlib_inflate): New static function.
764 (elf_zlib_verify_checksum): Likewise.
765 (elf_zlib_inflate_and_verify): Likewise.
766 (elf_uncompress_zdebug): Likewise.
767 (elf_uncompress_chdr): Likewise.
768 (backtrace_uncompress_zdebug): New extern function.
769 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
770 sections, and uncompress them.
771 * internal.h (backtrace_compress_zdebug): Declare.
772 * ztest.c: New file.
773 * configure.ac: Check for -lz and check whether the linker
774 supports --compress-debug-sections.
775 * Makefile.am (ztest_SOURCES): New variable.
776 (ztest_CFLAGS, ztest_LDADD): New variables.
777 (check_PROGRAMS): Add ztest.
778 (ctestg_SOURCES): New variable.
779 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
780 (ctesta_SOURCES): New variable.
781 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
782 (check_PROGRAMS): Add ctestg and ctesta.
783 * configure, config.h.in, Makefile.in: Rebuild.
784
785 2017-09-22 Ian Lance Taylor <iant@golang.org>
786
787 PR sanitizer/77631
788 * configure.ac: Check for lstat and readlink.
789 * elf.c (lstat, readlink): Provide dummy versions if real versions
790 are not available.
791 * configure, config.h.in: Rebuild.
792
793 2017-09-21 Ian Lance Taylor <iant@google.com>
794
795 PR go/82284
796 * elf.c (backtrace_initialize): Set pd.exe_filename.
797
798 2017-09-20 Ian Lance Taylor <iant@golang.org>
799 Denis Khalikov <d.khalikov@partner.samsung.com>
800
801 PR sanitizer/77631
802 Support for external debug info.
803 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
804 (S_ISLNK): Define if not defined.
805 (xstrnlen): Define if strnlen is not available.
806 (b_elf_note): Define type.
807 (NT_GNU_BUILD_ID): Define macro.
808 (elf_crc32, elf_crc32_file): New static functions.
809 (elf_is_symlink, elf_readlink): New static functions.
810 (elf_open_debugfile_by_buildid): New static function.
811 (elf_try_debugfile): New static function.
812 (elf_find_debugfile_by_debuglink): New static function.
813 (elf_open_debugfile_by_debuglink): New static function.
814 (elf_add): Add filename and debuginfo parameters. Adjust all
815 callers. Look for external debug info notes, and try to fetch
816 debug info from external file.
817 (struct phdr_data): Add exe_filename field.
818 (phdr_callback): Pass filename to elf_add.
819 (backtrace_initialize): Add filename parameter.
820 * internal.h (backtrace_initialize): Add filename parameter.
821 * fileline.c (fileline_initialize): Pass filename to
822 backtrace_initialize.
823 * pecoff.c (fileline_initialize): Add unused filename parameter.
824 * unknown.c (fileline_initialize): Likewise.
825 * xcoff.c (fileline_initialize): Likewise.
826 * configure.ac: Check for objcopy --add-gnu-debuglink.
827 * Makefile.am (dtest): New test target.
828 * configure, Makefile.in: Rebuild.
829
830 2017-09-12 Steve Ellcey <sellcey@cavium.com>
831
832 PR other/81096
833 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
834 * Makefile.in: Regenerate.
835
836 2017-09-12 Steve Ellcey <sellcey@cavium.com>
837
838 PR other/81096
839 * libbacktrace/Makefile.in
840 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
841
842 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
843
844 PR bootstrap/81638
845 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
846
847 2017-07-28 Tony Reix <tony.reix@atos.net>
848
849 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
850
851 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
852
853 * fileline.c (fileline_initialize): Print pid_t as long.
854
855 2017-07-26 Tony Reix <tony.reix@atos.net>
856
857 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
858 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
859 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
860 * configure, config.h.in: Regenerate.
861
862 2017-07-21 Tony Reix <tony.reix@atos.net>
863
864 * filetype.awk: Add AIX XCOFF type detection.
865 * configure.ac: Recognize xcoff format.
866 * Makefile.am (FORMAT_FILES): Add xcoff.c.
867 * fileline.c: Include <unistd.h>.
868 (fileline_initialize): Add case for AIX procfs.
869 * xcoff.c: New file.
870 * configure, Makefile.in: Rebuild.
871
872 2017-06-21 Richard Biener <rguenther@suse.de>
873
874 * configure.ac: Add AC_SYS_LARGEFILE.
875 * config.h.in: Regenerate.
876 * configure: Likewise.
877
878 2017-06-11 Ian Lance Taylor <iant@golang.org>
879
880 * elf.c (backtrace_initialize): Always set *fileline_fn.
881 * ttest.c: New file.
882 * btest.c: Move support functions into testlib.c. Change calls to
883 check to pass file name.
884 * testlib.c: New file, copied from (part of) btest.c.
885 * testlib.h: New file, declarations for testlib.c.
886 * edtest.c: Use testlib.h and testlib.c.
887 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
888 * Makefile.am (btest_SOURCES): Add testlib.c.
889 (edtest_SOURCES): Likewise.
890 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
891 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
892 * configure, Makefile.in: Rebuild.
893
894 2017-05-19 Than McIntosh <thanm@google.com>
895
896 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
897 (read_line_header): Don't allocate dirs if dirs_count == 0.
898 * edtest.c: New file.
899 * edtest2.c: New file.
900 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
901 (check_PROGRAMS): Add edtest.
902 (edtest2_build.c, gen_edtest2_build): New targets.
903 * Makefile.in: Rebuild.
904
905 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
906
907 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
908 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
909
910 2017-01-01 Jakub Jelinek <jakub@redhat.com>
911
912 Update copyright years.
913
914 2016-11-15 Matthias Klose <doko@ubuntu.com>
915
916 * configure: Regenerate.
917
918 2016-09-11 Carlos Liam <carlos@aarzee.me>
919
920 * all: Remove meaningless trailing whitespace.
921
922 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
923
924 PR target/71161
925 * elf.c (phdr_callback) [__i386__]: Add
926 __attribute__((__force_align_arg_pointer__)).
927
928 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
929
930 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
931 avoid possible crash.
932 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
933 missing debug info anymore.
934
935 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
936
937 * mmap.c (MAP_FAILED): Define if not defined.
938
939 2016-01-04 Jakub Jelinek <jakub@redhat.com>
940
941 Update copyright years.
942
943 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
944
945 * configure.ac: Specify that DJGPP do not have mmap
946 even when sys/mman.h exists.
947 * configure: Regenerate
948
949 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
950
951 PR libgfortran/68115
952 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
953 * configure: Regenerate.
954 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
955 to void.
956
957 2015-09-17 Ian Lance Taylor <iant@google.com>
958
959 * posix.c (backtrace_open): Cast second argument of open() to int.
960
961 2015-09-11 Ian Lance Taylor <iant@google.com>
962
963 * Makefile.am (backtrace.lo): Depend on internal.h.
964 (sort.lo, stest.lo): Add explicit dependencies.
965 * Makefile.in: Rebuild.
966
967 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
968
969 * backtrace.c: #include <sys/types.h>.
970
971 2015-09-08 Ian Lance Taylor <iant@google.com>
972
973 PR other/67457
974 * backtrace.c: #include "internal.h".
975 (struct backtrace_data): Add can_alloc field.
976 (unwind): If can_alloc is false, don't try to get file/line
977 information.
978 (backtrace_full): Set can_alloc field in bdata.
979 * alloc.c (backtrace_alloc): Don't call error_callback if it is
980 NULL.
981 * mmap.c (backtrace_alloc): Likewise.
982 * internal.h: Update comments for backtrace_alloc and
983 backtrace_free.
984
985 2015-09-08 Ian Lance Taylor <iant@google.com>
986
987 PR other/67457
988 * mmap.c (backtrace_alloc): Correct test for mmap failure.
989
990 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
991
992 * configure.ac: For spu-*-* targets, set have_fcntl to no.
993 * configure: Regenerate.
994
995 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
996
997 * configure.ac: Remove [disable-shared] argument to LT_INIT.
998 Remove setting PIC_FLAG when building as target library.
999 * configure: Regenerate.
1000
1001 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
1002
1003 * configure.ac: Only compile with -fPIC if the target
1004 supports it.
1005 * configure: Regenerate.
1006
1007 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1008
1009 * configure.ac: Set have_mmap to no on spu-*-* targets.
1010 * configure: Regenerate.
1011
1012 2015-08-13 Ian Lance Taylor <iant@google.com>
1013
1014 * dwarf.c (read_function_entry): Add vec_inlined parameter.
1015 Change all callers.
1016
1017 2015-06-11 Martin Sebor <msebor@redhat.com>
1018
1019 PR sanitizer/65479
1020 * dwarf.c (struct line): Add new field idx.
1021 (line_compare): Use it.
1022 (add_line): Set it.
1023 (read_line_info): Reset it.
1024
1025 2015-05-29 Tristan Gingold <gingold@adacore.com>
1026
1027 * pecoff.c: New file.
1028 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1029 * Makefile.in: Regenerate.
1030 * filetype.awk: Detect pecoff.
1031 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1032 Add pecoff.
1033 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1034 true.
1035 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1036 * configure: Regenerate.
1037 * pecoff.c: New file.
1038
1039 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1040
1041 * Makefile.in: Regenerated with automake-1.11.6.
1042 * aclocal.m4: Likewise.
1043 * configure: Likewise.
1044
1045 2015-01-24 Matthias Klose <doko@ubuntu.com>
1046
1047 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1048 * configure: Regenerate.
1049
1050 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1051
1052 Update copyright years.
1053
1054 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1055
1056 PR bootstrap/63784
1057 * configure: Regenerated.
1058
1059 2014-11-11 David Malcolm <dmalcolm@redhat.com>
1060
1061 * ChangeLog.jit: New.
1062
1063 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1064
1065 PR target/63610
1066 * configure: Regenerate.
1067
1068 2014-10-23 Ian Lance Taylor <iant@google.com>
1069
1070 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1071 Fix to return void *.
1072
1073 2014-05-08 Ian Lance Taylor <iant@google.com>
1074
1075 * mmap.c (backtrace_free): If freeing a large aligned block of
1076 memory, call munmap rather than holding onto it.
1077 (backtrace_vector_grow): When growing a vector, double the number
1078 of pages requested. When releasing the old version of a grown
1079 vector, pass the correct size to backtrace_free.
1080
1081 2014-03-07 Ian Lance Taylor <iant@google.com>
1082
1083 * sort.c (backtrace_qsort): Use middle element as pivot.
1084
1085 2014-03-06 Ian Lance Taylor <iant@google.com>
1086
1087 * sort.c: New file.
1088 * stest.c: New file.
1089 * internal.h (backtrace_qsort): Declare.
1090 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1091 (read_line_info, read_function_entry): Likewise.
1092 (read_function_info, build_dwarf_data): Likewise.
1093 * elf.c (elf_initialize_syminfo): Likewise.
1094 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1095 (stest_SOURCES, stest_LDADD): Define.
1096 (check_PROGRAMS): Add stest.
1097
1098 2014-02-07 Misty De Meo <misty@brew.sh>
1099
1100 PR target/58710
1101 * configure.ac: Use AC_LINK_IFELSE in check for
1102 _Unwind_GetIPInfo.
1103 * configure: Regenerate.
1104
1105 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1106
1107 Update copyright years
1108
1109 2013-12-06 Jakub Jelinek <jakub@redhat.com>
1110
1111 * elf.c (ET_DYN): Undefine and define again.
1112 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1113 return early -1 without closing the descriptor.
1114 (struct phdr_data): Add exe_descriptor.
1115 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1116 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1117 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1118 call to elf_add.
1119 (backtrace_initialize): Adjust call to elf_add. If it returns
1120 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1121
1122 2013-12-05 Ian Lance Taylor <iant@google.com>
1123
1124 * alloc.c (backtrace_vector_finish): Add error_callback and data
1125 parameters. Call backtrace_vector_release. Return address base.
1126 * mmap.c (backtrace_vector_finish): Add error_callback and data
1127 parameters. Return address base.
1128 * dwarf.c (read_function_info): Get new address base from
1129 backtrace_vector_finish.
1130 * internal.h (backtrace_vector_finish): Update declaration.
1131
1132 2013-11-27 Ian Lance Taylor <iant@google.com>
1133
1134 * dwarf.c (find_address_ranges): New static function, broken out
1135 of build_address_map.
1136 (build_address_map): Call it.
1137 * btest.c (check): Check for missing filename or function, rather
1138 than crashing.
1139 (f3): Check that enough frames were returned.
1140
1141 2013-11-19 Jakub Jelinek <jakub@redhat.com>
1142
1143 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1144 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1145 last argument.
1146 * btest.c (struct symdata): Add size field.
1147 (callback_three): Add symsize argument. Copy it to the data->size
1148 field.
1149 (f23): Set symdata.size to 0.
1150 (test5): Likewise. If sizeof (int) > 1, lookup address of
1151 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1152 values.
1153
1154 * atomic.c: Include sys/types.h.
1155
1156 2013-11-18 Ian Lance Taylor <iant@google.com>
1157
1158 * configure.ac: Check for support of __atomic extensions.
1159 * internal.h: Declare or #define atomic functions for use in
1160 backtrace code.
1161 * atomic.c: New file.
1162 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1163 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1164 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1165 (backtrace_initialize): Likewise.
1166 * fileline.c (fileline_initialize): Likewise.
1167 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1168 * configure, config.h.in, Makefile.in: Rebuild.
1169
1170 2013-11-18 Jakub Jelinek <jakub@redhat.com>
1171
1172 * elf.c (SHN_UNDEF): Define.
1173 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1174 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1175 (elf_add): Adjust caller.
1176
1177 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1178
1179 2013-11-16 Ian Lance Taylor <iant@google.com>
1180
1181 * backtrace.h (backtrace_create_state): Correct comment about
1182 threading.
1183
1184 2013-11-15 Ian Lance Taylor <iant@google.com>
1185
1186 * backtrace.h (backtrace_syminfo): Update comment and parameter
1187 name to take any address, not just a PC value.
1188 * elf.c (STT_OBJECT): Define.
1189 (elf_nosyms): Rename parameter pc to addr.
1190 (elf_symbol_search): Rename local variable pc to addr.
1191 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1192 (elf_syminfo): Rename parameter pc to addr.
1193 * btest.c (global): New global variable.
1194 (test5): New test.
1195 (main): Call test5.
1196
1197 2013-10-17 Ian Lance Taylor <iant@google.com>
1198
1199 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1200 is missing.
1201
1202 2013-10-15 David Malcolm <dmalcolm@redhat.com>
1203
1204 * configure.ac: Add --enable-host-shared, setting up
1205 pre-existing PIC_FLAG variable within Makefile.am et al.
1206 * configure: Regenerate.
1207
1208 2013-09-20 Alan Modra <amodra@gmail.com>
1209
1210 * configure: Regenerate.
1211
1212 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1213
1214 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1215
1216 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
1217
1218 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1219 dl_iterate_phdr callbacks.
1220
1221 2013-03-25 Ian Lance Taylor <iant@google.com>
1222
1223 * alloc.c: #include <sys/types.h>.
1224 * mmap.c: Likewise.
1225
1226 2013-01-31 Ian Lance Taylor <iant@google.com>
1227
1228 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1229 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1230
1231 2013-01-25 Jakub Jelinek <jakub@redhat.com>
1232
1233 PR other/56076
1234 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1235 attribute was not seen.
1236
1237 2013-01-16 Ian Lance Taylor <iant@google.com>
1238
1239 * dwarf.c (struct unit): Add filename and abs_filename fields.
1240 (build_address_map): Set new fields when reading unit.
1241 (dwarf_lookup_pc): If we don't find an entry in the line table,
1242 just return the main file name.
1243
1244 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1245
1246 Update copyright years.
1247
1248 2013-01-01 Ian Lance Taylor <iant@google.com>
1249
1250 PR bootstrap/54834
1251 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1252 $(MULTIBUILDTOP)/../../gcc/include.
1253 * Makefile.in: Rebuild.
1254
1255 2013-01-01 Ian Lance Taylor <iant@google.com>
1256
1257 PR other/55536
1258 * mmap.c (backtrace_alloc): Don't call sync functions if not
1259 threaded.
1260 (backtrace_free): Likewise.
1261
1262 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1263
1264 * mmapio.c: Define MAP_FAILED if not defined.
1265
1266 2012-12-11 Jakub Jelinek <jakub@redhat.com>
1267
1268 PR bootstrap/54926
1269 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1270 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1271 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1272 accepts it.
1273 * Makefile.in: Regenerated.
1274 * configure: Regenerated.
1275
1276 2012-12-07 Jakub Jelinek <jakub@redhat.com>
1277
1278 PR bootstrap/54926
1279 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1280 * Makefile.in: Regenerated.
1281
1282 2012-11-20 Ian Lance Taylor <iant@google.com>
1283
1284 * dwarf.c (read_attribute): Always clear val.
1285
1286 2012-11-13 Ian Lance Taylor <iant@google.com>
1287
1288 PR other/55312
1289 * configure.ac: Only add -Werror if building a target library.
1290 * configure: Rebuild.
1291
1292 2012-11-12 Ian Lance Taylor <iant@google.com>
1293 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1294 Gerald Pfeifer <gerald@pfeifer.com>
1295
1296 * configure.ac: Check for getexecname.
1297 * fileline.c: #include <errno.h>. Define getexecname if not
1298 available.
1299 (fileline_initialize): Try to find the executable in a few
1300 different ways.
1301 * print.c (error_callback): Only print the filename if it came
1302 from the backtrace state.
1303 * configure, config.h.in: Rebuild.
1304
1305 2012-10-29 Ian Lance Taylor <iant@google.com>
1306
1307 * mmap.c (backtrace_vector_release): Correct last patch: add
1308 aligned, not size.
1309
1310 2012-10-29 Ian Lance Taylor <iant@google.com>
1311
1312 * mmap.c (backtrace_vector_release): Make sure freed block is
1313 aligned on 8-byte boundary.
1314
1315 2012-10-26 Ian Lance Taylor <iant@google.com>
1316
1317 PR other/55087
1318 * posix.c (backtrace_open): Add does_not_exist parameter.
1319 * elf.c (phdr_callback): Do not warn if shared library could not
1320 be opened.
1321 * fileline.c (fileline_initialize): Update calls to
1322 backtrace_open.
1323 * internal.h (backtrace_open): Update declaration.
1324
1325 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1326
1327 PR target/55061
1328 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1329 * configure: Regenerate.
1330
1331 2012-10-24 Ian Lance Taylor <iant@google.com>
1332
1333 PR target/55061
1334 * configure.ac: Check whether -funwind-tables option works.
1335 * configure: Rebuild.
1336
1337 2012-10-11 Ian Lance Taylor <iant@google.com>
1338
1339 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1340 * configure: Rebuild.
1341
1342 2012-10-10 Ian Lance Taylor <iant@google.com>
1343
1344 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1345 lower case.
1346
1347 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1348
1349 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1350
1351 2012-10-09 Ian Lance Taylor <iant@google.com>
1352
1353 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1354 (backtrace_dwarf_add): Likewise.
1355
1356 2012-10-09 Ian Lance Taylor <iant@google.com>
1357
1358 Add support for tracing through shared libraries.
1359 * configure.ac: Check for link.h and dl_iterate_phdr.
1360 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1361 ELF macros before #defining them.
1362 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1363 dl_iterate_phdr.
1364 (struct elf_syminfo_data): Add next field.
1365 (elf_initialize_syminfo): Initialize next field.
1366 (elf_add_syminfo_data): New static function.
1367 (elf_add): New static function, broken out of
1368 backtrace_initialize. Call backtrace_dwarf_add instead of
1369 backtrace_dwarf_initialize.
1370 (struct phdr_data): Define.
1371 (phdr_callback): New static function.
1372 (backtrace_initialize): Call elf_add.
1373 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1374 (add_unit_addr): Add base_address parameter. Change all callers.
1375 (add_unit_ranges, build_address_map): Likewise.
1376 (add_line): Add ddata parameter. Change all callers.
1377 (read_line_program, add_function_range): Likewise.
1378 (dwarf_lookup_pc): New static function, broken out of
1379 dwarf_fileline.
1380 (dwarf_fileline): Call dwarf_lookup_pc.
1381 (build_dwarf_data): New static function.
1382 (backtrace_dwarf_add): New function.
1383 (backtrace_dwarf_initialize): Remove.
1384 * internal.h (backtrace_dwarf_initialize): Don't declare.
1385 (backtrace_dwarf_add): Declare.
1386 * configure, config.h.in: Rebuild.
1387
1388 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1389
1390 * btest.c (f23): Avoid uninitialized variable warning.
1391
1392 2012-10-04 Ian Lance Taylor <iant@google.com>
1393
1394 * dwarf.c: If the system header files do not declare strnlen,
1395 provide our own version.
1396
1397 2012-10-03 Ian Lance Taylor <iant@google.com>
1398
1399 * dwarf.c (read_uleb128): Fix overflow test.
1400 (read_sleb128): Likewise.
1401 (build_address_map): Don't change unit_buf.start.
1402
1403 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1404
1405 PR other/54761
1406 * configure.ac (EXTRA_FLAGS): New.
1407 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1408 * configure, Makefile.in: Regenerate.
1409
1410 2012-09-29 Ian Lance Taylor <iant@google.com>
1411
1412 PR other/54749
1413 * fileline.c (fileline_initialize): Pass errnum as -1 when
1414 reporting that we could not read executable information after a
1415 previous failure.
1416
1417 2012-09-27 Ian Lance Taylor <iant@google.com>
1418
1419 PR bootstrap/54732
1420 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1421 * Makefile.am: Add dependencies for all objects.
1422 * configure, aclocal.m4, Makefile.in: Rebuild.
1423
1424 2012-09-27 Ian Lance Taylor <iant@google.com>
1425
1426 PR other/54726
1427 * elf.c (backtrace_initialize): Set *fileln_fn, not
1428 state->fileln_fn.
1429
1430 2012-09-19 Ian Lance Taylor <iant@google.com>
1431
1432 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1433 as a target library.
1434 * configure: Rebuild.
1435
1436 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1437 Ian Lance Taylor <iant@google.com>
1438
1439 * configure.ac (GCC_HEADER_STDINT): Invoke.
1440 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1441 * btest.c: Don't include <stdint.h>.
1442 * dwarf.c: Likewise.
1443 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1444
1445 2012-09-18 Ian Lance Taylor <iant@google.com>
1446
1447 PR bootstrap/54623
1448 * Makefile.am (AM_CPPFLAGS): Define.
1449 (AM_CFLAGS): Remove -I options.
1450 * Makefile.in: Rebuild.
1451
1452 2012-09-18 Ian Lance Taylor <iant@google.com>
1453
1454 * posix.c (O_BINARY): Define if not defined.
1455 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1456 HAVE_FCNTL is defined.
1457 * configure.ac: Test for the fcntl function.
1458 * configure, config.h.in: Rebuild.
1459
1460 2012-09-18 Ian Lance Taylor <iant@google.com>
1461
1462 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1463
1464 2012-09-18 Ian Lance Taylor <iant@google.com>
1465
1466 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1467
1468 2012-09-18 Ian Lance Taylor <iant@google.com>
1469
1470 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1471 * mmapio.c: Don't define _GNU_SOURCE.
1472 * configure, config.h.in: Rebuild.
1473
1474 2012-09-18 Ian Lance Taylor <iant@google.com>
1475
1476 * configure.ac: Check whether strnlen is declared.
1477 * dwarf.c: Declare strnlen if not declared.
1478 * configure, config.h.in: Rebuild.
1479
1480 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1481
1482 * fileline.c: Include <stdlib.h>.
1483 * mmap.c: Likewise.
1484
1485 2012-09-17 Ian Lance Taylor <iant@google.com>
1486
1487 PR bootstrap/54611
1488 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1489 parameter.
1490
1491 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1492
1493 PR bootstrap/54611
1494 * nounwind.c (backtrace_simple): Add state parameter.
1495
1496 2012-09-17 Ian Lance Taylor <iant@google.com>
1497
1498 PR bootstrap/54609
1499 * unknown.c (unknown_fileline): Add state parameter, remove
1500 fileline_data parameter, name error_callback parameter.
1501 (backtrace_initialize): Add state parameter.
1502
1503 2012-09-17 Ian Lance Taylor <iant@google.com>
1504
1505 * Initial implementation.
1506 \f
1507 Copyright (C) 2012-2020 Free Software Foundation, Inc.
1508
1509 Copying and distribution of this file, with or without modification,
1510 are permitted in any medium without royalty provided the copyright
1511 notice and this notice are preserved.