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