1 2018-12-12 Tom de Vries <tdevries@suse.de>
3 * Makefile.am (TESTS): Add allocfail.sh.
4 (check_PROGRAMS): Add allocfail.
5 * Makefile.in: Regenerate.
6 * instrumented_alloc.c: New file. Redefine malloc and realloc.
8 * allocfail.c: New file.
9 * allocfail.sh: New file.
11 2018-11-30 Tom de Vries <tdevries@suse.de>
13 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
14 test_xcoff_64, test_pecoff and test_unknown.
15 * Makefile.in: Regenerate.
16 * test_format.c: New file.
18 2018-11-30 Tom de Vries <tdevries@suse.de>
20 * Makefile.am : Add _with_alloc version for each test in
22 * Makefile.in: Regenerate.
24 2018-11-30 Tom de Vries <tdevries@suse.de>
26 * internal.h (backtrace_vector_free): New static inline fuction,
28 * dwarf.c (read_line_info): ... here.
30 2018-11-28 Tom de Vries <tdevries@suse.de>
32 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
35 2018-11-27 Tom de Vries <tdevries@suse.de>
37 * mmap.c (backtrace_vector_release): Same.
38 * unittest.c (test1): Add check.
40 2018-11-27 Tom de Vries <tdevries@suse.de>
42 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
44 * Makefile.am (check_PROGRAMS): Add unittest.
45 * Makefile.in: Regenerate.
46 * unittest.c: New file.
48 2018-11-22 Tom de Vries <tdevries@suse.de>
50 * dwarf.c (read_initial_length): Factor out of ...
51 (build_address_map, read_line_info): ... here.
53 2018-11-21 Tom de Vries <tdevries@suse.de>
55 * dwarf.c (read_string): Factor out of ...
56 (read_attribute, read_line_header, read_line_program): ... here.
58 2018-10-31 Joseph Myers <joseph@codesourcery.com>
61 * Makefile.am: Include multilib.am.
62 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
63 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
65 2018-10-05 Ian Lance Taylor <iant@golang.org>
68 * backtrace.h: Document that backtrace_create_state should be
71 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
73 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
74 * Makefile.in: Regenerate.
75 * config.h.in: Likewise.
76 * configure: Likewise.
78 2018-08-01 Tony Reix <tony.reix@atos.net>
80 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
81 (struct xcoff_func, struct xcoff_func_vector): New structs.
82 (xcoff_syminfo): Drop leading dot from symbol name.
83 (xcoff_line_compare, xcoff_line_search): Remove.
84 (xcoff_func_compare, xcoff_func_search): New static functions.
85 (xcoff_lookup_pc): Search function table.
86 (xcoff_add_line, xcoff_process_linenos): Remove.
87 (xcoff_initialize_fileline): Build function table.
89 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
92 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
93 checking up to 36 bytes.
95 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
97 * configure: Regenerated.
99 2018-04-19 Jakub Jelinek <jakub@redhat.com>
101 * configure: Regenerated.
103 2018-04-17 Ian Lance Taylor <iant@golang.org>
105 * backtrace.c: Revert last two changes. Don't call mmap
108 2018-04-17 Ian Lance Taylor <iant@golang.org>
110 * backtrace.c: Include backtrace-supported.h before checking
111 BACKTRACE_USES_MALLOC.
113 2018-04-17 Ian Lance Taylor <iant@golang.org>
115 * backtrace.c (backtrace_full): When testing whether we can
116 allocate memory, call mmap directly, and munmap the memory.
118 2018-04-04 Jakub Jelinek <jakub@redhat.com>
121 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
122 big endian, only use 32-bit loads if endianity macros are predefined
123 and indicate big or little endian.
125 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
128 * configure: Regenerate.
130 2018-02-15 Jakub Jelinek <jakub@redhat.com>
133 * elf.c (SHT_PROGBITS): Undefine and define.
135 2018-02-14 Jakub Jelinek <jakub@redhat.com>
138 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
139 (struct elf_ppc64_opd_data): New type.
140 (elf_initialize_syminfo): Add opd argument, handle symbols
141 pointing into the PowerPC64 ELFv1 .opd section.
142 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
143 to structure with .opd data to elf_initialize_syminfo.
145 2018-01-31 Ian Lance Taylor <iant@golang.org>
147 * elf.c (elf_add): Close descriptor if we use a debugfile.
148 * btest.c (check_open_files): New static function.
149 (main): Call check_open_files.
151 2018-01-25 Ian Lance Taylor <iant@golang.org>
153 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
155 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
157 2018-01-25 Ian Lance Taylor <iant@golang.org>
159 * pecoff.c (coff_add): Only release syms_view if it is valid.
161 2018-01-25 Ian Lance Taylor <iant@golang.org>
163 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
165 2018-01-24 Ian Lance Taylor <iant@golang.org>
167 * pecoff.c (coff_add): Use coff_read4, not memcpy.
169 2018-01-24 Ian Lance Taylor <iant@golang.org>
172 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
175 2018-01-19 Tony Reix <tony.reix@atos.net>
177 * xcoff.c (xcoff_incl_compare): New function.
178 (xcoff_incl_search): New function.
179 (xcoff_process_linenos): Use bsearch to find include file.
180 (xcoff_initialize_fileline): Sort include file information.
182 2018-01-16 Ian Lance Taylor <iant@golang.org>
184 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
186 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
187 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
188 (elf_zlib_default_table): Update.
189 (elf_zlib_default_dist_table): New static array.
190 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
192 * ztest.c (struct zlib_test): Add uncompressed_len.
193 (tests): Initialize uncompressed_len field. Add new test case.
194 (test_samples): Use uncompressed_len field.
196 2018-01-03 Jakub Jelinek <jakub@redhat.com>
198 Update copyright years.
200 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
202 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
203 * aclocal.m4: Regenerate.
204 * Makefile.in: Likewise.
205 * configure: Likewise.
207 2017-10-06 Ian Lance Taylor <iant@golang.org>
209 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
210 zlib uncompress function.
212 2017-10-05 Ian Lance Taylor <iant@golang.org>
214 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
215 Read a four byte integer.
216 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
217 boundary before ever calling elf_zlib_fetch.
218 * ztest.c (test_large): Simplify print statements a bit.
220 2017-10-02 Ian Lance Taylor <iant@golang.org>
222 * ztest.c: #include <errno.h>.
223 (TEST_TIMING): Don't define, don't test.
224 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
225 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
226 (ZLIB_CLOCK_GETTIME_ARG): Define.
227 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
228 * Makefile.am: Likewise.
229 * configure, Makefile.in: Rebuild.
231 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
234 * Makefile.am: Append the content of clock_gettime_link to
236 * configure.ac: Test for the case that clock_gettime is in librt.
237 * Makefile.in: Regenerate.
238 * configure: Likewise.
241 * configure.ac: Check for clock_gettime.
242 * config.h.in: Regenerate.
243 * configure: Likewise.
244 * ztest.c (average_time, test_large): Conditionalize test timing
245 on clock_gettime availability.
247 2017-09-29 Tony Reix <tony.reix@atos.net>
249 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
250 (STYP_DWARF, SSUBTYP_DW*): Define.
251 (enum dwarf_section): Define.
252 (struct dwsect_info): Define.
253 (xcoff_add): Look for DWARF sections, pass them to
256 2017-09-28 Ian Lance Taylor <iant@golang.org>
259 * elf.c (__builtin_prefetch): Define if not __GNUC__.
261 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
262 (b_elf_chdr): Define type.
263 (enum debug_section): Add ZDEBUG_xxx values.
264 (debug_section_names): Add names for new sections.
265 (struct debug_section_info): Add compressed field.
266 (elf_zlib_failed, elf_zlib_fetch): New static functions.
267 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
268 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
269 (HUFFMAN_SECONDARY_SHIFT): Define.
270 (ZDEBUG_TABLE_SIZE): Define.
271 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
272 (final_next_secondary): New static variable if
273 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
274 (elf_zlib_inflate_table): New static function.
275 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
276 function to produce fixed Huffman table.
277 (elf_zlib_default_table): New static variable.
278 (elf_zlib_inflate): New static function.
279 (elf_zlib_verify_checksum): Likewise.
280 (elf_zlib_inflate_and_verify): Likewise.
281 (elf_uncompress_zdebug): Likewise.
282 (elf_uncompress_chdr): Likewise.
283 (backtrace_uncompress_zdebug): New extern function.
284 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
285 sections, and uncompress them.
286 * internal.h (backtrace_compress_zdebug): Declare.
288 * configure.ac: Check for -lz and check whether the linker
289 supports --compress-debug-sections.
290 * Makefile.am (ztest_SOURCES): New variable.
291 (ztest_CFLAGS, ztest_LDADD): New variables.
292 (check_PROGRAMS): Add ztest.
293 (ctestg_SOURCES): New variable.
294 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
295 (ctesta_SOURCES): New variable.
296 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
297 (check_PROGRAMS): Add ctestg and ctesta.
298 * configure, config.h.in, Makefile.in: Rebuild.
300 2017-09-22 Ian Lance Taylor <iant@golang.org>
303 * configure.ac: Check for lstat and readlink.
304 * elf.c (lstat, readlink): Provide dummy versions if real versions
306 * configure, config.h.in: Rebuild.
308 2017-09-21 Ian Lance Taylor <iant@google.com>
311 * elf.c (backtrace_initialize): Set pd.exe_filename.
313 2017-09-20 Ian Lance Taylor <iant@golang.org>
314 Denis Khalikov <d.khalikov@partner.samsung.com>
317 Support for external debug info.
318 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
319 (S_ISLNK): Define if not defined.
320 (xstrnlen): Define if strnlen is not available.
321 (b_elf_note): Define type.
322 (NT_GNU_BUILD_ID): Define macro.
323 (elf_crc32, elf_crc32_file): New static functions.
324 (elf_is_symlink, elf_readlink): New static functions.
325 (elf_open_debugfile_by_buildid): New static function.
326 (elf_try_debugfile): New static function.
327 (elf_find_debugfile_by_debuglink): New static function.
328 (elf_open_debugfile_by_debuglink): New static function.
329 (elf_add): Add filename and debuginfo parameters. Adjust all
330 callers. Look for external debug info notes, and try to fetch
331 debug info from external file.
332 (struct phdr_data): Add exe_filename field.
333 (phdr_callback): Pass filename to elf_add.
334 (backtrace_initialize): Add filename parameter.
335 * internal.h (backtrace_initialize): Add filename parameter.
336 * fileline.c (fileline_initialize): Pass filename to
337 backtrace_initialize.
338 * pecoff.c (fileline_initialize): Add unused filename parameter.
339 * unknown.c (fileline_initialize): Likewise.
340 * xcoff.c (fileline_initialize): Likewise.
341 * configure.ac: Check for objcopy --add-gnu-debuglink.
342 * Makefile.am (dtest): New test target.
343 * configure, Makefile.in: Rebuild.
345 2017-09-12 Steve Ellcey <sellcey@cavium.com>
348 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
349 * Makefile.in: Regenerate.
351 2017-09-12 Steve Ellcey <sellcey@cavium.com>
354 * libbacktrace/Makefile.in
355 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
357 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
360 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
362 2017-07-28 Tony Reix <tony.reix@atos.net>
364 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
366 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
368 * fileline.c (fileline_initialize): Print pid_t as long.
370 2017-07-26 Tony Reix <tony.reix@atos.net>
372 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
373 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
374 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
375 * configure, config.h.in: Regenerate.
377 2017-07-21 Tony Reix <tony.reix@atos.net>
379 * filetype.awk: Add AIX XCOFF type detection.
380 * configure.ac: Recognize xcoff format.
381 * Makefile.am (FORMAT_FILES): Add xcoff.c.
382 * fileline.c: Include <unistd.h>.
383 (fileline_initialize): Add case for AIX procfs.
385 * configure, Makefile.in: Rebuild.
387 2017-06-21 Richard Biener <rguenther@suse.de>
389 * configure.ac: Add AC_SYS_LARGEFILE.
390 * config.h.in: Regenerate.
391 * configure: Likewise.
393 2017-06-11 Ian Lance Taylor <iant@golang.org>
395 * elf.c (backtrace_initialize): Always set *fileline_fn.
397 * btest.c: Move support functions into testlib.c. Change calls to
398 check to pass file name.
399 * testlib.c: New file, copied from (part of) btest.c.
400 * testlib.h: New file, declarations for testlib.c.
401 * edtest.c: Use testlib.h and testlib.c.
402 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
403 * Makefile.am (btest_SOURCES): Add testlib.c.
404 (edtest_SOURCES): Likewise.
405 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
406 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
407 * configure, Makefile.in: Rebuild.
409 2017-05-19 Than McIntosh <thanm@google.com>
411 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
412 (read_line_header): Don't allocate dirs if dirs_count == 0.
413 * edtest.c: New file.
414 * edtest2.c: New file.
415 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
416 (check_PROGRAMS): Add edtest.
417 (edtest2_build.c, gen_edtest2_build): New targets.
418 * Makefile.in: Rebuild.
420 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
422 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
423 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
425 2017-01-01 Jakub Jelinek <jakub@redhat.com>
427 Update copyright years.
429 2016-11-15 Matthias Klose <doko@ubuntu.com>
431 * configure: Regenerate.
433 2016-09-11 Carlos Liam <carlos@aarzee.me>
435 * all: Remove meaningless trailing whitespace.
437 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
440 * elf.c (phdr_callback) [__i386__]: Add
441 __attribute__((__force_align_arg_pointer__)).
443 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
445 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
446 avoid possible crash.
447 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
448 missing debug info anymore.
450 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
452 * mmap.c (MAP_FAILED): Define if not defined.
454 2016-01-04 Jakub Jelinek <jakub@redhat.com>
456 Update copyright years.
458 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
460 * configure.ac: Specify that DJGPP do not have mmap
461 even when sys/mman.h exists.
462 * configure: Regenerate
464 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
467 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
468 * configure: Regenerate.
469 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
472 2015-09-17 Ian Lance Taylor <iant@google.com>
474 * posix.c (backtrace_open): Cast second argument of open() to int.
476 2015-09-11 Ian Lance Taylor <iant@google.com>
478 * Makefile.am (backtrace.lo): Depend on internal.h.
479 (sort.lo, stest.lo): Add explicit dependencies.
480 * Makefile.in: Rebuild.
482 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
484 * backtrace.c: #include <sys/types.h>.
486 2015-09-08 Ian Lance Taylor <iant@google.com>
489 * backtrace.c: #include "internal.h".
490 (struct backtrace_data): Add can_alloc field.
491 (unwind): If can_alloc is false, don't try to get file/line
493 (backtrace_full): Set can_alloc field in bdata.
494 * alloc.c (backtrace_alloc): Don't call error_callback if it is
496 * mmap.c (backtrace_alloc): Likewise.
497 * internal.h: Update comments for backtrace_alloc and
500 2015-09-08 Ian Lance Taylor <iant@google.com>
503 * mmap.c (backtrace_alloc): Correct test for mmap failure.
505 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
507 * configure.ac: For spu-*-* targets, set have_fcntl to no.
508 * configure: Regenerate.
510 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
512 * configure.ac: Remove [disable-shared] argument to LT_INIT.
513 Remove setting PIC_FLAG when building as target library.
514 * configure: Regenerate.
516 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
518 * configure.ac: Only compile with -fPIC if the target
520 * configure: Regenerate.
522 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
524 * configure.ac: Set have_mmap to no on spu-*-* targets.
525 * configure: Regenerate.
527 2015-08-13 Ian Lance Taylor <iant@google.com>
529 * dwarf.c (read_function_entry): Add vec_inlined parameter.
532 2015-06-11 Martin Sebor <msebor@redhat.com>
535 * dwarf.c (struct line): Add new field idx.
536 (line_compare): Use it.
538 (read_line_info): Reset it.
540 2015-05-29 Tristan Gingold <gingold@adacore.com>
542 * pecoff.c: New file.
543 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
544 * Makefile.in: Regenerate.
545 * filetype.awk: Detect pecoff.
546 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
548 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
550 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
551 * configure: Regenerate.
552 * pecoff.c: New file.
554 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
556 * Makefile.in: Regenerated with automake-1.11.6.
557 * aclocal.m4: Likewise.
558 * configure: Likewise.
560 2015-01-24 Matthias Klose <doko@ubuntu.com>
562 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
563 * configure: Regenerate.
565 2015-01-05 Jakub Jelinek <jakub@redhat.com>
567 Update copyright years.
569 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
572 * configure: Regenerated.
574 2014-11-11 David Malcolm <dmalcolm@redhat.com>
576 * ChangeLog.jit: New.
578 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
581 * configure: Regenerate.
583 2014-10-23 Ian Lance Taylor <iant@google.com>
585 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
586 Fix to return void *.
588 2014-05-08 Ian Lance Taylor <iant@google.com>
590 * mmap.c (backtrace_free): If freeing a large aligned block of
591 memory, call munmap rather than holding onto it.
592 (backtrace_vector_grow): When growing a vector, double the number
593 of pages requested. When releasing the old version of a grown
594 vector, pass the correct size to backtrace_free.
596 2014-03-07 Ian Lance Taylor <iant@google.com>
598 * sort.c (backtrace_qsort): Use middle element as pivot.
600 2014-03-06 Ian Lance Taylor <iant@google.com>
604 * internal.h (backtrace_qsort): Declare.
605 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
606 (read_line_info, read_function_entry): Likewise.
607 (read_function_info, build_dwarf_data): Likewise.
608 * elf.c (elf_initialize_syminfo): Likewise.
609 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
610 (stest_SOURCES, stest_LDADD): Define.
611 (check_PROGRAMS): Add stest.
613 2014-02-07 Misty De Meo <misty@brew.sh>
616 * configure.ac: Use AC_LINK_IFELSE in check for
618 * configure: Regenerate.
620 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
622 Update copyright years
624 2013-12-06 Jakub Jelinek <jakub@redhat.com>
626 * elf.c (ET_DYN): Undefine and define again.
627 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
628 return early -1 without closing the descriptor.
629 (struct phdr_data): Add exe_descriptor.
630 (phdr_callback): If pd->exe_descriptor is not -1, for very first
631 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
632 otherwise backtrace_close the exe_descriptor if not -1. Adjust
634 (backtrace_initialize): Adjust call to elf_add. If it returns
635 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
637 2013-12-05 Ian Lance Taylor <iant@google.com>
639 * alloc.c (backtrace_vector_finish): Add error_callback and data
640 parameters. Call backtrace_vector_release. Return address base.
641 * mmap.c (backtrace_vector_finish): Add error_callback and data
642 parameters. Return address base.
643 * dwarf.c (read_function_info): Get new address base from
644 backtrace_vector_finish.
645 * internal.h (backtrace_vector_finish): Update declaration.
647 2013-11-27 Ian Lance Taylor <iant@google.com>
649 * dwarf.c (find_address_ranges): New static function, broken out
650 of build_address_map.
651 (build_address_map): Call it.
652 * btest.c (check): Check for missing filename or function, rather
654 (f3): Check that enough frames were returned.
656 2013-11-19 Jakub Jelinek <jakub@redhat.com>
658 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
659 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
661 * btest.c (struct symdata): Add size field.
662 (callback_three): Add symsize argument. Copy it to the data->size
664 (f23): Set symdata.size to 0.
665 (test5): Likewise. If sizeof (int) > 1, lookup address of
666 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
669 * atomic.c: Include sys/types.h.
671 2013-11-18 Ian Lance Taylor <iant@google.com>
673 * configure.ac: Check for support of __atomic extensions.
674 * internal.h: Declare or #define atomic functions for use in
676 * atomic.c: New file.
677 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
678 (dwarf_fileline, backtrace_dwarf_add): Likewise.
679 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
680 (backtrace_initialize): Likewise.
681 * fileline.c (fileline_initialize): Likewise.
682 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
683 * configure, config.h.in, Makefile.in: Rebuild.
685 2013-11-18 Jakub Jelinek <jakub@redhat.com>
687 * elf.c (SHN_UNDEF): Define.
688 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
689 with st_shndx == SHN_UNDEF. Add base_address to address fields.
690 (elf_add): Adjust caller.
692 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
694 2013-11-16 Ian Lance Taylor <iant@google.com>
696 * backtrace.h (backtrace_create_state): Correct comment about
699 2013-11-15 Ian Lance Taylor <iant@google.com>
701 * backtrace.h (backtrace_syminfo): Update comment and parameter
702 name to take any address, not just a PC value.
703 * elf.c (STT_OBJECT): Define.
704 (elf_nosyms): Rename parameter pc to addr.
705 (elf_symbol_search): Rename local variable pc to addr.
706 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
707 (elf_syminfo): Rename parameter pc to addr.
708 * btest.c (global): New global variable.
712 2013-10-17 Ian Lance Taylor <iant@google.com>
714 * elf.c (elf_add): Don't get the wrong offsets if a debug section
717 2013-10-15 David Malcolm <dmalcolm@redhat.com>
719 * configure.ac: Add --enable-host-shared, setting up
720 pre-existing PIC_FLAG variable within Makefile.am et al.
721 * configure: Regenerate.
723 2013-09-20 Alan Modra <amodra@gmail.com>
725 * configure: Regenerate.
727 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
729 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
731 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
733 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
734 dl_iterate_phdr callbacks.
736 2013-03-25 Ian Lance Taylor <iant@google.com>
738 * alloc.c: #include <sys/types.h>.
741 2013-01-31 Ian Lance Taylor <iant@google.com>
743 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
744 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
746 2013-01-25 Jakub Jelinek <jakub@redhat.com>
749 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
750 attribute was not seen.
752 2013-01-16 Ian Lance Taylor <iant@google.com>
754 * dwarf.c (struct unit): Add filename and abs_filename fields.
755 (build_address_map): Set new fields when reading unit.
756 (dwarf_lookup_pc): If we don't find an entry in the line table,
757 just return the main file name.
759 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
761 Update copyright years.
763 2013-01-01 Ian Lance Taylor <iant@google.com>
766 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
767 $(MULTIBUILDTOP)/../../gcc/include.
768 * Makefile.in: Rebuild.
770 2013-01-01 Ian Lance Taylor <iant@google.com>
773 * mmap.c (backtrace_alloc): Don't call sync functions if not
775 (backtrace_free): Likewise.
777 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
779 * mmapio.c: Define MAP_FAILED if not defined.
781 2012-12-11 Jakub Jelinek <jakub@redhat.com>
784 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
785 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
786 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
788 * Makefile.in: Regenerated.
789 * configure: Regenerated.
791 2012-12-07 Jakub Jelinek <jakub@redhat.com>
794 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
795 * Makefile.in: Regenerated.
797 2012-11-20 Ian Lance Taylor <iant@google.com>
799 * dwarf.c (read_attribute): Always clear val.
801 2012-11-13 Ian Lance Taylor <iant@google.com>
804 * configure.ac: Only add -Werror if building a target library.
805 * configure: Rebuild.
807 2012-11-12 Ian Lance Taylor <iant@google.com>
808 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
809 Gerald Pfeifer <gerald@pfeifer.com>
811 * configure.ac: Check for getexecname.
812 * fileline.c: #include <errno.h>. Define getexecname if not
814 (fileline_initialize): Try to find the executable in a few
816 * print.c (error_callback): Only print the filename if it came
817 from the backtrace state.
818 * configure, config.h.in: Rebuild.
820 2012-10-29 Ian Lance Taylor <iant@google.com>
822 * mmap.c (backtrace_vector_release): Correct last patch: add
825 2012-10-29 Ian Lance Taylor <iant@google.com>
827 * mmap.c (backtrace_vector_release): Make sure freed block is
828 aligned on 8-byte boundary.
830 2012-10-26 Ian Lance Taylor <iant@google.com>
833 * posix.c (backtrace_open): Add does_not_exist parameter.
834 * elf.c (phdr_callback): Do not warn if shared library could not
836 * fileline.c (fileline_initialize): Update calls to
838 * internal.h (backtrace_open): Update declaration.
840 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
843 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
844 * configure: Regenerate.
846 2012-10-24 Ian Lance Taylor <iant@google.com>
849 * configure.ac: Check whether -funwind-tables option works.
850 * configure: Rebuild.
852 2012-10-11 Ian Lance Taylor <iant@google.com>
854 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
855 * configure: Rebuild.
857 2012-10-10 Ian Lance Taylor <iant@google.com>
859 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
862 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
864 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
866 2012-10-09 Ian Lance Taylor <iant@google.com>
868 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
869 (backtrace_dwarf_add): Likewise.
871 2012-10-09 Ian Lance Taylor <iant@google.com>
873 Add support for tracing through shared libraries.
874 * configure.ac: Check for link.h and dl_iterate_phdr.
875 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
876 ELF macros before #defining them.
877 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
879 (struct elf_syminfo_data): Add next field.
880 (elf_initialize_syminfo): Initialize next field.
881 (elf_add_syminfo_data): New static function.
882 (elf_add): New static function, broken out of
883 backtrace_initialize. Call backtrace_dwarf_add instead of
884 backtrace_dwarf_initialize.
885 (struct phdr_data): Define.
886 (phdr_callback): New static function.
887 (backtrace_initialize): Call elf_add.
888 * dwarf.c (struct dwarf_data): Add next and base_address fields.
889 (add_unit_addr): Add base_address parameter. Change all callers.
890 (add_unit_ranges, build_address_map): Likewise.
891 (add_line): Add ddata parameter. Change all callers.
892 (read_line_program, add_function_range): Likewise.
893 (dwarf_lookup_pc): New static function, broken out of
895 (dwarf_fileline): Call dwarf_lookup_pc.
896 (build_dwarf_data): New static function.
897 (backtrace_dwarf_add): New function.
898 (backtrace_dwarf_initialize): Remove.
899 * internal.h (backtrace_dwarf_initialize): Don't declare.
900 (backtrace_dwarf_add): Declare.
901 * configure, config.h.in: Rebuild.
903 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
905 * btest.c (f23): Avoid uninitialized variable warning.
907 2012-10-04 Ian Lance Taylor <iant@google.com>
909 * dwarf.c: If the system header files do not declare strnlen,
910 provide our own version.
912 2012-10-03 Ian Lance Taylor <iant@google.com>
914 * dwarf.c (read_uleb128): Fix overflow test.
915 (read_sleb128): Likewise.
916 (build_address_map): Don't change unit_buf.start.
918 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
921 * configure.ac (EXTRA_FLAGS): New.
922 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
923 * configure, Makefile.in: Regenerate.
925 2012-09-29 Ian Lance Taylor <iant@google.com>
928 * fileline.c (fileline_initialize): Pass errnum as -1 when
929 reporting that we could not read executable information after a
932 2012-09-27 Ian Lance Taylor <iant@google.com>
935 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
936 * Makefile.am: Add dependencies for all objects.
937 * configure, aclocal.m4, Makefile.in: Rebuild.
939 2012-09-27 Ian Lance Taylor <iant@google.com>
942 * elf.c (backtrace_initialize): Set *fileln_fn, not
945 2012-09-19 Ian Lance Taylor <iant@google.com>
947 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
949 * configure: Rebuild.
951 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
952 Ian Lance Taylor <iant@google.com>
954 * configure.ac (GCC_HEADER_STDINT): Invoke.
955 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
956 * btest.c: Don't include <stdint.h>.
958 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
960 2012-09-18 Ian Lance Taylor <iant@google.com>
963 * Makefile.am (AM_CPPFLAGS): Define.
964 (AM_CFLAGS): Remove -I options.
965 * Makefile.in: Rebuild.
967 2012-09-18 Ian Lance Taylor <iant@google.com>
969 * posix.c (O_BINARY): Define if not defined.
970 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
971 HAVE_FCNTL is defined.
972 * configure.ac: Test for the fcntl function.
973 * configure, config.h.in: Rebuild.
975 2012-09-18 Ian Lance Taylor <iant@google.com>
977 * btest.c (test1, test2, test3, test4): Add the unused attribute.
979 2012-09-18 Ian Lance Taylor <iant@google.com>
981 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
983 2012-09-18 Ian Lance Taylor <iant@google.com>
985 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
986 * mmapio.c: Don't define _GNU_SOURCE.
987 * configure, config.h.in: Rebuild.
989 2012-09-18 Ian Lance Taylor <iant@google.com>
991 * configure.ac: Check whether strnlen is declared.
992 * dwarf.c: Declare strnlen if not declared.
993 * configure, config.h.in: Rebuild.
995 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
997 * fileline.c: Include <stdlib.h>.
1000 2012-09-17 Ian Lance Taylor <iant@google.com>
1003 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1006 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1009 * nounwind.c (backtrace_simple): Add state parameter.
1011 2012-09-17 Ian Lance Taylor <iant@google.com>
1014 * unknown.c (unknown_fileline): Add state parameter, remove
1015 fileline_data parameter, name error_callback parameter.
1016 (backtrace_initialize): Add state parameter.
1018 2012-09-17 Ian Lance Taylor <iant@google.com>
1020 * Initial implementation.
1022 Copyright (C) 2012-2018 Free Software Foundation, Inc.
1024 Copying and distribution of this file, with or without modification,
1025 are permitted in any medium without royalty provided the copyright
1026 notice and this notice are preserved.