1 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
4 * configure: Regenerate.
6 2018-02-15 Jakub Jelinek <jakub@redhat.com>
9 * elf.c (SHT_PROGBITS): Undefine and define.
11 2018-02-14 Jakub Jelinek <jakub@redhat.com>
14 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
15 (struct elf_ppc64_opd_data): New type.
16 (elf_initialize_syminfo): Add opd argument, handle symbols
17 pointing into the PowerPC64 ELFv1 .opd section.
18 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
19 to structure with .opd data to elf_initialize_syminfo.
21 2018-01-31 Ian Lance Taylor <iant@golang.org>
23 * elf.c (elf_add): Close descriptor if we use a debugfile.
24 * btest.c (check_open_files): New static function.
25 (main): Call check_open_files.
27 2018-01-25 Ian Lance Taylor <iant@golang.org>
29 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
31 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
33 2018-01-25 Ian Lance Taylor <iant@golang.org>
35 * pecoff.c (coff_add): Only release syms_view if it is valid.
37 2018-01-25 Ian Lance Taylor <iant@golang.org>
39 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
41 2018-01-24 Ian Lance Taylor <iant@golang.org>
43 * pecoff.c (coff_add): Use coff_read4, not memcpy.
45 2018-01-24 Ian Lance Taylor <iant@golang.org>
48 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
51 2018-01-19 Tony Reix <tony.reix@atos.net>
53 * xcoff.c (xcoff_incl_compare): New function.
54 (xcoff_incl_search): New function.
55 (xcoff_process_linenos): Use bsearch to find include file.
56 (xcoff_initialize_fileline): Sort include file information.
58 2018-01-16 Ian Lance Taylor <iant@golang.org>
60 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
62 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
63 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
64 (elf_zlib_default_table): Update.
65 (elf_zlib_default_dist_table): New static array.
66 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
68 * ztest.c (struct zlib_test): Add uncompressed_len.
69 (tests): Initialize uncompressed_len field. Add new test case.
70 (test_samples): Use uncompressed_len field.
72 2018-01-03 Jakub Jelinek <jakub@redhat.com>
74 Update copyright years.
76 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
78 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
79 * aclocal.m4: Regenerate.
80 * Makefile.in: Likewise.
81 * configure: Likewise.
83 2017-10-06 Ian Lance Taylor <iant@golang.org>
85 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
86 zlib uncompress function.
88 2017-10-05 Ian Lance Taylor <iant@golang.org>
90 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
91 Read a four byte integer.
92 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
93 boundary before ever calling elf_zlib_fetch.
94 * ztest.c (test_large): Simplify print statements a bit.
96 2017-10-02 Ian Lance Taylor <iant@golang.org>
98 * ztest.c: #include <errno.h>.
99 (TEST_TIMING): Don't define, don't test.
100 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
101 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
102 (ZLIB_CLOCK_GETTIME_ARG): Define.
103 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
104 * Makefile.am: Likewise.
105 * configure, Makefile.in: Rebuild.
107 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
110 * Makefile.am: Append the content of clock_gettime_link to
112 * configure.ac: Test for the case that clock_gettime is in librt.
113 * Makefile.in: Regenerate.
114 * configure: Likewise.
117 * configure.ac: Check for clock_gettime.
118 * config.h.in: Regenerate.
119 * configure: Likewise.
120 * ztest.c (average_time, test_large): Conditionalize test timing
121 on clock_gettime availability.
123 2017-09-29 Tony Reix <tony.reix@atos.net>
125 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
126 (STYP_DWARF, SSUBTYP_DW*): Define.
127 (enum dwarf_section): Define.
128 (struct dwsect_info): Define.
129 (xcoff_add): Look for DWARF sections, pass them to
132 2017-09-28 Ian Lance Taylor <iant@golang.org>
135 * elf.c (__builtin_prefetch): Define if not __GNUC__.
137 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
138 (b_elf_chdr): Define type.
139 (enum debug_section): Add ZDEBUG_xxx values.
140 (debug_section_names): Add names for new sections.
141 (struct debug_section_info): Add compressed field.
142 (elf_zlib_failed, elf_zlib_fetch): New static functions.
143 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
144 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
145 (HUFFMAN_SECONDARY_SHIFT): Define.
146 (ZDEBUG_TABLE_SIZE): Define.
147 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
148 (final_next_secondary): New static variable if
149 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
150 (elf_zlib_inflate_table): New static function.
151 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
152 function to produce fixed Huffman table.
153 (elf_zlib_default_table): New static variable.
154 (elf_zlib_inflate): New static function.
155 (elf_zlib_verify_checksum): Likewise.
156 (elf_zlib_inflate_and_verify): Likewise.
157 (elf_uncompress_zdebug): Likewise.
158 (elf_uncompress_chdr): Likewise.
159 (backtrace_uncompress_zdebug): New extern function.
160 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
161 sections, and uncompress them.
162 * internal.h (backtrace_compress_zdebug): Declare.
164 * configure.ac: Check for -lz and check whether the linker
165 supports --compress-debug-sections.
166 * Makefile.am (ztest_SOURCES): New variable.
167 (ztest_CFLAGS, ztest_LDADD): New variables.
168 (check_PROGRAMS): Add ztest.
169 (ctestg_SOURCES): New variable.
170 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
171 (ctesta_SOURCES): New variable.
172 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
173 (check_PROGRAMS): Add ctestg and ctesta.
174 * configure, config.h.in, Makefile.in: Rebuild.
176 2017-09-22 Ian Lance Taylor <iant@golang.org>
179 * configure.ac: Check for lstat and readlink.
180 * elf.c (lstat, readlink): Provide dummy versions if real versions
182 * configure, config.h.in: Rebuild.
184 2017-09-21 Ian Lance Taylor <iant@google.com>
187 * elf.c (backtrace_initialize): Set pd.exe_filename.
189 2017-09-20 Ian Lance Taylor <iant@golang.org>
190 Denis Khalikov <d.khalikov@partner.samsung.com>
193 Support for external debug info.
194 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
195 (S_ISLNK): Define if not defined.
196 (xstrnlen): Define if strnlen is not available.
197 (b_elf_note): Define type.
198 (NT_GNU_BUILD_ID): Define macro.
199 (elf_crc32, elf_crc32_file): New static functions.
200 (elf_is_symlink, elf_readlink): New static functions.
201 (elf_open_debugfile_by_buildid): New static function.
202 (elf_try_debugfile): New static function.
203 (elf_find_debugfile_by_debuglink): New static function.
204 (elf_open_debugfile_by_debuglink): New static function.
205 (elf_add): Add filename and debuginfo parameters. Adjust all
206 callers. Look for external debug info notes, and try to fetch
207 debug info from external file.
208 (struct phdr_data): Add exe_filename field.
209 (phdr_callback): Pass filename to elf_add.
210 (backtrace_initialize): Add filename parameter.
211 * internal.h (backtrace_initialize): Add filename parameter.
212 * fileline.c (fileline_initialize): Pass filename to
213 backtrace_initialize.
214 * pecoff.c (fileline_initialize): Add unused filename parameter.
215 * unknown.c (fileline_initialize): Likewise.
216 * xcoff.c (fileline_initialize): Likewise.
217 * configure.ac: Check for objcopy --add-gnu-debuglink.
218 * Makefile.am (dtest): New test target.
219 * configure, Makefile.in: Rebuild.
221 2017-09-12 Steve Ellcey <sellcey@cavium.com>
224 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
225 * Makefile.in: Regenerate.
227 2017-09-12 Steve Ellcey <sellcey@cavium.com>
230 * libbacktrace/Makefile.in
231 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
233 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
236 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
238 2017-07-28 Tony Reix <tony.reix@atos.net>
240 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
242 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
244 * fileline.c (fileline_initialize): Print pid_t as long.
246 2017-07-26 Tony Reix <tony.reix@atos.net>
248 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
249 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
250 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
251 * configure, config.h.in: Regenerate.
253 2017-07-21 Tony Reix <tony.reix@atos.net>
255 * filetype.awk: Add AIX XCOFF type detection.
256 * configure.ac: Recognize xcoff format.
257 * Makefile.am (FORMAT_FILES): Add xcoff.c.
258 * fileline.c: Include <unistd.h>.
259 (fileline_initialize): Add case for AIX procfs.
261 * configure, Makefile.in: Rebuild.
263 2017-06-21 Richard Biener <rguenther@suse.de>
265 * configure.ac: Add AC_SYS_LARGEFILE.
266 * config.h.in: Regenerate.
267 * configure: Likewise.
269 2017-06-11 Ian Lance Taylor <iant@golang.org>
271 * elf.c (backtrace_initialize): Always set *fileline_fn.
273 * btest.c: Move support functions into testlib.c. Change calls to
274 check to pass file name.
275 * testlib.c: New file, copied from (part of) btest.c.
276 * testlib.h: New file, declarations for testlib.c.
277 * edtest.c: Use testlib.h and testlib.c.
278 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
279 * Makefile.am (btest_SOURCES): Add testlib.c.
280 (edtest_SOURCES): Likewise.
281 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
282 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
283 * configure, Makefile.in: Rebuild.
285 2017-05-19 Than McIntosh <thanm@google.com>
287 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
288 (read_line_header): Don't allocate dirs if dirs_count == 0.
289 * edtest.c: New file.
290 * edtest2.c: New file.
291 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
292 (check_PROGRAMS): Add edtest.
293 (edtest2_build.c, gen_edtest2_build): New targets.
294 * Makefile.in: Rebuild.
296 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
298 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
299 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
301 2017-01-01 Jakub Jelinek <jakub@redhat.com>
303 Update copyright years.
305 2016-11-15 Matthias Klose <doko@ubuntu.com>
307 * configure: Regenerate.
309 2016-09-11 Carlos Liam <carlos@aarzee.me>
311 * all: Remove meaningless trailing whitespace.
313 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
316 * elf.c (phdr_callback) [__i386__]: Add
317 __attribute__((__force_align_arg_pointer__)).
319 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
321 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
322 avoid possible crash.
323 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
324 missing debug info anymore.
326 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
328 * mmap.c (MAP_FAILED): Define if not defined.
330 2016-01-04 Jakub Jelinek <jakub@redhat.com>
332 Update copyright years.
334 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
336 * configure.ac: Specify that DJGPP do not have mmap
337 even when sys/mman.h exists.
338 * configure: Regenerate
340 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
343 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
344 * configure: Regenerate.
345 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
348 2015-09-17 Ian Lance Taylor <iant@google.com>
350 * posix.c (backtrace_open): Cast second argument of open() to int.
352 2015-09-11 Ian Lance Taylor <iant@google.com>
354 * Makefile.am (backtrace.lo): Depend on internal.h.
355 (sort.lo, stest.lo): Add explicit dependencies.
356 * Makefile.in: Rebuild.
358 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
360 * backtrace.c: #include <sys/types.h>.
362 2015-09-08 Ian Lance Taylor <iant@google.com>
365 * backtrace.c: #include "internal.h".
366 (struct backtrace_data): Add can_alloc field.
367 (unwind): If can_alloc is false, don't try to get file/line
369 (backtrace_full): Set can_alloc field in bdata.
370 * alloc.c (backtrace_alloc): Don't call error_callback if it is
372 * mmap.c (backtrace_alloc): Likewise.
373 * internal.h: Update comments for backtrace_alloc and
376 2015-09-08 Ian Lance Taylor <iant@google.com>
379 * mmap.c (backtrace_alloc): Correct test for mmap failure.
381 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
383 * configure.ac: For spu-*-* targets, set have_fcntl to no.
384 * configure: Regenerate.
386 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
388 * configure.ac: Remove [disable-shared] argument to LT_INIT.
389 Remove setting PIC_FLAG when building as target library.
390 * configure: Regenerate.
392 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
394 * configure.ac: Only compile with -fPIC if the target
396 * configure: Regenerate.
398 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
400 * configure.ac: Set have_mmap to no on spu-*-* targets.
401 * configure: Regenerate.
403 2015-08-13 Ian Lance Taylor <iant@google.com>
405 * dwarf.c (read_function_entry): Add vec_inlined parameter.
408 2015-06-11 Martin Sebor <msebor@redhat.com>
411 * dwarf.c (struct line): Add new field idx.
412 (line_compare): Use it.
414 (read_line_info): Reset it.
416 2015-05-29 Tristan Gingold <gingold@adacore.com>
418 * pecoff.c: New file.
419 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
420 * Makefile.in: Regenerate.
421 * filetype.awk: Detect pecoff.
422 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
424 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
426 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
427 * configure: Regenerate.
428 * pecoff.c: New file.
430 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
432 * Makefile.in: Regenerated with automake-1.11.6.
433 * aclocal.m4: Likewise.
434 * configure: Likewise.
436 2015-01-24 Matthias Klose <doko@ubuntu.com>
438 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
439 * configure: Regenerate.
441 2015-01-05 Jakub Jelinek <jakub@redhat.com>
443 Update copyright years.
445 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
448 * configure: Regenerated.
450 2014-11-11 David Malcolm <dmalcolm@redhat.com>
452 * ChangeLog.jit: New.
454 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
457 * configure: Regenerate.
459 2014-10-23 Ian Lance Taylor <iant@google.com>
461 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
462 Fix to return void *.
464 2014-05-08 Ian Lance Taylor <iant@google.com>
466 * mmap.c (backtrace_free): If freeing a large aligned block of
467 memory, call munmap rather than holding onto it.
468 (backtrace_vector_grow): When growing a vector, double the number
469 of pages requested. When releasing the old version of a grown
470 vector, pass the correct size to backtrace_free.
472 2014-03-07 Ian Lance Taylor <iant@google.com>
474 * sort.c (backtrace_qsort): Use middle element as pivot.
476 2014-03-06 Ian Lance Taylor <iant@google.com>
480 * internal.h (backtrace_qsort): Declare.
481 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
482 (read_line_info, read_function_entry): Likewise.
483 (read_function_info, build_dwarf_data): Likewise.
484 * elf.c (elf_initialize_syminfo): Likewise.
485 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
486 (stest_SOURCES, stest_LDADD): Define.
487 (check_PROGRAMS): Add stest.
489 2014-02-07 Misty De Meo <misty@brew.sh>
492 * configure.ac: Use AC_LINK_IFELSE in check for
494 * configure: Regenerate.
496 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
498 Update copyright years
500 2013-12-06 Jakub Jelinek <jakub@redhat.com>
502 * elf.c (ET_DYN): Undefine and define again.
503 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
504 return early -1 without closing the descriptor.
505 (struct phdr_data): Add exe_descriptor.
506 (phdr_callback): If pd->exe_descriptor is not -1, for very first
507 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
508 otherwise backtrace_close the exe_descriptor if not -1. Adjust
510 (backtrace_initialize): Adjust call to elf_add. If it returns
511 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
513 2013-12-05 Ian Lance Taylor <iant@google.com>
515 * alloc.c (backtrace_vector_finish): Add error_callback and data
516 parameters. Call backtrace_vector_release. Return address base.
517 * mmap.c (backtrace_vector_finish): Add error_callback and data
518 parameters. Return address base.
519 * dwarf.c (read_function_info): Get new address base from
520 backtrace_vector_finish.
521 * internal.h (backtrace_vector_finish): Update declaration.
523 2013-11-27 Ian Lance Taylor <iant@google.com>
525 * dwarf.c (find_address_ranges): New static function, broken out
526 of build_address_map.
527 (build_address_map): Call it.
528 * btest.c (check): Check for missing filename or function, rather
530 (f3): Check that enough frames were returned.
532 2013-11-19 Jakub Jelinek <jakub@redhat.com>
534 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
535 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
537 * btest.c (struct symdata): Add size field.
538 (callback_three): Add symsize argument. Copy it to the data->size
540 (f23): Set symdata.size to 0.
541 (test5): Likewise. If sizeof (int) > 1, lookup address of
542 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
545 * atomic.c: Include sys/types.h.
547 2013-11-18 Ian Lance Taylor <iant@google.com>
549 * configure.ac: Check for support of __atomic extensions.
550 * internal.h: Declare or #define atomic functions for use in
552 * atomic.c: New file.
553 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
554 (dwarf_fileline, backtrace_dwarf_add): Likewise.
555 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
556 (backtrace_initialize): Likewise.
557 * fileline.c (fileline_initialize): Likewise.
558 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
559 * configure, config.h.in, Makefile.in: Rebuild.
561 2013-11-18 Jakub Jelinek <jakub@redhat.com>
563 * elf.c (SHN_UNDEF): Define.
564 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
565 with st_shndx == SHN_UNDEF. Add base_address to address fields.
566 (elf_add): Adjust caller.
568 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
570 2013-11-16 Ian Lance Taylor <iant@google.com>
572 * backtrace.h (backtrace_create_state): Correct comment about
575 2013-11-15 Ian Lance Taylor <iant@google.com>
577 * backtrace.h (backtrace_syminfo): Update comment and parameter
578 name to take any address, not just a PC value.
579 * elf.c (STT_OBJECT): Define.
580 (elf_nosyms): Rename parameter pc to addr.
581 (elf_symbol_search): Rename local variable pc to addr.
582 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
583 (elf_syminfo): Rename parameter pc to addr.
584 * btest.c (global): New global variable.
588 2013-10-17 Ian Lance Taylor <iant@google.com>
590 * elf.c (elf_add): Don't get the wrong offsets if a debug section
593 2013-10-15 David Malcolm <dmalcolm@redhat.com>
595 * configure.ac: Add --enable-host-shared, setting up
596 pre-existing PIC_FLAG variable within Makefile.am et al.
597 * configure: Regenerate.
599 2013-09-20 Alan Modra <amodra@gmail.com>
601 * configure: Regenerate.
603 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
605 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
607 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
609 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
610 dl_iterate_phdr callbacks.
612 2013-03-25 Ian Lance Taylor <iant@google.com>
614 * alloc.c: #include <sys/types.h>.
617 2013-01-31 Ian Lance Taylor <iant@google.com>
619 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
620 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
622 2013-01-25 Jakub Jelinek <jakub@redhat.com>
625 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
626 attribute was not seen.
628 2013-01-16 Ian Lance Taylor <iant@google.com>
630 * dwarf.c (struct unit): Add filename and abs_filename fields.
631 (build_address_map): Set new fields when reading unit.
632 (dwarf_lookup_pc): If we don't find an entry in the line table,
633 just return the main file name.
635 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
637 Update copyright years.
639 2013-01-01 Ian Lance Taylor <iant@google.com>
642 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
643 $(MULTIBUILDTOP)/../../gcc/include.
644 * Makefile.in: Rebuild.
646 2013-01-01 Ian Lance Taylor <iant@google.com>
649 * mmap.c (backtrace_alloc): Don't call sync functions if not
651 (backtrace_free): Likewise.
653 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
655 * mmapio.c: Define MAP_FAILED if not defined.
657 2012-12-11 Jakub Jelinek <jakub@redhat.com>
660 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
661 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
662 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
664 * Makefile.in: Regenerated.
665 * configure: Regenerated.
667 2012-12-07 Jakub Jelinek <jakub@redhat.com>
670 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
671 * Makefile.in: Regenerated.
673 2012-11-20 Ian Lance Taylor <iant@google.com>
675 * dwarf.c (read_attribute): Always clear val.
677 2012-11-13 Ian Lance Taylor <iant@google.com>
680 * configure.ac: Only add -Werror if building a target library.
681 * configure: Rebuild.
683 2012-11-12 Ian Lance Taylor <iant@google.com>
684 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
685 Gerald Pfeifer <gerald@pfeifer.com>
687 * configure.ac: Check for getexecname.
688 * fileline.c: #include <errno.h>. Define getexecname if not
690 (fileline_initialize): Try to find the executable in a few
692 * print.c (error_callback): Only print the filename if it came
693 from the backtrace state.
694 * configure, config.h.in: Rebuild.
696 2012-10-29 Ian Lance Taylor <iant@google.com>
698 * mmap.c (backtrace_vector_release): Correct last patch: add
701 2012-10-29 Ian Lance Taylor <iant@google.com>
703 * mmap.c (backtrace_vector_release): Make sure freed block is
704 aligned on 8-byte boundary.
706 2012-10-26 Ian Lance Taylor <iant@google.com>
709 * posix.c (backtrace_open): Add does_not_exist parameter.
710 * elf.c (phdr_callback): Do not warn if shared library could not
712 * fileline.c (fileline_initialize): Update calls to
714 * internal.h (backtrace_open): Update declaration.
716 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
719 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
720 * configure: Regenerate.
722 2012-10-24 Ian Lance Taylor <iant@google.com>
725 * configure.ac: Check whether -funwind-tables option works.
726 * configure: Rebuild.
728 2012-10-11 Ian Lance Taylor <iant@google.com>
730 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
731 * configure: Rebuild.
733 2012-10-10 Ian Lance Taylor <iant@google.com>
735 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
738 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
740 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
742 2012-10-09 Ian Lance Taylor <iant@google.com>
744 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
745 (backtrace_dwarf_add): Likewise.
747 2012-10-09 Ian Lance Taylor <iant@google.com>
749 Add support for tracing through shared libraries.
750 * configure.ac: Check for link.h and dl_iterate_phdr.
751 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
752 ELF macros before #defining them.
753 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
755 (struct elf_syminfo_data): Add next field.
756 (elf_initialize_syminfo): Initialize next field.
757 (elf_add_syminfo_data): New static function.
758 (elf_add): New static function, broken out of
759 backtrace_initialize. Call backtrace_dwarf_add instead of
760 backtrace_dwarf_initialize.
761 (struct phdr_data): Define.
762 (phdr_callback): New static function.
763 (backtrace_initialize): Call elf_add.
764 * dwarf.c (struct dwarf_data): Add next and base_address fields.
765 (add_unit_addr): Add base_address parameter. Change all callers.
766 (add_unit_ranges, build_address_map): Likewise.
767 (add_line): Add ddata parameter. Change all callers.
768 (read_line_program, add_function_range): Likewise.
769 (dwarf_lookup_pc): New static function, broken out of
771 (dwarf_fileline): Call dwarf_lookup_pc.
772 (build_dwarf_data): New static function.
773 (backtrace_dwarf_add): New function.
774 (backtrace_dwarf_initialize): Remove.
775 * internal.h (backtrace_dwarf_initialize): Don't declare.
776 (backtrace_dwarf_add): Declare.
777 * configure, config.h.in: Rebuild.
779 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
781 * btest.c (f23): Avoid uninitialized variable warning.
783 2012-10-04 Ian Lance Taylor <iant@google.com>
785 * dwarf.c: If the system header files do not declare strnlen,
786 provide our own version.
788 2012-10-03 Ian Lance Taylor <iant@google.com>
790 * dwarf.c (read_uleb128): Fix overflow test.
791 (read_sleb128): Likewise.
792 (build_address_map): Don't change unit_buf.start.
794 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
797 * configure.ac (EXTRA_FLAGS): New.
798 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
799 * configure, Makefile.in: Regenerate.
801 2012-09-29 Ian Lance Taylor <iant@google.com>
804 * fileline.c (fileline_initialize): Pass errnum as -1 when
805 reporting that we could not read executable information after a
808 2012-09-27 Ian Lance Taylor <iant@google.com>
811 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
812 * Makefile.am: Add dependencies for all objects.
813 * configure, aclocal.m4, Makefile.in: Rebuild.
815 2012-09-27 Ian Lance Taylor <iant@google.com>
818 * elf.c (backtrace_initialize): Set *fileln_fn, not
821 2012-09-19 Ian Lance Taylor <iant@google.com>
823 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
825 * configure: Rebuild.
827 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
828 Ian Lance Taylor <iant@google.com>
830 * configure.ac (GCC_HEADER_STDINT): Invoke.
831 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
832 * btest.c: Don't include <stdint.h>.
834 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
836 2012-09-18 Ian Lance Taylor <iant@google.com>
839 * Makefile.am (AM_CPPFLAGS): Define.
840 (AM_CFLAGS): Remove -I options.
841 * Makefile.in: Rebuild.
843 2012-09-18 Ian Lance Taylor <iant@google.com>
845 * posix.c (O_BINARY): Define if not defined.
846 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
847 HAVE_FCNTL is defined.
848 * configure.ac: Test for the fcntl function.
849 * configure, config.h.in: Rebuild.
851 2012-09-18 Ian Lance Taylor <iant@google.com>
853 * btest.c (test1, test2, test3, test4): Add the unused attribute.
855 2012-09-18 Ian Lance Taylor <iant@google.com>
857 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
859 2012-09-18 Ian Lance Taylor <iant@google.com>
861 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
862 * mmapio.c: Don't define _GNU_SOURCE.
863 * configure, config.h.in: Rebuild.
865 2012-09-18 Ian Lance Taylor <iant@google.com>
867 * configure.ac: Check whether strnlen is declared.
868 * dwarf.c: Declare strnlen if not declared.
869 * configure, config.h.in: Rebuild.
871 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
873 * fileline.c: Include <stdlib.h>.
876 2012-09-17 Ian Lance Taylor <iant@google.com>
879 * nounwind.c (backtrace_full): Rename from backtrace. Add state
882 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
885 * nounwind.c (backtrace_simple): Add state parameter.
887 2012-09-17 Ian Lance Taylor <iant@google.com>
890 * unknown.c (unknown_fileline): Add state parameter, remove
891 fileline_data parameter, name error_callback parameter.
892 (backtrace_initialize): Add state parameter.
894 2012-09-17 Ian Lance Taylor <iant@google.com>
896 * Initial implementation.
898 Copyright (C) 2012-2018 Free Software Foundation, Inc.
900 Copying and distribution of this file, with or without modification,
901 are permitted in any medium without royalty provided the copyright
902 notice and this notice are preserved.