1 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
5 * backtrace.h: Mechanically replace "can not" with "cannot".
7 2019-01-01 Jakub Jelinek <jakub@redhat.com>
9 Update copyright years.
11 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
13 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
15 * Makefile.in: Regenerate.
17 2018-12-28 Tom de Vries <tdevries@suse.de>
19 * dwarf.c (build_address_map): Reuse unused units.
21 2018-12-28 Tom de Vries <tdevries@suse.de>
23 * dwarf.c (build_address_map): Simplify by removing local variable
26 2018-12-28 Ian Lance Taylor <iant@golang.org>
27 Tom de Vries <tdevries@suse.de>
30 * dwarf.c (free_unit_addrs_vector): Remove.
31 (build_address_map): Keep track of allocated units in vector. Free
32 allocated units and corresponding abbrevs upon failure. Remove now
33 redundant call to free_unit_addrs_vector. Free addrs vector upon
34 failure. Free allocated unit vector.
36 2018-12-28 Tom de Vries <tdevries@suse.de>
38 * dwarf.c (build_address_map): Free addrs vector upon failure.
40 2018-12-14 Tom de Vries <tdevries@suse.de>
43 * allocfail.sh: Remove "set -o pipefail".
45 2018-12-12 Tom de Vries <tdevries@suse.de>
47 * Makefile.am (TESTS): Add allocfail.sh.
48 (check_PROGRAMS): Add allocfail.
49 * Makefile.in: Regenerate.
50 * instrumented_alloc.c: New file. Redefine malloc and realloc.
52 * allocfail.c: New file.
53 * allocfail.sh: New file.
55 2018-11-30 Tom de Vries <tdevries@suse.de>
57 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
58 test_xcoff_64, test_pecoff and test_unknown.
59 * Makefile.in: Regenerate.
60 * test_format.c: New file.
62 2018-11-30 Tom de Vries <tdevries@suse.de>
64 * Makefile.am : Add _with_alloc version for each test in
66 * Makefile.in: Regenerate.
68 2018-11-30 Tom de Vries <tdevries@suse.de>
70 * internal.h (backtrace_vector_free): New static inline fuction,
72 * dwarf.c (read_line_info): ... here.
74 2018-11-28 Tom de Vries <tdevries@suse.de>
76 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
79 2018-11-27 Tom de Vries <tdevries@suse.de>
81 * mmap.c (backtrace_vector_release): Same.
82 * unittest.c (test1): Add check.
84 2018-11-27 Tom de Vries <tdevries@suse.de>
86 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
88 * Makefile.am (check_PROGRAMS): Add unittest.
89 * Makefile.in: Regenerate.
90 * unittest.c: New file.
92 2018-11-22 Tom de Vries <tdevries@suse.de>
94 * dwarf.c (read_initial_length): Factor out of ...
95 (build_address_map, read_line_info): ... here.
97 2018-11-21 Tom de Vries <tdevries@suse.de>
99 * dwarf.c (read_string): Factor out of ...
100 (read_attribute, read_line_header, read_line_program): ... here.
102 2018-10-31 Joseph Myers <joseph@codesourcery.com>
105 * Makefile.am: Include multilib.am.
106 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
107 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
109 2018-10-05 Ian Lance Taylor <iant@golang.org>
111 PR libbacktrace/87529
112 * backtrace.h: Document that backtrace_create_state should be
115 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
117 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
118 * Makefile.in: Regenerate.
119 * config.h.in: Likewise.
120 * configure: Likewise.
122 2018-08-01 Tony Reix <tony.reix@atos.net>
124 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
125 (struct xcoff_func, struct xcoff_func_vector): New structs.
126 (xcoff_syminfo): Drop leading dot from symbol name.
127 (xcoff_line_compare, xcoff_line_search): Remove.
128 (xcoff_func_compare, xcoff_func_search): New static functions.
129 (xcoff_lookup_pc): Search function table.
130 (xcoff_add_line, xcoff_process_linenos): Remove.
131 (xcoff_initialize_fileline): Build function table.
133 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
136 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
137 checking up to 36 bytes.
139 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
141 * configure: Regenerated.
143 2018-04-19 Jakub Jelinek <jakub@redhat.com>
145 * configure: Regenerated.
147 2018-04-17 Ian Lance Taylor <iant@golang.org>
149 * backtrace.c: Revert last two changes. Don't call mmap
152 2018-04-17 Ian Lance Taylor <iant@golang.org>
154 * backtrace.c: Include backtrace-supported.h before checking
155 BACKTRACE_USES_MALLOC.
157 2018-04-17 Ian Lance Taylor <iant@golang.org>
159 * backtrace.c (backtrace_full): When testing whether we can
160 allocate memory, call mmap directly, and munmap the memory.
162 2018-04-04 Jakub Jelinek <jakub@redhat.com>
165 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
166 big endian, only use 32-bit loads if endianity macros are predefined
167 and indicate big or little endian.
169 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
172 * configure: Regenerate.
174 2018-02-15 Jakub Jelinek <jakub@redhat.com>
177 * elf.c (SHT_PROGBITS): Undefine and define.
179 2018-02-14 Jakub Jelinek <jakub@redhat.com>
182 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
183 (struct elf_ppc64_opd_data): New type.
184 (elf_initialize_syminfo): Add opd argument, handle symbols
185 pointing into the PowerPC64 ELFv1 .opd section.
186 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
187 to structure with .opd data to elf_initialize_syminfo.
189 2018-01-31 Ian Lance Taylor <iant@golang.org>
191 * elf.c (elf_add): Close descriptor if we use a debugfile.
192 * btest.c (check_open_files): New static function.
193 (main): Call check_open_files.
195 2018-01-25 Ian Lance Taylor <iant@golang.org>
197 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
199 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
201 2018-01-25 Ian Lance Taylor <iant@golang.org>
203 * pecoff.c (coff_add): Only release syms_view if it is valid.
205 2018-01-25 Ian Lance Taylor <iant@golang.org>
207 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
209 2018-01-24 Ian Lance Taylor <iant@golang.org>
211 * pecoff.c (coff_add): Use coff_read4, not memcpy.
213 2018-01-24 Ian Lance Taylor <iant@golang.org>
216 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
219 2018-01-19 Tony Reix <tony.reix@atos.net>
221 * xcoff.c (xcoff_incl_compare): New function.
222 (xcoff_incl_search): New function.
223 (xcoff_process_linenos): Use bsearch to find include file.
224 (xcoff_initialize_fileline): Sort include file information.
226 2018-01-16 Ian Lance Taylor <iant@golang.org>
228 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
230 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
231 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
232 (elf_zlib_default_table): Update.
233 (elf_zlib_default_dist_table): New static array.
234 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
236 * ztest.c (struct zlib_test): Add uncompressed_len.
237 (tests): Initialize uncompressed_len field. Add new test case.
238 (test_samples): Use uncompressed_len field.
240 2018-01-03 Jakub Jelinek <jakub@redhat.com>
242 Update copyright years.
244 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
246 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
247 * aclocal.m4: Regenerate.
248 * Makefile.in: Likewise.
249 * configure: Likewise.
251 2017-10-06 Ian Lance Taylor <iant@golang.org>
253 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
254 zlib uncompress function.
256 2017-10-05 Ian Lance Taylor <iant@golang.org>
258 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
259 Read a four byte integer.
260 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
261 boundary before ever calling elf_zlib_fetch.
262 * ztest.c (test_large): Simplify print statements a bit.
264 2017-10-02 Ian Lance Taylor <iant@golang.org>
266 * ztest.c: #include <errno.h>.
267 (TEST_TIMING): Don't define, don't test.
268 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
269 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
270 (ZLIB_CLOCK_GETTIME_ARG): Define.
271 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
272 * Makefile.am: Likewise.
273 * configure, Makefile.in: Rebuild.
275 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
278 * Makefile.am: Append the content of clock_gettime_link to
280 * configure.ac: Test for the case that clock_gettime is in librt.
281 * Makefile.in: Regenerate.
282 * configure: Likewise.
285 * configure.ac: Check for clock_gettime.
286 * config.h.in: Regenerate.
287 * configure: Likewise.
288 * ztest.c (average_time, test_large): Conditionalize test timing
289 on clock_gettime availability.
291 2017-09-29 Tony Reix <tony.reix@atos.net>
293 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
294 (STYP_DWARF, SSUBTYP_DW*): Define.
295 (enum dwarf_section): Define.
296 (struct dwsect_info): Define.
297 (xcoff_add): Look for DWARF sections, pass them to
300 2017-09-28 Ian Lance Taylor <iant@golang.org>
303 * elf.c (__builtin_prefetch): Define if not __GNUC__.
305 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
306 (b_elf_chdr): Define type.
307 (enum debug_section): Add ZDEBUG_xxx values.
308 (debug_section_names): Add names for new sections.
309 (struct debug_section_info): Add compressed field.
310 (elf_zlib_failed, elf_zlib_fetch): New static functions.
311 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
312 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
313 (HUFFMAN_SECONDARY_SHIFT): Define.
314 (ZDEBUG_TABLE_SIZE): Define.
315 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
316 (final_next_secondary): New static variable if
317 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
318 (elf_zlib_inflate_table): New static function.
319 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
320 function to produce fixed Huffman table.
321 (elf_zlib_default_table): New static variable.
322 (elf_zlib_inflate): New static function.
323 (elf_zlib_verify_checksum): Likewise.
324 (elf_zlib_inflate_and_verify): Likewise.
325 (elf_uncompress_zdebug): Likewise.
326 (elf_uncompress_chdr): Likewise.
327 (backtrace_uncompress_zdebug): New extern function.
328 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
329 sections, and uncompress them.
330 * internal.h (backtrace_compress_zdebug): Declare.
332 * configure.ac: Check for -lz and check whether the linker
333 supports --compress-debug-sections.
334 * Makefile.am (ztest_SOURCES): New variable.
335 (ztest_CFLAGS, ztest_LDADD): New variables.
336 (check_PROGRAMS): Add ztest.
337 (ctestg_SOURCES): New variable.
338 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
339 (ctesta_SOURCES): New variable.
340 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
341 (check_PROGRAMS): Add ctestg and ctesta.
342 * configure, config.h.in, Makefile.in: Rebuild.
344 2017-09-22 Ian Lance Taylor <iant@golang.org>
347 * configure.ac: Check for lstat and readlink.
348 * elf.c (lstat, readlink): Provide dummy versions if real versions
350 * configure, config.h.in: Rebuild.
352 2017-09-21 Ian Lance Taylor <iant@google.com>
355 * elf.c (backtrace_initialize): Set pd.exe_filename.
357 2017-09-20 Ian Lance Taylor <iant@golang.org>
358 Denis Khalikov <d.khalikov@partner.samsung.com>
361 Support for external debug info.
362 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
363 (S_ISLNK): Define if not defined.
364 (xstrnlen): Define if strnlen is not available.
365 (b_elf_note): Define type.
366 (NT_GNU_BUILD_ID): Define macro.
367 (elf_crc32, elf_crc32_file): New static functions.
368 (elf_is_symlink, elf_readlink): New static functions.
369 (elf_open_debugfile_by_buildid): New static function.
370 (elf_try_debugfile): New static function.
371 (elf_find_debugfile_by_debuglink): New static function.
372 (elf_open_debugfile_by_debuglink): New static function.
373 (elf_add): Add filename and debuginfo parameters. Adjust all
374 callers. Look for external debug info notes, and try to fetch
375 debug info from external file.
376 (struct phdr_data): Add exe_filename field.
377 (phdr_callback): Pass filename to elf_add.
378 (backtrace_initialize): Add filename parameter.
379 * internal.h (backtrace_initialize): Add filename parameter.
380 * fileline.c (fileline_initialize): Pass filename to
381 backtrace_initialize.
382 * pecoff.c (fileline_initialize): Add unused filename parameter.
383 * unknown.c (fileline_initialize): Likewise.
384 * xcoff.c (fileline_initialize): Likewise.
385 * configure.ac: Check for objcopy --add-gnu-debuglink.
386 * Makefile.am (dtest): New test target.
387 * configure, Makefile.in: Rebuild.
389 2017-09-12 Steve Ellcey <sellcey@cavium.com>
392 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
393 * Makefile.in: Regenerate.
395 2017-09-12 Steve Ellcey <sellcey@cavium.com>
398 * libbacktrace/Makefile.in
399 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
401 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
404 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
406 2017-07-28 Tony Reix <tony.reix@atos.net>
408 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
410 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
412 * fileline.c (fileline_initialize): Print pid_t as long.
414 2017-07-26 Tony Reix <tony.reix@atos.net>
416 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
417 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
418 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
419 * configure, config.h.in: Regenerate.
421 2017-07-21 Tony Reix <tony.reix@atos.net>
423 * filetype.awk: Add AIX XCOFF type detection.
424 * configure.ac: Recognize xcoff format.
425 * Makefile.am (FORMAT_FILES): Add xcoff.c.
426 * fileline.c: Include <unistd.h>.
427 (fileline_initialize): Add case for AIX procfs.
429 * configure, Makefile.in: Rebuild.
431 2017-06-21 Richard Biener <rguenther@suse.de>
433 * configure.ac: Add AC_SYS_LARGEFILE.
434 * config.h.in: Regenerate.
435 * configure: Likewise.
437 2017-06-11 Ian Lance Taylor <iant@golang.org>
439 * elf.c (backtrace_initialize): Always set *fileline_fn.
441 * btest.c: Move support functions into testlib.c. Change calls to
442 check to pass file name.
443 * testlib.c: New file, copied from (part of) btest.c.
444 * testlib.h: New file, declarations for testlib.c.
445 * edtest.c: Use testlib.h and testlib.c.
446 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
447 * Makefile.am (btest_SOURCES): Add testlib.c.
448 (edtest_SOURCES): Likewise.
449 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
450 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
451 * configure, Makefile.in: Rebuild.
453 2017-05-19 Than McIntosh <thanm@google.com>
455 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
456 (read_line_header): Don't allocate dirs if dirs_count == 0.
457 * edtest.c: New file.
458 * edtest2.c: New file.
459 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
460 (check_PROGRAMS): Add edtest.
461 (edtest2_build.c, gen_edtest2_build): New targets.
462 * Makefile.in: Rebuild.
464 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
466 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
467 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
469 2017-01-01 Jakub Jelinek <jakub@redhat.com>
471 Update copyright years.
473 2016-11-15 Matthias Klose <doko@ubuntu.com>
475 * configure: Regenerate.
477 2016-09-11 Carlos Liam <carlos@aarzee.me>
479 * all: Remove meaningless trailing whitespace.
481 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
484 * elf.c (phdr_callback) [__i386__]: Add
485 __attribute__((__force_align_arg_pointer__)).
487 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
489 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
490 avoid possible crash.
491 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
492 missing debug info anymore.
494 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
496 * mmap.c (MAP_FAILED): Define if not defined.
498 2016-01-04 Jakub Jelinek <jakub@redhat.com>
500 Update copyright years.
502 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
504 * configure.ac: Specify that DJGPP do not have mmap
505 even when sys/mman.h exists.
506 * configure: Regenerate
508 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
511 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
512 * configure: Regenerate.
513 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
516 2015-09-17 Ian Lance Taylor <iant@google.com>
518 * posix.c (backtrace_open): Cast second argument of open() to int.
520 2015-09-11 Ian Lance Taylor <iant@google.com>
522 * Makefile.am (backtrace.lo): Depend on internal.h.
523 (sort.lo, stest.lo): Add explicit dependencies.
524 * Makefile.in: Rebuild.
526 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
528 * backtrace.c: #include <sys/types.h>.
530 2015-09-08 Ian Lance Taylor <iant@google.com>
533 * backtrace.c: #include "internal.h".
534 (struct backtrace_data): Add can_alloc field.
535 (unwind): If can_alloc is false, don't try to get file/line
537 (backtrace_full): Set can_alloc field in bdata.
538 * alloc.c (backtrace_alloc): Don't call error_callback if it is
540 * mmap.c (backtrace_alloc): Likewise.
541 * internal.h: Update comments for backtrace_alloc and
544 2015-09-08 Ian Lance Taylor <iant@google.com>
547 * mmap.c (backtrace_alloc): Correct test for mmap failure.
549 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
551 * configure.ac: For spu-*-* targets, set have_fcntl to no.
552 * configure: Regenerate.
554 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
556 * configure.ac: Remove [disable-shared] argument to LT_INIT.
557 Remove setting PIC_FLAG when building as target library.
558 * configure: Regenerate.
560 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
562 * configure.ac: Only compile with -fPIC if the target
564 * configure: Regenerate.
566 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
568 * configure.ac: Set have_mmap to no on spu-*-* targets.
569 * configure: Regenerate.
571 2015-08-13 Ian Lance Taylor <iant@google.com>
573 * dwarf.c (read_function_entry): Add vec_inlined parameter.
576 2015-06-11 Martin Sebor <msebor@redhat.com>
579 * dwarf.c (struct line): Add new field idx.
580 (line_compare): Use it.
582 (read_line_info): Reset it.
584 2015-05-29 Tristan Gingold <gingold@adacore.com>
586 * pecoff.c: New file.
587 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
588 * Makefile.in: Regenerate.
589 * filetype.awk: Detect pecoff.
590 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
592 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
594 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
595 * configure: Regenerate.
596 * pecoff.c: New file.
598 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
600 * Makefile.in: Regenerated with automake-1.11.6.
601 * aclocal.m4: Likewise.
602 * configure: Likewise.
604 2015-01-24 Matthias Klose <doko@ubuntu.com>
606 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
607 * configure: Regenerate.
609 2015-01-05 Jakub Jelinek <jakub@redhat.com>
611 Update copyright years.
613 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
616 * configure: Regenerated.
618 2014-11-11 David Malcolm <dmalcolm@redhat.com>
620 * ChangeLog.jit: New.
622 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
625 * configure: Regenerate.
627 2014-10-23 Ian Lance Taylor <iant@google.com>
629 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
630 Fix to return void *.
632 2014-05-08 Ian Lance Taylor <iant@google.com>
634 * mmap.c (backtrace_free): If freeing a large aligned block of
635 memory, call munmap rather than holding onto it.
636 (backtrace_vector_grow): When growing a vector, double the number
637 of pages requested. When releasing the old version of a grown
638 vector, pass the correct size to backtrace_free.
640 2014-03-07 Ian Lance Taylor <iant@google.com>
642 * sort.c (backtrace_qsort): Use middle element as pivot.
644 2014-03-06 Ian Lance Taylor <iant@google.com>
648 * internal.h (backtrace_qsort): Declare.
649 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
650 (read_line_info, read_function_entry): Likewise.
651 (read_function_info, build_dwarf_data): Likewise.
652 * elf.c (elf_initialize_syminfo): Likewise.
653 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
654 (stest_SOURCES, stest_LDADD): Define.
655 (check_PROGRAMS): Add stest.
657 2014-02-07 Misty De Meo <misty@brew.sh>
660 * configure.ac: Use AC_LINK_IFELSE in check for
662 * configure: Regenerate.
664 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
666 Update copyright years
668 2013-12-06 Jakub Jelinek <jakub@redhat.com>
670 * elf.c (ET_DYN): Undefine and define again.
671 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
672 return early -1 without closing the descriptor.
673 (struct phdr_data): Add exe_descriptor.
674 (phdr_callback): If pd->exe_descriptor is not -1, for very first
675 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
676 otherwise backtrace_close the exe_descriptor if not -1. Adjust
678 (backtrace_initialize): Adjust call to elf_add. If it returns
679 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
681 2013-12-05 Ian Lance Taylor <iant@google.com>
683 * alloc.c (backtrace_vector_finish): Add error_callback and data
684 parameters. Call backtrace_vector_release. Return address base.
685 * mmap.c (backtrace_vector_finish): Add error_callback and data
686 parameters. Return address base.
687 * dwarf.c (read_function_info): Get new address base from
688 backtrace_vector_finish.
689 * internal.h (backtrace_vector_finish): Update declaration.
691 2013-11-27 Ian Lance Taylor <iant@google.com>
693 * dwarf.c (find_address_ranges): New static function, broken out
694 of build_address_map.
695 (build_address_map): Call it.
696 * btest.c (check): Check for missing filename or function, rather
698 (f3): Check that enough frames were returned.
700 2013-11-19 Jakub Jelinek <jakub@redhat.com>
702 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
703 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
705 * btest.c (struct symdata): Add size field.
706 (callback_three): Add symsize argument. Copy it to the data->size
708 (f23): Set symdata.size to 0.
709 (test5): Likewise. If sizeof (int) > 1, lookup address of
710 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
713 * atomic.c: Include sys/types.h.
715 2013-11-18 Ian Lance Taylor <iant@google.com>
717 * configure.ac: Check for support of __atomic extensions.
718 * internal.h: Declare or #define atomic functions for use in
720 * atomic.c: New file.
721 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
722 (dwarf_fileline, backtrace_dwarf_add): Likewise.
723 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
724 (backtrace_initialize): Likewise.
725 * fileline.c (fileline_initialize): Likewise.
726 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
727 * configure, config.h.in, Makefile.in: Rebuild.
729 2013-11-18 Jakub Jelinek <jakub@redhat.com>
731 * elf.c (SHN_UNDEF): Define.
732 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
733 with st_shndx == SHN_UNDEF. Add base_address to address fields.
734 (elf_add): Adjust caller.
736 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
738 2013-11-16 Ian Lance Taylor <iant@google.com>
740 * backtrace.h (backtrace_create_state): Correct comment about
743 2013-11-15 Ian Lance Taylor <iant@google.com>
745 * backtrace.h (backtrace_syminfo): Update comment and parameter
746 name to take any address, not just a PC value.
747 * elf.c (STT_OBJECT): Define.
748 (elf_nosyms): Rename parameter pc to addr.
749 (elf_symbol_search): Rename local variable pc to addr.
750 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
751 (elf_syminfo): Rename parameter pc to addr.
752 * btest.c (global): New global variable.
756 2013-10-17 Ian Lance Taylor <iant@google.com>
758 * elf.c (elf_add): Don't get the wrong offsets if a debug section
761 2013-10-15 David Malcolm <dmalcolm@redhat.com>
763 * configure.ac: Add --enable-host-shared, setting up
764 pre-existing PIC_FLAG variable within Makefile.am et al.
765 * configure: Regenerate.
767 2013-09-20 Alan Modra <amodra@gmail.com>
769 * configure: Regenerate.
771 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
773 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
775 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
777 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
778 dl_iterate_phdr callbacks.
780 2013-03-25 Ian Lance Taylor <iant@google.com>
782 * alloc.c: #include <sys/types.h>.
785 2013-01-31 Ian Lance Taylor <iant@google.com>
787 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
788 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
790 2013-01-25 Jakub Jelinek <jakub@redhat.com>
793 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
794 attribute was not seen.
796 2013-01-16 Ian Lance Taylor <iant@google.com>
798 * dwarf.c (struct unit): Add filename and abs_filename fields.
799 (build_address_map): Set new fields when reading unit.
800 (dwarf_lookup_pc): If we don't find an entry in the line table,
801 just return the main file name.
803 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
805 Update copyright years.
807 2013-01-01 Ian Lance Taylor <iant@google.com>
810 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
811 $(MULTIBUILDTOP)/../../gcc/include.
812 * Makefile.in: Rebuild.
814 2013-01-01 Ian Lance Taylor <iant@google.com>
817 * mmap.c (backtrace_alloc): Don't call sync functions if not
819 (backtrace_free): Likewise.
821 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
823 * mmapio.c: Define MAP_FAILED if not defined.
825 2012-12-11 Jakub Jelinek <jakub@redhat.com>
828 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
829 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
830 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
832 * Makefile.in: Regenerated.
833 * configure: Regenerated.
835 2012-12-07 Jakub Jelinek <jakub@redhat.com>
838 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
839 * Makefile.in: Regenerated.
841 2012-11-20 Ian Lance Taylor <iant@google.com>
843 * dwarf.c (read_attribute): Always clear val.
845 2012-11-13 Ian Lance Taylor <iant@google.com>
848 * configure.ac: Only add -Werror if building a target library.
849 * configure: Rebuild.
851 2012-11-12 Ian Lance Taylor <iant@google.com>
852 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
853 Gerald Pfeifer <gerald@pfeifer.com>
855 * configure.ac: Check for getexecname.
856 * fileline.c: #include <errno.h>. Define getexecname if not
858 (fileline_initialize): Try to find the executable in a few
860 * print.c (error_callback): Only print the filename if it came
861 from the backtrace state.
862 * configure, config.h.in: Rebuild.
864 2012-10-29 Ian Lance Taylor <iant@google.com>
866 * mmap.c (backtrace_vector_release): Correct last patch: add
869 2012-10-29 Ian Lance Taylor <iant@google.com>
871 * mmap.c (backtrace_vector_release): Make sure freed block is
872 aligned on 8-byte boundary.
874 2012-10-26 Ian Lance Taylor <iant@google.com>
877 * posix.c (backtrace_open): Add does_not_exist parameter.
878 * elf.c (phdr_callback): Do not warn if shared library could not
880 * fileline.c (fileline_initialize): Update calls to
882 * internal.h (backtrace_open): Update declaration.
884 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
887 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
888 * configure: Regenerate.
890 2012-10-24 Ian Lance Taylor <iant@google.com>
893 * configure.ac: Check whether -funwind-tables option works.
894 * configure: Rebuild.
896 2012-10-11 Ian Lance Taylor <iant@google.com>
898 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
899 * configure: Rebuild.
901 2012-10-10 Ian Lance Taylor <iant@google.com>
903 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
906 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
908 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
910 2012-10-09 Ian Lance Taylor <iant@google.com>
912 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
913 (backtrace_dwarf_add): Likewise.
915 2012-10-09 Ian Lance Taylor <iant@google.com>
917 Add support for tracing through shared libraries.
918 * configure.ac: Check for link.h and dl_iterate_phdr.
919 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
920 ELF macros before #defining them.
921 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
923 (struct elf_syminfo_data): Add next field.
924 (elf_initialize_syminfo): Initialize next field.
925 (elf_add_syminfo_data): New static function.
926 (elf_add): New static function, broken out of
927 backtrace_initialize. Call backtrace_dwarf_add instead of
928 backtrace_dwarf_initialize.
929 (struct phdr_data): Define.
930 (phdr_callback): New static function.
931 (backtrace_initialize): Call elf_add.
932 * dwarf.c (struct dwarf_data): Add next and base_address fields.
933 (add_unit_addr): Add base_address parameter. Change all callers.
934 (add_unit_ranges, build_address_map): Likewise.
935 (add_line): Add ddata parameter. Change all callers.
936 (read_line_program, add_function_range): Likewise.
937 (dwarf_lookup_pc): New static function, broken out of
939 (dwarf_fileline): Call dwarf_lookup_pc.
940 (build_dwarf_data): New static function.
941 (backtrace_dwarf_add): New function.
942 (backtrace_dwarf_initialize): Remove.
943 * internal.h (backtrace_dwarf_initialize): Don't declare.
944 (backtrace_dwarf_add): Declare.
945 * configure, config.h.in: Rebuild.
947 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
949 * btest.c (f23): Avoid uninitialized variable warning.
951 2012-10-04 Ian Lance Taylor <iant@google.com>
953 * dwarf.c: If the system header files do not declare strnlen,
954 provide our own version.
956 2012-10-03 Ian Lance Taylor <iant@google.com>
958 * dwarf.c (read_uleb128): Fix overflow test.
959 (read_sleb128): Likewise.
960 (build_address_map): Don't change unit_buf.start.
962 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
965 * configure.ac (EXTRA_FLAGS): New.
966 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
967 * configure, Makefile.in: Regenerate.
969 2012-09-29 Ian Lance Taylor <iant@google.com>
972 * fileline.c (fileline_initialize): Pass errnum as -1 when
973 reporting that we could not read executable information after a
976 2012-09-27 Ian Lance Taylor <iant@google.com>
979 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
980 * Makefile.am: Add dependencies for all objects.
981 * configure, aclocal.m4, Makefile.in: Rebuild.
983 2012-09-27 Ian Lance Taylor <iant@google.com>
986 * elf.c (backtrace_initialize): Set *fileln_fn, not
989 2012-09-19 Ian Lance Taylor <iant@google.com>
991 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
993 * configure: Rebuild.
995 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
996 Ian Lance Taylor <iant@google.com>
998 * configure.ac (GCC_HEADER_STDINT): Invoke.
999 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1000 * btest.c: Don't include <stdint.h>.
1001 * dwarf.c: Likewise.
1002 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1004 2012-09-18 Ian Lance Taylor <iant@google.com>
1007 * Makefile.am (AM_CPPFLAGS): Define.
1008 (AM_CFLAGS): Remove -I options.
1009 * Makefile.in: Rebuild.
1011 2012-09-18 Ian Lance Taylor <iant@google.com>
1013 * posix.c (O_BINARY): Define if not defined.
1014 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1015 HAVE_FCNTL is defined.
1016 * configure.ac: Test for the fcntl function.
1017 * configure, config.h.in: Rebuild.
1019 2012-09-18 Ian Lance Taylor <iant@google.com>
1021 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1023 2012-09-18 Ian Lance Taylor <iant@google.com>
1025 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1027 2012-09-18 Ian Lance Taylor <iant@google.com>
1029 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1030 * mmapio.c: Don't define _GNU_SOURCE.
1031 * configure, config.h.in: Rebuild.
1033 2012-09-18 Ian Lance Taylor <iant@google.com>
1035 * configure.ac: Check whether strnlen is declared.
1036 * dwarf.c: Declare strnlen if not declared.
1037 * configure, config.h.in: Rebuild.
1039 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1041 * fileline.c: Include <stdlib.h>.
1044 2012-09-17 Ian Lance Taylor <iant@google.com>
1047 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1050 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1053 * nounwind.c (backtrace_simple): Add state parameter.
1055 2012-09-17 Ian Lance Taylor <iant@google.com>
1058 * unknown.c (unknown_fileline): Add state parameter, remove
1059 fileline_data parameter, name error_callback parameter.
1060 (backtrace_initialize): Add state parameter.
1062 2012-09-17 Ian Lance Taylor <iant@google.com>
1064 * Initial implementation.
1066 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1068 Copying and distribution of this file, with or without modification,
1069 are permitted in any medium without royalty provided the copyright
1070 notice and this notice are preserved.