stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
[gcc.git] / libbacktrace / ChangeLog
1 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
2
3 * configure: Regenerated.
4
5 2018-04-19 Jakub Jelinek <jakub@redhat.com>
6
7 * configure: Regenerated.
8
9 2018-04-17 Ian Lance Taylor <iant@golang.org>
10
11 * backtrace.c: Revert last two changes. Don't call mmap
12 directly.
13
14 2018-04-17 Ian Lance Taylor <iant@golang.org>
15
16 * backtrace.c: Include backtrace-supported.h before checking
17 BACKTRACE_USES_MALLOC.
18
19 2018-04-17 Ian Lance Taylor <iant@golang.org>
20
21 * backtrace.c (backtrace_full): When testing whether we can
22 allocate memory, call mmap directly, and munmap the memory.
23
24 2018-04-04 Jakub Jelinek <jakub@redhat.com>
25
26 PR other/85161
27 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
28 big endian, only use 32-bit loads if endianity macros are predefined
29 and indicate big or little endian.
30
31 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
32
33 PR target/84148
34 * configure: Regenerate.
35
36 2018-02-15 Jakub Jelinek <jakub@redhat.com>
37
38 PR other/82368
39 * elf.c (SHT_PROGBITS): Undefine and define.
40
41 2018-02-14 Jakub Jelinek <jakub@redhat.com>
42
43 PR other/82368
44 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
45 (struct elf_ppc64_opd_data): New type.
46 (elf_initialize_syminfo): Add opd argument, handle symbols
47 pointing into the PowerPC64 ELFv1 .opd section.
48 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
49 to structure with .opd data to elf_initialize_syminfo.
50
51 2018-01-31 Ian Lance Taylor <iant@golang.org>
52
53 * elf.c (elf_add): Close descriptor if we use a debugfile.
54 * btest.c (check_open_files): New static function.
55 (main): Call check_open_files.
56
57 2018-01-25 Ian Lance Taylor <iant@golang.org>
58
59 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
60 desired CRC is zero.
61 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
62
63 2018-01-25 Ian Lance Taylor <iant@golang.org>
64
65 * pecoff.c (coff_add): Only release syms_view if it is valid.
66
67 2018-01-25 Ian Lance Taylor <iant@golang.org>
68
69 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
70
71 2018-01-24 Ian Lance Taylor <iant@golang.org>
72
73 * pecoff.c (coff_add): Use coff_read4, not memcpy.
74
75 2018-01-24 Ian Lance Taylor <iant@golang.org>
76
77 PR other/68239
78 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
79 on the free list.
80
81 2018-01-19 Tony Reix <tony.reix@atos.net>
82
83 * xcoff.c (xcoff_incl_compare): New function.
84 (xcoff_incl_search): New function.
85 (xcoff_process_linenos): Use bsearch to find include file.
86 (xcoff_initialize_fileline): Sort include file information.
87
88 2018-01-16 Ian Lance Taylor <iant@golang.org>
89
90 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
91 288.
92 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
93 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
94 (elf_zlib_default_table): Update.
95 (elf_zlib_default_dist_table): New static array.
96 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
97 for block type 1.
98 * ztest.c (struct zlib_test): Add uncompressed_len.
99 (tests): Initialize uncompressed_len field. Add new test case.
100 (test_samples): Use uncompressed_len field.
101
102 2018-01-03 Jakub Jelinek <jakub@redhat.com>
103
104 Update copyright years.
105
106 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
107
108 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
109 * aclocal.m4: Regenerate.
110 * Makefile.in: Likewise.
111 * configure: Likewise.
112
113 2017-10-06 Ian Lance Taylor <iant@golang.org>
114
115 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
116 zlib uncompress function.
117
118 2017-10-05 Ian Lance Taylor <iant@golang.org>
119
120 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
121 Read a four byte integer.
122 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
123 boundary before ever calling elf_zlib_fetch.
124 * ztest.c (test_large): Simplify print statements a bit.
125
126 2017-10-02 Ian Lance Taylor <iant@golang.org>
127
128 * ztest.c: #include <errno.h>.
129 (TEST_TIMING): Don't define, don't test.
130 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
131 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
132 (ZLIB_CLOCK_GETTIME_ARG): Define.
133 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
134 * Makefile.am: Likewise.
135 * configure, Makefile.in: Rebuild.
136
137 2017-10-02 Thomas Schwinge <thomas@codesourcery.com>
138
139 PR other/67165
140 * Makefile.am: Append the content of clock_gettime_link to
141 ztest_LDADD.
142 * configure.ac: Test for the case that clock_gettime is in librt.
143 * Makefile.in: Regenerate.
144 * configure: Likewise.
145
146 PR other/67165
147 * configure.ac: Check for clock_gettime.
148 * config.h.in: Regenerate.
149 * configure: Likewise.
150 * ztest.c (average_time, test_large): Conditionalize test timing
151 on clock_gettime availability.
152
153 2017-09-29 Tony Reix <tony.reix@atos.net>
154
155 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
156 (STYP_DWARF, SSUBTYP_DW*): Define.
157 (enum dwarf_section): Define.
158 (struct dwsect_info): Define.
159 (xcoff_add): Look for DWARF sections, pass them to
160 backtrace_dwarf_add.
161
162 2017-09-28 Ian Lance Taylor <iant@golang.org>
163
164 PR other/67165
165 * elf.c (__builtin_prefetch): Define if not __GNUC__.
166 (unlikely): Define.
167 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
168 (b_elf_chdr): Define type.
169 (enum debug_section): Add ZDEBUG_xxx values.
170 (debug_section_names): Add names for new sections.
171 (struct debug_section_info): Add compressed field.
172 (elf_zlib_failed, elf_zlib_fetch): New static functions.
173 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
174 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
175 (HUFFMAN_SECONDARY_SHIFT): Define.
176 (ZDEBUG_TABLE_SIZE): Define.
177 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
178 (final_next_secondary): New static variable if
179 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
180 (elf_zlib_inflate_table): New static function.
181 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
182 function to produce fixed Huffman table.
183 (elf_zlib_default_table): New static variable.
184 (elf_zlib_inflate): New static function.
185 (elf_zlib_verify_checksum): Likewise.
186 (elf_zlib_inflate_and_verify): Likewise.
187 (elf_uncompress_zdebug): Likewise.
188 (elf_uncompress_chdr): Likewise.
189 (backtrace_uncompress_zdebug): New extern function.
190 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
191 sections, and uncompress them.
192 * internal.h (backtrace_compress_zdebug): Declare.
193 * ztest.c: New file.
194 * configure.ac: Check for -lz and check whether the linker
195 supports --compress-debug-sections.
196 * Makefile.am (ztest_SOURCES): New variable.
197 (ztest_CFLAGS, ztest_LDADD): New variables.
198 (check_PROGRAMS): Add ztest.
199 (ctestg_SOURCES): New variable.
200 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
201 (ctesta_SOURCES): New variable.
202 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
203 (check_PROGRAMS): Add ctestg and ctesta.
204 * configure, config.h.in, Makefile.in: Rebuild.
205
206 2017-09-22 Ian Lance Taylor <iant@golang.org>
207
208 PR sanitizer/77631
209 * configure.ac: Check for lstat and readlink.
210 * elf.c (lstat, readlink): Provide dummy versions if real versions
211 are not available.
212 * configure, config.h.in: Rebuild.
213
214 2017-09-21 Ian Lance Taylor <iant@google.com>
215
216 PR go/82284
217 * elf.c (backtrace_initialize): Set pd.exe_filename.
218
219 2017-09-20 Ian Lance Taylor <iant@golang.org>
220 Denis Khalikov <d.khalikov@partner.samsung.com>
221
222 PR sanitizer/77631
223 Support for external debug info.
224 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
225 (S_ISLNK): Define if not defined.
226 (xstrnlen): Define if strnlen is not available.
227 (b_elf_note): Define type.
228 (NT_GNU_BUILD_ID): Define macro.
229 (elf_crc32, elf_crc32_file): New static functions.
230 (elf_is_symlink, elf_readlink): New static functions.
231 (elf_open_debugfile_by_buildid): New static function.
232 (elf_try_debugfile): New static function.
233 (elf_find_debugfile_by_debuglink): New static function.
234 (elf_open_debugfile_by_debuglink): New static function.
235 (elf_add): Add filename and debuginfo parameters. Adjust all
236 callers. Look for external debug info notes, and try to fetch
237 debug info from external file.
238 (struct phdr_data): Add exe_filename field.
239 (phdr_callback): Pass filename to elf_add.
240 (backtrace_initialize): Add filename parameter.
241 * internal.h (backtrace_initialize): Add filename parameter.
242 * fileline.c (fileline_initialize): Pass filename to
243 backtrace_initialize.
244 * pecoff.c (fileline_initialize): Add unused filename parameter.
245 * unknown.c (fileline_initialize): Likewise.
246 * xcoff.c (fileline_initialize): Likewise.
247 * configure.ac: Check for objcopy --add-gnu-debuglink.
248 * Makefile.am (dtest): New test target.
249 * configure, Makefile.in: Rebuild.
250
251 2017-09-12 Steve Ellcey <sellcey@cavium.com>
252
253 PR other/81096
254 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
255 * Makefile.in: Regenerate.
256
257 2017-09-12 Steve Ellcey <sellcey@cavium.com>
258
259 PR other/81096
260 * libbacktrace/Makefile.in
261 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
262
263 2017-08-02 David Edelsohn <dje.gcc@gmail.com>
264
265 PR bootstrap/81638
266 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
267
268 2017-07-28 Tony Reix <tony.reix@atos.net>
269
270 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
271
272 2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
273
274 * fileline.c (fileline_initialize): Print pid_t as long.
275
276 2017-07-26 Tony Reix <tony.reix@atos.net>
277
278 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
279 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
280 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
281 * configure, config.h.in: Regenerate.
282
283 2017-07-21 Tony Reix <tony.reix@atos.net>
284
285 * filetype.awk: Add AIX XCOFF type detection.
286 * configure.ac: Recognize xcoff format.
287 * Makefile.am (FORMAT_FILES): Add xcoff.c.
288 * fileline.c: Include <unistd.h>.
289 (fileline_initialize): Add case for AIX procfs.
290 * xcoff.c: New file.
291 * configure, Makefile.in: Rebuild.
292
293 2017-06-21 Richard Biener <rguenther@suse.de>
294
295 * configure.ac: Add AC_SYS_LARGEFILE.
296 * config.h.in: Regenerate.
297 * configure: Likewise.
298
299 2017-06-11 Ian Lance Taylor <iant@golang.org>
300
301 * elf.c (backtrace_initialize): Always set *fileline_fn.
302 * ttest.c: New file.
303 * btest.c: Move support functions into testlib.c. Change calls to
304 check to pass file name.
305 * testlib.c: New file, copied from (part of) btest.c.
306 * testlib.h: New file, declarations for testlib.c.
307 * edtest.c: Use testlib.h and testlib.c.
308 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
309 * Makefile.am (btest_SOURCES): Add testlib.c.
310 (edtest_SOURCES): Likewise.
311 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
312 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
313 * configure, Makefile.in: Rebuild.
314
315 2017-05-19 Than McIntosh <thanm@google.com>
316
317 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
318 (read_line_header): Don't allocate dirs if dirs_count == 0.
319 * edtest.c: New file.
320 * edtest2.c: New file.
321 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
322 (check_PROGRAMS): Add edtest.
323 (edtest2_build.c, gen_edtest2_build): New targets.
324 * Makefile.in: Rebuild.
325
326 2017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
327
328 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
329 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
330
331 2017-01-01 Jakub Jelinek <jakub@redhat.com>
332
333 Update copyright years.
334
335 2016-11-15 Matthias Klose <doko@ubuntu.com>
336
337 * configure: Regenerate.
338
339 2016-09-11 Carlos Liam <carlos@aarzee.me>
340
341 * all: Remove meaningless trailing whitespace.
342
343 2016-05-18 Uros Bizjak <ubizjak@gmail.com>
344
345 PR target/71161
346 * elf.c (phdr_callback) [__i386__]: Add
347 __attribute__((__force_align_arg_pointer__)).
348
349 2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
350
351 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
352 avoid possible crash.
353 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
354 missing debug info anymore.
355
356 2016-02-06 John David Anglin <danglin@gcc.gnu.org>
357
358 * mmap.c (MAP_FAILED): Define if not defined.
359
360 2016-01-04 Jakub Jelinek <jakub@redhat.com>
361
362 Update copyright years.
363
364 2015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
365
366 * configure.ac: Specify that DJGPP do not have mmap
367 even when sys/mman.h exists.
368 * configure: Regenerate
369
370 2015-12-09 John David Anglin <danglin@gcc.gnu.org>
371
372 PR libgfortran/68115
373 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
374 * configure: Regenerate.
375 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
376 to void.
377
378 2015-09-17 Ian Lance Taylor <iant@google.com>
379
380 * posix.c (backtrace_open): Cast second argument of open() to int.
381
382 2015-09-11 Ian Lance Taylor <iant@google.com>
383
384 * Makefile.am (backtrace.lo): Depend on internal.h.
385 (sort.lo, stest.lo): Add explicit dependencies.
386 * Makefile.in: Rebuild.
387
388 2015-09-09 Hans-Peter Nilsson <hp@axis.com>
389
390 * backtrace.c: #include <sys/types.h>.
391
392 2015-09-08 Ian Lance Taylor <iant@google.com>
393
394 PR other/67457
395 * backtrace.c: #include "internal.h".
396 (struct backtrace_data): Add can_alloc field.
397 (unwind): If can_alloc is false, don't try to get file/line
398 information.
399 (backtrace_full): Set can_alloc field in bdata.
400 * alloc.c (backtrace_alloc): Don't call error_callback if it is
401 NULL.
402 * mmap.c (backtrace_alloc): Likewise.
403 * internal.h: Update comments for backtrace_alloc and
404 backtrace_free.
405
406 2015-09-08 Ian Lance Taylor <iant@google.com>
407
408 PR other/67457
409 * mmap.c (backtrace_alloc): Correct test for mmap failure.
410
411 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
412
413 * configure.ac: For spu-*-* targets, set have_fcntl to no.
414 * configure: Regenerate.
415
416 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
417
418 * configure.ac: Remove [disable-shared] argument to LT_INIT.
419 Remove setting PIC_FLAG when building as target library.
420 * configure: Regenerate.
421
422 2015-08-26 Hans-Peter Nilsson <hp@axis.com>
423
424 * configure.ac: Only compile with -fPIC if the target
425 supports it.
426 * configure: Regenerate.
427
428 2015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
429
430 * configure.ac: Set have_mmap to no on spu-*-* targets.
431 * configure: Regenerate.
432
433 2015-08-13 Ian Lance Taylor <iant@google.com>
434
435 * dwarf.c (read_function_entry): Add vec_inlined parameter.
436 Change all callers.
437
438 2015-06-11 Martin Sebor <msebor@redhat.com>
439
440 PR sanitizer/65479
441 * dwarf.c (struct line): Add new field idx.
442 (line_compare): Use it.
443 (add_line): Set it.
444 (read_line_info): Reset it.
445
446 2015-05-29 Tristan Gingold <gingold@adacore.com>
447
448 * pecoff.c: New file.
449 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
450 * Makefile.in: Regenerate.
451 * filetype.awk: Detect pecoff.
452 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
453 Add pecoff.
454 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
455 true.
456 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
457 * configure: Regenerate.
458 * pecoff.c: New file.
459
460 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
461
462 * Makefile.in: Regenerated with automake-1.11.6.
463 * aclocal.m4: Likewise.
464 * configure: Likewise.
465
466 2015-01-24 Matthias Klose <doko@ubuntu.com>
467
468 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
469 * configure: Regenerate.
470
471 2015-01-05 Jakub Jelinek <jakub@redhat.com>
472
473 Update copyright years.
474
475 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
476
477 PR bootstrap/63784
478 * configure: Regenerated.
479
480 2014-11-11 David Malcolm <dmalcolm@redhat.com>
481
482 * ChangeLog.jit: New.
483
484 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
485
486 PR target/63610
487 * configure: Regenerate.
488
489 2014-10-23 Ian Lance Taylor <iant@google.com>
490
491 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
492 Fix to return void *.
493
494 2014-05-08 Ian Lance Taylor <iant@google.com>
495
496 * mmap.c (backtrace_free): If freeing a large aligned block of
497 memory, call munmap rather than holding onto it.
498 (backtrace_vector_grow): When growing a vector, double the number
499 of pages requested. When releasing the old version of a grown
500 vector, pass the correct size to backtrace_free.
501
502 2014-03-07 Ian Lance Taylor <iant@google.com>
503
504 * sort.c (backtrace_qsort): Use middle element as pivot.
505
506 2014-03-06 Ian Lance Taylor <iant@google.com>
507
508 * sort.c: New file.
509 * stest.c: New file.
510 * internal.h (backtrace_qsort): Declare.
511 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
512 (read_line_info, read_function_entry): Likewise.
513 (read_function_info, build_dwarf_data): Likewise.
514 * elf.c (elf_initialize_syminfo): Likewise.
515 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
516 (stest_SOURCES, stest_LDADD): Define.
517 (check_PROGRAMS): Add stest.
518
519 2014-02-07 Misty De Meo <misty@brew.sh>
520
521 PR target/58710
522 * configure.ac: Use AC_LINK_IFELSE in check for
523 _Unwind_GetIPInfo.
524 * configure: Regenerate.
525
526 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
527
528 Update copyright years
529
530 2013-12-06 Jakub Jelinek <jakub@redhat.com>
531
532 * elf.c (ET_DYN): Undefine and define again.
533 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
534 return early -1 without closing the descriptor.
535 (struct phdr_data): Add exe_descriptor.
536 (phdr_callback): If pd->exe_descriptor is not -1, for very first
537 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
538 otherwise backtrace_close the exe_descriptor if not -1. Adjust
539 call to elf_add.
540 (backtrace_initialize): Adjust call to elf_add. If it returns
541 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
542
543 2013-12-05 Ian Lance Taylor <iant@google.com>
544
545 * alloc.c (backtrace_vector_finish): Add error_callback and data
546 parameters. Call backtrace_vector_release. Return address base.
547 * mmap.c (backtrace_vector_finish): Add error_callback and data
548 parameters. Return address base.
549 * dwarf.c (read_function_info): Get new address base from
550 backtrace_vector_finish.
551 * internal.h (backtrace_vector_finish): Update declaration.
552
553 2013-11-27 Ian Lance Taylor <iant@google.com>
554
555 * dwarf.c (find_address_ranges): New static function, broken out
556 of build_address_map.
557 (build_address_map): Call it.
558 * btest.c (check): Check for missing filename or function, rather
559 than crashing.
560 (f3): Check that enough frames were returned.
561
562 2013-11-19 Jakub Jelinek <jakub@redhat.com>
563
564 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
565 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
566 last argument.
567 * btest.c (struct symdata): Add size field.
568 (callback_three): Add symsize argument. Copy it to the data->size
569 field.
570 (f23): Set symdata.size to 0.
571 (test5): Likewise. If sizeof (int) > 1, lookup address of
572 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
573 values.
574
575 * atomic.c: Include sys/types.h.
576
577 2013-11-18 Ian Lance Taylor <iant@google.com>
578
579 * configure.ac: Check for support of __atomic extensions.
580 * internal.h: Declare or #define atomic functions for use in
581 backtrace code.
582 * atomic.c: New file.
583 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
584 (dwarf_fileline, backtrace_dwarf_add): Likewise.
585 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
586 (backtrace_initialize): Likewise.
587 * fileline.c (fileline_initialize): Likewise.
588 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
589 * configure, config.h.in, Makefile.in: Rebuild.
590
591 2013-11-18 Jakub Jelinek <jakub@redhat.com>
592
593 * elf.c (SHN_UNDEF): Define.
594 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
595 with st_shndx == SHN_UNDEF. Add base_address to address fields.
596 (elf_add): Adjust caller.
597
598 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
599
600 2013-11-16 Ian Lance Taylor <iant@google.com>
601
602 * backtrace.h (backtrace_create_state): Correct comment about
603 threading.
604
605 2013-11-15 Ian Lance Taylor <iant@google.com>
606
607 * backtrace.h (backtrace_syminfo): Update comment and parameter
608 name to take any address, not just a PC value.
609 * elf.c (STT_OBJECT): Define.
610 (elf_nosyms): Rename parameter pc to addr.
611 (elf_symbol_search): Rename local variable pc to addr.
612 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
613 (elf_syminfo): Rename parameter pc to addr.
614 * btest.c (global): New global variable.
615 (test5): New test.
616 (main): Call test5.
617
618 2013-10-17 Ian Lance Taylor <iant@google.com>
619
620 * elf.c (elf_add): Don't get the wrong offsets if a debug section
621 is missing.
622
623 2013-10-15 David Malcolm <dmalcolm@redhat.com>
624
625 * configure.ac: Add --enable-host-shared, setting up
626 pre-existing PIC_FLAG variable within Makefile.am et al.
627 * configure: Regenerate.
628
629 2013-09-20 Alan Modra <amodra@gmail.com>
630
631 * configure: Regenerate.
632
633 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
634
635 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
636
637 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
638
639 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
640 dl_iterate_phdr callbacks.
641
642 2013-03-25 Ian Lance Taylor <iant@google.com>
643
644 * alloc.c: #include <sys/types.h>.
645 * mmap.c: Likewise.
646
647 2013-01-31 Ian Lance Taylor <iant@google.com>
648
649 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
650 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
651
652 2013-01-25 Jakub Jelinek <jakub@redhat.com>
653
654 PR other/56076
655 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
656 attribute was not seen.
657
658 2013-01-16 Ian Lance Taylor <iant@google.com>
659
660 * dwarf.c (struct unit): Add filename and abs_filename fields.
661 (build_address_map): Set new fields when reading unit.
662 (dwarf_lookup_pc): If we don't find an entry in the line table,
663 just return the main file name.
664
665 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
666
667 Update copyright years.
668
669 2013-01-01 Ian Lance Taylor <iant@google.com>
670
671 PR bootstrap/54834
672 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
673 $(MULTIBUILDTOP)/../../gcc/include.
674 * Makefile.in: Rebuild.
675
676 2013-01-01 Ian Lance Taylor <iant@google.com>
677
678 PR other/55536
679 * mmap.c (backtrace_alloc): Don't call sync functions if not
680 threaded.
681 (backtrace_free): Likewise.
682
683 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
684
685 * mmapio.c: Define MAP_FAILED if not defined.
686
687 2012-12-11 Jakub Jelinek <jakub@redhat.com>
688
689 PR bootstrap/54926
690 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
691 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
692 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
693 accepts it.
694 * Makefile.in: Regenerated.
695 * configure: Regenerated.
696
697 2012-12-07 Jakub Jelinek <jakub@redhat.com>
698
699 PR bootstrap/54926
700 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
701 * Makefile.in: Regenerated.
702
703 2012-11-20 Ian Lance Taylor <iant@google.com>
704
705 * dwarf.c (read_attribute): Always clear val.
706
707 2012-11-13 Ian Lance Taylor <iant@google.com>
708
709 PR other/55312
710 * configure.ac: Only add -Werror if building a target library.
711 * configure: Rebuild.
712
713 2012-11-12 Ian Lance Taylor <iant@google.com>
714 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
715 Gerald Pfeifer <gerald@pfeifer.com>
716
717 * configure.ac: Check for getexecname.
718 * fileline.c: #include <errno.h>. Define getexecname if not
719 available.
720 (fileline_initialize): Try to find the executable in a few
721 different ways.
722 * print.c (error_callback): Only print the filename if it came
723 from the backtrace state.
724 * configure, config.h.in: Rebuild.
725
726 2012-10-29 Ian Lance Taylor <iant@google.com>
727
728 * mmap.c (backtrace_vector_release): Correct last patch: add
729 aligned, not size.
730
731 2012-10-29 Ian Lance Taylor <iant@google.com>
732
733 * mmap.c (backtrace_vector_release): Make sure freed block is
734 aligned on 8-byte boundary.
735
736 2012-10-26 Ian Lance Taylor <iant@google.com>
737
738 PR other/55087
739 * posix.c (backtrace_open): Add does_not_exist parameter.
740 * elf.c (phdr_callback): Do not warn if shared library could not
741 be opened.
742 * fileline.c (fileline_initialize): Update calls to
743 backtrace_open.
744 * internal.h (backtrace_open): Update declaration.
745
746 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
747
748 PR target/55061
749 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
750 * configure: Regenerate.
751
752 2012-10-24 Ian Lance Taylor <iant@google.com>
753
754 PR target/55061
755 * configure.ac: Check whether -funwind-tables option works.
756 * configure: Rebuild.
757
758 2012-10-11 Ian Lance Taylor <iant@google.com>
759
760 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
761 * configure: Rebuild.
762
763 2012-10-10 Ian Lance Taylor <iant@google.com>
764
765 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
766 lower case.
767
768 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
769
770 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
771
772 2012-10-09 Ian Lance Taylor <iant@google.com>
773
774 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
775 (backtrace_dwarf_add): Likewise.
776
777 2012-10-09 Ian Lance Taylor <iant@google.com>
778
779 Add support for tracing through shared libraries.
780 * configure.ac: Check for link.h and dl_iterate_phdr.
781 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
782 ELF macros before #defining them.
783 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
784 dl_iterate_phdr.
785 (struct elf_syminfo_data): Add next field.
786 (elf_initialize_syminfo): Initialize next field.
787 (elf_add_syminfo_data): New static function.
788 (elf_add): New static function, broken out of
789 backtrace_initialize. Call backtrace_dwarf_add instead of
790 backtrace_dwarf_initialize.
791 (struct phdr_data): Define.
792 (phdr_callback): New static function.
793 (backtrace_initialize): Call elf_add.
794 * dwarf.c (struct dwarf_data): Add next and base_address fields.
795 (add_unit_addr): Add base_address parameter. Change all callers.
796 (add_unit_ranges, build_address_map): Likewise.
797 (add_line): Add ddata parameter. Change all callers.
798 (read_line_program, add_function_range): Likewise.
799 (dwarf_lookup_pc): New static function, broken out of
800 dwarf_fileline.
801 (dwarf_fileline): Call dwarf_lookup_pc.
802 (build_dwarf_data): New static function.
803 (backtrace_dwarf_add): New function.
804 (backtrace_dwarf_initialize): Remove.
805 * internal.h (backtrace_dwarf_initialize): Don't declare.
806 (backtrace_dwarf_add): Declare.
807 * configure, config.h.in: Rebuild.
808
809 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
810
811 * btest.c (f23): Avoid uninitialized variable warning.
812
813 2012-10-04 Ian Lance Taylor <iant@google.com>
814
815 * dwarf.c: If the system header files do not declare strnlen,
816 provide our own version.
817
818 2012-10-03 Ian Lance Taylor <iant@google.com>
819
820 * dwarf.c (read_uleb128): Fix overflow test.
821 (read_sleb128): Likewise.
822 (build_address_map): Don't change unit_buf.start.
823
824 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
825
826 PR other/54761
827 * configure.ac (EXTRA_FLAGS): New.
828 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
829 * configure, Makefile.in: Regenerate.
830
831 2012-09-29 Ian Lance Taylor <iant@google.com>
832
833 PR other/54749
834 * fileline.c (fileline_initialize): Pass errnum as -1 when
835 reporting that we could not read executable information after a
836 previous failure.
837
838 2012-09-27 Ian Lance Taylor <iant@google.com>
839
840 PR bootstrap/54732
841 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
842 * Makefile.am: Add dependencies for all objects.
843 * configure, aclocal.m4, Makefile.in: Rebuild.
844
845 2012-09-27 Ian Lance Taylor <iant@google.com>
846
847 PR other/54726
848 * elf.c (backtrace_initialize): Set *fileln_fn, not
849 state->fileln_fn.
850
851 2012-09-19 Ian Lance Taylor <iant@google.com>
852
853 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
854 as a target library.
855 * configure: Rebuild.
856
857 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
858 Ian Lance Taylor <iant@google.com>
859
860 * configure.ac (GCC_HEADER_STDINT): Invoke.
861 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
862 * btest.c: Don't include <stdint.h>.
863 * dwarf.c: Likewise.
864 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
865
866 2012-09-18 Ian Lance Taylor <iant@google.com>
867
868 PR bootstrap/54623
869 * Makefile.am (AM_CPPFLAGS): Define.
870 (AM_CFLAGS): Remove -I options.
871 * Makefile.in: Rebuild.
872
873 2012-09-18 Ian Lance Taylor <iant@google.com>
874
875 * posix.c (O_BINARY): Define if not defined.
876 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
877 HAVE_FCNTL is defined.
878 * configure.ac: Test for the fcntl function.
879 * configure, config.h.in: Rebuild.
880
881 2012-09-18 Ian Lance Taylor <iant@google.com>
882
883 * btest.c (test1, test2, test3, test4): Add the unused attribute.
884
885 2012-09-18 Ian Lance Taylor <iant@google.com>
886
887 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
888
889 2012-09-18 Ian Lance Taylor <iant@google.com>
890
891 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
892 * mmapio.c: Don't define _GNU_SOURCE.
893 * configure, config.h.in: Rebuild.
894
895 2012-09-18 Ian Lance Taylor <iant@google.com>
896
897 * configure.ac: Check whether strnlen is declared.
898 * dwarf.c: Declare strnlen if not declared.
899 * configure, config.h.in: Rebuild.
900
901 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
902
903 * fileline.c: Include <stdlib.h>.
904 * mmap.c: Likewise.
905
906 2012-09-17 Ian Lance Taylor <iant@google.com>
907
908 PR bootstrap/54611
909 * nounwind.c (backtrace_full): Rename from backtrace. Add state
910 parameter.
911
912 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
913
914 PR bootstrap/54611
915 * nounwind.c (backtrace_simple): Add state parameter.
916
917 2012-09-17 Ian Lance Taylor <iant@google.com>
918
919 PR bootstrap/54609
920 * unknown.c (unknown_fileline): Add state parameter, remove
921 fileline_data parameter, name error_callback parameter.
922 (backtrace_initialize): Add state parameter.
923
924 2012-09-17 Ian Lance Taylor <iant@google.com>
925
926 * Initial implementation.
927 \f
928 Copyright (C) 2012-2018 Free Software Foundation, Inc.
929
930 Copying and distribution of this file, with or without modification,
931 are permitted in any medium without royalty provided the copyright
932 notice and this notice are preserved.