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