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