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