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