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