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