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