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