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