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