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