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