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