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