]> git.ipfire.org Git - thirdparty/gcc.git/blame - libbacktrace/ChangeLog
cet.m4 (GCC_CET_FLAGS): Default to --disable-cet, replace --enable-cet=default with...
[thirdparty/gcc.git] / libbacktrace / ChangeLog
CommitLineData
a0e1df88
JJ
12018-04-19 Jakub Jelinek <jakub@redhat.com>
2
3 * configure: Regenerated.
4
21070494
ILT
52018-04-17 Ian Lance Taylor <iant@golang.org>
6
7 * backtrace.c: Revert last two changes. Don't call mmap
8 directly.
9
c36af1b4
ILT
102018-04-17 Ian Lance Taylor <iant@golang.org>
11
12 * backtrace.c: Include backtrace-supported.h before checking
13 BACKTRACE_USES_MALLOC.
14
83a658ca
ILT
152018-04-17 Ian Lance Taylor <iant@golang.org>
16
17 * backtrace.c (backtrace_full): When testing whether we can
18 allocate memory, call mmap directly, and munmap the memory.
19
c5c4b2ae
JJ
202018-04-04 Jakub Jelinek <jakub@redhat.com>
21
22 PR other/85161
23 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
24 big endian, only use 32-bit loads if endianity macros are predefined
25 and indicate big or little endian.
26
14e335ed
IT
272018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
28
29 PR target/84148
30 * configure: Regenerate.
31
bcc23586
JJ
322018-02-15 Jakub Jelinek <jakub@redhat.com>
33
34 PR other/82368
35 * elf.c (SHT_PROGBITS): Undefine and define.
36
da07141f
JJ
372018-02-14 Jakub Jelinek <jakub@redhat.com>
38
39 PR other/82368
40 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
41 (struct elf_ppc64_opd_data): New type.
42 (elf_initialize_syminfo): Add opd argument, handle symbols
43 pointing into the PowerPC64 ELFv1 .opd section.
44 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
45 to structure with .opd data to elf_initialize_syminfo.
46
65d0b859
ILT
472018-01-31 Ian Lance Taylor <iant@golang.org>
48
49 * elf.c (elf_add): Close descriptor if we use a debugfile.
50 * btest.c (check_open_files): New static function.
51 (main): Call check_open_files.
52
96f7c2a9
ILT
532018-01-25 Ian Lance Taylor <iant@golang.org>
54
55 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
56 desired CRC is zero.
57 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
58
a794e494
ILT
592018-01-25 Ian Lance Taylor <iant@golang.org>
60
61 * pecoff.c (coff_add): Only release syms_view if it is valid.
62
45f3ab19
ILT
632018-01-25 Ian Lance Taylor <iant@golang.org>
64
65 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
66
017707ce
ILT
672018-01-24 Ian Lance Taylor <iant@golang.org>
68
69 * pecoff.c (coff_add): Use coff_read4, not memcpy.
70
3fe3c7d7
ILT
712018-01-24 Ian Lance Taylor <iant@golang.org>
72
73 PR other/68239
74 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
75 on the free list.
76
47c699f5
TR
772018-01-19 Tony Reix <tony.reix@atos.net>
78
79 * xcoff.c (xcoff_incl_compare): New function.
80 (xcoff_incl_search): New function.
81 (xcoff_process_linenos): Use bsearch to find include file.
82 (xcoff_initialize_fileline): Sort include file information.
83
566588f1
ILT
842018-01-16 Ian Lance Taylor <iant@golang.org>
85
86 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
87 288.
88 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
89 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
90 (elf_zlib_default_table): Update.
91 (elf_zlib_default_dist_table): New static array.
92 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
93 for block type 1.
94 * ztest.c (struct zlib_test): Add uncompressed_len.
95 (tests): Initialize uncompressed_len field. Add new test case.
96 (test_samples): Use uncompressed_len field.
97
85ec4feb
JJ
982018-01-03 Jakub Jelinek <jakub@redhat.com>
99
100 Update copyright years.
101
44685d37
IT
1022017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
103
104 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
105 * aclocal.m4: Regenerate.
106 * Makefile.in: Likewise.
107 * configure: Likewise.
108
549d24e9
ILT
1092017-10-06 Ian Lance Taylor <iant@golang.org>
110
111 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
112 zlib uncompress function.
113
a978e26b
ILT
1142017-10-05 Ian Lance Taylor <iant@golang.org>
115
116 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
117 Read a four byte integer.
118 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
119 boundary before ever calling elf_zlib_fetch.
120 * ztest.c (test_large): Simplify print statements a bit.
121
8398c1df
ILT
1222017-10-02 Ian Lance Taylor <iant@golang.org>
123
124 * ztest.c: #include <errno.h>.
125 (TEST_TIMING): Don't define, don't test.
126 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
127 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
128 (ZLIB_CLOCK_GETTIME_ARG): Define.
129 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
130 * Makefile.am: Likewise.
131 * configure, Makefile.in: Rebuild.
132
dbc31f20
TS
1332017-10-02 Thomas Schwinge <thomas@codesourcery.com>
134
dd954c67
TS
135 PR other/67165
136 * Makefile.am: Append the content of clock_gettime_link to
137 ztest_LDADD.
138 * configure.ac: Test for the case that clock_gettime is in librt.
139 * Makefile.in: Regenerate.
140 * configure: Likewise.
141
dbc31f20
TS
142 PR other/67165
143 * configure.ac: Check for clock_gettime.
144 * config.h.in: Regenerate.
145 * configure: Likewise.
146 * ztest.c (average_time, test_large): Conditionalize test timing
147 on clock_gettime availability.
148
e90c74f5
TR
1492017-09-29 Tony Reix <tony.reix@atos.net>
150
151 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
152 (STYP_DWARF, SSUBTYP_DW*): Define.
153 (enum dwarf_section): Define.
154 (struct dwsect_info): Define.
155 (xcoff_add): Look for DWARF sections, pass them to
156 backtrace_dwarf_add.
157
8da872d9
ILT
1582017-09-28 Ian Lance Taylor <iant@golang.org>
159
160 PR other/67165
161 * elf.c (__builtin_prefetch): Define if not __GNUC__.
162 (unlikely): Define.
163 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
164 (b_elf_chdr): Define type.
165 (enum debug_section): Add ZDEBUG_xxx values.
166 (debug_section_names): Add names for new sections.
167 (struct debug_section_info): Add compressed field.
168 (elf_zlib_failed, elf_zlib_fetch): New static functions.
169 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
170 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
171 (HUFFMAN_SECONDARY_SHIFT): Define.
172 (ZDEBUG_TABLE_SIZE): Define.
173 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
174 (final_next_secondary): New static variable if
175 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
176 (elf_zlib_inflate_table): New static function.
177 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
178 function to produce fixed Huffman table.
179 (elf_zlib_default_table): New static variable.
180 (elf_zlib_inflate): New static function.
181 (elf_zlib_verify_checksum): Likewise.
182 (elf_zlib_inflate_and_verify): Likewise.
183 (elf_uncompress_zdebug): Likewise.
184 (elf_uncompress_chdr): Likewise.
185 (backtrace_uncompress_zdebug): New extern function.
186 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
187 sections, and uncompress them.
188 * internal.h (backtrace_compress_zdebug): Declare.
189 * ztest.c: New file.
190 * configure.ac: Check for -lz and check whether the linker
191 supports --compress-debug-sections.
192 * Makefile.am (ztest_SOURCES): New variable.
193 (ztest_CFLAGS, ztest_LDADD): New variables.
194 (check_PROGRAMS): Add ztest.
195 (ctestg_SOURCES): New variable.
196 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
197 (ctesta_SOURCES): New variable.
198 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
199 (check_PROGRAMS): Add ctestg and ctesta.
200 * configure, config.h.in, Makefile.in: Rebuild.
201
8c2ea6b2
ILT
2022017-09-22 Ian Lance Taylor <iant@golang.org>
203
204 PR sanitizer/77631
205 * configure.ac: Check for lstat and readlink.
206 * elf.c (lstat, readlink): Provide dummy versions if real versions
207 are not available.
208 * configure, config.h.in: Rebuild.
209
f0de4542
ILT
2102017-09-21 Ian Lance Taylor <iant@google.com>
211
212 PR go/82284
213 * elf.c (backtrace_initialize): Set pd.exe_filename.
214
9283471b
ILT
2152017-09-20 Ian Lance Taylor <iant@golang.org>
216 Denis Khalikov <d.khalikov@partner.samsung.com>
217
218 PR sanitizer/77631
219 Support for external debug info.
220 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
221 (S_ISLNK): Define if not defined.
222 (xstrnlen): Define if strnlen is not available.
223 (b_elf_note): Define type.
224 (NT_GNU_BUILD_ID): Define macro.
225 (elf_crc32, elf_crc32_file): New static functions.
226 (elf_is_symlink, elf_readlink): New static functions.
227 (elf_open_debugfile_by_buildid): New static function.
228 (elf_try_debugfile): New static function.
229 (elf_find_debugfile_by_debuglink): New static function.
230 (elf_open_debugfile_by_debuglink): New static function.
231 (elf_add): Add filename and debuginfo parameters. Adjust all
232 callers. Look for external debug info notes, and try to fetch
233 debug info from external file.
234 (struct phdr_data): Add exe_filename field.
235 (phdr_callback): Pass filename to elf_add.
236 (backtrace_initialize): Add filename parameter.
237 * internal.h (backtrace_initialize): Add filename parameter.
238 * fileline.c (fileline_initialize): Pass filename to
239 backtrace_initialize.
240 * pecoff.c (fileline_initialize): Add unused filename parameter.
241 * unknown.c (fileline_initialize): Likewise.
242 * xcoff.c (fileline_initialize): Likewise.
243 * configure.ac: Check for objcopy --add-gnu-debuglink.
244 * Makefile.am (dtest): New test target.
245 * configure, Makefile.in: Rebuild.
246
29788f90
SE
2472017-09-12 Steve Ellcey <sellcey@cavium.com>
248
249 PR other/81096
250 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
251 * Makefile.in: Regenerate.
252
917a804c
SE
2532017-09-12 Steve Ellcey <sellcey@cavium.com>
254
255 PR other/81096
256 * libbacktrace/Makefile.in
257 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
258
2e6af1b8
DE
2592017-08-02 David Edelsohn <dje.gcc@gmail.com>
260
8a0e6224 261 PR bootstrap/81638
2e6af1b8
DE
262 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
263
afce7deb
TR
2642017-07-28 Tony Reix <tony.reix@atos.net>
265
266 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
267
cf311b03
RO
2682017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
269
270 * fileline.c (fileline_initialize): Print pid_t as long.
271
7e2a8417
TR
2722017-07-26 Tony Reix <tony.reix@atos.net>
273
274 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
275 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
276 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
277 * configure, config.h.in: Regenerate.
278
b3530b94
TR
2792017-07-21 Tony Reix <tony.reix@atos.net>
280
281 * filetype.awk: Add AIX XCOFF type detection.
282 * configure.ac: Recognize xcoff format.
283 * Makefile.am (FORMAT_FILES): Add xcoff.c.
284 * fileline.c: Include <unistd.h>.
285 (fileline_initialize): Add case for AIX procfs.
286 * xcoff.c: New file.
287 * configure, Makefile.in: Rebuild.
288
e91a2ddc
RB
2892017-06-21 Richard Biener <rguenther@suse.de>
290
291 * configure.ac: Add AC_SYS_LARGEFILE.
292 * config.h.in: Regenerate.
293 * configure: Likewise.
294
d1609a23
ILT
2952017-06-11 Ian Lance Taylor <iant@golang.org>
296
297 * elf.c (backtrace_initialize): Always set *fileline_fn.
298 * ttest.c: New file.
299 * btest.c: Move support functions into testlib.c. Change calls to
300 check to pass file name.
301 * testlib.c: New file, copied from (part of) btest.c.
302 * testlib.h: New file, declarations for testlib.c.
303 * edtest.c: Use testlib.h and testlib.c.
304 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
305 * Makefile.am (btest_SOURCES): Add testlib.c.
306 (edtest_SOURCES): Likewise.
307 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
308 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
309 * configure, Makefile.in: Rebuild.
310
281161d1
TM
3112017-05-19 Than McIntosh <thanm@google.com>
312
313 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
314 (read_line_header): Don't allocate dirs if dirs_count == 0.
315 * edtest.c: New file.
316 * edtest2.c: New file.
317 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
318 (check_PROGRAMS): Add edtest.
319 (edtest2_build.c, gen_edtest2_build): New targets.
320 * Makefile.in: Rebuild.
321
121eb024
ST
3222017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
323
324 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
325 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
326
cbe34bb5
JJ
3272017-01-01 Jakub Jelinek <jakub@redhat.com>
328
329 Update copyright years.
330
84c1b9d3
MK
3312016-11-15 Matthias Klose <doko@ubuntu.com>
332
333 * configure: Regenerate.
334
84ebf639
CL
3352016-09-11 Carlos Liam <carlos@aarzee.me>
336
337 * all: Remove meaningless trailing whitespace.
338
28644f75
UB
3392016-05-18 Uros Bizjak <ubizjak@gmail.com>
340
341 PR target/71161
342 * elf.c (phdr_callback) [__i386__]: Add
343 __attribute__((__force_align_arg_pointer__)).
344
26ac52db
MO
3452016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
346
347 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
348 avoid possible crash.
349 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
350 missing debug info anymore.
351
09b08e17
JDA
3522016-02-06 John David Anglin <danglin@gcc.gnu.org>
353
354 * mmap.c (MAP_FAILED): Define if not defined.
355
818ab71a
JJ
3562016-01-04 Jakub Jelinek <jakub@redhat.com>
357
358 Update copyright years.
359
5b4bbc7d
AP
3602015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
361
28644f75
UB
362 * configure.ac: Specify that DJGPP do not have mmap
363 even when sys/mman.h exists.
5b4bbc7d
AP
364 * configure: Regenerate
365
2f401a8f
JDA
3662015-12-09 John David Anglin <danglin@gcc.gnu.org>
367
28644f75 368 PR libgfortran/68115
2f401a8f
JDA
369 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
370 * configure: Regenerate.
371 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
372 to void.
373
750cdaf7
ILT
3742015-09-17 Ian Lance Taylor <iant@google.com>
375
376 * posix.c (backtrace_open): Cast second argument of open() to int.
377
fc002444
ILT
3782015-09-11 Ian Lance Taylor <iant@google.com>
379
380 * Makefile.am (backtrace.lo): Depend on internal.h.
381 (sort.lo, stest.lo): Add explicit dependencies.
382 * Makefile.in: Rebuild.
383
50809ff9
HPN
3842015-09-09 Hans-Peter Nilsson <hp@axis.com>
385
386 * backtrace.c: #include <sys/types.h>.
387
c478516b
ILT
3882015-09-08 Ian Lance Taylor <iant@google.com>
389
390 PR other/67457
391 * backtrace.c: #include "internal.h".
392 (struct backtrace_data): Add can_alloc field.
393 (unwind): If can_alloc is false, don't try to get file/line
394 information.
395 (backtrace_full): Set can_alloc field in bdata.
396 * alloc.c (backtrace_alloc): Don't call error_callback if it is
397 NULL.
398 * mmap.c (backtrace_alloc): Likewise.
399 * internal.h: Update comments for backtrace_alloc and
400 backtrace_free.
401
981d281f
ILT
4022015-09-08 Ian Lance Taylor <iant@google.com>
403
404 PR other/67457
405 * mmap.c (backtrace_alloc): Correct test for mmap failure.
406
8f5027bf
UW
4072015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
408
409 * configure.ac: For spu-*-* targets, set have_fcntl to no.
410 * configure: Regenerate.
411
7e5c7547
UW
4122015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
413
414 * configure.ac: Remove [disable-shared] argument to LT_INIT.
415 Remove setting PIC_FLAG when building as target library.
416 * configure: Regenerate.
417
7ce9cf39
HPN
4182015-08-26 Hans-Peter Nilsson <hp@axis.com>
419
420 * configure.ac: Only compile with -fPIC if the target
421 supports it.
422 * configure: Regenerate.
423
1b533361
UW
4242015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
425
426 * configure.ac: Set have_mmap to no on spu-*-* targets.
427 * configure: Regenerate.
428
d96fa208
ILT
4292015-08-13 Ian Lance Taylor <iant@google.com>
430
431 * dwarf.c (read_function_entry): Add vec_inlined parameter.
432 Change all callers.
433
d99a7b4d
MS
4342015-06-11 Martin Sebor <msebor@redhat.com>
435
436 PR sanitizer/65479
437 * dwarf.c (struct line): Add new field idx.
438 (line_compare): Use it.
439 (add_line): Set it.
440 (read_line_info): Reset it.
441
e24afc10
TG
4422015-05-29 Tristan Gingold <gingold@adacore.com>
443
444 * pecoff.c: New file.
445 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
446 * Makefile.in: Regenerate.
447 * filetype.awk: Detect pecoff.
448 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
449 Add pecoff.
450 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
451 true.
452 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
453 * configure: Regenerate.
454 * pecoff.c: New file.
455
df96c0f7
MH
4562015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
457
458 * Makefile.in: Regenerated with automake-1.11.6.
459 * aclocal.m4: Likewise.
460 * configure: Likewise.
461
2b8fa469
MK
4622015-01-24 Matthias Klose <doko@ubuntu.com>
463
464 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
465 * configure: Regenerate.
466
5624e564
JJ
4672015-01-05 Jakub Jelinek <jakub@redhat.com>
468
469 Update copyright years.
470
a699d672
L
4712014-11-21 H.J. Lu <hongjiu.lu@intel.com>
472
473 PR bootstrap/63784
474 * configure: Regenerated.
475
35485da9
DM
4762014-11-11 David Malcolm <dmalcolm@redhat.com>
477
478 * ChangeLog.jit: New.
479
ebf6d33b
FXC
4802014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
481
482 PR target/63610
483 * configure: Regenerate.
484
c96601d2
ILT
4852014-10-23 Ian Lance Taylor <iant@google.com>
486
487 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
488 Fix to return void *.
489
d573fd89
ILT
4902014-05-08 Ian Lance Taylor <iant@google.com>
491
492 * mmap.c (backtrace_free): If freeing a large aligned block of
493 memory, call munmap rather than holding onto it.
494 (backtrace_vector_grow): When growing a vector, double the number
495 of pages requested. When releasing the old version of a grown
496 vector, pass the correct size to backtrace_free.
497
dbe20842
ILT
4982014-03-07 Ian Lance Taylor <iant@google.com>
499
500 * sort.c (backtrace_qsort): Use middle element as pivot.
501
c5604b48
ILT
5022014-03-06 Ian Lance Taylor <iant@google.com>
503
504 * sort.c: New file.
505 * stest.c: New file.
506 * internal.h (backtrace_qsort): Declare.
507 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
508 (read_line_info, read_function_entry): Likewise.
509 (read_function_info, build_dwarf_data): Likewise.
510 * elf.c (elf_initialize_syminfo): Likewise.
511 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
512 (stest_SOURCES, stest_LDADD): Define.
513 (check_PROGRAMS): Add stest.
514
63fefb4b
MDM
5152014-02-07 Misty De Meo <misty@brew.sh>
516
517 PR target/58710
518 * configure.ac: Use AC_LINK_IFELSE in check for
519 _Unwind_GetIPInfo.
520 * configure: Regenerate.
521
afeba5cb
RS
5222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
523
524 Update copyright years
525
0284b52e
JJ
5262013-12-06 Jakub Jelinek <jakub@redhat.com>
527
528 * elf.c (ET_DYN): Undefine and define again.
529 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
530 return early -1 without closing the descriptor.
531 (struct phdr_data): Add exe_descriptor.
532 (phdr_callback): If pd->exe_descriptor is not -1, for very first
533 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
534 otherwise backtrace_close the exe_descriptor if not -1. Adjust
535 call to elf_add.
536 (backtrace_initialize): Adjust call to elf_add. If it returns
537 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
538
bfd74f22
ILT
5392013-12-05 Ian Lance Taylor <iant@google.com>
540
541 * alloc.c (backtrace_vector_finish): Add error_callback and data
542 parameters. Call backtrace_vector_release. Return address base.
543 * mmap.c (backtrace_vector_finish): Add error_callback and data
544 parameters. Return address base.
545 * dwarf.c (read_function_info): Get new address base from
546 backtrace_vector_finish.
547 * internal.h (backtrace_vector_finish): Update declaration.
548
b8ddd61b
ILT
5492013-11-27 Ian Lance Taylor <iant@google.com>
550
551 * dwarf.c (find_address_ranges): New static function, broken out
552 of build_address_map.
553 (build_address_map): Call it.
554 * btest.c (check): Check for missing filename or function, rather
555 than crashing.
556 (f3): Check that enough frames were returned.
557
64856e1e
JJ
5582013-11-19 Jakub Jelinek <jakub@redhat.com>
559
1f96a712
JJ
560 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
561 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
562 last argument.
563 * btest.c (struct symdata): Add size field.
564 (callback_three): Add symsize argument. Copy it to the data->size
565 field.
566 (f23): Set symdata.size to 0.
567 (test5): Likewise. If sizeof (int) > 1, lookup address of
568 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
569 values.
570
64856e1e
JJ
571 * atomic.c: Include sys/types.h.
572
49579c7e
ILT
5732013-11-18 Ian Lance Taylor <iant@google.com>
574
575 * configure.ac: Check for support of __atomic extensions.
576 * internal.h: Declare or #define atomic functions for use in
577 backtrace code.
578 * atomic.c: New file.
579 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
580 (dwarf_fileline, backtrace_dwarf_add): Likewise.
581 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
582 (backtrace_initialize): Likewise.
583 * fileline.c (fileline_initialize): Likewise.
584 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
585 * configure, config.h.in, Makefile.in: Rebuild.
586
582f5a2d
JJ
5872013-11-18 Jakub Jelinek <jakub@redhat.com>
588
f1857815
JJ
589 * elf.c (SHN_UNDEF): Define.
590 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
591 with st_shndx == SHN_UNDEF. Add base_address to address fields.
592 (elf_add): Adjust caller.
593
582f5a2d
JJ
594 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
595
25e6253e
ILT
5962013-11-16 Ian Lance Taylor <iant@google.com>
597
598 * backtrace.h (backtrace_create_state): Correct comment about
599 threading.
600
cfa658e4
ILT
6012013-11-15 Ian Lance Taylor <iant@google.com>
602
603 * backtrace.h (backtrace_syminfo): Update comment and parameter
604 name to take any address, not just a PC value.
605 * elf.c (STT_OBJECT): Define.
606 (elf_nosyms): Rename parameter pc to addr.
607 (elf_symbol_search): Rename local variable pc to addr.
608 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
609 (elf_syminfo): Rename parameter pc to addr.
610 * btest.c (global): New global variable.
611 (test5): New test.
612 (main): Call test5.
613
6c084a5b
ILT
6142013-10-17 Ian Lance Taylor <iant@google.com>
615
616 * elf.c (elf_add): Don't get the wrong offsets if a debug section
617 is missing.
618
459260ec
DM
6192013-10-15 David Malcolm <dmalcolm@redhat.com>
620
621 * configure.ac: Add --enable-host-shared, setting up
622 pre-existing PIC_FLAG variable within Makefile.am et al.
623 * configure: Regenerate.
624
3cbe17f7
AM
6252013-09-20 Alan Modra <amodra@gmail.com>
626
627 * configure: Regenerate.
628
78625ce6
AM
6292013-07-23 Alexander Monakov <amonakov@ispras.ru>
630
631 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
632
0153887c
AM
6332013-07-23 Alexander Monakov <amonakov@ispras.ru>
634
635 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
636 dl_iterate_phdr callbacks.
637
85d8c21e
ILT
6382013-03-25 Ian Lance Taylor <iant@google.com>
639
640 * alloc.c: #include <sys/types.h>.
641 * mmap.c: Likewise.
642
38811401
ILT
6432013-01-31 Ian Lance Taylor <iant@google.com>
644
645 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
646 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
647
1e678aed
JJ
6482013-01-25 Jakub Jelinek <jakub@redhat.com>
649
650 PR other/56076
651 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
652 attribute was not seen.
653
6b514c53
ILT
6542013-01-16 Ian Lance Taylor <iant@google.com>
655
656 * dwarf.c (struct unit): Add filename and abs_filename fields.
657 (build_address_map): Set new fields when reading unit.
658 (dwarf_lookup_pc): If we don't find an entry in the line table,
659 just return the main file name.
660
f8a7e1a4
RS
6612013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
662
663 Update copyright years.
664
c3de1960
ILT
6652013-01-01 Ian Lance Taylor <iant@google.com>
666
667 PR bootstrap/54834
668 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
669 $(MULTIBUILDTOP)/../../gcc/include.
670 * Makefile.in: Rebuild.
671
2a5195d9
ILT
6722013-01-01 Ian Lance Taylor <iant@google.com>
673
674 PR other/55536
675 * mmap.c (backtrace_alloc): Don't call sync functions if not
676 threaded.
677 (backtrace_free): Likewise.
678
85619b6f
JDA
6792012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
680
681 * mmapio.c: Define MAP_FAILED if not defined.
682
36a58fb3
JJ
6832012-12-11 Jakub Jelinek <jakub@redhat.com>
684
685 PR bootstrap/54926
686 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
687 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
688 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
689 accepts it.
690 * Makefile.in: Regenerated.
691 * configure: Regenerated.
692
a58dfde0
JJ
6932012-12-07 Jakub Jelinek <jakub@redhat.com>
694
695 PR bootstrap/54926
696 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
697 * Makefile.in: Regenerated.
698
b20ade36
ILT
6992012-11-20 Ian Lance Taylor <iant@google.com>
700
701 * dwarf.c (read_attribute): Always clear val.
702
73c3ed27
ILT
7032012-11-13 Ian Lance Taylor <iant@google.com>
704
705 PR other/55312
706 * configure.ac: Only add -Werror if building a target library.
2a5195d9 707 * configure: Rebuild.
73c3ed27 708
33521509
ILT
7092012-11-12 Ian Lance Taylor <iant@google.com>
710 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
711 Gerald Pfeifer <gerald@pfeifer.com>
712
713 * configure.ac: Check for getexecname.
714 * fileline.c: #include <errno.h>. Define getexecname if not
715 available.
716 (fileline_initialize): Try to find the executable in a few
717 different ways.
718 * print.c (error_callback): Only print the filename if it came
719 from the backtrace state.
720 * configure, config.h.in: Rebuild.
721
8fe91dea
ILT
7222012-10-29 Ian Lance Taylor <iant@google.com>
723
724 * mmap.c (backtrace_vector_release): Correct last patch: add
725 aligned, not size.
726
8277de34
ILT
7272012-10-29 Ian Lance Taylor <iant@google.com>
728
729 * mmap.c (backtrace_vector_release): Make sure freed block is
730 aligned on 8-byte boundary.
731
73f41491
ILT
7322012-10-26 Ian Lance Taylor <iant@google.com>
733
734 PR other/55087
735 * posix.c (backtrace_open): Add does_not_exist parameter.
736 * elf.c (phdr_callback): Do not warn if shared library could not
737 be opened.
738 * fileline.c (fileline_initialize): Update calls to
739 backtrace_open.
740 * internal.h (backtrace_open): Update declaration.
741
385710cf
JH
7422012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
743
744 PR target/55061
745 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
746 * configure: Regenerate.
747
32061319
ILT
7482012-10-24 Ian Lance Taylor <iant@google.com>
749
750 PR target/55061
751 * configure.ac: Check whether -funwind-tables option works.
752 * configure: Rebuild.
753
5551b12c
ILT
7542012-10-11 Ian Lance Taylor <iant@google.com>
755
756 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
757 * configure: Rebuild.
758
40d15b5b
ILT
7592012-10-10 Ian Lance Taylor <iant@google.com>
760
761 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
762 lower case.
763
74f80620
HPN
7642012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
765
766 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
767
ce8aa074
ILT
7682012-10-09 Ian Lance Taylor <iant@google.com>
769
770 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
771 (backtrace_dwarf_add): Likewise.
772
e561a992
ILT
7732012-10-09 Ian Lance Taylor <iant@google.com>
774
775 Add support for tracing through shared libraries.
776 * configure.ac: Check for link.h and dl_iterate_phdr.
777 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
778 ELF macros before #defining them.
779 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
780 dl_iterate_phdr.
781 (struct elf_syminfo_data): Add next field.
782 (elf_initialize_syminfo): Initialize next field.
783 (elf_add_syminfo_data): New static function.
784 (elf_add): New static function, broken out of
785 backtrace_initialize. Call backtrace_dwarf_add instead of
786 backtrace_dwarf_initialize.
787 (struct phdr_data): Define.
788 (phdr_callback): New static function.
789 (backtrace_initialize): Call elf_add.
790 * dwarf.c (struct dwarf_data): Add next and base_address fields.
791 (add_unit_addr): Add base_address parameter. Change all callers.
792 (add_unit_ranges, build_address_map): Likewise.
793 (add_line): Add ddata parameter. Change all callers.
794 (read_line_program, add_function_range): Likewise.
795 (dwarf_lookup_pc): New static function, broken out of
796 dwarf_fileline.
797 (dwarf_fileline): Call dwarf_lookup_pc.
798 (build_dwarf_data): New static function.
799 (backtrace_dwarf_add): New function.
800 (backtrace_dwarf_initialize): Remove.
801 * internal.h (backtrace_dwarf_initialize): Don't declare.
802 (backtrace_dwarf_add): Declare.
803 * configure, config.h.in: Rebuild.
804
068ef6d1
GP
8052012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
806
807 * btest.c (f23): Avoid uninitialized variable warning.
e561a992 808
244e2d9c
ILT
8092012-10-04 Ian Lance Taylor <iant@google.com>
810
811 * dwarf.c: If the system header files do not declare strnlen,
812 provide our own version.
813
be4ba8ae
ILT
8142012-10-03 Ian Lance Taylor <iant@google.com>
815
816 * dwarf.c (read_uleb128): Fix overflow test.
817 (read_sleb128): Likewise.
818 (build_address_map): Don't change unit_buf.start.
819
56195009
UB
8202012-10-02 Uros Bizjak <ubizjak@gmail.com>
821
faf86a02
UB
822 PR other/54761
823 * configure.ac (EXTRA_FLAGS): New.
56195009 824 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
faf86a02 825 * configure, Makefile.in: Regenerate.
56195009 826
8a447b3d
ILT
8272012-09-29 Ian Lance Taylor <iant@google.com>
828
829 PR other/54749
830 * fileline.c (fileline_initialize): Pass errnum as -1 when
831 reporting that we could not read executable information after a
832 previous failure.
833
af710874
ILT
8342012-09-27 Ian Lance Taylor <iant@google.com>
835
836 PR bootstrap/54732
837 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
838 * Makefile.am: Add dependencies for all objects.
839 * configure, aclocal.m4, Makefile.in: Rebuild.
840
588f4f8f
ILT
8412012-09-27 Ian Lance Taylor <iant@google.com>
842
843 PR other/54726
844 * elf.c (backtrace_initialize): Set *fileln_fn, not
845 state->fileln_fn.
846
64b89453
ILT
8472012-09-19 Ian Lance Taylor <iant@google.com>
848
849 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
850 as a target library.
851 * configure: Rebuild.
852
76850556
RO
8532012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
854 Ian Lance Taylor <iant@google.com>
855
856 * configure.ac (GCC_HEADER_STDINT): Invoke.
857 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
858 * btest.c: Don't include <stdint.h>.
859 * dwarf.c: Likewise.
860 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
861
9425c00b
ILT
8622012-09-18 Ian Lance Taylor <iant@google.com>
863
864 PR bootstrap/54623
865 * Makefile.am (AM_CPPFLAGS): Define.
866 (AM_CFLAGS): Remove -I options.
867 * Makefile.in: Rebuild.
868
3319ef17
ILT
8692012-09-18 Ian Lance Taylor <iant@google.com>
870
871 * posix.c (O_BINARY): Define if not defined.
872 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
873 HAVE_FCNTL is defined.
874 * configure.ac: Test for the fcntl function.
875 * configure, config.h.in: Rebuild.
876
bd3e497d
ILT
8772012-09-18 Ian Lance Taylor <iant@google.com>
878
879 * btest.c (test1, test2, test3, test4): Add the unused attribute.
880
30e15876
ILT
8812012-09-18 Ian Lance Taylor <iant@google.com>
882
883 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
884
d4c059d5
ILT
8852012-09-18 Ian Lance Taylor <iant@google.com>
886
887 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
888 * mmapio.c: Don't define _GNU_SOURCE.
889 * configure, config.h.in: Rebuild.
890
772a71a9
ILT
8912012-09-18 Ian Lance Taylor <iant@google.com>
892
893 * configure.ac: Check whether strnlen is declared.
894 * dwarf.c: Declare strnlen if not declared.
895 * configure, config.h.in: Rebuild.
896
c0558468
RO
8972012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
898
899 * fileline.c: Include <stdlib.h>.
900 * mmap.c: Likewise.
901
c5812e0b
ILT
9022012-09-17 Ian Lance Taylor <iant@google.com>
903
904 PR bootstrap/54611
905 * nounwind.c (backtrace_full): Rename from backtrace. Add state
906 parameter.
907
e8f4008a
GP
9082012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
909
910 PR bootstrap/54611
911 * nounwind.c (backtrace_simple): Add state parameter.
912
f588eb27
ILT
9132012-09-17 Ian Lance Taylor <iant@google.com>
914
915 PR bootstrap/54609
916 * unknown.c (unknown_fileline): Add state parameter, remove
917 fileline_data parameter, name error_callback parameter.
918 (backtrace_initialize): Add state parameter.
919
eff02e4f
ILT
9202012-09-17 Ian Lance Taylor <iant@google.com>
921
922 * Initial implementation.
818ab71a 923\f
85ec4feb 924Copyright (C) 2012-2018 Free Software Foundation, Inc.
818ab71a
JJ
925
926Copying and distribution of this file, with or without modification,
927are permitted in any medium without royalty provided the copyright
928notice and this notice are preserved.