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