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