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