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