1 2019-01-17 Tom de Vries <tdevries@suse.de>
4 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
5 (read_attribute): Handle DW_FORM_GNU_ref_alt using
7 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
9 2019-01-17 Tom de Vries <tdevries@suse.de>
11 * dwarf.c (struct unit): Add low_offset and high_offset fields.
12 (struct unit_vector): New type.
13 (struct dwarf_data): Add units and units_counts fields.
14 (find_unit): New function.
15 (find_address_ranges): Add and handle unit_tag parameter.
16 (build_address_map): Add and handle units_vec parameter.
17 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
20 2019-01-17 Tom de Vries <tdevries@suse.de>
23 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
26 2019-01-17 Tom de Vries <tdevries@suse.de>
28 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
29 (read_attribute): Add altlink parameter. Handle missing altlink for
30 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
31 (find_address_ranges, build_address_map, build_dwarf_data): Add and
32 handle altlink parameter.
33 (read_referenced_name, read_function_entry): Add argument to
36 2019-01-17 Tom de Vries <tdevries@suse.de>
38 * dwarf.c (struct dwarf_data): Add altlink field.
39 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
40 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
41 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
42 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
43 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
44 * xcoff.c (xcoff_add): Same.
46 2019-01-17 Tom de Vries <tdevries@suse.de>
48 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
49 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
50 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
51 argument to backtrace_dwarf_add call.
52 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
53 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
54 * xcoff.c (xcoff_add): Same.
56 2019-01-17 Tom de Vries <tdevries@suse.de>
58 * elf.c (elf_add): Add and handle with_buildid_data and
59 with_buildid_size parameters. Handle .gnu_debugaltlink section.
60 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
62 2019-01-16 Tom de Vries <tdevries@suse.de>
64 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
66 (read_referenced_name): ... here, and ...
67 (read_function_entry): ... here.
69 2019-01-16 Tom de Vries <tdevries@suse.de>
71 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
73 (read_function_entry): Same. Don't allow name found via
74 DW_AT_abstract_origin or case DW_AT_specification to override linkage
77 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
81 * backtrace.h: Mechanically replace "can not" with "cannot".
83 2019-01-01 Jakub Jelinek <jakub@redhat.com>
85 Update copyright years.
87 2018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
89 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
91 * Makefile.in: Regenerate.
93 2018-12-28 Tom de Vries <tdevries@suse.de>
95 * dwarf.c (build_address_map): Reuse unused units.
97 2018-12-28 Tom de Vries <tdevries@suse.de>
99 * dwarf.c (build_address_map): Simplify by removing local variable
102 2018-12-28 Ian Lance Taylor <iant@golang.org>
103 Tom de Vries <tdevries@suse.de>
105 PR libbacktrace/88063
106 * dwarf.c (free_unit_addrs_vector): Remove.
107 (build_address_map): Keep track of allocated units in vector. Free
108 allocated units and corresponding abbrevs upon failure. Remove now
109 redundant call to free_unit_addrs_vector. Free addrs vector upon
110 failure. Free allocated unit vector.
112 2018-12-28 Tom de Vries <tdevries@suse.de>
114 * dwarf.c (build_address_map): Free addrs vector upon failure.
116 2018-12-14 Tom de Vries <tdevries@suse.de>
119 * allocfail.sh: Remove "set -o pipefail".
121 2018-12-12 Tom de Vries <tdevries@suse.de>
123 * Makefile.am (TESTS): Add allocfail.sh.
124 (check_PROGRAMS): Add allocfail.
125 * Makefile.in: Regenerate.
126 * instrumented_alloc.c: New file. Redefine malloc and realloc.
128 * allocfail.c: New file.
129 * allocfail.sh: New file.
131 2018-11-30 Tom de Vries <tdevries@suse.de>
133 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
134 test_xcoff_64, test_pecoff and test_unknown.
135 * Makefile.in: Regenerate.
136 * test_format.c: New file.
138 2018-11-30 Tom de Vries <tdevries@suse.de>
140 * Makefile.am : Add _with_alloc version for each test in
142 * Makefile.in: Regenerate.
144 2018-11-30 Tom de Vries <tdevries@suse.de>
146 * internal.h (backtrace_vector_free): New static inline fuction,
148 * dwarf.c (read_line_info): ... here.
150 2018-11-28 Tom de Vries <tdevries@suse.de>
152 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
155 2018-11-27 Tom de Vries <tdevries@suse.de>
157 * mmap.c (backtrace_vector_release): Same.
158 * unittest.c (test1): Add check.
160 2018-11-27 Tom de Vries <tdevries@suse.de>
162 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
164 * Makefile.am (check_PROGRAMS): Add unittest.
165 * Makefile.in: Regenerate.
166 * unittest.c: New file.
168 2018-11-22 Tom de Vries <tdevries@suse.de>
170 * dwarf.c (read_initial_length): Factor out of ...
171 (build_address_map, read_line_info): ... here.
173 2018-11-21 Tom de Vries <tdevries@suse.de>
175 * dwarf.c (read_string): Factor out of ...
176 (read_attribute, read_line_header, read_line_program): ... here.
178 2018-10-31 Joseph Myers <joseph@codesourcery.com>
181 * Makefile.am: Include multilib.am.
182 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
183 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
185 2018-10-05 Ian Lance Taylor <iant@golang.org>
187 PR libbacktrace/87529
188 * backtrace.h: Document that backtrace_create_state should be
191 2018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
193 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
194 * Makefile.in: Regenerate.
195 * config.h.in: Likewise.
196 * configure: Likewise.
198 2018-08-01 Tony Reix <tony.reix@atos.net>
200 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
201 (struct xcoff_func, struct xcoff_func_vector): New structs.
202 (xcoff_syminfo): Drop leading dot from symbol name.
203 (xcoff_line_compare, xcoff_line_search): Remove.
204 (xcoff_func_compare, xcoff_func_search): New static functions.
205 (xcoff_lookup_pc): Search function table.
206 (xcoff_add_line, xcoff_process_linenos): Remove.
207 (xcoff_initialize_fileline): Build function table.
209 2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
212 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
213 checking up to 36 bytes.
215 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
217 * configure: Regenerated.
219 2018-04-19 Jakub Jelinek <jakub@redhat.com>
221 * configure: Regenerated.
223 2018-04-17 Ian Lance Taylor <iant@golang.org>
225 * backtrace.c: Revert last two changes. Don't call mmap
228 2018-04-17 Ian Lance Taylor <iant@golang.org>
230 * backtrace.c: Include backtrace-supported.h before checking
231 BACKTRACE_USES_MALLOC.
233 2018-04-17 Ian Lance Taylor <iant@golang.org>
235 * backtrace.c (backtrace_full): When testing whether we can
236 allocate memory, call mmap directly, and munmap the memory.
238 2018-04-04 Jakub Jelinek <jakub@redhat.com>
241 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
242 big endian, only use 32-bit loads if endianity macros are predefined
243 and indicate big or little endian.
245 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
248 * configure: Regenerate.
250 2018-02-15 Jakub Jelinek <jakub@redhat.com>
253 * elf.c (SHT_PROGBITS): Undefine and define.
255 2018-02-14 Jakub Jelinek <jakub@redhat.com>
258 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
259 (struct elf_ppc64_opd_data): New type.
260 (elf_initialize_syminfo): Add opd argument, handle symbols
261 pointing into the PowerPC64 ELFv1 .opd section.
262 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
263 to structure with .opd data to elf_initialize_syminfo.
265 2018-01-31 Ian Lance Taylor <iant@golang.org>
267 * elf.c (elf_add): Close descriptor if we use a debugfile.
268 * btest.c (check_open_files): New static function.
269 (main): Call check_open_files.
271 2018-01-25 Ian Lance Taylor <iant@golang.org>
273 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
275 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
277 2018-01-25 Ian Lance Taylor <iant@golang.org>
279 * pecoff.c (coff_add): Only release syms_view if it is valid.
281 2018-01-25 Ian Lance Taylor <iant@golang.org>
283 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
285 2018-01-24 Ian Lance Taylor <iant@golang.org>
287 * pecoff.c (coff_add): Use coff_read4, not memcpy.
289 2018-01-24 Ian Lance Taylor <iant@golang.org>
292 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
295 2018-01-19 Tony Reix <tony.reix@atos.net>
297 * xcoff.c (xcoff_incl_compare): New function.
298 (xcoff_incl_search): New function.
299 (xcoff_process_linenos): Use bsearch to find include file.
300 (xcoff_initialize_fileline): Sort include file information.
302 2018-01-16 Ian Lance Taylor <iant@golang.org>
304 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
306 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
307 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
308 (elf_zlib_default_table): Update.
309 (elf_zlib_default_dist_table): New static array.
310 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
312 * ztest.c (struct zlib_test): Add uncompressed_len.
313 (tests): Initialize uncompressed_len field. Add new test case.
314 (test_samples): Use uncompressed_len field.
316 2018-01-03 Jakub Jelinek <jakub@redhat.com>
318 Update copyright years.
320 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
322 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
323 * aclocal.m4: Regenerate.
324 * Makefile.in: Likewise.
325 * configure: Likewise.
327 2017-10-06 Ian Lance Taylor <iant@golang.org>
329 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
330 zlib uncompress function.
332 2017-10-05 Ian Lance Taylor <iant@golang.org>
334 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
335 Read a four byte integer.
336 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
337 boundary before ever calling elf_zlib_fetch.
338 * ztest.c (test_large): Simplify print statements a bit.
340 2017-10-02 Ian Lance Taylor <iant@golang.org>
342 * ztest.c: #include <errno.h>.
343 (TEST_TIMING): Don't define, don't test.
344 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
345 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
346 (ZLIB_CLOCK_GETTIME_ARG): Define.
347 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
348 * Makefile.am: Likewise.
349 * configure, Makefile.in: Rebuild.
351 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
354 * Makefile.am: Append the content of clock_gettime_link to
356 * configure.ac: Test for the case that clock_gettime is in librt.
357 * Makefile.in: Regenerate.
358 * configure: Likewise.
361 * configure.ac: Check for clock_gettime.
362 * config.h.in: Regenerate.
363 * configure: Likewise.
364 * ztest.c (average_time, test_large): Conditionalize test timing
365 on clock_gettime availability.
367 2017-09-29 Tony Reix <tony.reix@atos.net>
369 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
370 (STYP_DWARF, SSUBTYP_DW*): Define.
371 (enum dwarf_section): Define.
372 (struct dwsect_info): Define.
373 (xcoff_add): Look for DWARF sections, pass them to
376 2017-09-28 Ian Lance Taylor <iant@golang.org>
379 * elf.c (__builtin_prefetch): Define if not __GNUC__.
381 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
382 (b_elf_chdr): Define type.
383 (enum debug_section): Add ZDEBUG_xxx values.
384 (debug_section_names): Add names for new sections.
385 (struct debug_section_info): Add compressed field.
386 (elf_zlib_failed, elf_zlib_fetch): New static functions.
387 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
388 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
389 (HUFFMAN_SECONDARY_SHIFT): Define.
390 (ZDEBUG_TABLE_SIZE): Define.
391 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
392 (final_next_secondary): New static variable if
393 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
394 (elf_zlib_inflate_table): New static function.
395 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
396 function to produce fixed Huffman table.
397 (elf_zlib_default_table): New static variable.
398 (elf_zlib_inflate): New static function.
399 (elf_zlib_verify_checksum): Likewise.
400 (elf_zlib_inflate_and_verify): Likewise.
401 (elf_uncompress_zdebug): Likewise.
402 (elf_uncompress_chdr): Likewise.
403 (backtrace_uncompress_zdebug): New extern function.
404 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
405 sections, and uncompress them.
406 * internal.h (backtrace_compress_zdebug): Declare.
408 * configure.ac: Check for -lz and check whether the linker
409 supports --compress-debug-sections.
410 * Makefile.am (ztest_SOURCES): New variable.
411 (ztest_CFLAGS, ztest_LDADD): New variables.
412 (check_PROGRAMS): Add ztest.
413 (ctestg_SOURCES): New variable.
414 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
415 (ctesta_SOURCES): New variable.
416 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
417 (check_PROGRAMS): Add ctestg and ctesta.
418 * configure, config.h.in, Makefile.in: Rebuild.
420 2017-09-22 Ian Lance Taylor <iant@golang.org>
423 * configure.ac: Check for lstat and readlink.
424 * elf.c (lstat, readlink): Provide dummy versions if real versions
426 * configure, config.h.in: Rebuild.
428 2017-09-21 Ian Lance Taylor <iant@google.com>
431 * elf.c (backtrace_initialize): Set pd.exe_filename.
433 2017-09-20 Ian Lance Taylor <iant@golang.org>
434 Denis Khalikov <d.khalikov@partner.samsung.com>
437 Support for external debug info.
438 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
439 (S_ISLNK): Define if not defined.
440 (xstrnlen): Define if strnlen is not available.
441 (b_elf_note): Define type.
442 (NT_GNU_BUILD_ID): Define macro.
443 (elf_crc32, elf_crc32_file): New static functions.
444 (elf_is_symlink, elf_readlink): New static functions.
445 (elf_open_debugfile_by_buildid): New static function.
446 (elf_try_debugfile): New static function.
447 (elf_find_debugfile_by_debuglink): New static function.
448 (elf_open_debugfile_by_debuglink): New static function.
449 (elf_add): Add filename and debuginfo parameters. Adjust all
450 callers. Look for external debug info notes, and try to fetch
451 debug info from external file.
452 (struct phdr_data): Add exe_filename field.
453 (phdr_callback): Pass filename to elf_add.
454 (backtrace_initialize): Add filename parameter.
455 * internal.h (backtrace_initialize): Add filename parameter.
456 * fileline.c (fileline_initialize): Pass filename to
457 backtrace_initialize.
458 * pecoff.c (fileline_initialize): Add unused filename parameter.
459 * unknown.c (fileline_initialize): Likewise.
460 * xcoff.c (fileline_initialize): Likewise.
461 * configure.ac: Check for objcopy --add-gnu-debuglink.
462 * Makefile.am (dtest): New test target.
463 * configure, Makefile.in: Rebuild.
465 2017-09-12 Steve Ellcey <sellcey@cavium.com>
468 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
469 * Makefile.in: Regenerate.
471 2017-09-12 Steve Ellcey <sellcey@cavium.com>
474 * libbacktrace/Makefile.in
475 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
477 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
480 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
482 2017-07-28 Tony Reix <tony.reix@atos.net>
484 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
486 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
488 * fileline.c (fileline_initialize): Print pid_t as long.
490 2017-07-26 Tony Reix <tony.reix@atos.net>
492 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
493 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
494 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
495 * configure, config.h.in: Regenerate.
497 2017-07-21 Tony Reix <tony.reix@atos.net>
499 * filetype.awk: Add AIX XCOFF type detection.
500 * configure.ac: Recognize xcoff format.
501 * Makefile.am (FORMAT_FILES): Add xcoff.c.
502 * fileline.c: Include <unistd.h>.
503 (fileline_initialize): Add case for AIX procfs.
505 * configure, Makefile.in: Rebuild.
507 2017-06-21 Richard Biener <rguenther@suse.de>
509 * configure.ac: Add AC_SYS_LARGEFILE.
510 * config.h.in: Regenerate.
511 * configure: Likewise.
513 2017-06-11 Ian Lance Taylor <iant@golang.org>
515 * elf.c (backtrace_initialize): Always set *fileline_fn.
517 * btest.c: Move support functions into testlib.c. Change calls to
518 check to pass file name.
519 * testlib.c: New file, copied from (part of) btest.c.
520 * testlib.h: New file, declarations for testlib.c.
521 * edtest.c: Use testlib.h and testlib.c.
522 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
523 * Makefile.am (btest_SOURCES): Add testlib.c.
524 (edtest_SOURCES): Likewise.
525 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
526 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
527 * configure, Makefile.in: Rebuild.
529 2017-05-19 Than McIntosh <thanm@google.com>
531 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
532 (read_line_header): Don't allocate dirs if dirs_count == 0.
533 * edtest.c: New file.
534 * edtest2.c: New file.
535 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
536 (check_PROGRAMS): Add edtest.
537 (edtest2_build.c, gen_edtest2_build): New targets.
538 * Makefile.in: Rebuild.
540 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
542 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
543 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
545 2017-01-01 Jakub Jelinek <jakub@redhat.com>
547 Update copyright years.
549 2016-11-15 Matthias Klose <doko@ubuntu.com>
551 * configure: Regenerate.
553 2016-09-11 Carlos Liam <carlos@aarzee.me>
555 * all: Remove meaningless trailing whitespace.
557 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
560 * elf.c (phdr_callback) [__i386__]: Add
561 __attribute__((__force_align_arg_pointer__)).
563 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
565 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
566 avoid possible crash.
567 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
568 missing debug info anymore.
570 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
572 * mmap.c (MAP_FAILED): Define if not defined.
574 2016-01-04 Jakub Jelinek <jakub@redhat.com>
576 Update copyright years.
578 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
580 * configure.ac: Specify that DJGPP do not have mmap
581 even when sys/mman.h exists.
582 * configure: Regenerate
584 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
587 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
588 * configure: Regenerate.
589 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
592 2015-09-17 Ian Lance Taylor <iant@google.com>
594 * posix.c (backtrace_open): Cast second argument of open() to int.
596 2015-09-11 Ian Lance Taylor <iant@google.com>
598 * Makefile.am (backtrace.lo): Depend on internal.h.
599 (sort.lo, stest.lo): Add explicit dependencies.
600 * Makefile.in: Rebuild.
602 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
604 * backtrace.c: #include <sys/types.h>.
606 2015-09-08 Ian Lance Taylor <iant@google.com>
609 * backtrace.c: #include "internal.h".
610 (struct backtrace_data): Add can_alloc field.
611 (unwind): If can_alloc is false, don't try to get file/line
613 (backtrace_full): Set can_alloc field in bdata.
614 * alloc.c (backtrace_alloc): Don't call error_callback if it is
616 * mmap.c (backtrace_alloc): Likewise.
617 * internal.h: Update comments for backtrace_alloc and
620 2015-09-08 Ian Lance Taylor <iant@google.com>
623 * mmap.c (backtrace_alloc): Correct test for mmap failure.
625 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
627 * configure.ac: For spu-*-* targets, set have_fcntl to no.
628 * configure: Regenerate.
630 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
632 * configure.ac: Remove [disable-shared] argument to LT_INIT.
633 Remove setting PIC_FLAG when building as target library.
634 * configure: Regenerate.
636 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
638 * configure.ac: Only compile with -fPIC if the target
640 * configure: Regenerate.
642 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
644 * configure.ac: Set have_mmap to no on spu-*-* targets.
645 * configure: Regenerate.
647 2015-08-13 Ian Lance Taylor <iant@google.com>
649 * dwarf.c (read_function_entry): Add vec_inlined parameter.
652 2015-06-11 Martin Sebor <msebor@redhat.com>
655 * dwarf.c (struct line): Add new field idx.
656 (line_compare): Use it.
658 (read_line_info): Reset it.
660 2015-05-29 Tristan Gingold <gingold@adacore.com>
662 * pecoff.c: New file.
663 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
664 * Makefile.in: Regenerate.
665 * filetype.awk: Detect pecoff.
666 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
668 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
670 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
671 * configure: Regenerate.
672 * pecoff.c: New file.
674 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
676 * Makefile.in: Regenerated with automake-1.11.6.
677 * aclocal.m4: Likewise.
678 * configure: Likewise.
680 2015-01-24 Matthias Klose <doko@ubuntu.com>
682 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
683 * configure: Regenerate.
685 2015-01-05 Jakub Jelinek <jakub@redhat.com>
687 Update copyright years.
689 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
692 * configure: Regenerated.
694 2014-11-11 David Malcolm <dmalcolm@redhat.com>
696 * ChangeLog.jit: New.
698 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
701 * configure: Regenerate.
703 2014-10-23 Ian Lance Taylor <iant@google.com>
705 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
706 Fix to return void *.
708 2014-05-08 Ian Lance Taylor <iant@google.com>
710 * mmap.c (backtrace_free): If freeing a large aligned block of
711 memory, call munmap rather than holding onto it.
712 (backtrace_vector_grow): When growing a vector, double the number
713 of pages requested. When releasing the old version of a grown
714 vector, pass the correct size to backtrace_free.
716 2014-03-07 Ian Lance Taylor <iant@google.com>
718 * sort.c (backtrace_qsort): Use middle element as pivot.
720 2014-03-06 Ian Lance Taylor <iant@google.com>
724 * internal.h (backtrace_qsort): Declare.
725 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
726 (read_line_info, read_function_entry): Likewise.
727 (read_function_info, build_dwarf_data): Likewise.
728 * elf.c (elf_initialize_syminfo): Likewise.
729 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
730 (stest_SOURCES, stest_LDADD): Define.
731 (check_PROGRAMS): Add stest.
733 2014-02-07 Misty De Meo <misty@brew.sh>
736 * configure.ac: Use AC_LINK_IFELSE in check for
738 * configure: Regenerate.
740 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
742 Update copyright years
744 2013-12-06 Jakub Jelinek <jakub@redhat.com>
746 * elf.c (ET_DYN): Undefine and define again.
747 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
748 return early -1 without closing the descriptor.
749 (struct phdr_data): Add exe_descriptor.
750 (phdr_callback): If pd->exe_descriptor is not -1, for very first
751 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
752 otherwise backtrace_close the exe_descriptor if not -1. Adjust
754 (backtrace_initialize): Adjust call to elf_add. If it returns
755 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
757 2013-12-05 Ian Lance Taylor <iant@google.com>
759 * alloc.c (backtrace_vector_finish): Add error_callback and data
760 parameters. Call backtrace_vector_release. Return address base.
761 * mmap.c (backtrace_vector_finish): Add error_callback and data
762 parameters. Return address base.
763 * dwarf.c (read_function_info): Get new address base from
764 backtrace_vector_finish.
765 * internal.h (backtrace_vector_finish): Update declaration.
767 2013-11-27 Ian Lance Taylor <iant@google.com>
769 * dwarf.c (find_address_ranges): New static function, broken out
770 of build_address_map.
771 (build_address_map): Call it.
772 * btest.c (check): Check for missing filename or function, rather
774 (f3): Check that enough frames were returned.
776 2013-11-19 Jakub Jelinek <jakub@redhat.com>
778 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
779 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
781 * btest.c (struct symdata): Add size field.
782 (callback_three): Add symsize argument. Copy it to the data->size
784 (f23): Set symdata.size to 0.
785 (test5): Likewise. If sizeof (int) > 1, lookup address of
786 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
789 * atomic.c: Include sys/types.h.
791 2013-11-18 Ian Lance Taylor <iant@google.com>
793 * configure.ac: Check for support of __atomic extensions.
794 * internal.h: Declare or #define atomic functions for use in
796 * atomic.c: New file.
797 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
798 (dwarf_fileline, backtrace_dwarf_add): Likewise.
799 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
800 (backtrace_initialize): Likewise.
801 * fileline.c (fileline_initialize): Likewise.
802 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
803 * configure, config.h.in, Makefile.in: Rebuild.
805 2013-11-18 Jakub Jelinek <jakub@redhat.com>
807 * elf.c (SHN_UNDEF): Define.
808 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
809 with st_shndx == SHN_UNDEF. Add base_address to address fields.
810 (elf_add): Adjust caller.
812 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
814 2013-11-16 Ian Lance Taylor <iant@google.com>
816 * backtrace.h (backtrace_create_state): Correct comment about
819 2013-11-15 Ian Lance Taylor <iant@google.com>
821 * backtrace.h (backtrace_syminfo): Update comment and parameter
822 name to take any address, not just a PC value.
823 * elf.c (STT_OBJECT): Define.
824 (elf_nosyms): Rename parameter pc to addr.
825 (elf_symbol_search): Rename local variable pc to addr.
826 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
827 (elf_syminfo): Rename parameter pc to addr.
828 * btest.c (global): New global variable.
832 2013-10-17 Ian Lance Taylor <iant@google.com>
834 * elf.c (elf_add): Don't get the wrong offsets if a debug section
837 2013-10-15 David Malcolm <dmalcolm@redhat.com>
839 * configure.ac: Add --enable-host-shared, setting up
840 pre-existing PIC_FLAG variable within Makefile.am et al.
841 * configure: Regenerate.
843 2013-09-20 Alan Modra <amodra@gmail.com>
845 * configure: Regenerate.
847 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
849 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
851 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
853 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
854 dl_iterate_phdr callbacks.
856 2013-03-25 Ian Lance Taylor <iant@google.com>
858 * alloc.c: #include <sys/types.h>.
861 2013-01-31 Ian Lance Taylor <iant@google.com>
863 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
864 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
866 2013-01-25 Jakub Jelinek <jakub@redhat.com>
869 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
870 attribute was not seen.
872 2013-01-16 Ian Lance Taylor <iant@google.com>
874 * dwarf.c (struct unit): Add filename and abs_filename fields.
875 (build_address_map): Set new fields when reading unit.
876 (dwarf_lookup_pc): If we don't find an entry in the line table,
877 just return the main file name.
879 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
881 Update copyright years.
883 2013-01-01 Ian Lance Taylor <iant@google.com>
886 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
887 $(MULTIBUILDTOP)/../../gcc/include.
888 * Makefile.in: Rebuild.
890 2013-01-01 Ian Lance Taylor <iant@google.com>
893 * mmap.c (backtrace_alloc): Don't call sync functions if not
895 (backtrace_free): Likewise.
897 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
899 * mmapio.c: Define MAP_FAILED if not defined.
901 2012-12-11 Jakub Jelinek <jakub@redhat.com>
904 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
905 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
906 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
908 * Makefile.in: Regenerated.
909 * configure: Regenerated.
911 2012-12-07 Jakub Jelinek <jakub@redhat.com>
914 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
915 * Makefile.in: Regenerated.
917 2012-11-20 Ian Lance Taylor <iant@google.com>
919 * dwarf.c (read_attribute): Always clear val.
921 2012-11-13 Ian Lance Taylor <iant@google.com>
924 * configure.ac: Only add -Werror if building a target library.
925 * configure: Rebuild.
927 2012-11-12 Ian Lance Taylor <iant@google.com>
928 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
929 Gerald Pfeifer <gerald@pfeifer.com>
931 * configure.ac: Check for getexecname.
932 * fileline.c: #include <errno.h>. Define getexecname if not
934 (fileline_initialize): Try to find the executable in a few
936 * print.c (error_callback): Only print the filename if it came
937 from the backtrace state.
938 * configure, config.h.in: Rebuild.
940 2012-10-29 Ian Lance Taylor <iant@google.com>
942 * mmap.c (backtrace_vector_release): Correct last patch: add
945 2012-10-29 Ian Lance Taylor <iant@google.com>
947 * mmap.c (backtrace_vector_release): Make sure freed block is
948 aligned on 8-byte boundary.
950 2012-10-26 Ian Lance Taylor <iant@google.com>
953 * posix.c (backtrace_open): Add does_not_exist parameter.
954 * elf.c (phdr_callback): Do not warn if shared library could not
956 * fileline.c (fileline_initialize): Update calls to
958 * internal.h (backtrace_open): Update declaration.
960 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
963 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
964 * configure: Regenerate.
966 2012-10-24 Ian Lance Taylor <iant@google.com>
969 * configure.ac: Check whether -funwind-tables option works.
970 * configure: Rebuild.
972 2012-10-11 Ian Lance Taylor <iant@google.com>
974 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
975 * configure: Rebuild.
977 2012-10-10 Ian Lance Taylor <iant@google.com>
979 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
982 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
984 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
986 2012-10-09 Ian Lance Taylor <iant@google.com>
988 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
989 (backtrace_dwarf_add): Likewise.
991 2012-10-09 Ian Lance Taylor <iant@google.com>
993 Add support for tracing through shared libraries.
994 * configure.ac: Check for link.h and dl_iterate_phdr.
995 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
996 ELF macros before #defining them.
997 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
999 (struct elf_syminfo_data): Add next field.
1000 (elf_initialize_syminfo): Initialize next field.
1001 (elf_add_syminfo_data): New static function.
1002 (elf_add): New static function, broken out of
1003 backtrace_initialize. Call backtrace_dwarf_add instead of
1004 backtrace_dwarf_initialize.
1005 (struct phdr_data): Define.
1006 (phdr_callback): New static function.
1007 (backtrace_initialize): Call elf_add.
1008 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1009 (add_unit_addr): Add base_address parameter. Change all callers.
1010 (add_unit_ranges, build_address_map): Likewise.
1011 (add_line): Add ddata parameter. Change all callers.
1012 (read_line_program, add_function_range): Likewise.
1013 (dwarf_lookup_pc): New static function, broken out of
1015 (dwarf_fileline): Call dwarf_lookup_pc.
1016 (build_dwarf_data): New static function.
1017 (backtrace_dwarf_add): New function.
1018 (backtrace_dwarf_initialize): Remove.
1019 * internal.h (backtrace_dwarf_initialize): Don't declare.
1020 (backtrace_dwarf_add): Declare.
1021 * configure, config.h.in: Rebuild.
1023 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1025 * btest.c (f23): Avoid uninitialized variable warning.
1027 2012-10-04 Ian Lance Taylor <iant@google.com>
1029 * dwarf.c: If the system header files do not declare strnlen,
1030 provide our own version.
1032 2012-10-03 Ian Lance Taylor <iant@google.com>
1034 * dwarf.c (read_uleb128): Fix overflow test.
1035 (read_sleb128): Likewise.
1036 (build_address_map): Don't change unit_buf.start.
1038 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
1041 * configure.ac (EXTRA_FLAGS): New.
1042 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
1043 * configure, Makefile.in: Regenerate.
1045 2012-09-29 Ian Lance Taylor <iant@google.com>
1048 * fileline.c (fileline_initialize): Pass errnum as -1 when
1049 reporting that we could not read executable information after a
1052 2012-09-27 Ian Lance Taylor <iant@google.com>
1055 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1056 * Makefile.am: Add dependencies for all objects.
1057 * configure, aclocal.m4, Makefile.in: Rebuild.
1059 2012-09-27 Ian Lance Taylor <iant@google.com>
1062 * elf.c (backtrace_initialize): Set *fileln_fn, not
1065 2012-09-19 Ian Lance Taylor <iant@google.com>
1067 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1068 as a target library.
1069 * configure: Rebuild.
1071 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1072 Ian Lance Taylor <iant@google.com>
1074 * configure.ac (GCC_HEADER_STDINT): Invoke.
1075 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1076 * btest.c: Don't include <stdint.h>.
1077 * dwarf.c: Likewise.
1078 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
1080 2012-09-18 Ian Lance Taylor <iant@google.com>
1083 * Makefile.am (AM_CPPFLAGS): Define.
1084 (AM_CFLAGS): Remove -I options.
1085 * Makefile.in: Rebuild.
1087 2012-09-18 Ian Lance Taylor <iant@google.com>
1089 * posix.c (O_BINARY): Define if not defined.
1090 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1091 HAVE_FCNTL is defined.
1092 * configure.ac: Test for the fcntl function.
1093 * configure, config.h.in: Rebuild.
1095 2012-09-18 Ian Lance Taylor <iant@google.com>
1097 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1099 2012-09-18 Ian Lance Taylor <iant@google.com>
1101 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
1103 2012-09-18 Ian Lance Taylor <iant@google.com>
1105 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
1106 * mmapio.c: Don't define _GNU_SOURCE.
1107 * configure, config.h.in: Rebuild.
1109 2012-09-18 Ian Lance Taylor <iant@google.com>
1111 * configure.ac: Check whether strnlen is declared.
1112 * dwarf.c: Declare strnlen if not declared.
1113 * configure, config.h.in: Rebuild.
1115 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1117 * fileline.c: Include <stdlib.h>.
1120 2012-09-17 Ian Lance Taylor <iant@google.com>
1123 * nounwind.c (backtrace_full): Rename from backtrace. Add state
1126 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
1129 * nounwind.c (backtrace_simple): Add state parameter.
1131 2012-09-17 Ian Lance Taylor <iant@google.com>
1134 * unknown.c (unknown_fileline): Add state parameter, remove
1135 fileline_data parameter, name error_callback parameter.
1136 (backtrace_initialize): Add state parameter.
1138 2012-09-17 Ian Lance Taylor <iant@google.com>
1140 * Initial implementation.
1142 Copyright (C) 2012-2019 Free Software Foundation, Inc.
1144 Copying and distribution of this file, with or without modification,
1145 are permitted in any medium without royalty provided the copyright
1146 notice and this notice are preserved.