1 2019-01-16 Tom de Vries <tdevries@suse.de>
3 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
5 (read_referenced_name): ... here, and ...
6 (read_function_entry): ... here.
8 2019-01-16 Tom de Vries <tdevries@suse.de>
10 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
12 (read_function_entry): Same. Don't allow name found via
13 DW_AT_abstract_origin or case DW_AT_specification to override linkage
16 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
20 * backtrace.h: Mechanically replace "can not" with "cannot".
22 2019-01-01 Jakub Jelinek <jakub@redhat.com>
24 Update copyright years.
26 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
28 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
30 * Makefile.in: Regenerate.
32 2018-12-28 Tom de Vries <tdevries@suse.de>
34 * dwarf.c (build_address_map): Reuse unused units.
36 2018-12-28 Tom de Vries <tdevries@suse.de>
38 * dwarf.c (build_address_map): Simplify by removing local variable
41 2018-12-28 Ian Lance Taylor <iant@golang.org>
42 Tom de Vries <tdevries@suse.de>
45 * dwarf.c (free_unit_addrs_vector): Remove.
46 (build_address_map): Keep track of allocated units in vector. Free
47 allocated units and corresponding abbrevs upon failure. Remove now
48 redundant call to free_unit_addrs_vector. Free addrs vector upon
49 failure. Free allocated unit vector.
51 2018-12-28 Tom de Vries <tdevries@suse.de>
53 * dwarf.c (build_address_map): Free addrs vector upon failure.
55 2018-12-14 Tom de Vries <tdevries@suse.de>
58 * allocfail.sh: Remove "set -o pipefail".
60 2018-12-12 Tom de Vries <tdevries@suse.de>
62 * Makefile.am (TESTS): Add allocfail.sh.
63 (check_PROGRAMS): Add allocfail.
64 * Makefile.in: Regenerate.
65 * instrumented_alloc.c: New file. Redefine malloc and realloc.
67 * allocfail.c: New file.
68 * allocfail.sh: New file.
70 2018-11-30 Tom de Vries <tdevries@suse.de>
72 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
73 test_xcoff_64, test_pecoff and test_unknown.
74 * Makefile.in: Regenerate.
75 * test_format.c: New file.
77 2018-11-30 Tom de Vries <tdevries@suse.de>
79 * Makefile.am : Add _with_alloc version for each test in
81 * Makefile.in: Regenerate.
83 2018-11-30 Tom de Vries <tdevries@suse.de>
85 * internal.h (backtrace_vector_free): New static inline fuction,
87 * dwarf.c (read_line_info): ... here.
89 2018-11-28 Tom de Vries <tdevries@suse.de>
91 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
94 2018-11-27 Tom de Vries <tdevries@suse.de>
96 * mmap.c (backtrace_vector_release): Same.
97 * unittest.c (test1): Add check.
99 2018-11-27 Tom de Vries <tdevries@suse.de>
101 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
103 * Makefile.am (check_PROGRAMS): Add unittest.
104 * Makefile.in: Regenerate.
105 * unittest.c: New file.
107 2018-11-22 Tom de Vries <tdevries@suse.de>
109 * dwarf.c (read_initial_length): Factor out of ...
110 (build_address_map, read_line_info): ... here.
112 2018-11-21 Tom de Vries <tdevries@suse.de>
114 * dwarf.c (read_string): Factor out of ...
115 (read_attribute, read_line_header, read_line_program): ... here.
117 2018-10-31 Joseph Myers <joseph@codesourcery.com>
120 * Makefile.am: Include multilib.am.
121 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
122 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
124 2018-10-05 Ian Lance Taylor <iant@golang.org>
126 PR libbacktrace/87529
127 * backtrace.h: Document that backtrace_create_state should be
130 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
132 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
133 * Makefile.in: Regenerate.
134 * config.h.in: Likewise.
135 * configure: Likewise.
137 2018-08-01 Tony Reix <tony.reix@atos.net>
139 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
140 (struct xcoff_func, struct xcoff_func_vector): New structs.
141 (xcoff_syminfo): Drop leading dot from symbol name.
142 (xcoff_line_compare, xcoff_line_search): Remove.
143 (xcoff_func_compare, xcoff_func_search): New static functions.
144 (xcoff_lookup_pc): Search function table.
145 (xcoff_add_line, xcoff_process_linenos): Remove.
146 (xcoff_initialize_fileline): Build function table.
148 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
151 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
152 checking up to 36 bytes.
154 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
156 * configure: Regenerated.
158 2018-04-19 Jakub Jelinek <jakub@redhat.com>
160 * configure: Regenerated.
162 2018-04-17 Ian Lance Taylor <iant@golang.org>
164 * backtrace.c: Revert last two changes. Don't call mmap
167 2018-04-17 Ian Lance Taylor <iant@golang.org>
169 * backtrace.c: Include backtrace-supported.h before checking
170 BACKTRACE_USES_MALLOC.
172 2018-04-17 Ian Lance Taylor <iant@golang.org>
174 * backtrace.c (backtrace_full): When testing whether we can
175 allocate memory, call mmap directly, and munmap the memory.
177 2018-04-04 Jakub Jelinek <jakub@redhat.com>
180 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
181 big endian, only use 32-bit loads if endianity macros are predefined
182 and indicate big or little endian.
184 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
187 * configure: Regenerate.
189 2018-02-15 Jakub Jelinek <jakub@redhat.com>
192 * elf.c (SHT_PROGBITS): Undefine and define.
194 2018-02-14 Jakub Jelinek <jakub@redhat.com>
197 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
198 (struct elf_ppc64_opd_data): New type.
199 (elf_initialize_syminfo): Add opd argument, handle symbols
200 pointing into the PowerPC64 ELFv1 .opd section.
201 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
202 to structure with .opd data to elf_initialize_syminfo.
204 2018-01-31 Ian Lance Taylor <iant@golang.org>
206 * elf.c (elf_add): Close descriptor if we use a debugfile.
207 * btest.c (check_open_files): New static function.
208 (main): Call check_open_files.
210 2018-01-25 Ian Lance Taylor <iant@golang.org>
212 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
214 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
216 2018-01-25 Ian Lance Taylor <iant@golang.org>
218 * pecoff.c (coff_add): Only release syms_view if it is valid.
220 2018-01-25 Ian Lance Taylor <iant@golang.org>
222 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
224 2018-01-24 Ian Lance Taylor <iant@golang.org>
226 * pecoff.c (coff_add): Use coff_read4, not memcpy.
228 2018-01-24 Ian Lance Taylor <iant@golang.org>
231 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
234 2018-01-19 Tony Reix <tony.reix@atos.net>
236 * xcoff.c (xcoff_incl_compare): New function.
237 (xcoff_incl_search): New function.
238 (xcoff_process_linenos): Use bsearch to find include file.
239 (xcoff_initialize_fileline): Sort include file information.
241 2018-01-16 Ian Lance Taylor <iant@golang.org>
243 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
245 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
246 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
247 (elf_zlib_default_table): Update.
248 (elf_zlib_default_dist_table): New static array.
249 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
251 * ztest.c (struct zlib_test): Add uncompressed_len.
252 (tests): Initialize uncompressed_len field. Add new test case.
253 (test_samples): Use uncompressed_len field.
255 2018-01-03 Jakub Jelinek <jakub@redhat.com>
257 Update copyright years.
259 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
261 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
262 * aclocal.m4: Regenerate.
263 * Makefile.in: Likewise.
264 * configure: Likewise.
266 2017-10-06 Ian Lance Taylor <iant@golang.org>
268 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
269 zlib uncompress function.
271 2017-10-05 Ian Lance Taylor <iant@golang.org>
273 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
274 Read a four byte integer.
275 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
276 boundary before ever calling elf_zlib_fetch.
277 * ztest.c (test_large): Simplify print statements a bit.
279 2017-10-02 Ian Lance Taylor <iant@golang.org>
281 * ztest.c: #include <errno.h>.
282 (TEST_TIMING): Don't define, don't test.
283 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
284 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
285 (ZLIB_CLOCK_GETTIME_ARG): Define.
286 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
287 * Makefile.am: Likewise.
288 * configure, Makefile.in: Rebuild.
290 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
293 * Makefile.am: Append the content of clock_gettime_link to
295 * configure.ac: Test for the case that clock_gettime is in librt.
296 * Makefile.in: Regenerate.
297 * configure: Likewise.
300 * configure.ac: Check for clock_gettime.
301 * config.h.in: Regenerate.
302 * configure: Likewise.
303 * ztest.c (average_time, test_large): Conditionalize test timing
304 on clock_gettime availability.
306 2017-09-29 Tony Reix <tony.reix@atos.net>
308 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
309 (STYP_DWARF, SSUBTYP_DW*): Define.
310 (enum dwarf_section): Define.
311 (struct dwsect_info): Define.
312 (xcoff_add): Look for DWARF sections, pass them to
315 2017-09-28 Ian Lance Taylor <iant@golang.org>
318 * elf.c (__builtin_prefetch): Define if not __GNUC__.
320 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
321 (b_elf_chdr): Define type.
322 (enum debug_section): Add ZDEBUG_xxx values.
323 (debug_section_names): Add names for new sections.
324 (struct debug_section_info): Add compressed field.
325 (elf_zlib_failed, elf_zlib_fetch): New static functions.
326 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
327 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
328 (HUFFMAN_SECONDARY_SHIFT): Define.
329 (ZDEBUG_TABLE_SIZE): Define.
330 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
331 (final_next_secondary): New static variable if
332 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
333 (elf_zlib_inflate_table): New static function.
334 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
335 function to produce fixed Huffman table.
336 (elf_zlib_default_table): New static variable.
337 (elf_zlib_inflate): New static function.
338 (elf_zlib_verify_checksum): Likewise.
339 (elf_zlib_inflate_and_verify): Likewise.
340 (elf_uncompress_zdebug): Likewise.
341 (elf_uncompress_chdr): Likewise.
342 (backtrace_uncompress_zdebug): New extern function.
343 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
344 sections, and uncompress them.
345 * internal.h (backtrace_compress_zdebug): Declare.
347 * configure.ac: Check for -lz and check whether the linker
348 supports --compress-debug-sections.
349 * Makefile.am (ztest_SOURCES): New variable.
350 (ztest_CFLAGS, ztest_LDADD): New variables.
351 (check_PROGRAMS): Add ztest.
352 (ctestg_SOURCES): New variable.
353 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
354 (ctesta_SOURCES): New variable.
355 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
356 (check_PROGRAMS): Add ctestg and ctesta.
357 * configure, config.h.in, Makefile.in: Rebuild.
359 2017-09-22 Ian Lance Taylor <iant@golang.org>
362 * configure.ac: Check for lstat and readlink.
363 * elf.c (lstat, readlink): Provide dummy versions if real versions
365 * configure, config.h.in: Rebuild.
367 2017-09-21 Ian Lance Taylor <iant@google.com>
370 * elf.c (backtrace_initialize): Set pd.exe_filename.
372 2017-09-20 Ian Lance Taylor <iant@golang.org>
373 Denis Khalikov <d.khalikov@partner.samsung.com>
376 Support for external debug info.
377 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
378 (S_ISLNK): Define if not defined.
379 (xstrnlen): Define if strnlen is not available.
380 (b_elf_note): Define type.
381 (NT_GNU_BUILD_ID): Define macro.
382 (elf_crc32, elf_crc32_file): New static functions.
383 (elf_is_symlink, elf_readlink): New static functions.
384 (elf_open_debugfile_by_buildid): New static function.
385 (elf_try_debugfile): New static function.
386 (elf_find_debugfile_by_debuglink): New static function.
387 (elf_open_debugfile_by_debuglink): New static function.
388 (elf_add): Add filename and debuginfo parameters. Adjust all
389 callers. Look for external debug info notes, and try to fetch
390 debug info from external file.
391 (struct phdr_data): Add exe_filename field.
392 (phdr_callback): Pass filename to elf_add.
393 (backtrace_initialize): Add filename parameter.
394 * internal.h (backtrace_initialize): Add filename parameter.
395 * fileline.c (fileline_initialize): Pass filename to
396 backtrace_initialize.
397 * pecoff.c (fileline_initialize): Add unused filename parameter.
398 * unknown.c (fileline_initialize): Likewise.
399 * xcoff.c (fileline_initialize): Likewise.
400 * configure.ac: Check for objcopy --add-gnu-debuglink.
401 * Makefile.am (dtest): New test target.
402 * configure, Makefile.in: Rebuild.
404 2017-09-12 Steve Ellcey <sellcey@cavium.com>
407 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
408 * Makefile.in: Regenerate.
410 2017-09-12 Steve Ellcey <sellcey@cavium.com>
413 * libbacktrace/Makefile.in
414 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
416 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
419 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
421 2017-07-28 Tony Reix <tony.reix@atos.net>
423 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
425 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
427 * fileline.c (fileline_initialize): Print pid_t as long.
429 2017-07-26 Tony Reix <tony.reix@atos.net>
431 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
432 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
433 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
434 * configure, config.h.in: Regenerate.
436 2017-07-21 Tony Reix <tony.reix@atos.net>
438 * filetype.awk: Add AIX XCOFF type detection.
439 * configure.ac: Recognize xcoff format.
440 * Makefile.am (FORMAT_FILES): Add xcoff.c.
441 * fileline.c: Include <unistd.h>.
442 (fileline_initialize): Add case for AIX procfs.
444 * configure, Makefile.in: Rebuild.
446 2017-06-21 Richard Biener <rguenther@suse.de>
448 * configure.ac: Add AC_SYS_LARGEFILE.
449 * config.h.in: Regenerate.
450 * configure: Likewise.
452 2017-06-11 Ian Lance Taylor <iant@golang.org>
454 * elf.c (backtrace_initialize): Always set *fileline_fn.
456 * btest.c: Move support functions into testlib.c. Change calls to
457 check to pass file name.
458 * testlib.c: New file, copied from (part of) btest.c.
459 * testlib.h: New file, declarations for testlib.c.
460 * edtest.c: Use testlib.h and testlib.c.
461 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
462 * Makefile.am (btest_SOURCES): Add testlib.c.
463 (edtest_SOURCES): Likewise.
464 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
465 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
466 * configure, Makefile.in: Rebuild.
468 2017-05-19 Than McIntosh <thanm@google.com>
470 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
471 (read_line_header): Don't allocate dirs if dirs_count == 0.
472 * edtest.c: New file.
473 * edtest2.c: New file.
474 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
475 (check_PROGRAMS): Add edtest.
476 (edtest2_build.c, gen_edtest2_build): New targets.
477 * Makefile.in: Rebuild.
479 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
481 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
482 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
484 2017-01-01 Jakub Jelinek <jakub@redhat.com>
486 Update copyright years.
488 2016-11-15 Matthias Klose <doko@ubuntu.com>
490 * configure: Regenerate.
492 2016-09-11 Carlos Liam <carlos@aarzee.me>
494 * all: Remove meaningless trailing whitespace.
496 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
499 * elf.c (phdr_callback) [__i386__]: Add
500 __attribute__((__force_align_arg_pointer__)).
502 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
504 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
505 avoid possible crash.
506 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
507 missing debug info anymore.
509 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
511 * mmap.c (MAP_FAILED): Define if not defined.
513 2016-01-04 Jakub Jelinek <jakub@redhat.com>
515 Update copyright years.
517 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
519 * configure.ac: Specify that DJGPP do not have mmap
520 even when sys/mman.h exists.
521 * configure: Regenerate
523 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
526 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
527 * configure: Regenerate.
528 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
531 2015-09-17 Ian Lance Taylor <iant@google.com>
533 * posix.c (backtrace_open): Cast second argument of open() to int.
535 2015-09-11 Ian Lance Taylor <iant@google.com>
537 * Makefile.am (backtrace.lo): Depend on internal.h.
538 (sort.lo, stest.lo): Add explicit dependencies.
539 * Makefile.in: Rebuild.
541 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
543 * backtrace.c: #include <sys/types.h>.
545 2015-09-08 Ian Lance Taylor <iant@google.com>
548 * backtrace.c: #include "internal.h".
549 (struct backtrace_data): Add can_alloc field.
550 (unwind): If can_alloc is false, don't try to get file/line
552 (backtrace_full): Set can_alloc field in bdata.
553 * alloc.c (backtrace_alloc): Don't call error_callback if it is
555 * mmap.c (backtrace_alloc): Likewise.
556 * internal.h: Update comments for backtrace_alloc and
559 2015-09-08 Ian Lance Taylor <iant@google.com>
562 * mmap.c (backtrace_alloc): Correct test for mmap failure.
564 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
566 * configure.ac: For spu-*-* targets, set have_fcntl to no.
567 * configure: Regenerate.
569 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
571 * configure.ac: Remove [disable-shared] argument to LT_INIT.
572 Remove setting PIC_FLAG when building as target library.
573 * configure: Regenerate.
575 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
577 * configure.ac: Only compile with -fPIC if the target
579 * configure: Regenerate.
581 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
583 * configure.ac: Set have_mmap to no on spu-*-* targets.
584 * configure: Regenerate.
586 2015-08-13 Ian Lance Taylor <iant@google.com>
588 * dwarf.c (read_function_entry): Add vec_inlined parameter.
591 2015-06-11 Martin Sebor <msebor@redhat.com>
594 * dwarf.c (struct line): Add new field idx.
595 (line_compare): Use it.
597 (read_line_info): Reset it.
599 2015-05-29 Tristan Gingold <gingold@adacore.com>
601 * pecoff.c: New file.
602 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
603 * Makefile.in: Regenerate.
604 * filetype.awk: Detect pecoff.
605 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
607 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
609 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
610 * configure: Regenerate.
611 * pecoff.c: New file.
613 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
615 * Makefile.in: Regenerated with automake-1.11.6.
616 * aclocal.m4: Likewise.
617 * configure: Likewise.
619 2015-01-24 Matthias Klose <doko@ubuntu.com>
621 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
622 * configure: Regenerate.
624 2015-01-05 Jakub Jelinek <jakub@redhat.com>
626 Update copyright years.
628 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
631 * configure: Regenerated.
633 2014-11-11 David Malcolm <dmalcolm@redhat.com>
635 * ChangeLog.jit: New.
637 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
640 * configure: Regenerate.
642 2014-10-23 Ian Lance Taylor <iant@google.com>
644 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
645 Fix to return void *.
647 2014-05-08 Ian Lance Taylor <iant@google.com>
649 * mmap.c (backtrace_free): If freeing a large aligned block of
650 memory, call munmap rather than holding onto it.
651 (backtrace_vector_grow): When growing a vector, double the number
652 of pages requested. When releasing the old version of a grown
653 vector, pass the correct size to backtrace_free.
655 2014-03-07 Ian Lance Taylor <iant@google.com>
657 * sort.c (backtrace_qsort): Use middle element as pivot.
659 2014-03-06 Ian Lance Taylor <iant@google.com>
663 * internal.h (backtrace_qsort): Declare.
664 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
665 (read_line_info, read_function_entry): Likewise.
666 (read_function_info, build_dwarf_data): Likewise.
667 * elf.c (elf_initialize_syminfo): Likewise.
668 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
669 (stest_SOURCES, stest_LDADD): Define.
670 (check_PROGRAMS): Add stest.
672 2014-02-07 Misty De Meo <misty@brew.sh>
675 * configure.ac: Use AC_LINK_IFELSE in check for
677 * configure: Regenerate.
679 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
681 Update copyright years
683 2013-12-06 Jakub Jelinek <jakub@redhat.com>
685 * elf.c (ET_DYN): Undefine and define again.
686 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
687 return early -1 without closing the descriptor.
688 (struct phdr_data): Add exe_descriptor.
689 (phdr_callback): If pd->exe_descriptor is not -1, for very first
690 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
691 otherwise backtrace_close the exe_descriptor if not -1. Adjust
693 (backtrace_initialize): Adjust call to elf_add. If it returns
694 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
696 2013-12-05 Ian Lance Taylor <iant@google.com>
698 * alloc.c (backtrace_vector_finish): Add error_callback and data
699 parameters. Call backtrace_vector_release. Return address base.
700 * mmap.c (backtrace_vector_finish): Add error_callback and data
701 parameters. Return address base.
702 * dwarf.c (read_function_info): Get new address base from
703 backtrace_vector_finish.
704 * internal.h (backtrace_vector_finish): Update declaration.
706 2013-11-27 Ian Lance Taylor <iant@google.com>
708 * dwarf.c (find_address_ranges): New static function, broken out
709 of build_address_map.
710 (build_address_map): Call it.
711 * btest.c (check): Check for missing filename or function, rather
713 (f3): Check that enough frames were returned.
715 2013-11-19 Jakub Jelinek <jakub@redhat.com>
717 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
718 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
720 * btest.c (struct symdata): Add size field.
721 (callback_three): Add symsize argument. Copy it to the data->size
723 (f23): Set symdata.size to 0.
724 (test5): Likewise. If sizeof (int) > 1, lookup address of
725 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
728 * atomic.c: Include sys/types.h.
730 2013-11-18 Ian Lance Taylor <iant@google.com>
732 * configure.ac: Check for support of __atomic extensions.
733 * internal.h: Declare or #define atomic functions for use in
735 * atomic.c: New file.
736 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
737 (dwarf_fileline, backtrace_dwarf_add): Likewise.
738 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
739 (backtrace_initialize): Likewise.
740 * fileline.c (fileline_initialize): Likewise.
741 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
742 * configure, config.h.in, Makefile.in: Rebuild.
744 2013-11-18 Jakub Jelinek <jakub@redhat.com>
746 * elf.c (SHN_UNDEF): Define.
747 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
748 with st_shndx == SHN_UNDEF. Add base_address to address fields.
749 (elf_add): Adjust caller.
751 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
753 2013-11-16 Ian Lance Taylor <iant@google.com>
755 * backtrace.h (backtrace_create_state): Correct comment about
758 2013-11-15 Ian Lance Taylor <iant@google.com>
760 * backtrace.h (backtrace_syminfo): Update comment and parameter
761 name to take any address, not just a PC value.
762 * elf.c (STT_OBJECT): Define.
763 (elf_nosyms): Rename parameter pc to addr.
764 (elf_symbol_search): Rename local variable pc to addr.
765 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
766 (elf_syminfo): Rename parameter pc to addr.
767 * btest.c (global): New global variable.
771 2013-10-17 Ian Lance Taylor <iant@google.com>
773 * elf.c (elf_add): Don't get the wrong offsets if a debug section
776 2013-10-15 David Malcolm <dmalcolm@redhat.com>
778 * configure.ac: Add --enable-host-shared, setting up
779 pre-existing PIC_FLAG variable within Makefile.am et al.
780 * configure: Regenerate.
782 2013-09-20 Alan Modra <amodra@gmail.com>
784 * configure: Regenerate.
786 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
788 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
790 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
792 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
793 dl_iterate_phdr callbacks.
795 2013-03-25 Ian Lance Taylor <iant@google.com>
797 * alloc.c: #include <sys/types.h>.
800 2013-01-31 Ian Lance Taylor <iant@google.com>
802 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
803 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
805 2013-01-25 Jakub Jelinek <jakub@redhat.com>
808 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
809 attribute was not seen.
811 2013-01-16 Ian Lance Taylor <iant@google.com>
813 * dwarf.c (struct unit): Add filename and abs_filename fields.
814 (build_address_map): Set new fields when reading unit.
815 (dwarf_lookup_pc): If we don't find an entry in the line table,
816 just return the main file name.
818 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
820 Update copyright years.
822 2013-01-01 Ian Lance Taylor <iant@google.com>
825 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
826 $(MULTIBUILDTOP)/../../gcc/include.
827 * Makefile.in: Rebuild.
829 2013-01-01 Ian Lance Taylor <iant@google.com>
832 * mmap.c (backtrace_alloc): Don't call sync functions if not
834 (backtrace_free): Likewise.
836 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
838 * mmapio.c: Define MAP_FAILED if not defined.
840 2012-12-11 Jakub Jelinek <jakub@redhat.com>
843 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
844 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
845 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
847 * Makefile.in: Regenerated.
848 * configure: Regenerated.
850 2012-12-07 Jakub Jelinek <jakub@redhat.com>
853 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
854 * Makefile.in: Regenerated.
856 2012-11-20 Ian Lance Taylor <iant@google.com>
858 * dwarf.c (read_attribute): Always clear val.
860 2012-11-13 Ian Lance Taylor <iant@google.com>
863 * configure.ac: Only add -Werror if building a target library.
864 * configure: Rebuild.
866 2012-11-12 Ian Lance Taylor <iant@google.com>
867 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
868 Gerald Pfeifer <gerald@pfeifer.com>
870 * configure.ac: Check for getexecname.
871 * fileline.c: #include <errno.h>. Define getexecname if not
873 (fileline_initialize): Try to find the executable in a few
875 * print.c (error_callback): Only print the filename if it came
876 from the backtrace state.
877 * configure, config.h.in: Rebuild.
879 2012-10-29 Ian Lance Taylor <iant@google.com>
881 * mmap.c (backtrace_vector_release): Correct last patch: add
884 2012-10-29 Ian Lance Taylor <iant@google.com>
886 * mmap.c (backtrace_vector_release): Make sure freed block is
887 aligned on 8-byte boundary.
889 2012-10-26 Ian Lance Taylor <iant@google.com>
892 * posix.c (backtrace_open): Add does_not_exist parameter.
893 * elf.c (phdr_callback): Do not warn if shared library could not
895 * fileline.c (fileline_initialize): Update calls to
897 * internal.h (backtrace_open): Update declaration.
899 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
902 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
903 * configure: Regenerate.
905 2012-10-24 Ian Lance Taylor <iant@google.com>
908 * configure.ac: Check whether -funwind-tables option works.
909 * configure: Rebuild.
911 2012-10-11 Ian Lance Taylor <iant@google.com>
913 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
914 * configure: Rebuild.
916 2012-10-10 Ian Lance Taylor <iant@google.com>
918 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
921 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
923 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
925 2012-10-09 Ian Lance Taylor <iant@google.com>
927 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
928 (backtrace_dwarf_add): Likewise.
930 2012-10-09 Ian Lance Taylor <iant@google.com>
932 Add support for tracing through shared libraries.
933 * configure.ac: Check for link.h and dl_iterate_phdr.
934 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
935 ELF macros before #defining them.
936 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
938 (struct elf_syminfo_data): Add next field.
939 (elf_initialize_syminfo): Initialize next field.
940 (elf_add_syminfo_data): New static function.
941 (elf_add): New static function, broken out of
942 backtrace_initialize. Call backtrace_dwarf_add instead of
943 backtrace_dwarf_initialize.
944 (struct phdr_data): Define.
945 (phdr_callback): New static function.
946 (backtrace_initialize): Call elf_add.
947 * dwarf.c (struct dwarf_data): Add next and base_address fields.
948 (add_unit_addr): Add base_address parameter. Change all callers.
949 (add_unit_ranges, build_address_map): Likewise.
950 (add_line): Add ddata parameter. Change all callers.
951 (read_line_program, add_function_range): Likewise.
952 (dwarf_lookup_pc): New static function, broken out of
954 (dwarf_fileline): Call dwarf_lookup_pc.
955 (build_dwarf_data): New static function.
956 (backtrace_dwarf_add): New function.
957 (backtrace_dwarf_initialize): Remove.
958 * internal.h (backtrace_dwarf_initialize): Don't declare.
959 (backtrace_dwarf_add): Declare.
960 * configure, config.h.in: Rebuild.
962 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
964 * btest.c (f23): Avoid uninitialized variable warning.
966 2012-10-04 Ian Lance Taylor <iant@google.com>
968 * dwarf.c: If the system header files do not declare strnlen,
969 provide our own version.
971 2012-10-03 Ian Lance Taylor <iant@google.com>
973 * dwarf.c (read_uleb128): Fix overflow test.
974 (read_sleb128): Likewise.
975 (build_address_map): Don't change unit_buf.start.
977 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
980 * configure.ac (EXTRA_FLAGS): New.
981 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
982 * configure, Makefile.in: Regenerate.
984 2012-09-29 Ian Lance Taylor <iant@google.com>
987 * fileline.c (fileline_initialize): Pass errnum as -1 when
988 reporting that we could not read executable information after a
991 2012-09-27 Ian Lance Taylor <iant@google.com>
994 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
995 * Makefile.am: Add dependencies for all objects.
996 * configure, aclocal.m4, Makefile.in: Rebuild.
998 2012-09-27 Ian Lance Taylor <iant@google.com>
1001 * elf.c (backtrace_initialize): Set *fileln_fn, not
1004 2012-09-19 Ian Lance Taylor <iant@google.com>
1006 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1007 as a target library.
1008 * configure: Rebuild.
1010 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1011 Ian Lance Taylor <iant@google.com>
1013 * configure.ac (GCC_HEADER_STDINT): Invoke.
1014 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1015 * btest.c: Don't include <stdint.h>.
1016 * dwarf.c: Likewise.
1017 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1019 2012-09-18 Ian Lance Taylor <iant@google.com>
1022 * Makefile.am (AM_CPPFLAGS): Define.
1023 (AM_CFLAGS): Remove -I options.
1024 * Makefile.in: Rebuild.
1026 2012-09-18 Ian Lance Taylor <iant@google.com>
1028 * posix.c (O_BINARY): Define if not defined.
1029 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1030 HAVE_FCNTL is defined.
1031 * configure.ac: Test for the fcntl function.
1032 * configure, config.h.in: Rebuild.
1034 2012-09-18 Ian Lance Taylor <iant@google.com>
1036 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1038 2012-09-18 Ian Lance Taylor <iant@google.com>
1040 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1042 2012-09-18 Ian Lance Taylor <iant@google.com>
1044 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1045 * mmapio.c: Don't define _GNU_SOURCE.
1046 * configure, config.h.in: Rebuild.
1048 2012-09-18 Ian Lance Taylor <iant@google.com>
1050 * configure.ac: Check whether strnlen is declared.
1051 * dwarf.c: Declare strnlen if not declared.
1052 * configure, config.h.in: Rebuild.
1054 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1056 * fileline.c: Include <stdlib.h>.
1059 2012-09-17 Ian Lance Taylor <iant@google.com>
1062 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1065 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1068 * nounwind.c (backtrace_simple): Add state parameter.
1070 2012-09-17 Ian Lance Taylor <iant@google.com>
1073 * unknown.c (unknown_fileline): Add state parameter, remove
1074 fileline_data parameter, name error_callback parameter.
1075 (backtrace_initialize): Add state parameter.
1077 2012-09-17 Ian Lance Taylor <iant@google.com>
1079 * Initial implementation.
1081 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1083 Copying and distribution of this file, with or without modification,
1084 are permitted in any medium without royalty provided the copyright
1085 notice and this notice are preserved.