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