PR c++/84192
[official-gcc.git] / libbacktrace / ChangeLog
blob323ac94165c007184ecfc6602ddc20d5738d8e89
1 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
3         PR other/82368
4         * elf.c (SHT_PROGBITS): Undefine and define.
6 2018-02-14  Jakub Jelinek  <jakub@redhat.com>
8         PR other/82368
9         * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
10         (struct elf_ppc64_opd_data): New type.
11         (elf_initialize_syminfo): Add opd argument, handle symbols
12         pointing into the PowerPC64 ELFv1 .opd section.
13         (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
14         to structure with .opd data to elf_initialize_syminfo.
16 2018-01-31  Ian Lance Taylor  <iant@golang.org>
18         * elf.c (elf_add): Close descriptor if we use a debugfile.
19         * btest.c (check_open_files): New static function.
20         (main): Call check_open_files.
22 2018-01-25  Ian Lance Taylor  <iant@golang.org>
24         * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
25         desired CRC is zero.
26         (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
28 2018-01-25  Ian Lance Taylor  <iant@golang.org>
30         * pecoff.c (coff_add): Only release syms_view if it is valid.
32 2018-01-25  Ian Lance Taylor  <iant@golang.org>
34         * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
36 2018-01-24  Ian Lance Taylor  <iant@golang.org>
38         * pecoff.c (coff_add): Use coff_read4, not memcpy.
40 2018-01-24  Ian Lance Taylor  <iant@golang.org>
42         PR other/68239
43         * mmap.c (backtrace_free_locked): Don't put more than 16 entries
44         on the free list.
46 2018-01-19  Tony Reix  <tony.reix@atos.net>
48         * xcoff.c (xcoff_incl_compare): New function.
49         (xcoff_incl_search): New function.
50         (xcoff_process_linenos): Use bsearch to find include file.
51         (xcoff_initialize_fileline): Sort include file information.
53 2018-01-16  Ian Lance Taylor  <iant@golang.org>
55         * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
56         288.
57         (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
58         elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
59         (elf_zlib_default_table): Update.
60         (elf_zlib_default_dist_table): New static array.
61         (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
62         for block type 1.
63         * ztest.c (struct zlib_test): Add uncompressed_len.
64         (tests): Initialize uncompressed_len field.  Add new test case.
65         (test_samples): Use uncompressed_len field.
67 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
69         Update copyright years.
71 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
73         * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
74         * aclocal.m4: Regenerate.
75         * Makefile.in: Likewise.
76         * configure: Likewise.
78 2017-10-06  Ian Lance Taylor  <iant@golang.org>
80         * ztest.c (test_large): Pass unsigned long *, not size_t *, to
81         zlib uncompress function.
83 2017-10-05  Ian Lance Taylor  <iant@golang.org>
85         * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
86         Read a four byte integer.
87         (elf_zlib_inflate): Change val to uint64_t.  Align pin to a 32-bit
88         boundary before ever calling elf_zlib_fetch.
89         * ztest.c (test_large): Simplify print statements a bit.
91 2017-10-02  Ian Lance Taylor  <iant@golang.org>
93         * ztest.c: #include <errno.h>.
94         (TEST_TIMING): Don't define, don't test.
95         (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
96         (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
97         (ZLIB_CLOCK_GETTIME_ARG): Define.
98         * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
99         * Makefile.am: Likewise.
100         * configure, Makefile.in: Rebuild.
102 2017-10-02  Thomas Schwinge  <thomas@codesourcery.com>
104         PR other/67165
105         * Makefile.am: Append the content of clock_gettime_link to
106         ztest_LDADD.
107         * configure.ac: Test for the case that clock_gettime is in librt.
108         * Makefile.in: Regenerate.
109         * configure: Likewise.
111         PR other/67165
112         * configure.ac: Check for clock_gettime.
113         * config.h.in: Regenerate.
114         * configure: Likewise.
115         * ztest.c (average_time, test_large): Conditionalize test timing
116         on clock_gettime availability.
118 2017-09-29  Tony Reix  <tony.reix@atos.net>
120         * xcoff.c: Initial support for DWARF debug sections in XCOFF.
121         (STYP_DWARF, SSUBTYP_DW*): Define.
122         (enum dwarf_section): Define.
123         (struct dwsect_info): Define.
124         (xcoff_add): Look for DWARF sections, pass them to
125         backtrace_dwarf_add.
127 2017-09-28  Ian Lance Taylor  <iant@golang.org>
129         PR other/67165
130         * elf.c (__builtin_prefetch): Define if not __GNUC__.
131         (unlikely): Define.
132         (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
133         (b_elf_chdr): Define type.
134         (enum debug_section): Add ZDEBUG_xxx values.
135         (debug_section_names): Add names for new sections.
136         (struct debug_section_info): Add compressed field.
137         (elf_zlib_failed, elf_zlib_fetch): New static functions.
138         (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
139         (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
140         (HUFFMAN_SECONDARY_SHIFT): Define.
141         (ZDEBUG_TABLE_SIZE): Define.
142         (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
143         (final_next_secondary): New static variable if
144         BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
145         (elf_zlib_inflate_table): New static function.
146         (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
147         function to produce fixed Huffman table.
148         (elf_zlib_default_table): New static variable.
149         (elf_zlib_inflate): New static function.
150         (elf_zlib_verify_checksum): Likewise.
151         (elf_zlib_inflate_and_verify): Likewise.
152         (elf_uncompress_zdebug): Likewise.
153         (elf_uncompress_chdr): Likewise.
154         (backtrace_uncompress_zdebug): New extern function.
155         (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
156         sections, and uncompress them.
157         * internal.h (backtrace_compress_zdebug): Declare.
158         * ztest.c: New file.
159         * configure.ac: Check for -lz and check whether the linker
160         supports --compress-debug-sections.
161         * Makefile.am (ztest_SOURCES): New variable.
162         (ztest_CFLAGS, ztest_LDADD): New variables.
163         (check_PROGRAMS): Add ztest.
164         (ctestg_SOURCES): New variable.
165         (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
166         (ctesta_SOURCES): New variable.
167         (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
168         (check_PROGRAMS): Add ctestg and ctesta.
169         * configure, config.h.in, Makefile.in: Rebuild.
171 2017-09-22  Ian Lance Taylor  <iant@golang.org>
173         PR sanitizer/77631
174         * configure.ac: Check for lstat and readlink.
175         * elf.c (lstat, readlink): Provide dummy versions if real versions
176         are not available.
177         * configure, config.h.in: Rebuild.
179 2017-09-21  Ian Lance Taylor  <iant@google.com>
181         PR go/82284
182         * elf.c (backtrace_initialize): Set pd.exe_filename.
184 2017-09-20  Ian Lance Taylor  <iant@golang.org>
185             Denis Khalikov  <d.khalikov@partner.samsung.com>
187         PR sanitizer/77631
188         Support for external debug info.
189         * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
190         (S_ISLNK): Define if not defined.
191         (xstrnlen): Define if strnlen is not available.
192         (b_elf_note): Define type.
193         (NT_GNU_BUILD_ID): Define macro.
194         (elf_crc32, elf_crc32_file): New static functions.
195         (elf_is_symlink, elf_readlink): New static functions.
196         (elf_open_debugfile_by_buildid): New static function.
197         (elf_try_debugfile): New static function.
198         (elf_find_debugfile_by_debuglink): New static function.
199         (elf_open_debugfile_by_debuglink): New static function.
200         (elf_add): Add filename and debuginfo parameters.  Adjust all
201         callers.  Look for external debug info notes, and try to fetch
202         debug info from external file.
203         (struct phdr_data): Add exe_filename field.
204         (phdr_callback): Pass filename to elf_add.
205         (backtrace_initialize): Add filename parameter.
206         * internal.h (backtrace_initialize): Add filename parameter.
207         * fileline.c (fileline_initialize): Pass filename to
208         backtrace_initialize.
209         * pecoff.c (fileline_initialize): Add unused filename parameter.
210         * unknown.c (fileline_initialize): Likewise.
211         * xcoff.c (fileline_initialize): Likewise.
212         * configure.ac: Check for objcopy --add-gnu-debuglink.
213         * Makefile.am (dtest): New test target.
214         * configure, Makefile.in: Rebuild.
216 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
218         PR other/81096
219         * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
220         * Makefile.in: Regenerate.
222 2017-09-12  Steve Ellcey  <sellcey@cavium.com>
224         PR other/81096
225         * libbacktrace/Makefile.in
226         (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
228 2017-08-02  David Edelsohn  <dje.gcc@gmail.com>
230         PR bootstrap/81638
231         * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
233 2017-07-28  Tony Reix  <tony.reix@atos.net>
235         * xcoff.c: Don't leak a file descriptor if an archive is malformed.
237 2017-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
239         * fileline.c (fileline_initialize): Print pid_t as long.
241 2017-07-26  Tony Reix  <tony.reix@atos.net>
243         * configure.ac: Check for XCOFF32/XCOFF64.  Check for loadquery.
244         * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
245         * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
246         * configure, config.h.in: Regenerate.
248 2017-07-21  Tony Reix  <tony.reix@atos.net>
250         * filetype.awk: Add AIX XCOFF type detection.
251         * configure.ac: Recognize xcoff format.
252         * Makefile.am (FORMAT_FILES): Add xcoff.c.
253         * fileline.c: Include <unistd.h>.
254         (fileline_initialize): Add case for AIX procfs.
255         * xcoff.c: New file.
256         * configure, Makefile.in: Rebuild.
258 2017-06-21  Richard Biener  <rguenther@suse.de>
260         * configure.ac: Add AC_SYS_LARGEFILE.
261         * config.h.in: Regenerate.
262         * configure: Likewise.
264 2017-06-11  Ian Lance Taylor  <iant@golang.org>
266         * elf.c (backtrace_initialize): Always set *fileline_fn.
267         * ttest.c: New file.
268         * btest.c: Move support functions into testlib.c.  Change calls to
269         check to pass file name.
270         * testlib.c: New file, copied from (part of) btest.c.
271         * testlib.h: New file, declarations for testlib.c.
272         * edtest.c: Use testlib.h and testlib.c.
273         * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
274         * Makefile.am (btest_SOURCES): Add testlib.c.
275         (edtest_SOURCES): Likewise.
276         (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
277         (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
278         * configure, Makefile.in: Rebuild.
280 2017-05-19  Than McIntosh  <thanm@google.com>
282         * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
283         (read_line_header): Don't allocate dirs if dirs_count == 0.
284         * edtest.c: New file.
285         * edtest2.c: New file.
286         * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
287         (check_PROGRAMS): Add edtest.
288         (edtest2_build.c, gen_edtest2_build): New targets.
289         * Makefile.in: Rebuild.
291 2017-03-08  Sam Thursfield  <sam.thursfield@codethink.co.uk>
293         * btest.c (test5): Replace #ifdef guard with 'unused' attribute
294         to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
296 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
298         Update copyright years.
300 2016-11-15  Matthias Klose  <doko@ubuntu.com>
302         * configure: Regenerate.
304 2016-09-11  Carlos Liam  <carlos@aarzee.me>
306         * all: Remove meaningless trailing whitespace.
308 2016-05-18  Uros Bizjak  <ubizjak@gmail.com>
310         PR target/71161
311         * elf.c (phdr_callback) [__i386__]: Add
312         __attribute__((__force_align_arg_pointer__)).
314 2016-03-02  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
316         * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
317         avoid possible crash.
318         (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
319         missing debug info anymore.
321 2016-02-06  John David Anglin  <danglin@gcc.gnu.org>
323         * mmap.c (MAP_FAILED): Define if not defined.
325 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
327         Update copyright years.
329 2015-12-18  Andris Pavenis  <andris.pavenis@iki.fi>
331         * configure.ac: Specify that DJGPP do not have mmap
332         even when sys/mman.h exists.
333         * configure: Regenerate
335 2015-12-09  John David Anglin  <danglin@gcc.gnu.org>
337         PR libgfortran/68115
338         * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
339         * configure: Regenerate.
340         * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
341         to void.
343 2015-09-17  Ian Lance Taylor  <iant@google.com>
345         * posix.c (backtrace_open): Cast second argument of open() to int.
347 2015-09-11  Ian Lance Taylor  <iant@google.com>
349         * Makefile.am (backtrace.lo): Depend on internal.h.
350         (sort.lo, stest.lo): Add explicit dependencies.
351         * Makefile.in: Rebuild.
353 2015-09-09  Hans-Peter Nilsson  <hp@axis.com>
355         * backtrace.c: #include <sys/types.h>.
357 2015-09-08  Ian Lance Taylor  <iant@google.com>
359         PR other/67457
360         * backtrace.c: #include "internal.h".
361         (struct backtrace_data): Add can_alloc field.
362         (unwind): If can_alloc is false, don't try to get file/line
363         information.
364         (backtrace_full): Set can_alloc field in bdata.
365         * alloc.c (backtrace_alloc): Don't call error_callback if it is
366         NULL.
367         * mmap.c (backtrace_alloc): Likewise.
368         * internal.h: Update comments for backtrace_alloc and
369         backtrace_free.
371 2015-09-08  Ian Lance Taylor  <iant@google.com>
373         PR other/67457
374         * mmap.c (backtrace_alloc): Correct test for mmap failure.
376 2015-08-31  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
378         * configure.ac: For spu-*-* targets, set have_fcntl to no.
379         * configure: Regenerate.
381 2015-08-27  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
383         * configure.ac: Remove [disable-shared] argument to LT_INIT.
384         Remove setting PIC_FLAG when building as target library.
385         * configure: Regenerate.
387 2015-08-26  Hans-Peter Nilsson  <hp@axis.com>
389         * configure.ac: Only compile with -fPIC if the target
390         supports it.
391         * configure: Regenerate.
393 2015-08-24  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
395         * configure.ac: Set have_mmap to no on spu-*-* targets.
396         * configure: Regenerate.
398 2015-08-13  Ian Lance Taylor  <iant@google.com>
400         * dwarf.c (read_function_entry): Add vec_inlined parameter.
401         Change all callers.
403 2015-06-11  Martin Sebor  <msebor@redhat.com>
405         PR sanitizer/65479
406         * dwarf.c (struct line): Add new field idx.
407         (line_compare): Use it.
408         (add_line): Set it.
409         (read_line_info): Reset it.
411 2015-05-29  Tristan Gingold  <gingold@adacore.com>
413         * pecoff.c: New file.
414         * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
415         * Makefile.in: Regenerate.
416         * filetype.awk: Detect pecoff.
417         * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
418         Add pecoff.
419         * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
420         true.
421         * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
422         * configure: Regenerate.
423         * pecoff.c: New file.
425 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
427         * Makefile.in: Regenerated with automake-1.11.6.
428         * aclocal.m4: Likewise.
429         * configure: Likewise.
431 2015-01-24  Matthias Klose  <doko@ubuntu.com>
433         * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
434         * configure: Regenerate.
436 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
438         Update copyright years.
440 2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
442         PR bootstrap/63784
443         * configure: Regenerated.
445 2014-11-11  David Malcolm  <dmalcolm@redhat.com>
447         * ChangeLog.jit: New.
449 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
451         PR target/63610
452         * configure: Regenerate.
454 2014-10-23  Ian Lance Taylor  <iant@google.com>
456         * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
457         Fix to return void *.
459 2014-05-08  Ian Lance Taylor  <iant@google.com>
461         * mmap.c (backtrace_free): If freeing a large aligned block of
462         memory, call munmap rather than holding onto it.
463         (backtrace_vector_grow): When growing a vector, double the number
464         of pages requested.  When releasing the old version of a grown
465         vector, pass the correct size to backtrace_free.
467 2014-03-07  Ian Lance Taylor  <iant@google.com>
469         * sort.c (backtrace_qsort): Use middle element as pivot.
471 2014-03-06  Ian Lance Taylor  <iant@google.com>
473         * sort.c: New file.
474         * stest.c: New file.
475         * internal.h (backtrace_qsort): Declare.
476         * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
477         (read_line_info, read_function_entry): Likewise.
478         (read_function_info, build_dwarf_data): Likewise.
479         * elf.c (elf_initialize_syminfo): Likewise.
480         * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
481         (stest_SOURCES, stest_LDADD): Define.
482         (check_PROGRAMS): Add stest.
484 2014-02-07  Misty De Meo  <misty@brew.sh>
486         PR target/58710
487         * configure.ac: Use AC_LINK_IFELSE in check for
488         _Unwind_GetIPInfo.
489         * configure: Regenerate.
491 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
493         Update copyright years
495 2013-12-06  Jakub Jelinek  <jakub@redhat.com>
497         * elf.c (ET_DYN): Undefine and define again.
498         (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
499         return early -1 without closing the descriptor.
500         (struct phdr_data): Add exe_descriptor.
501         (phdr_callback): If pd->exe_descriptor is not -1, for very first
502         call if dlpi_name is NULL just call elf_add with the exe_descriptor,
503         otherwise backtrace_close the exe_descriptor if not -1.  Adjust
504         call to elf_add.
505         (backtrace_initialize): Adjust call to elf_add.  If it returns
506         -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
508 2013-12-05  Ian Lance Taylor  <iant@google.com>
510         * alloc.c (backtrace_vector_finish): Add error_callback and data
511         parameters.  Call backtrace_vector_release.  Return address base.
512         * mmap.c (backtrace_vector_finish): Add error_callback and data
513         parameters.  Return address base.
514         * dwarf.c (read_function_info): Get new address base from
515         backtrace_vector_finish.
516         * internal.h (backtrace_vector_finish): Update declaration.
518 2013-11-27  Ian Lance Taylor  <iant@google.com>
520         * dwarf.c (find_address_ranges): New static function, broken out
521         of build_address_map.
522         (build_address_map): Call it.
523         * btest.c (check): Check for missing filename or function, rather
524         than crashing.
525         (f3): Check that enough frames were returned.
527 2013-11-19  Jakub Jelinek  <jakub@redhat.com>
529         * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
530         * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
531         last argument.
532         * btest.c (struct symdata): Add size field.
533         (callback_three): Add symsize argument.  Copy it to the data->size
534         field.
535         (f23): Set symdata.size to 0.
536         (test5): Likewise.  If sizeof (int) > 1, lookup address of
537         ((uintptr_t) &global) + 1.  Verify symdata.val and symdata.size
538         values.
540         * atomic.c: Include sys/types.h.
542 2013-11-18  Ian Lance Taylor  <iant@google.com>
544         * configure.ac: Check for support of __atomic extensions.
545         * internal.h: Declare or #define atomic functions for use in
546         backtrace code.
547         * atomic.c: New file.
548         * dwarf.c (dwarf_lookup_pc): Use atomic functions.
549         (dwarf_fileline, backtrace_dwarf_add): Likewise.
550         * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
551         (backtrace_initialize): Likewise.
552         * fileline.c (fileline_initialize): Likewise.
553         * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
554         * configure, config.h.in, Makefile.in: Rebuild.
556 2013-11-18  Jakub Jelinek  <jakub@redhat.com>
558         * elf.c (SHN_UNDEF): Define.
559         (elf_initialize_syminfo): Add base_address argument.  Ignore symbols
560         with st_shndx == SHN_UNDEF.  Add base_address to address fields.
561         (elf_add): Adjust caller.
563         * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
565 2013-11-16  Ian Lance Taylor  <iant@google.com>
567         * backtrace.h (backtrace_create_state): Correct comment about
568         threading.
570 2013-11-15  Ian Lance Taylor  <iant@google.com>
572         * backtrace.h (backtrace_syminfo): Update comment and parameter
573         name to take any address, not just a PC value.
574         * elf.c (STT_OBJECT): Define.
575         (elf_nosyms): Rename parameter pc to addr.
576         (elf_symbol_search): Rename local variable pc to addr.
577         (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
578         (elf_syminfo): Rename parameter pc to addr.
579         * btest.c (global): New global variable.
580         (test5): New test.
581         (main): Call test5.
583 2013-10-17  Ian Lance Taylor  <iant@google.com>
585         * elf.c (elf_add): Don't get the wrong offsets if a debug section
586         is missing.
588 2013-10-15  David Malcolm  <dmalcolm@redhat.com>
590         * configure.ac: Add --enable-host-shared, setting up
591         pre-existing PIC_FLAG variable within Makefile.am et al.
592         * configure: Regenerate.
594 2013-09-20  Alan Modra  <amodra@gmail.com>
596         * configure: Regenerate.
598 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
600         * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
602 2013-07-23  Alexander Monakov  <amonakov@ispras.ru>
604         * elf.c (backtrace_initialize): Pass elf_fileline_fn to
605         dl_iterate_phdr callbacks.
607 2013-03-25  Ian Lance Taylor  <iant@google.com>
609         * alloc.c: #include <sys/types.h>.
610         * mmap.c: Likewise.
612 2013-01-31  Ian Lance Taylor  <iant@google.com>
614         * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
615         (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
617 2013-01-25  Jakub Jelinek  <jakub@redhat.com>
619         PR other/56076
620         * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
621         attribute was not seen.
623 2013-01-16  Ian Lance Taylor  <iant@google.com>
625         * dwarf.c (struct unit): Add filename and abs_filename fields.
626         (build_address_map): Set new fields when reading unit.
627         (dwarf_lookup_pc): If we don't find an entry in the line table,
628         just return the main file name.
630 2013-01-14  Richard Sandiford  <rdsandiford@googlemail.com>
632         Update copyright years.
634 2013-01-01  Ian Lance Taylor  <iant@google.com>
636         PR bootstrap/54834
637         * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
638         $(MULTIBUILDTOP)/../../gcc/include.
639         * Makefile.in: Rebuild.
641 2013-01-01  Ian Lance Taylor  <iant@google.com>
643         PR other/55536
644         * mmap.c (backtrace_alloc): Don't call sync functions if not
645         threaded.
646         (backtrace_free): Likewise.
648 2012-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
650         * mmapio.c: Define MAP_FAILED if not defined.
652 2012-12-11  Jakub Jelinek  <jakub@redhat.com>
654         PR bootstrap/54926
655         * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
656         * configure.ac: If --with-target-subdir, add -frandom-seed=$@
657         to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
658         accepts it.
659         * Makefile.in: Regenerated.
660         * configure: Regenerated.
662 2012-12-07  Jakub Jelinek  <jakub@redhat.com>
664         PR bootstrap/54926
665         * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
666         * Makefile.in: Regenerated.
668 2012-11-20  Ian Lance Taylor  <iant@google.com>
670         * dwarf.c (read_attribute): Always clear val.
672 2012-11-13  Ian Lance Taylor  <iant@google.com>
674         PR other/55312
675         * configure.ac: Only add -Werror if building a target library.
676         * configure: Rebuild.
678 2012-11-12  Ian Lance Taylor  <iant@google.com>
679             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
680             Gerald Pfeifer  <gerald@pfeifer.com>
682         * configure.ac: Check for getexecname.
683         * fileline.c: #include <errno.h>.  Define getexecname if not
684         available.
685         (fileline_initialize): Try to find the executable in a few
686         different ways.
687         * print.c (error_callback): Only print the filename if it came
688         from the backtrace state.
689         * configure, config.h.in: Rebuild.
691 2012-10-29  Ian Lance Taylor  <iant@google.com>
693         * mmap.c (backtrace_vector_release): Correct last patch: add
694         aligned, not size.
696 2012-10-29  Ian Lance Taylor  <iant@google.com>
698         * mmap.c (backtrace_vector_release): Make sure freed block is
699         aligned on 8-byte boundary.
701 2012-10-26  Ian Lance Taylor  <iant@google.com>
703         PR other/55087
704         * posix.c (backtrace_open): Add does_not_exist parameter.
705         * elf.c (phdr_callback): Do not warn if shared library could not
706         be opened.
707         * fileline.c (fileline_initialize): Update calls to
708         backtrace_open.
709         * internal.h (backtrace_open): Update declaration.
711 2012-10-26  Jack Howarth  <howarth@bromo.med.uc.edu>
713         PR target/55061
714         * configure.ac: Check for _Unwind_GetIPInfo function declaration.
715         * configure: Regenerate.
717 2012-10-24  Ian Lance Taylor  <iant@google.com>
719         PR target/55061
720         * configure.ac: Check whether -funwind-tables option works.
721         * configure: Rebuild.
723 2012-10-11  Ian Lance Taylor  <iant@google.com>
725         * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
726         * configure: Rebuild.
728 2012-10-10  Ian Lance Taylor  <iant@google.com>
730         * elf.c: Rename all Elf typedefs to start with b_elf, and be all
731         lower case.
733 2012-10-10  Hans-Peter Nilsson  <hp@bitrange.com>
735         * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
737 2012-10-09  Ian Lance Taylor  <iant@google.com>
739         * dwarf.c (dwarf_fileline): Add cast to avoid warning.
740         (backtrace_dwarf_add): Likewise.
742 2012-10-09  Ian Lance Taylor  <iant@google.com>
744         Add support for tracing through shared libraries.
745         * configure.ac: Check for link.h and dl_iterate_phdr.
746         * elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
747         ELF macros before #defining them.
748         (dl_phdr_info, dl_iterate_phdr): Define if system does not have
749         dl_iterate_phdr.
750         (struct elf_syminfo_data): Add next field.
751         (elf_initialize_syminfo): Initialize next field.
752         (elf_add_syminfo_data): New static function.
753         (elf_add): New static function, broken out of
754         backtrace_initialize.  Call backtrace_dwarf_add instead of
755         backtrace_dwarf_initialize.
756         (struct phdr_data): Define.
757         (phdr_callback): New static function.
758         (backtrace_initialize): Call elf_add.
759         * dwarf.c (struct dwarf_data): Add next and base_address fields.
760         (add_unit_addr): Add base_address parameter.  Change all callers.
761         (add_unit_ranges, build_address_map): Likewise.
762         (add_line): Add ddata parameter.  Change all callers.
763         (read_line_program, add_function_range): Likewise.
764         (dwarf_lookup_pc): New static function, broken out of
765         dwarf_fileline.
766         (dwarf_fileline): Call dwarf_lookup_pc.
767         (build_dwarf_data): New static function.
768         (backtrace_dwarf_add): New function.
769         (backtrace_dwarf_initialize): Remove.
770         * internal.h (backtrace_dwarf_initialize): Don't declare.
771         (backtrace_dwarf_add): Declare.
772         * configure, config.h.in: Rebuild.
774 2012-10-04  Gerald Pfeifer  <gerald@pfeifer.com>
776         * btest.c (f23): Avoid uninitialized variable warning.
778 2012-10-04  Ian Lance Taylor  <iant@google.com>
780         * dwarf.c: If the system header files do not declare strnlen,
781         provide our own version.
783 2012-10-03  Ian Lance Taylor  <iant@google.com>
785         * dwarf.c (read_uleb128): Fix overflow test.
786         (read_sleb128): Likewise.
787         (build_address_map): Don't change unit_buf.start.
789 2012-10-02  Uros Bizjak  <ubizjak@gmail.com>
791         PR other/54761
792         * configure.ac (EXTRA_FLAGS): New.
793         * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
794         * configure, Makefile.in: Regenerate.
796 2012-09-29  Ian Lance Taylor  <iant@google.com>
798         PR other/54749
799         * fileline.c (fileline_initialize): Pass errnum as -1 when
800         reporting that we could not read executable information after a
801         previous failure.
803 2012-09-27  Ian Lance Taylor  <iant@google.com>
805         PR bootstrap/54732
806         * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
807         * Makefile.am: Add dependencies for all objects.
808         * configure, aclocal.m4, Makefile.in: Rebuild.
810 2012-09-27  Ian Lance Taylor  <iant@google.com>
812         PR other/54726
813         * elf.c (backtrace_initialize): Set *fileln_fn, not
814         state->fileln_fn.
816 2012-09-19  Ian Lance Taylor  <iant@google.com>
818         * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
819         as a target library.
820         * configure: Rebuild.
822 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
823             Ian Lance Taylor  <iant@google.com>
825         * configure.ac (GCC_HEADER_STDINT): Invoke.
826         * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
827         * btest.c: Don't include <stdint.h>.
828         * dwarf.c: Likewise.
829         * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
831 2012-09-18  Ian Lance Taylor  <iant@google.com>
833         PR bootstrap/54623
834         * Makefile.am (AM_CPPFLAGS): Define.
835         (AM_CFLAGS): Remove -I options.
836         * Makefile.in: Rebuild.
838 2012-09-18  Ian Lance Taylor  <iant@google.com>
840         * posix.c (O_BINARY): Define if not defined.
841         (backtrace_open): Pass O_BINARY to open.  Only call fcntl if
842         HAVE_FCNTL is defined.
843         * configure.ac: Test for the fcntl function.
844         * configure, config.h.in: Rebuild.
846 2012-09-18  Ian Lance Taylor  <iant@google.com>
848         * btest.c (test1, test2, test3, test4): Add the unused attribute.
850 2012-09-18  Ian Lance Taylor  <iant@google.com>
852         * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
854 2012-09-18  Ian Lance Taylor  <iant@google.com>
856         * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
857         * mmapio.c: Don't define _GNU_SOURCE.
858         * configure, config.h.in: Rebuild.
860 2012-09-18  Ian Lance Taylor  <iant@google.com>
862         * configure.ac: Check whether strnlen is declared.
863         * dwarf.c: Declare strnlen if not declared.
864         * configure, config.h.in: Rebuild.
866 2012-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
868         * fileline.c: Include <stdlib.h>.
869         * mmap.c: Likewise.
871 2012-09-17  Ian Lance Taylor  <iant@google.com>
873         PR bootstrap/54611
874         * nounwind.c (backtrace_full): Rename from backtrace.  Add state
875         parameter.
877 2012-09-17  Gerald Pfeifer  <gerald@pfeifer.com>
879         PR bootstrap/54611
880         * nounwind.c (backtrace_simple): Add state parameter.
882 2012-09-17  Ian Lance Taylor  <iant@google.com>
884         PR bootstrap/54609
885         * unknown.c (unknown_fileline): Add state parameter, remove
886         fileline_data parameter, name error_callback parameter.
887         (backtrace_initialize): Add state parameter.
889 2012-09-17  Ian Lance Taylor  <iant@google.com>
891         * Initial implementation.
893 Copyright (C) 2012-2018 Free Software Foundation, Inc.
895 Copying and distribution of this file, with or without modification,
896 are permitted in any medium without royalty provided the copyright
897 notice and this notice are preserved.