1 2018-12-28 Tom de Vries <tdevries@suse.de>
3 * dwarf.c (build_address_map): Simplify by removing local variable
6 2018-12-28 Ian Lance Taylor <iant@golang.org>
7 Tom de Vries <tdevries@suse.de>
10 * dwarf.c (free_unit_addrs_vector): Remove.
11 (build_address_map): Keep track of allocated units in vector. Free
12 allocated units and corresponding abbrevs upon failure. Remove now
13 redundant call to free_unit_addrs_vector. Free addrs vector upon
14 failure. Free allocated unit vector.
16 2018-12-28 Tom de Vries <tdevries@suse.de>
18 * dwarf.c (build_address_map): Free addrs vector upon failure.
20 2018-12-14 Tom de Vries <tdevries@suse.de>
23 * allocfail.sh: Remove "set -o pipefail".
25 2018-12-12 Tom de Vries <tdevries@suse.de>
27 * Makefile.am (TESTS): Add allocfail.sh.
28 (check_PROGRAMS): Add allocfail.
29 * Makefile.in: Regenerate.
30 * instrumented_alloc.c: New file. Redefine malloc and realloc.
32 * allocfail.c: New file.
33 * allocfail.sh: New file.
35 2018-11-30 Tom de Vries <tdevries@suse.de>
37 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
38 test_xcoff_64, test_pecoff and test_unknown.
39 * Makefile.in: Regenerate.
40 * test_format.c: New file.
42 2018-11-30 Tom de Vries <tdevries@suse.de>
44 * Makefile.am : Add _with_alloc version for each test in
46 * Makefile.in: Regenerate.
48 2018-11-30 Tom de Vries <tdevries@suse.de>
50 * internal.h (backtrace_vector_free): New static inline fuction,
52 * dwarf.c (read_line_info): ... here.
54 2018-11-28 Tom de Vries <tdevries@suse.de>
56 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
59 2018-11-27 Tom de Vries <tdevries@suse.de>
61 * mmap.c (backtrace_vector_release): Same.
62 * unittest.c (test1): Add check.
64 2018-11-27 Tom de Vries <tdevries@suse.de>
66 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
68 * Makefile.am (check_PROGRAMS): Add unittest.
69 * Makefile.in: Regenerate.
70 * unittest.c: New file.
72 2018-11-22 Tom de Vries <tdevries@suse.de>
74 * dwarf.c (read_initial_length): Factor out of ...
75 (build_address_map, read_line_info): ... here.
77 2018-11-21 Tom de Vries <tdevries@suse.de>
79 * dwarf.c (read_string): Factor out of ...
80 (read_attribute, read_line_header, read_line_program): ... here.
82 2018-10-31 Joseph Myers <joseph@codesourcery.com>
85 * Makefile.am: Include multilib.am.
86 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
87 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
89 2018-10-05 Ian Lance Taylor <iant@golang.org>
92 * backtrace.h: Document that backtrace_create_state should be
95 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
97 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
98 * Makefile.in: Regenerate.
99 * config.h.in: Likewise.
100 * configure: Likewise.
102 2018-08-01 Tony Reix <tony.reix@atos.net>
104 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
105 (struct xcoff_func, struct xcoff_func_vector): New structs.
106 (xcoff_syminfo): Drop leading dot from symbol name.
107 (xcoff_line_compare, xcoff_line_search): Remove.
108 (xcoff_func_compare, xcoff_func_search): New static functions.
109 (xcoff_lookup_pc): Search function table.
110 (xcoff_add_line, xcoff_process_linenos): Remove.
111 (xcoff_initialize_fileline): Build function table.
113 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
116 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
117 checking up to 36 bytes.
119 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
121 * configure: Regenerated.
123 2018-04-19 Jakub Jelinek <jakub@redhat.com>
125 * configure: Regenerated.
127 2018-04-17 Ian Lance Taylor <iant@golang.org>
129 * backtrace.c: Revert last two changes. Don't call mmap
132 2018-04-17 Ian Lance Taylor <iant@golang.org>
134 * backtrace.c: Include backtrace-supported.h before checking
135 BACKTRACE_USES_MALLOC.
137 2018-04-17 Ian Lance Taylor <iant@golang.org>
139 * backtrace.c (backtrace_full): When testing whether we can
140 allocate memory, call mmap directly, and munmap the memory.
142 2018-04-04 Jakub Jelinek <jakub@redhat.com>
145 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
146 big endian, only use 32-bit loads if endianity macros are predefined
147 and indicate big or little endian.
149 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
152 * configure: Regenerate.
154 2018-02-15 Jakub Jelinek <jakub@redhat.com>
157 * elf.c (SHT_PROGBITS): Undefine and define.
159 2018-02-14 Jakub Jelinek <jakub@redhat.com>
162 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
163 (struct elf_ppc64_opd_data): New type.
164 (elf_initialize_syminfo): Add opd argument, handle symbols
165 pointing into the PowerPC64 ELFv1 .opd section.
166 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
167 to structure with .opd data to elf_initialize_syminfo.
169 2018-01-31 Ian Lance Taylor <iant@golang.org>
171 * elf.c (elf_add): Close descriptor if we use a debugfile.
172 * btest.c (check_open_files): New static function.
173 (main): Call check_open_files.
175 2018-01-25 Ian Lance Taylor <iant@golang.org>
177 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
179 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
181 2018-01-25 Ian Lance Taylor <iant@golang.org>
183 * pecoff.c (coff_add): Only release syms_view if it is valid.
185 2018-01-25 Ian Lance Taylor <iant@golang.org>
187 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
189 2018-01-24 Ian Lance Taylor <iant@golang.org>
191 * pecoff.c (coff_add): Use coff_read4, not memcpy.
193 2018-01-24 Ian Lance Taylor <iant@golang.org>
196 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
199 2018-01-19 Tony Reix <tony.reix@atos.net>
201 * xcoff.c (xcoff_incl_compare): New function.
202 (xcoff_incl_search): New function.
203 (xcoff_process_linenos): Use bsearch to find include file.
204 (xcoff_initialize_fileline): Sort include file information.
206 2018-01-16 Ian Lance Taylor <iant@golang.org>
208 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
210 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
211 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
212 (elf_zlib_default_table): Update.
213 (elf_zlib_default_dist_table): New static array.
214 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
216 * ztest.c (struct zlib_test): Add uncompressed_len.
217 (tests): Initialize uncompressed_len field. Add new test case.
218 (test_samples): Use uncompressed_len field.
220 2018-01-03 Jakub Jelinek <jakub@redhat.com>
222 Update copyright years.
224 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
226 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
227 * aclocal.m4: Regenerate.
228 * Makefile.in: Likewise.
229 * configure: Likewise.
231 2017-10-06 Ian Lance Taylor <iant@golang.org>
233 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
234 zlib uncompress function.
236 2017-10-05 Ian Lance Taylor <iant@golang.org>
238 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
239 Read a four byte integer.
240 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
241 boundary before ever calling elf_zlib_fetch.
242 * ztest.c (test_large): Simplify print statements a bit.
244 2017-10-02 Ian Lance Taylor <iant@golang.org>
246 * ztest.c: #include <errno.h>.
247 (TEST_TIMING): Don't define, don't test.
248 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
249 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
250 (ZLIB_CLOCK_GETTIME_ARG): Define.
251 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
252 * Makefile.am: Likewise.
253 * configure, Makefile.in: Rebuild.
255 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
258 * Makefile.am: Append the content of clock_gettime_link to
260 * configure.ac: Test for the case that clock_gettime is in librt.
261 * Makefile.in: Regenerate.
262 * configure: Likewise.
265 * configure.ac: Check for clock_gettime.
266 * config.h.in: Regenerate.
267 * configure: Likewise.
268 * ztest.c (average_time, test_large): Conditionalize test timing
269 on clock_gettime availability.
271 2017-09-29 Tony Reix <tony.reix@atos.net>
273 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
274 (STYP_DWARF, SSUBTYP_DW*): Define.
275 (enum dwarf_section): Define.
276 (struct dwsect_info): Define.
277 (xcoff_add): Look for DWARF sections, pass them to
280 2017-09-28 Ian Lance Taylor <iant@golang.org>
283 * elf.c (__builtin_prefetch): Define if not __GNUC__.
285 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
286 (b_elf_chdr): Define type.
287 (enum debug_section): Add ZDEBUG_xxx values.
288 (debug_section_names): Add names for new sections.
289 (struct debug_section_info): Add compressed field.
290 (elf_zlib_failed, elf_zlib_fetch): New static functions.
291 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
292 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
293 (HUFFMAN_SECONDARY_SHIFT): Define.
294 (ZDEBUG_TABLE_SIZE): Define.
295 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
296 (final_next_secondary): New static variable if
297 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
298 (elf_zlib_inflate_table): New static function.
299 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
300 function to produce fixed Huffman table.
301 (elf_zlib_default_table): New static variable.
302 (elf_zlib_inflate): New static function.
303 (elf_zlib_verify_checksum): Likewise.
304 (elf_zlib_inflate_and_verify): Likewise.
305 (elf_uncompress_zdebug): Likewise.
306 (elf_uncompress_chdr): Likewise.
307 (backtrace_uncompress_zdebug): New extern function.
308 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
309 sections, and uncompress them.
310 * internal.h (backtrace_compress_zdebug): Declare.
312 * configure.ac: Check for -lz and check whether the linker
313 supports --compress-debug-sections.
314 * Makefile.am (ztest_SOURCES): New variable.
315 (ztest_CFLAGS, ztest_LDADD): New variables.
316 (check_PROGRAMS): Add ztest.
317 (ctestg_SOURCES): New variable.
318 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
319 (ctesta_SOURCES): New variable.
320 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
321 (check_PROGRAMS): Add ctestg and ctesta.
322 * configure, config.h.in, Makefile.in: Rebuild.
324 2017-09-22 Ian Lance Taylor <iant@golang.org>
327 * configure.ac: Check for lstat and readlink.
328 * elf.c (lstat, readlink): Provide dummy versions if real versions
330 * configure, config.h.in: Rebuild.
332 2017-09-21 Ian Lance Taylor <iant@google.com>
335 * elf.c (backtrace_initialize): Set pd.exe_filename.
337 2017-09-20 Ian Lance Taylor <iant@golang.org>
338 Denis Khalikov <d.khalikov@partner.samsung.com>
341 Support for external debug info.
342 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
343 (S_ISLNK): Define if not defined.
344 (xstrnlen): Define if strnlen is not available.
345 (b_elf_note): Define type.
346 (NT_GNU_BUILD_ID): Define macro.
347 (elf_crc32, elf_crc32_file): New static functions.
348 (elf_is_symlink, elf_readlink): New static functions.
349 (elf_open_debugfile_by_buildid): New static function.
350 (elf_try_debugfile): New static function.
351 (elf_find_debugfile_by_debuglink): New static function.
352 (elf_open_debugfile_by_debuglink): New static function.
353 (elf_add): Add filename and debuginfo parameters. Adjust all
354 callers. Look for external debug info notes, and try to fetch
355 debug info from external file.
356 (struct phdr_data): Add exe_filename field.
357 (phdr_callback): Pass filename to elf_add.
358 (backtrace_initialize): Add filename parameter.
359 * internal.h (backtrace_initialize): Add filename parameter.
360 * fileline.c (fileline_initialize): Pass filename to
361 backtrace_initialize.
362 * pecoff.c (fileline_initialize): Add unused filename parameter.
363 * unknown.c (fileline_initialize): Likewise.
364 * xcoff.c (fileline_initialize): Likewise.
365 * configure.ac: Check for objcopy --add-gnu-debuglink.
366 * Makefile.am (dtest): New test target.
367 * configure, Makefile.in: Rebuild.
369 2017-09-12 Steve Ellcey <sellcey@cavium.com>
372 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
373 * Makefile.in: Regenerate.
375 2017-09-12 Steve Ellcey <sellcey@cavium.com>
378 * libbacktrace/Makefile.in
379 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
381 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
384 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
386 2017-07-28 Tony Reix <tony.reix@atos.net>
388 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
390 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
392 * fileline.c (fileline_initialize): Print pid_t as long.
394 2017-07-26 Tony Reix <tony.reix@atos.net>
396 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
397 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
398 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
399 * configure, config.h.in: Regenerate.
401 2017-07-21 Tony Reix <tony.reix@atos.net>
403 * filetype.awk: Add AIX XCOFF type detection.
404 * configure.ac: Recognize xcoff format.
405 * Makefile.am (FORMAT_FILES): Add xcoff.c.
406 * fileline.c: Include <unistd.h>.
407 (fileline_initialize): Add case for AIX procfs.
409 * configure, Makefile.in: Rebuild.
411 2017-06-21 Richard Biener <rguenther@suse.de>
413 * configure.ac: Add AC_SYS_LARGEFILE.
414 * config.h.in: Regenerate.
415 * configure: Likewise.
417 2017-06-11 Ian Lance Taylor <iant@golang.org>
419 * elf.c (backtrace_initialize): Always set *fileline_fn.
421 * btest.c: Move support functions into testlib.c. Change calls to
422 check to pass file name.
423 * testlib.c: New file, copied from (part of) btest.c.
424 * testlib.h: New file, declarations for testlib.c.
425 * edtest.c: Use testlib.h and testlib.c.
426 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
427 * Makefile.am (btest_SOURCES): Add testlib.c.
428 (edtest_SOURCES): Likewise.
429 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
430 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
431 * configure, Makefile.in: Rebuild.
433 2017-05-19 Than McIntosh <thanm@google.com>
435 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
436 (read_line_header): Don't allocate dirs if dirs_count == 0.
437 * edtest.c: New file.
438 * edtest2.c: New file.
439 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
440 (check_PROGRAMS): Add edtest.
441 (edtest2_build.c, gen_edtest2_build): New targets.
442 * Makefile.in: Rebuild.
444 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
446 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
447 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
449 2017-01-01 Jakub Jelinek <jakub@redhat.com>
451 Update copyright years.
453 2016-11-15 Matthias Klose <doko@ubuntu.com>
455 * configure: Regenerate.
457 2016-09-11 Carlos Liam <carlos@aarzee.me>
459 * all: Remove meaningless trailing whitespace.
461 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
464 * elf.c (phdr_callback) [__i386__]: Add
465 __attribute__((__force_align_arg_pointer__)).
467 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
469 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
470 avoid possible crash.
471 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
472 missing debug info anymore.
474 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
476 * mmap.c (MAP_FAILED): Define if not defined.
478 2016-01-04 Jakub Jelinek <jakub@redhat.com>
480 Update copyright years.
482 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
484 * configure.ac: Specify that DJGPP do not have mmap
485 even when sys/mman.h exists.
486 * configure: Regenerate
488 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
491 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
492 * configure: Regenerate.
493 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
496 2015-09-17 Ian Lance Taylor <iant@google.com>
498 * posix.c (backtrace_open): Cast second argument of open() to int.
500 2015-09-11 Ian Lance Taylor <iant@google.com>
502 * Makefile.am (backtrace.lo): Depend on internal.h.
503 (sort.lo, stest.lo): Add explicit dependencies.
504 * Makefile.in: Rebuild.
506 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
508 * backtrace.c: #include <sys/types.h>.
510 2015-09-08 Ian Lance Taylor <iant@google.com>
513 * backtrace.c: #include "internal.h".
514 (struct backtrace_data): Add can_alloc field.
515 (unwind): If can_alloc is false, don't try to get file/line
517 (backtrace_full): Set can_alloc field in bdata.
518 * alloc.c (backtrace_alloc): Don't call error_callback if it is
520 * mmap.c (backtrace_alloc): Likewise.
521 * internal.h: Update comments for backtrace_alloc and
524 2015-09-08 Ian Lance Taylor <iant@google.com>
527 * mmap.c (backtrace_alloc): Correct test for mmap failure.
529 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
531 * configure.ac: For spu-*-* targets, set have_fcntl to no.
532 * configure: Regenerate.
534 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
536 * configure.ac: Remove [disable-shared] argument to LT_INIT.
537 Remove setting PIC_FLAG when building as target library.
538 * configure: Regenerate.
540 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
542 * configure.ac: Only compile with -fPIC if the target
544 * configure: Regenerate.
546 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
548 * configure.ac: Set have_mmap to no on spu-*-* targets.
549 * configure: Regenerate.
551 2015-08-13 Ian Lance Taylor <iant@google.com>
553 * dwarf.c (read_function_entry): Add vec_inlined parameter.
556 2015-06-11 Martin Sebor <msebor@redhat.com>
559 * dwarf.c (struct line): Add new field idx.
560 (line_compare): Use it.
562 (read_line_info): Reset it.
564 2015-05-29 Tristan Gingold <gingold@adacore.com>
566 * pecoff.c: New file.
567 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
568 * Makefile.in: Regenerate.
569 * filetype.awk: Detect pecoff.
570 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
572 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
574 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
575 * configure: Regenerate.
576 * pecoff.c: New file.
578 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
580 * Makefile.in: Regenerated with automake-1.11.6.
581 * aclocal.m4: Likewise.
582 * configure: Likewise.
584 2015-01-24 Matthias Klose <doko@ubuntu.com>
586 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
587 * configure: Regenerate.
589 2015-01-05 Jakub Jelinek <jakub@redhat.com>
591 Update copyright years.
593 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
596 * configure: Regenerated.
598 2014-11-11 David Malcolm <dmalcolm@redhat.com>
600 * ChangeLog.jit: New.
602 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
605 * configure: Regenerate.
607 2014-10-23 Ian Lance Taylor <iant@google.com>
609 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
610 Fix to return void *.
612 2014-05-08 Ian Lance Taylor <iant@google.com>
614 * mmap.c (backtrace_free): If freeing a large aligned block of
615 memory, call munmap rather than holding onto it.
616 (backtrace_vector_grow): When growing a vector, double the number
617 of pages requested. When releasing the old version of a grown
618 vector, pass the correct size to backtrace_free.
620 2014-03-07 Ian Lance Taylor <iant@google.com>
622 * sort.c (backtrace_qsort): Use middle element as pivot.
624 2014-03-06 Ian Lance Taylor <iant@google.com>
628 * internal.h (backtrace_qsort): Declare.
629 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
630 (read_line_info, read_function_entry): Likewise.
631 (read_function_info, build_dwarf_data): Likewise.
632 * elf.c (elf_initialize_syminfo): Likewise.
633 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
634 (stest_SOURCES, stest_LDADD): Define.
635 (check_PROGRAMS): Add stest.
637 2014-02-07 Misty De Meo <misty@brew.sh>
640 * configure.ac: Use AC_LINK_IFELSE in check for
642 * configure: Regenerate.
644 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
646 Update copyright years
648 2013-12-06 Jakub Jelinek <jakub@redhat.com>
650 * elf.c (ET_DYN): Undefine and define again.
651 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
652 return early -1 without closing the descriptor.
653 (struct phdr_data): Add exe_descriptor.
654 (phdr_callback): If pd->exe_descriptor is not -1, for very first
655 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
656 otherwise backtrace_close the exe_descriptor if not -1. Adjust
658 (backtrace_initialize): Adjust call to elf_add. If it returns
659 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
661 2013-12-05 Ian Lance Taylor <iant@google.com>
663 * alloc.c (backtrace_vector_finish): Add error_callback and data
664 parameters. Call backtrace_vector_release. Return address base.
665 * mmap.c (backtrace_vector_finish): Add error_callback and data
666 parameters. Return address base.
667 * dwarf.c (read_function_info): Get new address base from
668 backtrace_vector_finish.
669 * internal.h (backtrace_vector_finish): Update declaration.
671 2013-11-27 Ian Lance Taylor <iant@google.com>
673 * dwarf.c (find_address_ranges): New static function, broken out
674 of build_address_map.
675 (build_address_map): Call it.
676 * btest.c (check): Check for missing filename or function, rather
678 (f3): Check that enough frames were returned.
680 2013-11-19 Jakub Jelinek <jakub@redhat.com>
682 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
683 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
685 * btest.c (struct symdata): Add size field.
686 (callback_three): Add symsize argument. Copy it to the data->size
688 (f23): Set symdata.size to 0.
689 (test5): Likewise. If sizeof (int) > 1, lookup address of
690 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
693 * atomic.c: Include sys/types.h.
695 2013-11-18 Ian Lance Taylor <iant@google.com>
697 * configure.ac: Check for support of __atomic extensions.
698 * internal.h: Declare or #define atomic functions for use in
700 * atomic.c: New file.
701 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
702 (dwarf_fileline, backtrace_dwarf_add): Likewise.
703 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
704 (backtrace_initialize): Likewise.
705 * fileline.c (fileline_initialize): Likewise.
706 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
707 * configure, config.h.in, Makefile.in: Rebuild.
709 2013-11-18 Jakub Jelinek <jakub@redhat.com>
711 * elf.c (SHN_UNDEF): Define.
712 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
713 with st_shndx == SHN_UNDEF. Add base_address to address fields.
714 (elf_add): Adjust caller.
716 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
718 2013-11-16 Ian Lance Taylor <iant@google.com>
720 * backtrace.h (backtrace_create_state): Correct comment about
723 2013-11-15 Ian Lance Taylor <iant@google.com>
725 * backtrace.h (backtrace_syminfo): Update comment and parameter
726 name to take any address, not just a PC value.
727 * elf.c (STT_OBJECT): Define.
728 (elf_nosyms): Rename parameter pc to addr.
729 (elf_symbol_search): Rename local variable pc to addr.
730 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
731 (elf_syminfo): Rename parameter pc to addr.
732 * btest.c (global): New global variable.
736 2013-10-17 Ian Lance Taylor <iant@google.com>
738 * elf.c (elf_add): Don't get the wrong offsets if a debug section
741 2013-10-15 David Malcolm <dmalcolm@redhat.com>
743 * configure.ac: Add --enable-host-shared, setting up
744 pre-existing PIC_FLAG variable within Makefile.am et al.
745 * configure: Regenerate.
747 2013-09-20 Alan Modra <amodra@gmail.com>
749 * configure: Regenerate.
751 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
753 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
755 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
757 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
758 dl_iterate_phdr callbacks.
760 2013-03-25 Ian Lance Taylor <iant@google.com>
762 * alloc.c: #include <sys/types.h>.
765 2013-01-31 Ian Lance Taylor <iant@google.com>
767 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
768 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
770 2013-01-25 Jakub Jelinek <jakub@redhat.com>
773 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
774 attribute was not seen.
776 2013-01-16 Ian Lance Taylor <iant@google.com>
778 * dwarf.c (struct unit): Add filename and abs_filename fields.
779 (build_address_map): Set new fields when reading unit.
780 (dwarf_lookup_pc): If we don't find an entry in the line table,
781 just return the main file name.
783 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
785 Update copyright years.
787 2013-01-01 Ian Lance Taylor <iant@google.com>
790 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
791 $(MULTIBUILDTOP)/../../gcc/include.
792 * Makefile.in: Rebuild.
794 2013-01-01 Ian Lance Taylor <iant@google.com>
797 * mmap.c (backtrace_alloc): Don't call sync functions if not
799 (backtrace_free): Likewise.
801 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
803 * mmapio.c: Define MAP_FAILED if not defined.
805 2012-12-11 Jakub Jelinek <jakub@redhat.com>
808 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
809 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
810 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
812 * Makefile.in: Regenerated.
813 * configure: Regenerated.
815 2012-12-07 Jakub Jelinek <jakub@redhat.com>
818 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
819 * Makefile.in: Regenerated.
821 2012-11-20 Ian Lance Taylor <iant@google.com>
823 * dwarf.c (read_attribute): Always clear val.
825 2012-11-13 Ian Lance Taylor <iant@google.com>
828 * configure.ac: Only add -Werror if building a target library.
829 * configure: Rebuild.
831 2012-11-12 Ian Lance Taylor <iant@google.com>
832 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
833 Gerald Pfeifer <gerald@pfeifer.com>
835 * configure.ac: Check for getexecname.
836 * fileline.c: #include <errno.h>. Define getexecname if not
838 (fileline_initialize): Try to find the executable in a few
840 * print.c (error_callback): Only print the filename if it came
841 from the backtrace state.
842 * configure, config.h.in: Rebuild.
844 2012-10-29 Ian Lance Taylor <iant@google.com>
846 * mmap.c (backtrace_vector_release): Correct last patch: add
849 2012-10-29 Ian Lance Taylor <iant@google.com>
851 * mmap.c (backtrace_vector_release): Make sure freed block is
852 aligned on 8-byte boundary.
854 2012-10-26 Ian Lance Taylor <iant@google.com>
857 * posix.c (backtrace_open): Add does_not_exist parameter.
858 * elf.c (phdr_callback): Do not warn if shared library could not
860 * fileline.c (fileline_initialize): Update calls to
862 * internal.h (backtrace_open): Update declaration.
864 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
867 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
868 * configure: Regenerate.
870 2012-10-24 Ian Lance Taylor <iant@google.com>
873 * configure.ac: Check whether -funwind-tables option works.
874 * configure: Rebuild.
876 2012-10-11 Ian Lance Taylor <iant@google.com>
878 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
879 * configure: Rebuild.
881 2012-10-10 Ian Lance Taylor <iant@google.com>
883 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
886 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
888 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
890 2012-10-09 Ian Lance Taylor <iant@google.com>
892 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
893 (backtrace_dwarf_add): Likewise.
895 2012-10-09 Ian Lance Taylor <iant@google.com>
897 Add support for tracing through shared libraries.
898 * configure.ac: Check for link.h and dl_iterate_phdr.
899 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
900 ELF macros before #defining them.
901 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
903 (struct elf_syminfo_data): Add next field.
904 (elf_initialize_syminfo): Initialize next field.
905 (elf_add_syminfo_data): New static function.
906 (elf_add): New static function, broken out of
907 backtrace_initialize. Call backtrace_dwarf_add instead of
908 backtrace_dwarf_initialize.
909 (struct phdr_data): Define.
910 (phdr_callback): New static function.
911 (backtrace_initialize): Call elf_add.
912 * dwarf.c (struct dwarf_data): Add next and base_address fields.
913 (add_unit_addr): Add base_address parameter. Change all callers.
914 (add_unit_ranges, build_address_map): Likewise.
915 (add_line): Add ddata parameter. Change all callers.
916 (read_line_program, add_function_range): Likewise.
917 (dwarf_lookup_pc): New static function, broken out of
919 (dwarf_fileline): Call dwarf_lookup_pc.
920 (build_dwarf_data): New static function.
921 (backtrace_dwarf_add): New function.
922 (backtrace_dwarf_initialize): Remove.
923 * internal.h (backtrace_dwarf_initialize): Don't declare.
924 (backtrace_dwarf_add): Declare.
925 * configure, config.h.in: Rebuild.
927 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
929 * btest.c (f23): Avoid uninitialized variable warning.
931 2012-10-04 Ian Lance Taylor <iant@google.com>
933 * dwarf.c: If the system header files do not declare strnlen,
934 provide our own version.
936 2012-10-03 Ian Lance Taylor <iant@google.com>
938 * dwarf.c (read_uleb128): Fix overflow test.
939 (read_sleb128): Likewise.
940 (build_address_map): Don't change unit_buf.start.
942 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
945 * configure.ac (EXTRA_FLAGS): New.
946 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
947 * configure, Makefile.in: Regenerate.
949 2012-09-29 Ian Lance Taylor <iant@google.com>
952 * fileline.c (fileline_initialize): Pass errnum as -1 when
953 reporting that we could not read executable information after a
956 2012-09-27 Ian Lance Taylor <iant@google.com>
959 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
960 * Makefile.am: Add dependencies for all objects.
961 * configure, aclocal.m4, Makefile.in: Rebuild.
963 2012-09-27 Ian Lance Taylor <iant@google.com>
966 * elf.c (backtrace_initialize): Set *fileln_fn, not
969 2012-09-19 Ian Lance Taylor <iant@google.com>
971 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
973 * configure: Rebuild.
975 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
976 Ian Lance Taylor <iant@google.com>
978 * configure.ac (GCC_HEADER_STDINT): Invoke.
979 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
980 * btest.c: Don't include <stdint.h>.
982 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
984 2012-09-18 Ian Lance Taylor <iant@google.com>
987 * Makefile.am (AM_CPPFLAGS): Define.
988 (AM_CFLAGS): Remove -I options.
989 * Makefile.in: Rebuild.
991 2012-09-18 Ian Lance Taylor <iant@google.com>
993 * posix.c (O_BINARY): Define if not defined.
994 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
995 HAVE_FCNTL is defined.
996 * configure.ac: Test for the fcntl function.
997 * configure, config.h.in: Rebuild.
999 2012-09-18 Ian Lance Taylor <iant@google.com>
1001 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1003 2012-09-18 Ian Lance Taylor <iant@google.com>
1005 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1007 2012-09-18 Ian Lance Taylor <iant@google.com>
1009 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1010 * mmapio.c: Don't define _GNU_SOURCE.
1011 * configure, config.h.in: Rebuild.
1013 2012-09-18 Ian Lance Taylor <iant@google.com>
1015 * configure.ac: Check whether strnlen is declared.
1016 * dwarf.c: Declare strnlen if not declared.
1017 * configure, config.h.in: Rebuild.
1019 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1021 * fileline.c: Include <stdlib.h>.
1024 2012-09-17 Ian Lance Taylor <iant@google.com>
1027 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1030 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1033 * nounwind.c (backtrace_simple): Add state parameter.
1035 2012-09-17 Ian Lance Taylor <iant@google.com>
1038 * unknown.c (unknown_fileline): Add state parameter, remove
1039 fileline_data parameter, name error_callback parameter.
1040 (backtrace_initialize): Add state parameter.
1042 2012-09-17 Ian Lance Taylor <iant@google.com>
1044 * Initial implementation.
1046 Copyright (C) 2012-2018 Free Software Foundation, Inc.
1048 Copying and distribution of this file, with or without modification,
1049 are permitted in any medium without royalty provided the copyright
1050 notice and this notice are preserved.