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