PR other/68239
[official-gcc.git] / libbacktrace / ChangeLog
blob2d89ea1dd6c772a0e537f8a9d274c5b96625e070
1 2018-01-24  Ian Lance Taylor  <iant@golang.org>
3         PR other/68239
4         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
5         on the free list.
7 2018-01-19  Tony Reix  <tony.reix@atos.net>
9         * xcoff.c (xcoff_incl_compare): New function.
10         (xcoff_incl_search): New function.
11         (xcoff_process_linenos): Use bsearch to find include file.
12         (xcoff_initialize_fileline): Sort include file information.
14 2018-01-16  Ian Lance Taylor  <iant@golang.org>
16         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
17         288.
18         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
19         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
20         (elf_zlib_default_table): Update.
21         (elf_zlib_default_dist_table): New static array.
22         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
23         for block type 1.
24         * ztest.c (struct zlib_test): Add uncompressed_len.
25         (tests): Initialize uncompressed_len field.  Add new test case.
26         (test_samples): Use uncompressed_len field.
28 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30         Update copyright years.
32 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
34         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
35         * aclocal.m4: Regenerate.
36         * Makefile.in: Likewise.
37         * configure: Likewise.
39 2017-10-06  Ian Lance Taylor  <iant@golang.org>
41         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
42         zlib uncompress function.
44 2017-10-05  Ian Lance Taylor  <iant@golang.org>
46         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
47         Read a four byte integer.
48         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
49         boundary before ever calling elf_zlib_fetch.
50         * ztest.c (test_large): Simplify print statements a bit.
52 2017-10-02  Ian Lance Taylor  <iant@golang.org>
54         * ztest.c: #include <errno.h>.
55         (TEST_TIMING): Don't define, don't test.
56         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
57         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
58         (ZLIB_CLOCK_GETTIME_ARG): Define.
59         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
60         * Makefile.am: Likewise.
61         * configure, Makefile.in: Rebuild.
63 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
65         PR other/67165
66         * Makefile.am: Append the content of clock_gettime_link to
67         ztest_LDADD.
68         * configure.ac: Test for the case that clock_gettime is in librt.
69         * Makefile.in: Regenerate.
70         * configure: Likewise.
72         PR other/67165
73         * configure.ac: Check for clock_gettime.
74         * config.h.in: Regenerate.
75         * configure: Likewise.
76         * ztest.c (average_time, test_large): Conditionalize test timing
77         on clock_gettime availability.
79 2017-09-29  Tony Reix  <tony.reix@atos.net>
81         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
82         (STYP_DWARF, SSUBTYP_DW*): Define.
83         (enum dwarf_section): Define.
84         (struct dwsect_info): Define.
85         (xcoff_add): Look for DWARF sections, pass them to
86         backtrace_dwarf_add.
88 2017-09-28  Ian Lance Taylor  <iant@golang.org>
90         PR other/67165
91         * elf.c (__builtin_prefetch): Define if not __GNUC__.
92         (unlikely): Define.
93         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
94         (b_elf_chdr): Define type.
95         (enum debug_section): Add ZDEBUG_xxx values.
96         (debug_section_names): Add names for new sections.
97         (struct debug_section_info): Add compressed field.
98         (elf_zlib_failed, elf_zlib_fetch): New static functions.
99         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
100         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
101         (HUFFMAN_SECONDARY_SHIFT): Define.
102         (ZDEBUG_TABLE_SIZE): Define.
103         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
104         (final_next_secondary): New static variable if
105         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
106         (elf_zlib_inflate_table): New static function.
107         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
108         function to produce fixed Huffman table.
109         (elf_zlib_default_table): New static variable.
110         (elf_zlib_inflate): New static function.
111         (elf_zlib_verify_checksum): Likewise.
112         (elf_zlib_inflate_and_verify): Likewise.
113         (elf_uncompress_zdebug): Likewise.
114         (elf_uncompress_chdr): Likewise.
115         (backtrace_uncompress_zdebug): New extern function.
116         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
117         sections, and uncompress them.
118         * internal.h (backtrace_compress_zdebug): Declare.
119         * ztest.c: New file.
120         * configure.ac: Check for -lz and check whether the linker
121         supports --compress-debug-sections.
122         * Makefile.am (ztest_SOURCES): New variable.
123         (ztest_CFLAGS, ztest_LDADD): New variables.
124         (check_PROGRAMS): Add ztest.
125         (ctestg_SOURCES): New variable.
126         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
127         (ctesta_SOURCES): New variable.
128         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
129         (check_PROGRAMS): Add ctestg and ctesta.
130         * configure, config.h.in, Makefile.in: Rebuild.
132 2017-09-22  Ian Lance Taylor  <iant@golang.org>
134         PR sanitizer/77631
135         * configure.ac: Check for lstat and readlink.
136         * elf.c (lstat, readlink): Provide dummy versions if real versions
137         are not available.
138         * configure, config.h.in: Rebuild.
140 2017-09-21  Ian Lance Taylor  <iant@google.com>
142         PR go/82284
143         * elf.c (backtrace_initialize): Set pd.exe_filename.
145 2017-09-20  Ian Lance Taylor  <iant@golang.org>
146             Denis Khalikov  <d.khalikov@partner.samsung.com>
148         PR sanitizer/77631
149         Support for external debug info.
150         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
151         (S_ISLNK): Define if not defined.
152         (xstrnlen): Define if strnlen is not available.
153         (b_elf_note): Define type.
154         (NT_GNU_BUILD_ID): Define macro.
155         (elf_crc32, elf_crc32_file): New static functions.
156         (elf_is_symlink, elf_readlink): New static functions.
157         (elf_open_debugfile_by_buildid): New static function.
158         (elf_try_debugfile): New static function.
159         (elf_find_debugfile_by_debuglink): New static function.
160         (elf_open_debugfile_by_debuglink): New static function.
161         (elf_add): Add filename and debuginfo parameters.  Adjust all
162         callers.  Look for external debug info notes, and try to fetch
163         debug info from external file.
164         (struct phdr_data): Add exe_filename field.
165         (phdr_callback): Pass filename to elf_add.
166         (backtrace_initialize): Add filename parameter.
167         * internal.h (backtrace_initialize): Add filename parameter.
168         * fileline.c (fileline_initialize): Pass filename to
169         backtrace_initialize.
170         * pecoff.c (fileline_initialize): Add unused filename parameter.
171         * unknown.c (fileline_initialize): Likewise.
172         * xcoff.c (fileline_initialize): Likewise.
173         * configure.ac: Check for objcopy --add-gnu-debuglink.
174         * Makefile.am (dtest): New test target.
175         * configure, Makefile.in: Rebuild.
177 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
179         PR other/81096
180         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
181         * Makefile.in: Regenerate.
183 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
185         PR other/81096
186         * libbacktrace/Makefile.in
187         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
189 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
191         PR bootstrap/81638
192         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
194 2017-07-28  Tony Reix  <tony.reix@atos.net>
196         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
198 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
200         * fileline.c (fileline_initialize): Print pid_t as long.
202 2017-07-26  Tony Reix  <tony.reix@atos.net>
204         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
205         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
206         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
207         * configure, config.h.in: Regenerate.
209 2017-07-21  Tony Reix  <tony.reix@atos.net>
211         * filetype.awk: Add AIX XCOFF type detection.
212         * configure.ac: Recognize xcoff format.
213         * Makefile.am (FORMAT_FILES): Add xcoff.c.
214         * fileline.c: Include <unistd.h>.
215         (fileline_initialize): Add case for AIX procfs.
216         * xcoff.c: New file.
217         * configure, Makefile.in: Rebuild.
219 2017-06-21  Richard Biener  <rguenther@suse.de>
221         * configure.ac: Add AC_SYS_LARGEFILE.
222         * config.h.in: Regenerate.
223         * configure: Likewise.
225 2017-06-11  Ian Lance Taylor  <iant@golang.org>
227         * elf.c (backtrace_initialize): Always set *fileline_fn.
228         * ttest.c: New file.
229         * btest.c: Move support functions into testlib.c.  Change calls to
230         check to pass file name.
231         * testlib.c: New file, copied from (part of) btest.c.
232         * testlib.h: New file, declarations for testlib.c.
233         * edtest.c: Use testlib.h and testlib.c.
234         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
235         * Makefile.am (btest_SOURCES): Add testlib.c.
236         (edtest_SOURCES): Likewise.
237         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
238         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
239         * configure, Makefile.in: Rebuild.
241 2017-05-19  Than McIntosh  <thanm@google.com>
243         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
244         (read_line_header): Don't allocate dirs if dirs_count == 0.
245         * edtest.c: New file.
246         * edtest2.c: New file.
247         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
248         (check_PROGRAMS): Add edtest.
249         (edtest2_build.c, gen_edtest2_build): New targets.
250         * Makefile.in: Rebuild.
252 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
254         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
255         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
257 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
259         Update copyright years.
261 2016-11-15  Matthias Klose  <doko@ubuntu.com>
263         * configure: Regenerate.
265 2016-09-11  Carlos Liam  <carlos@aarzee.me>
267         * all: Remove meaningless trailing whitespace.
269 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
271         PR target/71161
272         * elf.c (phdr_callback) [__i386__]: Add
273         __attribute__((__force_align_arg_pointer__)).
275 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
277         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
278         avoid possible crash.
279         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
280         missing debug info anymore.
282 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
284         * mmap.c (MAP_FAILED): Define if not defined.
286 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
288         Update copyright years.
290 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
292         * configure.ac: Specify that DJGPP do not have mmap
293         even when sys/mman.h exists.
294         * configure: Regenerate
296 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
298         PR libgfortran/68115
299         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
300         * configure: Regenerate.
301         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
302         to void.
304 2015-09-17  Ian Lance Taylor  <iant@google.com>
306         * posix.c (backtrace_open): Cast second argument of open() to int.
308 2015-09-11  Ian Lance Taylor  <iant@google.com>
310         * Makefile.am (backtrace.lo): Depend on internal.h.
311         (sort.lo, stest.lo): Add explicit dependencies.
312         * Makefile.in: Rebuild.
314 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
316         * backtrace.c: #include <sys/types.h>.
318 2015-09-08  Ian Lance Taylor  <iant@google.com>
320         PR other/67457
321         * backtrace.c: #include "internal.h".
322         (struct backtrace_data): Add can_alloc field.
323         (unwind): If can_alloc is false, don't try to get file/line
324         information.
325         (backtrace_full): Set can_alloc field in bdata.
326         * alloc.c (backtrace_alloc): Don't call error_callback if it is
327         NULL.
328         * mmap.c (backtrace_alloc): Likewise.
329         * internal.h: Update comments for backtrace_alloc and
330         backtrace_free.
332 2015-09-08  Ian Lance Taylor  <iant@google.com>
334         PR other/67457
335         * mmap.c (backtrace_alloc): Correct test for mmap failure.
337 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
339         * configure.ac: For spu-*-* targets, set have_fcntl to no.
340         * configure: Regenerate.
342 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
344         * configure.ac: Remove [disable-shared] argument to LT_INIT.
345         Remove setting PIC_FLAG when building as target library.
346         * configure: Regenerate.
348 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
350         * configure.ac: Only compile with -fPIC if the target
351         supports it.
352         * configure: Regenerate.
354 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
356         * configure.ac: Set have_mmap to no on spu-*-* targets.
357         * configure: Regenerate.
359 2015-08-13  Ian Lance Taylor  <iant@google.com>
361         * dwarf.c (read_function_entry): Add vec_inlined parameter.
362         Change all callers.
364 2015-06-11  Martin Sebor  <msebor@redhat.com>
366         PR sanitizer/65479
367         * dwarf.c (struct line): Add new field idx.
368         (line_compare): Use it.
369         (add_line): Set it.
370         (read_line_info): Reset it.
372 2015-05-29  Tristan Gingold  <gingold@adacore.com>
374         * pecoff.c: New file.
375         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
376         * Makefile.in: Regenerate.
377         * filetype.awk: Detect pecoff.
378         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
379         Add pecoff.
380         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
381         true.
382         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
383         * configure: Regenerate.
384         * pecoff.c: New file.
386 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
388         * Makefile.in: Regenerated with automake-1.11.6.
389         * aclocal.m4: Likewise.
390         * configure: Likewise.
392 2015-01-24  Matthias Klose  <doko@ubuntu.com>
394         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
395         * configure: Regenerate.
397 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
399         Update copyright years.
401 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
403         PR bootstrap/63784
404         * configure: Regenerated.
406 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
408         * ChangeLog.jit: New.
410 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
412         PR target/63610
413         * configure: Regenerate.
415 2014-10-23  Ian Lance Taylor  <iant@google.com>
417         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
418         Fix to return void *.
420 2014-05-08  Ian Lance Taylor  <iant@google.com>
422         * mmap.c (backtrace_free): If freeing a large aligned block of
423         memory, call munmap rather than holding onto it.
424         (backtrace_vector_grow): When growing a vector, double the number
425         of pages requested.  When releasing the old version of a grown
426         vector, pass the correct size to backtrace_free.
428 2014-03-07  Ian Lance Taylor  <iant@google.com>
430         * sort.c (backtrace_qsort): Use middle element as pivot.
432 2014-03-06  Ian Lance Taylor  <iant@google.com>
434         * sort.c: New file.
435         * stest.c: New file.
436         * internal.h (backtrace_qsort): Declare.
437         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
438         (read_line_info, read_function_entry): Likewise.
439         (read_function_info, build_dwarf_data): Likewise.
440         * elf.c (elf_initialize_syminfo): Likewise.
441         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
442         (stest_SOURCES, stest_LDADD): Define.
443         (check_PROGRAMS): Add stest.
445 2014-02-07  Misty De Meo  <misty@brew.sh>
447         PR target/58710
448         * configure.ac: Use AC_LINK_IFELSE in check for
449         _Unwind_GetIPInfo.
450         * configure: Regenerate.
452 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
454         Update copyright years
456 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
458         * elf.c (ET_DYN): Undefine and define again.
459         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
460         return early -1 without closing the descriptor.
461         (struct phdr_data): Add exe_descriptor.
462         (phdr_callback): If pd->exe_descriptor is not -1, for very first
463         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
464         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
465         call to elf_add.
466         (backtrace_initialize): Adjust call to elf_add.  If it returns
467         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
469 2013-12-05  Ian Lance Taylor  <iant@google.com>
471         * alloc.c (backtrace_vector_finish): Add error_callback and data
472         parameters.  Call backtrace_vector_release.  Return address base.
473         * mmap.c (backtrace_vector_finish): Add error_callback and data
474         parameters.  Return address base.
475         * dwarf.c (read_function_info): Get new address base from
476         backtrace_vector_finish.
477         * internal.h (backtrace_vector_finish): Update declaration.
479 2013-11-27  Ian Lance Taylor  <iant@google.com>
481         * dwarf.c (find_address_ranges): New static function, broken out
482         of build_address_map.
483         (build_address_map): Call it.
484         * btest.c (check): Check for missing filename or function, rather
485         than crashing.
486         (f3): Check that enough frames were returned.
488 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
490         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
491         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
492         last argument.
493         * btest.c (struct symdata): Add size field.
494         (callback_three): Add symsize argument.  Copy it to the data->size
495         field.
496         (f23): Set symdata.size to 0.
497         (test5): Likewise.  If sizeof (int) > 1, lookup address of
498         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
499         values.
501         * atomic.c: Include sys/types.h.
503 2013-11-18  Ian Lance Taylor  <iant@google.com>
505         * configure.ac: Check for support of __atomic extensions.
506         * internal.h: Declare or #define atomic functions for use in
507         backtrace code.
508         * atomic.c: New file.
509         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
510         (dwarf_fileline, backtrace_dwarf_add): Likewise.
511         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
512         (backtrace_initialize): Likewise.
513         * fileline.c (fileline_initialize): Likewise.
514         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
515         * configure, config.h.in, Makefile.in: Rebuild.
517 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
519         * elf.c (SHN_UNDEF): Define.
520         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
521         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
522         (elf_add): Adjust caller.
524         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
526 2013-11-16  Ian Lance Taylor  <iant@google.com>
528         * backtrace.h (backtrace_create_state): Correct comment about
529         threading.
531 2013-11-15  Ian Lance Taylor  <iant@google.com>
533         * backtrace.h (backtrace_syminfo): Update comment and parameter
534         name to take any address, not just a PC value.
535         * elf.c (STT_OBJECT): Define.
536         (elf_nosyms): Rename parameter pc to addr.
537         (elf_symbol_search): Rename local variable pc to addr.
538         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
539         (elf_syminfo): Rename parameter pc to addr.
540         * btest.c (global): New global variable.
541         (test5): New test.
542         (main): Call test5.
544 2013-10-17  Ian Lance Taylor  <iant@google.com>
546         * elf.c (elf_add): Don't get the wrong offsets if a debug section
547         is missing.
549 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
551         * configure.ac: Add --enable-host-shared, setting up
552         pre-existing PIC_FLAG variable within Makefile.am et al.
553         * configure: Regenerate.
555 2013-09-20  Alan Modra  <amodra@gmail.com>
557         * configure: Regenerate.
559 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
561         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
563 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
565         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
566         dl_iterate_phdr callbacks.
568 2013-03-25  Ian Lance Taylor  <iant@google.com>
570         * alloc.c: #include <sys/types.h>.
571         * mmap.c: Likewise.
573 2013-01-31  Ian Lance Taylor  <iant@google.com>
575         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
576         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
578 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
580         PR other/56076
581         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
582         attribute was not seen.
584 2013-01-16  Ian Lance Taylor  <iant@google.com>
586         * dwarf.c (struct unit): Add filename and abs_filename fields.
587         (build_address_map): Set new fields when reading unit.
588         (dwarf_lookup_pc): If we don't find an entry in the line table,
589         just return the main file name.
591 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
593         Update copyright years.
595 2013-01-01  Ian Lance Taylor  <iant@google.com>
597         PR bootstrap/54834
598         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
599         $(MULTIBUILDTOP)/../../gcc/include.
600         * Makefile.in: Rebuild.
602 2013-01-01  Ian Lance Taylor  <iant@google.com>
604         PR other/55536
605         * mmap.c (backtrace_alloc): Don't call sync functions if not
606         threaded.
607         (backtrace_free): Likewise.
609 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
611         * mmapio.c: Define MAP_FAILED if not defined.
613 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
615         PR bootstrap/54926
616         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
617         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
618         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
619         accepts it.
620         * Makefile.in: Regenerated.
621         * configure: Regenerated.
623 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
625         PR bootstrap/54926
626         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
627         * Makefile.in: Regenerated.
629 2012-11-20  Ian Lance Taylor  <iant@google.com>
631         * dwarf.c (read_attribute): Always clear val.
633 2012-11-13  Ian Lance Taylor  <iant@google.com>
635         PR other/55312
636         * configure.ac: Only add -Werror if building a target library.
637         * configure: Rebuild.
639 2012-11-12  Ian Lance Taylor  <iant@google.com>
640             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
641             Gerald Pfeifer  <gerald@pfeifer.com>
643         * configure.ac: Check for getexecname.
644         * fileline.c: #include <errno.h>.  Define getexecname if not
645         available.
646         (fileline_initialize): Try to find the executable in a few
647         different ways.
648         * print.c (error_callback): Only print the filename if it came
649         from the backtrace state.
650         * configure, config.h.in: Rebuild.
652 2012-10-29  Ian Lance Taylor  <iant@google.com>
654         * mmap.c (backtrace_vector_release): Correct last patch: add
655         aligned, not size.
657 2012-10-29  Ian Lance Taylor  <iant@google.com>
659         * mmap.c (backtrace_vector_release): Make sure freed block is
660         aligned on 8-byte boundary.
662 2012-10-26  Ian Lance Taylor  <iant@google.com>
664         PR other/55087
665         * posix.c (backtrace_open): Add does_not_exist parameter.
666         * elf.c (phdr_callback): Do not warn if shared library could not
667         be opened.
668         * fileline.c (fileline_initialize): Update calls to
669         backtrace_open.
670         * internal.h (backtrace_open): Update declaration.
672 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
674         PR target/55061
675         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
676         * configure: Regenerate.
678 2012-10-24  Ian Lance Taylor  <iant@google.com>
680         PR target/55061
681         * configure.ac: Check whether -funwind-tables option works.
682         * configure: Rebuild.
684 2012-10-11  Ian Lance Taylor  <iant@google.com>
686         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
687         * configure: Rebuild.
689 2012-10-10  Ian Lance Taylor  <iant@google.com>
691         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
692         lower case.
694 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
696         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
698 2012-10-09  Ian Lance Taylor  <iant@google.com>
700         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
701         (backtrace_dwarf_add): Likewise.
703 2012-10-09  Ian Lance Taylor  <iant@google.com>
705         Add support for tracing through shared libraries.
706         * configure.ac: Check for link.h and dl_iterate_phdr.
707         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
708         ELF macros before #defining them.
709         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
710         dl_iterate_phdr.
711         (struct elf_syminfo_data): Add next field.
712         (elf_initialize_syminfo): Initialize next field.
713         (elf_add_syminfo_data): New static function.
714         (elf_add): New static function, broken out of
715         backtrace_initialize.  Call backtrace_dwarf_add instead of
716         backtrace_dwarf_initialize.
717         (struct phdr_data): Define.
718         (phdr_callback): New static function.
719         (backtrace_initialize): Call elf_add.
720         * dwarf.c (struct dwarf_data): Add next and base_address fields.
721         (add_unit_addr): Add base_address parameter.  Change all callers.
722         (add_unit_ranges, build_address_map): Likewise.
723         (add_line): Add ddata parameter.  Change all callers.
724         (read_line_program, add_function_range): Likewise.
725         (dwarf_lookup_pc): New static function, broken out of
726         dwarf_fileline.
727         (dwarf_fileline): Call dwarf_lookup_pc.
728         (build_dwarf_data): New static function.
729         (backtrace_dwarf_add): New function.
730         (backtrace_dwarf_initialize): Remove.
731         * internal.h (backtrace_dwarf_initialize): Don't declare.
732         (backtrace_dwarf_add): Declare.
733         * configure, config.h.in: Rebuild.
735 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
737         * btest.c (f23): Avoid uninitialized variable warning.
739 2012-10-04  Ian Lance Taylor  <iant@google.com>
741         * dwarf.c: If the system header files do not declare strnlen,
742         provide our own version.
744 2012-10-03  Ian Lance Taylor  <iant@google.com>
746         * dwarf.c (read_uleb128): Fix overflow test.
747         (read_sleb128): Likewise.
748         (build_address_map): Don't change unit_buf.start.
750 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
752         PR other/54761
753         * configure.ac (EXTRA_FLAGS): New.
754         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
755         * configure, Makefile.in: Regenerate.
757 2012-09-29  Ian Lance Taylor  <iant@google.com>
759         PR other/54749
760         * fileline.c (fileline_initialize): Pass errnum as -1 when
761         reporting that we could not read executable information after a
762         previous failure.
764 2012-09-27  Ian Lance Taylor  <iant@google.com>
766         PR bootstrap/54732
767         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
768         * Makefile.am: Add dependencies for all objects.
769         * configure, aclocal.m4, Makefile.in: Rebuild.
771 2012-09-27  Ian Lance Taylor  <iant@google.com>
773         PR other/54726
774         * elf.c (backtrace_initialize): Set *fileln_fn, not
775         state->fileln_fn.
777 2012-09-19  Ian Lance Taylor  <iant@google.com>
779         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
780         as a target library.
781         * configure: Rebuild.
783 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
784             Ian Lance Taylor  <iant@google.com>
786         * configure.ac (GCC_HEADER_STDINT): Invoke.
787         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
788         * btest.c: Don't include <stdint.h>.
789         * dwarf.c: Likewise.
790         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
792 2012-09-18  Ian Lance Taylor  <iant@google.com>
794         PR bootstrap/54623
795         * Makefile.am (AM_CPPFLAGS): Define.
796         (AM_CFLAGS): Remove -I options.
797         * Makefile.in: Rebuild.
799 2012-09-18  Ian Lance Taylor  <iant@google.com>
801         * posix.c (O_BINARY): Define if not defined.
802         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
803         HAVE_FCNTL is defined.
804         * configure.ac: Test for the fcntl function.
805         * configure, config.h.in: Rebuild.
807 2012-09-18  Ian Lance Taylor  <iant@google.com>
809         * btest.c (test1, test2, test3, test4): Add the unused attribute.
811 2012-09-18  Ian Lance Taylor  <iant@google.com>
813         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
815 2012-09-18  Ian Lance Taylor  <iant@google.com>
817         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
818         * mmapio.c: Don't define _GNU_SOURCE.
819         * configure, config.h.in: Rebuild.
821 2012-09-18  Ian Lance Taylor  <iant@google.com>
823         * configure.ac: Check whether strnlen is declared.
824         * dwarf.c: Declare strnlen if not declared.
825         * configure, config.h.in: Rebuild.
827 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
829         * fileline.c: Include <stdlib.h>.
830         * mmap.c: Likewise.
832 2012-09-17  Ian Lance Taylor  <iant@google.com>
834         PR bootstrap/54611
835         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
836         parameter.
838 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
840         PR bootstrap/54611
841         * nounwind.c (backtrace_simple): Add state parameter.
843 2012-09-17  Ian Lance Taylor  <iant@google.com>
845         PR bootstrap/54609
846         * unknown.c (unknown_fileline): Add state parameter, remove
847         fileline_data parameter, name error_callback parameter.
848         (backtrace_initialize): Add state parameter.
850 2012-09-17  Ian Lance Taylor  <iant@google.com>
852         * Initial implementation.
854 Copyright (C) 2012-2018 Free Software Foundation, Inc.
856 Copying and distribution of this file, with or without modification,
857 are permitted in any medium without royalty provided the copyright
858 notice and this notice are preserved.