]> git.ipfire.org Git - thirdparty/gcc.git/blame - libbacktrace/ChangeLog
Daily bump.
[thirdparty/gcc.git] / libbacktrace / ChangeLog
CommitLineData
306a4c32
GA
12024-03-01 Ian Lance Taylor <iant@golang.org>
2
3 * elf.c (elf_add): Add the symbol table from a debuginfo file.
4 * Makefile.am (MAKETESTS): Add buildidfull and gnudebuglinkfull
5 variants of buildid and gnudebuglink tests.
6 (%_gnudebuglinkfull, %_buildidfull): New patterns.
7 * Makefile.in: Regenerate.
8
8428bcd7
GA
92023-11-30 Ian Lance Taylor <iant@golang.org>
10
11 * pecoff.c: Include <windows.h> if available.
12 (coff_add): On Windows call GetModuleHandle to get base address.
13
31d8cf17
GA
142023-11-29 Ian Lance Taylor <iant@golang.org>
15
16 * fileline.c: Include <windows.h> if available.
17 (windows_get_executable_path): New static function.
18 (fileline_initialize): Call windows_get_executable_path.
19 * configure.ac: Checked for windows.h
20 * configure: Regenerate.
21 * config.h.in: Regenerate.
22
3b632746
GA
232023-10-22 Iain Sandoe <iain@sandoe.co.uk>
24
25 * configure: Regenerate.
26 * configure.ac: Handle Darwin rpaths.
27
4b92dba7
GA
282023-08-07 Nick Alcock <nick.alcock@oracle.com>
29
30 * configure: Regenerate.
31
322023-08-07 Alexander von Gluck IV <kallisti5@unixzen.com>
33
34 * configure: Regenerate.
35
362023-08-07 Nick Alcock <nick.alcock@oracle.com>
37
38 * configure: Regenerate.
39
402023-08-07 Nick Alcock <nick.alcock@oracle.com>
41
42 * configure: Regenerate.
43
442023-08-07 H.J. Lu <hjl.tools@gmail.com>
45
46 * configure: Regenerate.
47
482023-08-07 H.J. Lu <hjl.tools@gmail.com>
49
50 * configure: Regenerate.
51
86fa4433
GA
522023-08-03 Richard Biener <rguenther@suse.de>
53
54 * zstdtest.c (test_samples): Properly compute the allocation
55 size for the uncompressed data.
56
a2f31d79
GA
572023-07-31 Ian Lance Taylor <iant@golang.org>
58
59 * configure.ac: Check for _pgmptr declaration.
60 * fileline.c (fileline_initialize): Check for _pgmfptr before
61 /proc/self/exec.
62 * configure, config.h.in: Regenerate.
63
579cdc1e
GA
642023-03-28 Ian Lance Taylor <iant@golang.org>
65
66 * elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading
67 bits, not before. Add unlikely for error case.
68 (elf_zstd_offset_table): Regenerate.
69 (elf_zstd_read_huff): Clear 13 entries in weight_mark, not 12.
70 (elf_zstd_read_literals): For a single stream adjust by
71 total_streams_size, not compressed_size.
72
1bdb1768
GA
732023-01-20 Ian Lance Taylor <iant@golang.org>
74
75 * dwarf.c (struct function_addrs): Change low and high fields to
76 uintptr_t.
77 (struct unit_addrs): Likewise.
78 (resolve_addr_index): Change address parameter to uintptr_t*.
79 (add_unit_addr): Change lowpc and highpc parameters to uintptr_t.
80 (add_function_range): Likewise.
81 (struct pcrange): Change lowpc and highpc fields to uintptr_t.
82 (add_low_high_range): Change add_range lowpc and highpc parameters
83 to uintptr_t.
84 (add_ranges_from_ranges): Likewise.
85 (add_ranges_from_rnglists): Likewise.
86 (add_low_high_range): Chnage lowpc and highpc variables to
87 uintpr_t.
88 (add_ranges_from_rnglists): Change some local variables to
89 uintptr_t.
90 (add_ranges_from_ranges): Change base parameter to uintptr_t.
91 (add_ranges_from_rnglists): Likewise.
92 (read_function_entry): Likewise.
93 (resolve_addr_index): Add explicit casts to uintptr_t.
94 (update_pcrange): Likewise.
95 (add_ranges_from_ranges): Likewise.
96 (add_ranges_from_rnglists): Likewise.
97 (read_function_entry): Likewise.
98
8d07b193
GA
992023-01-17 Martin Liska <mliska@suse.cz>
100
101 * Makefile.in: Regenerate.
102
d808db1f
GA
1032023-01-06 Ian Lance Taylor <iant@golang.org>
104
105 PR libbacktrace/108297
106 * configure.ac: Test whether linker supports --build-id.
107 * Makefile.am: Only run --build-id tests if supported.
108 * configure, Makefile.in: Regenerate.
109
92bc3617
GA
1102022-12-17 Ian Lance Taylor <iant@golang.org>
111
112 * elf.c (elf_fetch_backward_init): New static function.
113 (ZSTD_TABLE_SIZE): Use huffman scratch space size rather than
114 literal size.
115 (ZSTD_TABLE_WORK_LIT_SIZE): Don't define.
116 (elf_zstd_read_huff): Use elf_fetch_backward_init.
117 (elf_zstd_read_literals): New static function.
118 (ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define.
119 (struct elf_zstd_literals): Don't define.
120 (elf_zstd_literal_output): Remove static function.
121 (elf_zstd_decompress): Use elf_fetch_backward_init and
122 elf_zstd_read_literals. Rewrite literal copying.<
123
c6b12b80
GA
1242022-12-10 Ian Lance Taylor <iant@golang.org>
125
126 * elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry.
127 (ZSTD_ENCODE_BASELINE_BITS): Define.
128 (ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define.
129 (elf_zstd_literal_length_base): New static const array.
130 (elf_zstd_match_length_base): Likewise.
131 (struct elf_zstd_fse_baseline_entry): Define.
132 (elf_zstd_make_literal_baseline_fse): New static function.
133 (elf_zstd_make_offset_baseline_fse): Likewise.
134 (elf_zstd_make_match_baseline_fse): Likewise.
135 (print_table, main): Use elf_zstd_fse_baseline_entry.
136 (elf_zstd_lit_table, elf_zstd_match_table): Likewise.
137 (elf_zstd_offset_table): Likewise.
138 (struct elf_zstd_seq_decode): Likewise. Remove use_rle and rle
139 fields.
140 (elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry,
141 taking a conversion function. Convert RLE to FSE.
142 (elf_zstd_literal_length_baseline): Remove.
143 (elf_zstd_literal_length_bits): Remove.
144 (elf_zstd_match_length_baseline): Remove.
145 (elf_zstd_match_length_bits): Remove.
146 (elf_zstd_decompress): Use elf_zstd_fse_baseline_entry. Rewrite
147 and simplify main loop.
148
e6110da4
GA
1492022-12-08 Ian Lance Taylor <iant@golang.org>
150
151 * configure.ac: Check for zstd library and
152 --compress-debug-sections=zstd linker option.
153 * Makefile.am (zstdtest_*): New targets.
154 (zstdtest_alloc_*, ctestzstd_*): New targets.
155 (BUILDTESTS): Add zstdtest, zstdtest_alloc, ctestzstd as
156 appropriate.
157 * elf.c (ELFCOMPRESS_ZSTD): Define.
158 (elf_fetch_bits): Rename from elf_zlib_fetch. Update uses.
159 (elf_fetch_bits_backward): New static function.
160 (ZLIB_HUFFMAN_*): Rename from HUFFMAN_*. Update uses.
161 (ZLIB_TABLE_*): Rename from ZDEBUG_TABLE_*. Update uses.
162 (ZSTD_TABLE_*): Define.
163 (struct elf_zstd_fse_entry): Define.
164 (elf_zstd_read_fse): New static function.
165 (elf_zstd_build_fse): Likewise.
166 (lit): Define if BACKTRACE_GENERATE_ZSTD_FSE_TABLES.
167 (match, offset, next, print_table, main): Likewise.
168 (elf_zstd_lit_table): New static const array.
169 (elf_zstd_match_table, elf_zstd_offset_table): Likewise.
170 (elf_zstd_read_huff): New static function.
171 (struct elf_zstd_seq_decode): Define.
172 (elf_zstd_unpack_seq_decode): New static function.
173 (ZSTD_LIT_*): Define.
174 (struct elf_zstd_literals): Define.
175 (elf_zstd_literal_output): New static function.
176 (ZSTD_LITERAL_LENGTH_BASELINE_OFFSET): Define.
177 (elf_zstd_literal_length_baseline): New static const array.
178 (elf_zstd_literal_length_bits): Likewise.
179 (ZSTD_MATCH_LENGTH_BASELINE_OFFSET): Define.
180 (elf_zstd_match_length_baseline): New static const array.
181 (elf_zstd_match_length_bits): Likewise.
182 (elf_zstd_decompress): New static function.
183 (ZDEBUG_TABLE_SIZE): New definition.
184 (elf_uncompress_chdr): Support ELF_COMPRESS_ZSTD.
185 (backtrace_uncompress_zstd): New function.
186 (elf_add): Use ZLIB_TABLE_SIZE for zlib-gnu sections.
187 * internal.h (backtrace_uncompress_zstd): Declare.
188 * zstdtest.c: New file.
189 * configure, config.h.in, Makefile.in: Regenerate.
190
781f477a
GA
1912022-10-12 Martin Liska <mliska@suse.cz>
192
193 * configure: Regenerate.
194
ab332cd7
GA
1952022-10-11 Olivier Hainque <hainque@adacore.com>
196 Olivier Hainque <hainque@adacore.com>
197
198 * configure: Regenerate.
199
0fe604a2
GA
2002022-07-08 Ian Lance Taylor <iant@golang.org>
201
202 * configure.ac: Check for sys/link.h. Use either link.h or
203 sys/link.h when checking for dl_iterate_phdr.
204 * elf.c: Include sys/link.h if available.
205 * configure, config.h.in: Regenerate.
206
6345c414
GA
2072022-07-07 Ian Lance Taylor <iant@golang.org>
208
209 * macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit
210 loop if we can't find debug info for one shared library.
211
2122022-07-07 Ian Lance Taylor <iant@golang.org>
213
214 * Makefile.am (MAKETESTS): New variable split out of TESTS.
215 (CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS.
216 * Makefile.in: Regenerate.
217
9d3dd218
GA
2182022-06-27 Ian Lance Taylor <iant@golang.org>
219
220 * configure.ac: Use grep instead of fgrep.
221 * configure, Makefile.in: Regenerate.
222
37b3b5da
GA
2232022-05-28 Ian Lance Taylor <iant@golang.org>
224
225 PR libbacktrace/105721
226 * README: Update.
227
9d84ed68
GA
2282022-04-05 Ian Lance Taylor <iant@golang.org>
229
230 * elf.c (elf_zlib_inflate): Don't skip initial aligned byte in
231 uncompressed block.
232
0bdb0498
GA
2332022-02-17 Ian Lance Taylor <iant@golang.org>
234
235 * dwarf.c (find_address_ranges): Handle skeleton units.
236 (read_function_entry): Likewise.
237
cb3afcd2
GA
2382022-02-16 Ian Lance Taylor <iant@golang.org>
239
240 * dwarf.c (build_address_map): Initialize DWARF 5 fields of unit.
241
682ede39
GA
2422022-02-03 David Seifert <soap@gentoo.org>
243 Jakub Jelinek <jakub@redhat.com>
244
245 * configure.ac: Support --disable-werror.
246 * configure: Regenerate.
247
054e57e4
GA
2482021-12-28 Francois-Xavier Coudert <fxcoudert@gmail.com>
249
250 PR libbacktrace/103822
251 * Makefile.am: Fix newline.
252 * Makefile.in: Regenerate.
253
af2852b9
GA
2542021-11-12 Martin Liska <mliska@suse.cz>
255
256 PR libbacktrace/103167
257 * elf.c (elf_uncompress_lzma_block): Cast to unsigned int.
258 (elf_uncompress_lzma): Likewise.
259 * xztest.c (test_samples): memcpy only if v > 0.
260
c2bd5d8a
GA
2612021-10-22 Martin Liska <mliska@suse.cz>
262
263 PR testsuite/102742
264 * btest.c (MIN_DESCRIPTOR): New.
265 (MAX_DESCRIPTOR): Likewise.
266 (check_available_files): Likewise.
267 (check_open_files): Check only file descriptors that
268 were not available at the entry.
269 (main): Call check_available_files.
270
261512fa
GA
2712021-08-13 Sergei Trofimovich <siarheit@google.com>
272
273 * install-debuginfo-for-buildid.sh.in: Force non-localized readelf
274 output with LANG=C.
275
c8abc205
GA
2762021-06-28 Clément Chigot <clement.chigot@atos.net>
277
278 * xcoff.c (SSUBTYP_DWRNGES): New define.
279 (xcoff_add): Use correct XCOFF DWARF section subtype
280 for DEBUG_RANGES. Remove lineoff workaround.
281 Adjust base_address.
282 (xcoff_initialize_syminfo): Adapt to new base_address.
283 (xcoff_lookup_pc): Likewise.
284 (xcoff_initialize_fileline): Likewise.
285
e690396d
GA
2862021-05-03 H.J. Lu <hjl.tools@gmail.com>
287
288 PR bootstrap/99703
289 * configure: Regenerated.
290
f3641ac7
GA
2912021-03-03 Ian Lance Taylor <iant@golang.org>
292
293 * dwarf.c (read_line_program): Don't special case file 0.
294 (read_function_entry): Likewise.
295
d97a92dc
GA
2962021-03-02 Ian Lance Taylor <iant@golang.org>
297
298 PR libbacktrace/98818
299 * dwarf.c (dwarf_buf_error): Add errnum parameter. Change all
300 callers.
301 * backtrace.h: Update backtrace_error_callback comment.
302
fab095da
GA
3032021-02-12 Ian Lance Taylor <iant@golang.org>
304
305 * configure.ac: Check for objcopy --add-gnu-debuglink by using
306 objcopy --help.
307 * configure: Regenerate
308
ef1f8ee6
GA
3092021-01-18 Ian Lance Taylor <iant@golang.org>
310
311 * Makefile.am (%_dwz): If dwz fails, use uncompressed debug info.
312 * Makefile.in: Regenerate.
313 * configure: Regenerate.
314
3152021-01-18 Ian Lance Taylor <iant@golang.org>
316
317 PR debug/98716
318 * dwarf.c (read_v2_paths): Allocate zero entry for dirs and
319 filenames.
320 (read_line_program): Remove parameter u, change caller. Don't
321 subtract one from dirs and filenames index.
322 (read_function_entry): Don't subtract one from filenames index.
323
651b8a50
GA
3242021-01-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
325
326 * configure: Re-generate.
327
6e1edf48
GA
3282020-12-05 Iain Sandoe <iain@sandoe.co.uk>
329
330 PR target/97865
331 * configure: Regenerate.
332
11860cf4
GA
3332020-12-02 Ian Lance Taylor <iant@golang.org>
334
335 * dwarf.c (resolve_string): Use > rather than >= to check whether
336 string index extends past buffer.
337 (resolve_addr_index): Similarly for address index.
338
a9625c50
GA
3392020-11-29 John David Anglin <danglin@gcc.gnu.org>
340
341 * configure: Regenerate.
342
e2e04288
GA
3432020-10-20 Ian Lance Taylor <iant@golang.org>
344
345 * internal.h (ATTRIBUTE_FALLTHROUGH): Define.
346 * elf.c (elf_zlib_inflate): Use ATTRIBUTE_FALLTHROUGH.
347
e84761c6
GA
3482020-09-28 Ian Lance Taylor <iant@golang.org>
349
350 PR libbacktrace/97082
351 * Makefile.am (check_DATA): Add mtest.dSYM if USE_DSYMUTIL.
352 * Makefile.in: Regenerate.
353
3542020-09-28 Ian Lance Taylor <iant@golang.org>
355
356 PR libbacktrace/97227
357 * configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL.
358 * Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL.
359 * configure: Regenerate.
360 * Makefile.in: Regenerate.
361
82b77dee
GA
3622020-09-23 Ian Lance Taylor <iant@golang.org>
363
364 * dwarf.c (report_inlined_functions): Handle PC == -1 and PC ==
365 p->low.
366 (dwarf_lookup_pc): Likewise.
367
ecde1b0a
GA
3682020-09-17 Ian Lance Taylor <iant@golang.org>
369
370 PR libbacktrace/97080
371 * fileline.c (backtrace_syminfo_to_full_callback): New function.
372 (backtrace_syminfo_to_full_error_callback): New function.
373 * elf.c (elf_nodebug): Call syminfo_fn if possible.
374 * internal.h (struct backtrace_call_full): Define.
375 (backtrace_syminfo_to_full_callback): Declare.
376 (backtrace_syminfo_to_full_error_callback): Declare.
377 * mtest.c (f3): Only check all[i] if data.index permits.
378
3792020-09-16 Iain Sandoe <iain@sandoe.co.uk>
380
381 * macho.c (MACH_O_CPU_TYPE_PPC): New.
382 (MACH_O_CPU_TYPE_PPC64): New.
383 Add compile-tests for powerpc to the Mach-O variants.
384
50a71cd0
GA
3852020-09-14 Ian Lance Taylor <iant@golang.org>
386
387 PR libbacktrace/93608
388 Add support for MiniDebugInfo.
389 * elf.c (struct elf_view): Define. Replace most uses of
390 backtrace_view with elf_view.
391 (elf_get_view): New static functions. Replace most calls of
392 backtrace_get_view with elf_get_view.
393 (elf_release_view): New static functions. Replace most calls of
394 backtrace_release_view with elf_release_view.
395 (elf_uncompress_failed): Rename from elf_zlib_failed. Change all
396 callers.
397 (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define.
398 (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define.
399 (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define.
400 (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define.
401 (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define.
402 (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define.
403 (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define.
404 (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define.
405 (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define.
406 (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define.
407 (LZMA_PROB_DIST_ALIGN_LEN): Define.
408 (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define.
409 (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define.
410 (LZMA_PROB_MATCH_LEN_LOW_LEN): Define.
411 (LZMA_PROB_MATCH_LEN_MID_LEN): Define.
412 (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define.
413 (LZMA_PROB_REP_LEN_CHOICE_LEN): Define.
414 (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define.
415 (LZMA_PROB_REP_LEN_LOW_LEN): Define.
416 (LZMA_PROB_REP_LEN_MID_LEN): Define.
417 (LZMA_PROB_REP_LEN_HIGH_LEN): Define.
418 (LZMA_PROB_LITERAL_LEN): Define.
419 (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define.
420 (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define.
421 (LZMA_PROB_IS_REP2_OFFSET): Define.
422 (LZMA_PROB_IS_REP0_LONG_OFFSET): Define.
423 (LZMA_PROB_DIST_SLOT_OFFSET): Define.
424 (LZMA_PROB_DIST_SPECIAL_OFFSET): Define.
425 (LZMA_PROB_DIST_ALIGN_OFFSET): Define.
426 (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define.
427 (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define.
428 (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define.
429 (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define.
430 (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define.
431 (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define.
432 (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define.
433 (LZMA_PROB_REP_LEN_LOW_OFFSET): Define.
434 (LZMA_PROB_REP_LEN_MID_OFFSET): Define.
435 (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define.
436 (LZMA_PROB_LITERAL_OFFSET): Define.
437 (LZMA_PROB_TOTAL_COUNT): Define.
438 (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define.
439 (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define.
440 (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define.
441 (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define.
442 (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define.
443 (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define.
444 (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define.
445 (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define.
446 (elf_lzma_varint): New static function.
447 (elf_lzma_range_normalize): New static function.
448 (elf_lzma_bit, elf_lzma_integer): New static functions.
449 (elf_lzma_reverse_integer): New static function.
450 (elf_lzma_len, elf_uncompress_lzma_block): New static functions.
451 (elf_uncompress_lzma): New static function.
452 (backtrace_uncompress_lzma): New function.
453 (elf_add): Add memory and memory_size parameters. Change all
454 callers. Look for .gnu_debugdata section, and, if found,
455 decompress it and use it for symbols and debug info. Permit the
456 descriptor parameter to be -1.
457 * internal.h (backtrace_uncompress_lzma): Declare.
458 * mtest.c: New file.
459 * xztest.c: New file.
460 * configure.ac: Check for nm, xz, and comm programs. Check for
461 liblzma library.
462 (HAVE_MINIDEBUG): Define.
463 * Makefile.am (mtest_SOURCES): Define.
464 (mtest_CFLAGS, mtest_LDADD): Define.
465 (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG.
466 (%_minidebug): New pattern rule, if HAVE_MINIDEBUG.
467 (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define.
468 (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define
469 (xztest_alloc_LDADD): Define.
470 (BUILDTESTS): Add mtest, xztest, xztest_alloc.
471 (CLEANFILES): Add files created by minidebug pattern.
472 (btest.lo): Correct INCDIR reference.
473 (mtest.lo, xztest.lo, ztest.lo): New targets.
474 * configure: Regenerate.
475 * config.h.in: Regenerate.
476 * Makefile.in: Regenerate.
477
80f86e78
GA
4782020-09-09 Ian Lance Taylor <iant@golang.org>
479
480 * pecoff.c (coff_initialize_syminfo): Add is_64 parameter.
481 (coff_add): Determine and pass is_64.
482
4832020-09-09 Ian Lance Taylor <iant@golang.org>
484
485 PR libbacktrace/96973
486 * fileline.c (macho_get_executable_path): New static function.
487 (fileline_initialize): Call macho_get_executable_path.
488
4892020-09-09 Ian Lance Taylor <iant@golang.org>
490
491 * dwarf.c (function_addrs_search): Compare against the next entry
492 low address, not the high address.
493 (unit_addrs_search): Likewise.
494 (build_address_map): Add a trailing unit_addrs.
495 (read_function_entry): Add a trailing function_addrs.
496 (read_function_info): Likewise.
497 (report_inlined_functions): Search backward for function_addrs
498 match.
499 (dwarf_lookup_pc): Search backward for unit_addrs and
500 function_addrs matches.
501
31a05046
GA
5022020-09-08 Ian Lance Taylor <iant@golang.org>
503
504 * simple.c (simple_unwind): Correct comment spelling.
505
5062020-09-08 Ian Lance Taylor <iant@golang.org>
507
508 * macho.c (macho_add_dsym): Make space for '/' in dsym. Use
509 correct length when freeing diralc.
510
5112020-09-08 Ian Lance Taylor <iant@golang.org>
512
513 PR libbacktrace/96973
514 * macho.c (macho_add_fat): Correctly swap 32-bit file offset.
515
5162020-09-08 Ian Lance Taylor <iant@golang.org>
517
518 PR libbacktrace/96971
519 * filetype.awk: Only match magic number at start of line.
520
b2b24d30
GA
5212020-08-24 Ian Lance Taylor <iant@golang.org>
522
523 * macho.c (MACH_O_MH_MAGIC_FAT_64): Define.
524 (MACH_O_MH_CIGAM_FAT_64): Define.
525 (struct macho_fat_arch_64): Define.
526 (macho_add_fat): Add and use is_64 parameter.
527 (macho_add): Recognize 64-bit fat files.
528
d48cca8f
GA
5292020-07-30 H.J. Lu <hjl.tools@gmail.com>
530
531 PR bootstrap/96202
532 * configure: Regenerated.
533
50873cc5
GA
5342020-07-08 Ian Lance Taylor <iant@golang.org>
535
536 * configure.ac: Test linker support for DWARF5
537 * configure: Regenerate
538
885ef72f
GA
5392020-05-29 H.J. Lu <hjl.tools@gmail.com>
540
541 PR bootstrap/95413
542 * configure: Regenerated.
543
4c1a5d8b
L
5442020-05-15 H.J. Lu <hongjiu.lu@intel.com>
545
546 PR bootstrap/95147
547 * configure: Regenerated.
548
8d286dd1
L
5492020-05-14 H.J. Lu <hongjiu.lu@intel.com>
550
551 * configure: Regenerated.
552
d2ec2786
ILT
5532020-05-13 Ian Lance Taylor <iant@golang.org>
554
555 * ztest.c (test_large): Mark state ATTRIBUTE_UNUSED.
556
702adbb2
ILT
5572020-05-13 Ian Lance Taylor <iant@golang.org>
558
559 PR go/95061
560 * posix.c (backtrace_open): Treat EACCESS like ENOENT.
561
5622020-05-12 H.J. Lu <hongjiu.lu@intel.com>
d2148648
L
563
564 * Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
565 * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
566 AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't
567 enabled.
568 * Makefile.in: Regenerated.
569 * configure: Likewise.
570
47f4703c
ILT
5712020-05-11 Ian Lance Taylor <iant@golang.org>
572
573 PR libbacktrace/95012
574 * configure.ac: Check for getpagesize declaration.
575 * mmap.c: Declare getpagesize if necessary.
576 * mmapio.c: Likewise.
577 * configure: Regenerate.
578 * config.h.in: Regenerate.
579 * Makefile.in: Regenerate.
580
ef639420
ILT
5812020-05-09 Roland McGrath <mcgrathr@google.com>
582
583 * elf.c (elf_add): Bail early if there are no section headers at all.
584
8600440e
ILT
5852020-05-09 Ian Lance Taylor <iant@golang.org>
586
587 * elf.c (elf_add): Don't free strtab if an error occurs after
588 recording symbol information.
589
dea40c94
ILT
5902020-05-09 Ian Lance Taylor <iant@golang.org>
591
592 PR libbacktrace/88745
593 * macho.c: New file.
594 * filetype.awk: Recognize Mach-O files.
595 * Makefile.am (FORMAT_FILES): Add macho.c.
596 (check_DATA): New variable. Set to .dSYM if HAVE_DSYMUTIL.
597 (%.dSYM): New pattern target.
598 (test_macho_SOURCES, test_macho_CFLAGS): New targets.
599 (test_macho_LDADD): New target.
600 (BUILDTESTS): Add test_macho.
601 (macho.lo): Add dependencies.
602 * configure.ac: Recognize macho file type. Check for
603 mach-o/dyld.h. Don't try to run objcopy if we don't find it.
604 Look for dsymutil and define a HAVE_DSYMUTIL conditional.
605 * Makefile.in: Regenerate.
606 * configure: Regenerate.
607 * config.h.in: Regenerate.
608
4b26b138
ILT
6092020-05-09 Ian Lance Taylor <iant@golang.org>
610
611 * read.c (backtrace_get_view): Support short read.
612
31ae7b86
ILT
6132020-05-09 Ian Lance Taylor <iant@golang.org>
614
615 * elf.c (elf_add): If debug sections are very large or far apart,
616 read them individually rather than as a single view.
617
26135684
ILT
6182020-05-08 Ian Lance Taylor <iant@golang.org>
619
620 * fileline.c (sysctl_exec_name): New static function.
621 (sysctl_exec_name1): New macro or static function.
622 (sysctl_exec_name2): Likewise.
623 (fileline_initialize): Try sysctl_exec_name[12].
624 * configure.ac: Check for sysctl args to fetch executable name.
625 * configure: Regenerate.
626 * config.h.in: Regenerate.
627
9a3d019a
ILT
6282020-02-15 Ian Lance Taylor <iant@golang.org>
629
630 * ztest.c (test_large): Update file to current libgo test file.
631
628ee3c2
ILT
6322020-02-03 Ian Lance Taylor <iant@golang.org>
633
634 * Makefile.am (libbacktrace_TEST_CFLAGS): Define.
635 (test_elf32_CFLAGS): Use $(libbacktrace_test_CFLAGS).
636 (test_elf_64_CFLAGS, test_xcoff_32_CFLAGS): Likewise.
637 (test_xcoff_64_CFLAGS, test_pecoff_CFLAGS): Likewise.
638 (test_unknown_CFLAGS, unittest_CFLAGS): Likewise.
639 (unittest_alloc_CFLAGS, allocfail_CFLAGS): Likewise.
640 (b2test_CFLAGS, b3test_CFLAGS, btest_CFLAGS): Likewise.
641 (btest_lto_CFLAGS, btest_alloc_CFLAGS, stest_CFLAGS): Likewise.
642 (stest_alloc_CFLAGS): Likewise.
643 * Makefile.in: Regenerate.
644 * ztest.c (error_callback_compress): Mark vdata unused.
645 (test_large): Add casts to avoid warnings.
646
8d9254fc
JJ
6472020-01-01 Jakub Jelinek <jakub@redhat.com>
648
649 Update copyright years.
650
c926fd82
ILT
6512019-12-13 Ian Lance Taylor <iant@golang.org>
652
653 Add DWARF 5 support.
654 * dwarf.c (struct attr): Add val field.
655 (enum attr_val_encoding): Add ATTR_VAL_ADDDRESS_INDEX,
656 ATTR_VAL_STRING_INDEX, ATTR_VAL_RNGLISTS_INDEX.
657 (struct line_header): Add addrsize field.
658 (struct line_header_format): Define.
659 (struct unit): Add str_offsets_base, addr_base, and rnglists_base
660 fields.
661 (read_uint24): New static function.
662 (read_attribute): Add implicit_val parameter. Replace dwarf_str
663 and dwarf_str_size parameters with dwarf_sections parameter. Add
664 support for new DWARF 5 forms. Change all callers.
665 (resolve_string): New static function.
666 (resolve_addr_index): Likewise.
667 (read_abbrevs): Support DW_FORM_implicit_const.
668 (struct pcrange): Add lowpc_is_addr_index, highpc_is_addr_Index,
669 and ranges_is_index fields.
670 (update_pcrange): Support DWARF 5 encodings.
671 (add_high_low_range): New static function, split out of
672 add_ranges.
673 (add_ranges_from_ranges): Likewise.
674 (add_ranges_from_rnglists): New static function.
675 (add_ranges): Just call new helper functions.
676 (find_address_ranges): Use resolve_string for strings, after
677 reading all attributes. Handle new DWARF 5 attributes.
678 (build_address_map): Support DWARF 5 compilation units.
679 (read_v2_paths): New static function, split out of
680 read_line_header.
681 (read_lnct): New static function.
682 (read_line_header_format_entries): Likewise.
683 (read_line_header): Add ddata parameter. Support DWARF 5 line
684 headers. Call new helper functions. Change all callers.
685 (read_line_program): Use addrsize from line program header. Don't
686 special case directory index 0 for DWARF 5.
687 (read_referenced_name): Use resolve_string.
688 (read_function_entry): Handle DWARF 5 encodings. Use
689 resolve_string.
690 * internal.h (enum dwarf_section): Add DEBUG_ADDR,
691 DEBUG_STR_OFFSETS, DEBUG_LINE_STR, DEBUG_RNGLISTS.
692 * elf.c (dwarf_section_names): Add new section names.
693 * pecoff.c (dwarf_section_names): Likewise.
694 * xcoff.c (xcoff_add): Clear dwarf_sections before setting
695 fields.
696 * configure.ac: Define HAVE_DWARF5 automake conditional.
697 * Makefile.am (dwarf5_SOURCES): New variable if HAVE_DWARF5.
698 (dwarf5_CFLAGS, dwarf5_LDADD): Likewise.
699 (dwarf5_alloc_SOURCES, dwarf5_alloc_CFLAGS): Likewise.
700 (dwarf5_alloc_LDADD): Likewise.
701 (BUILDTESTS): Add dwarf5 tests if HAVE_DWARF5.
702 (CLEANFILES, clean-local): Define.
703
4b3fc188
ILT
7042019-12-08 Ian Lance Taylor <iant@golang.org>
705
706 * dwarf.c (struct pcrange): Define.
707 (update_pcrange, add_ranges): New static functions.
708 (add_unit_addr): Change signature to work with add_ranges. Don't
709 add base_address here.
710 (add_unit_ranges): Remove.
711 (find_address_ranges): Replace str/ranges parameters with
712 dwarf_sections. Use update_pcrange and add_ranges. Change all
713 callers.
714 (add_function_range): Change signature to work with add_ranges.
715 Don't add base_address here.
716 (add_function_ranges): Remove.
717 (read_function_entry): Use update_pcrange and add_ranges.
718
70bfe5a7
ILT
7192019-12-04 Ian Lance Taylor <iant@golang.org>
720
721 * edtest.c (test1): Add noclone attribute.
722
66ab5839
ILT
7232019-12-04 Ian Lance Taylor <iant@golang.org>
724
725 * internal.h (enum dwarf_section): Define.
726 (struct dwarf_sections): Define.
727 (backtrace_dwarf_add): Update declaration to replace specific
728 section parameters with dwarf_sections parameter.
729 * dwarf.c (struct dwarf_data): Replace specific section fields
730 with dwarf_sections field.
731 (read_attribute): Use dwarf_sections with altlink.
732 (build_address_map): Replace specific section parameters with
733 dwarf_sections parameter. Change all callers.
734 (read_line_info): Use dwarf_sections with ddata.
735 (read_referenced_name): Likewise.
736 (add_function_ranges): Likewise.
737 (read_function_entry): Likewise.
738 (read_function_info): Likewise.
739 (build_dwarf_data): Replace specific section parameters with
740 dwarf_sections parameter. Change all callers.
741 (backtrace_dwarf_add): Likewise.
742 * elf.c (enum debug_section): Remove.
743 (dwarf_section_names): Remove .zdebug names.
744 (elf_add): Track zsections separately. Build dwarf_sections.
745 * pecoff.c (enum debug_section): Remove.
746 (struct debug_section_info): Remove data field.
747 (coff_add): Build dwarf_sections.
748 * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx
749 references with DEBUG_xxx references.
750 (xcoff_add): Build dwarf_sections.
751
e9085da5
MR
7522019-09-27 Maciej W. Rozycki <macro@wdc.com>
753
754 * configure: Regenerate.
755
5fe5f75f
ILT
7562019-09-26 Ian Lance Taylor <iant@golang.org>
757
758 PR libbacktrace/91908
759 * pecoff.c (backtrace_initialize): Explicitly cast unchecked
760 __sync_bool_compare_and_swap to void.
761 * xcoff.c (backtrace_initialize): Likewise.
762
2f2aeda9
UW
7632019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
764
765 * configure.ac: Remove references to spu.
766 * configure: Regenerate.
767
245254b8
CC
7682019-05-24 Clement Chigot <clement.chigot@atos.net>
769
770 * Makefile.am (BUILDTESTS): Remove test_elf, add test_elf_32 and
771 test_elf_64.
772 * Makefile.in: Regenerate.
773
ccd1242e
RO
7742019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
775
776 * configure.ac (have_dl_iterate_phdr): Remove *-*-solaris2.10*
777 handling.
778 * configure: Regenerate.
779
7856fb45
ILT
7802019-03-11 Ian Lance Taylor <iant@golang.org>
781
782 PR libbacktrace/89669
783 * Makefile.am (BUILDTESTS): Only add ztest and ztest_alloc if
784 HAVE_ELF.
785 * Makefile.in: Regenerate.
786
067aef03
TV
7872019-02-26 Tom de Vries <tdevries@suse.de>
788
789 * btest.c (test5): Allow global.* as minimal symbol name for global.
790
d831b1ec
TV
7912019-02-26 Tom de Vries <tdevries@suse.de>
792
793 * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
794 * Makefile.in: Regenerate.
795
68641fb7
TV
7962019-02-12 Tom de Vries <tdevries@suse.de>
797
798 PR libbacktrace/81983
799 * dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.
800
c51b2c8c
TV
8012019-02-10 Tom de Vries <tdevries@suse.de>
802
803 * Makefile.am (BUILDTESTS): Add btest_lto.
804 * Makefile.in: Regenerate.
805 * btest.c (test1, f2, f3, test3, f22, f23): Declare with
806 __attribute__((noclone)).
807
4af50e13
TV
8082019-02-08 Tom de Vries <tdevries@suse.de>
809
810 * backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
811 * print.c (backtrace_print): Same.
812 * simple.c (backtrace_simple): Same.
813
2bd0a246
TV
8142019-02-08 Tom de Vries <tdevries@suse.de>
815
816 PR libbacktrace/78063
817 * dwarf.c (build_address_map): Keep all parsed units.
818 (read_referenced_name_from_attr): Handle DW_FORM_ref_addr.
819
3a3f5dd1
TV
8202019-01-31 Tom de Vries <tdevries@suse.de>
821
822 PR libbacktrace/89136
823 * elf.c (elf_add): Read build-id if with_buildid_data. Fix
824 'debugaltlink_name_len =+ 1'.
825
fddbc193
TV
8262019-01-29 Tom de Vries <tdevries@suse.de>
827
828 * install-debuginfo-for-buildid.sh.in: New script.
829 * Makefile.am (check_PROGRAMS): Add b2test and b3test.
830 (TESTS): Add b2test_buildid and b3test_dwz_buildid.
831 * Makefile.in: Regenerate.
832 * configure.ac (HAVE_ELF): Set with AM_CONDITIONAL.
833 (READELF): Set with AC_CHECK_PROG.
834 (install-debuginfo-for-buildid.sh): Generate with AC_CONFIG_FILES.
835 * configure: Regenerate.
836 * elf.c (SYSTEM_BUILD_ID_DIR): Factor out of ...
837 (elf_open_debugfile_by_buildid): ... here.
838
57f0d303
TV
8392019-01-29 Tom de Vries <tdevries@suse.de>
840
841 * Makefile.am: Replace check_PROGRAMS with BUILDTESTS, except for
842 allocfail.
843 (TESTS): Don't add check_PROGRAMS. Add BUILDTESTS.
844 (check_PROGRAMS): Add BUILDTESTS.
845 * Makefile.in: Regenerate.
846
62d4a355
TV
8472019-01-28 Tom de Vries <tdevries@suse.de>
848
849 * Makefile.am (xcoff_%.c): Generate sed result into temporary file.
850 Use $< to access prerequisite.
851 * Makefile.in: Regenerate.
852
4bfcd139
NS
8532019-01-25 Nathan Sidwell <nathan@acm.org>
854
855 * elf.c (elf_add): Pass "" filename to recursive call with
856 separated debug.
857
c75795fa
TV
8582019-01-25 Tom de Vries <tdevries@suse.de>
859
860 * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
861 filename == "".
862 * Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
863 * Makefile.in: Regenerate.
864
37ab491d
TV
8652019-01-25 Tom de Vries <tdevries@suse.de>
866
867 * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule.
868 (TESTS): Rename dtest to btest_gnudebuglink.
869 * Makefile.in: Regenerate.
870
3f5d2012
TV
8712019-01-23 Tom de Vries <tdevries@suse.de>
872
873 * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields.
874 (units_search, find_unit): Use size_t for offset.
875 (build_address_map): Use size_t for unit_offset.
876
5e2a7241
GP
8772019-01-20 Gerald Pfeifer <gerald@pfeifer.com>
878
879 * allocfail.c (main): Increase portability of printf statement.
880
8b248c17
ILT
8812019-01-18 Ian Lance Taylor <iant@golang.org>
882
883 PR libbacktrace/88890
884 * mmapio.c (backtrace_get_view): Change size parameter to
885 uint64_t. Check that value fits in size_t.
886 * read.c (backtrace_get_view): Likewise.
887 * internal.h (backtrace_get_view): Update declaration.
888 * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.
889
10f48858
TV
8902019-01-17 Tom de Vries <tdevries@suse.de>
891
892 PR libbacktrace/82857
893 * configure.ac (DWZ): Set with AC_CHECK_PROG.
894 (HAVE_DWZ): Set with AM_CONDITIONAL.
895 * configure: Regenerate.
896 * Makefile.am (TESTS): Add btest_dwz.
897 * Makefile.in: Regenerate.
898
1c2a9a37
TV
8992019-01-17 Tom de Vries <tdevries@suse.de>
900
901 PR libbacktrace/82857
902 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_REF_ALT_INFO.
903 (read_attribute): Handle DW_FORM_GNU_ref_alt using
904 ATTR_VAL_REF_ALT_INFO.
905 (read_referenced_name_from_attr): Handle DW_FORM_GNU_ref_alt.
906
9d576782
TV
9072019-01-17 Tom de Vries <tdevries@suse.de>
908
909 * dwarf.c (struct unit): Add low_offset and high_offset fields.
910 (struct unit_vector): New type.
911 (struct dwarf_data): Add units and units_counts fields.
912 (find_unit): New function.
913 (find_address_ranges): Add and handle unit_tag parameter.
914 (build_address_map): Add and handle units_vec parameter.
915 (build_dwarf_data): Pass units_vec to build_address_map. Store resulting
916 units vector.
917
f2f00d3a
TV
9182019-01-17 Tom de Vries <tdevries@suse.de>
919
920 PR libbacktrace/82857
921 * dwarf.c (read_attribute): Handle DW_FORM_GNU_strp_alt
922 using altlink.
923
944f59ff
TV
9242019-01-17 Tom de Vries <tdevries@suse.de>
925
926 * dwarf.c (enum attr_val_encoding): Add ATTR_VAL_NONE.
927 (read_attribute): Add altlink parameter. Handle missing altlink for
928 DW_FORM_GNU_strp_alt and DW_FORM_GNU_ref_alt.
929 (find_address_ranges, build_address_map, build_dwarf_data): Add and
930 handle altlink parameter.
931 (read_referenced_name, read_function_entry): Add argument to
932 read_attribute call.
933
9ad458d5
TV
9342019-01-17 Tom de Vries <tdevries@suse.de>
935
936 * dwarf.c (struct dwarf_data): Add altlink field.
937 (backtrace_dwarf_add): Add and handle fileline_altlink parameter.
938 * elf.c (elf_add): Add argument to backtrace_dwarf_add call.
939 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
940 * internal.h (backtrace_dwarf_add): Add fileline_altlink parameter.
941 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
942 * xcoff.c (xcoff_add): Same.
943
e6f00c83
TV
9442019-01-17 Tom de Vries <tdevries@suse.de>
945
946 * internal.h (backtrace_dwarf_add): Add fileline_entry parameter.
947 * dwarf.c (backtrace_dwarf_add): Add and handle fileline_entry parameter.
948 * elf.c (elf_add): Add and handle fileline_entry parameter. Add
949 argument to backtrace_dwarf_add call.
950 (phdr_callback, backtrace_initialize): Add argument to elf_add calls.
951 * pecoff.c (coff_add): Add argument to backtrace_dwarf_add call.
952 * xcoff.c (xcoff_add): Same.
953
a34c2a3d
TV
9542019-01-17 Tom de Vries <tdevries@suse.de>
955
956 * elf.c (elf_add): Add and handle with_buildid_data and
957 with_buildid_size parameters. Handle .gnu_debugaltlink section.
958 (phdr_callback, backtrace_initialize): Add arguments to elf_add calls.
959
07e1534f
TV
9602019-01-16 Tom de Vries <tdevries@suse.de>
961
962 * dwarf.c (read_referenced_name_from_attr): New function. Factor out
963 of ...
964 (read_referenced_name): ... here, and ...
965 (read_function_entry): ... here.
966
df1de064
TV
9672019-01-16 Tom de Vries <tdevries@suse.de>
968
969 * dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
970 name.
971 (read_function_entry): Same. Don't allow name found via
972 DW_AT_abstract_origin or case DW_AT_specification to override linkage
973 name.
974
67914693
SL
9752019-01-09 Sandra Loosemore <sandra@codesourcery.com>
976
977 PR other/16615
978
979 * backtrace.h: Mechanically replace "can not" with "cannot".
980
a5544970
JJ
9812019-01-01 Jakub Jelinek <jakub@redhat.com>
982
983 Update copyright years.
984
4b420b27
GP
9852018-12-29 Gerald Pfeifer <gerald@pfeifer.com>
986
987 * Makefile.am (xcoff_%.c): Use an actual newline instead of \n
988 in sed pattern.
989 * Makefile.in: Regenerate.
990
eb33bf0a
TV
9912018-12-28 Tom de Vries <tdevries@suse.de>
992
993 * dwarf.c (build_address_map): Reuse unused units.
994
d9aa0961
TV
9952018-12-28 Tom de Vries <tdevries@suse.de>
996
997 * dwarf.c (build_address_map): Simplify by removing local variable
998 abbrevs.
999
40b8d3b2
ILT
10002018-12-28 Ian Lance Taylor <iant@golang.org>
1001 Tom de Vries <tdevries@suse.de>
1002
1003 PR libbacktrace/88063
1004 * dwarf.c (free_unit_addrs_vector): Remove.
1005 (build_address_map): Keep track of allocated units in vector. Free
1006 allocated units and corresponding abbrevs upon failure. Remove now
1007 redundant call to free_unit_addrs_vector. Free addrs vector upon
1008 failure. Free allocated unit vector.
1009
53a52133
TV
10102018-12-28 Tom de Vries <tdevries@suse.de>
1011
1012 * dwarf.c (build_address_map): Free addrs vector upon failure.
1013
a37a52e5
TV
10142018-12-14 Tom de Vries <tdevries@suse.de>
1015
1016 PR testsuite/88491
1017 * allocfail.sh: Remove "set -o pipefail".
1018
d665cd9b
TV
10192018-12-12 Tom de Vries <tdevries@suse.de>
1020
1021 * Makefile.am (TESTS): Add allocfail.sh.
1022 (check_PROGRAMS): Add allocfail.
1023 * Makefile.in: Regenerate.
1024 * instrumented_alloc.c: New file. Redefine malloc and realloc.
1025 Include alloc.c.
1026 * allocfail.c: New file.
1027 * allocfail.sh: New file.
1028
187b9e1d
TV
10292018-11-30 Tom de Vries <tdevries@suse.de>
1030
1031 * Makefile.am (check_PROGRAMS): Add test_elf, test_xcoff_32,
1032 test_xcoff_64, test_pecoff and test_unknown.
1033 * Makefile.in: Regenerate.
1034 * test_format.c: New file.
1035
9b7d1a97
TV
10362018-11-30 Tom de Vries <tdevries@suse.de>
1037
1038 * Makefile.am : Add _with_alloc version for each test in
1039 check_PROGRAMS.
1040 * Makefile.in: Regenerate.
1041
518a3a21
TV
10422018-11-30 Tom de Vries <tdevries@suse.de>
1043
1044 * internal.h (backtrace_vector_free): New static inline fuction,
1045 factored out of ...
1046 * dwarf.c (read_line_info): ... here.
1047
18c742b5
TV
10482018-11-28 Tom de Vries <tdevries@suse.de>
1049
1050 * dwarf.c (read_abbrevs): Fix handling of abbrevs->abbrevs allocation
1051 failure.
1052
6d760a01
TV
10532018-11-27 Tom de Vries <tdevries@suse.de>
1054
1055 * mmap.c (backtrace_vector_release): Same.
1056 * unittest.c (test1): Add check.
1057
0c155f24
TV
10582018-11-27 Tom de Vries <tdevries@suse.de>
1059
1060 * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free
1061 instead of realloc.
1062 * Makefile.am (check_PROGRAMS): Add unittest.
1063 * Makefile.in: Regenerate.
1064 * unittest.c: New file.
1065
292592c5
TV
10662018-11-22 Tom de Vries <tdevries@suse.de>
1067
1068 * dwarf.c (read_initial_length): Factor out of ...
1069 (build_address_map, read_line_info): ... here.
1070
17112570
TV
10712018-11-21 Tom de Vries <tdevries@suse.de>
1072
1073 * dwarf.c (read_string): Factor out of ...
1074 (read_attribute, read_line_header, read_line_program): ... here.
1075
22e05272
JM
10762018-10-31 Joseph Myers <joseph@codesourcery.com>
1077
1078 PR bootstrap/82856
1079 * Makefile.am: Include multilib.am.
1080 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE.
1081 * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
1082
a2a86641
ILT
10832018-10-05 Ian Lance Taylor <iant@golang.org>
1084
1085 PR libbacktrace/87529
1086 * backtrace.h: Document that backtrace_create_state should be
1087 called only once.
1088
2206fb89
IB
10892018-08-05 Iain Buclaw <ibuclaw@gdcproject.org>
1090
1091 * configure.ac: Move define of HAVE_ZLIB into check for -lz.
1092 * Makefile.in: Regenerate.
1093 * config.h.in: Likewise.
1094 * configure: Likewise.
1095
ca9a1314
TR
10962018-08-01 Tony Reix <tony.reix@atos.net>
1097
1098 * xcoff.c (struct xcoff_line, struct xcoff_line_vector): Remove.
1099 (struct xcoff_func, struct xcoff_func_vector): New structs.
1100 (xcoff_syminfo): Drop leading dot from symbol name.
1101 (xcoff_line_compare, xcoff_line_search): Remove.
1102 (xcoff_func_compare, xcoff_func_search): New static functions.
1103 (xcoff_lookup_pc): Search function table.
1104 (xcoff_add_line, xcoff_process_linenos): Remove.
1105 (xcoff_initialize_fileline): Build function table.
1106
1ac6620a
DK
11072018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
1108
1109 PR other/86198
1110 * elf.c (elf_add): Increase ".note.gnu.build-id" section size
1111 checking up to 36 bytes.
1112
7b47ecf2
L
11132018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1114
1115 * configure: Regenerated.
1116
a0e1df88
JJ
11172018-04-19 Jakub Jelinek <jakub@redhat.com>
1118
1119 * configure: Regenerated.
1120
21070494
ILT
11212018-04-17 Ian Lance Taylor <iant@golang.org>
1122
1123 * backtrace.c: Revert last two changes. Don't call mmap
1124 directly.
1125
c36af1b4
ILT
11262018-04-17 Ian Lance Taylor <iant@golang.org>
1127
1128 * backtrace.c: Include backtrace-supported.h before checking
1129 BACKTRACE_USES_MALLOC.
1130
83a658ca
ILT
11312018-04-17 Ian Lance Taylor <iant@golang.org>
1132
1133 * backtrace.c (backtrace_full): When testing whether we can
1134 allocate memory, call mmap directly, and munmap the memory.
1135
c5c4b2ae
JJ
11362018-04-04 Jakub Jelinek <jakub@redhat.com>
1137
1138 PR other/85161
1139 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for
1140 big endian, only use 32-bit loads if endianity macros are predefined
1141 and indicate big or little endian.
1142
14e335ed
IT
11432018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1144
1145 PR target/84148
1146 * configure: Regenerate.
1147
bcc23586
JJ
11482018-02-15 Jakub Jelinek <jakub@redhat.com>
1149
1150 PR other/82368
1151 * elf.c (SHT_PROGBITS): Undefine and define.
1152
da07141f
JJ
11532018-02-14 Jakub Jelinek <jakub@redhat.com>
1154
1155 PR other/82368
1156 * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
1157 (struct elf_ppc64_opd_data): New type.
1158 (elf_initialize_syminfo): Add opd argument, handle symbols
1159 pointing into the PowerPC64 ELFv1 .opd section.
1160 (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
1161 to structure with .opd data to elf_initialize_syminfo.
1162
65d0b859
ILT
11632018-01-31 Ian Lance Taylor <iant@golang.org>
1164
1165 * elf.c (elf_add): Close descriptor if we use a debugfile.
1166 * btest.c (check_open_files): New static function.
1167 (main): Call check_open_files.
1168
96f7c2a9
ILT
11692018-01-25 Ian Lance Taylor <iant@golang.org>
1170
1171 * elf.c (elf_open_debugfile_by_debuglink): Don't check CRC if the
1172 desired CRC is zero.
1173 (elf_add): Don't clear *found_sym and *found_dwarf if debuginfo.
1174
a794e494
ILT
11752018-01-25 Ian Lance Taylor <iant@golang.org>
1176
1177 * pecoff.c (coff_add): Only release syms_view if it is valid.
1178
45f3ab19
ILT
11792018-01-25 Ian Lance Taylor <iant@golang.org>
1180
1181 * pecoff.c (coff_add): Another memcpy -> coff_read4 fix.
1182
017707ce
ILT
11832018-01-24 Ian Lance Taylor <iant@golang.org>
1184
1185 * pecoff.c (coff_add): Use coff_read4, not memcpy.
1186
3fe3c7d7
ILT
11872018-01-24 Ian Lance Taylor <iant@golang.org>
1188
1189 PR other/68239
1190 * mmap.c (backtrace_free_locked): Don't put more than 16 entries
1191 on the free list.
1192
47c699f5
TR
11932018-01-19 Tony Reix <tony.reix@atos.net>
1194
1195 * xcoff.c (xcoff_incl_compare): New function.
1196 (xcoff_incl_search): New function.
1197 (xcoff_process_linenos): Use bsearch to find include file.
1198 (xcoff_initialize_fileline): Sort include file information.
1199
566588f1
ILT
12002018-01-16 Ian Lance Taylor <iant@golang.org>
1201
1202 * elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
1203 288.
1204 (main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
1205 elf_zlib_inflate_table. Generate elf_zlib_default_dist_table.
1206 (elf_zlib_default_table): Update.
1207 (elf_zlib_default_dist_table): New static array.
1208 (elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
1209 for block type 1.
1210 * ztest.c (struct zlib_test): Add uncompressed_len.
1211 (tests): Initialize uncompressed_len field. Add new test case.
1212 (test_samples): Use uncompressed_len field.
1213
85ec4feb
JJ
12142018-01-03 Jakub Jelinek <jakub@redhat.com>
1215
1216 Update copyright years.
1217
44685d37
IT
12182017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1219
1220 * configure.ac: Add CET_FLAGS to EXTRA_FLAGS.
1221 * aclocal.m4: Regenerate.
1222 * Makefile.in: Likewise.
1223 * configure: Likewise.
1224
549d24e9
ILT
12252017-10-06 Ian Lance Taylor <iant@golang.org>
1226
1227 * ztest.c (test_large): Pass unsigned long *, not size_t *, to
1228 zlib uncompress function.
1229
a978e26b
ILT
12302017-10-05 Ian Lance Taylor <iant@golang.org>
1231
1232 * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
1233 Read a four byte integer.
1234 (elf_zlib_inflate): Change val to uint64_t. Align pin to a 32-bit
1235 boundary before ever calling elf_zlib_fetch.
1236 * ztest.c (test_large): Simplify print statements a bit.
1237
8398c1df
ILT
12382017-10-02 Ian Lance Taylor <iant@golang.org>
1239
1240 * ztest.c: #include <errno.h>.
1241 (TEST_TIMING): Don't define, don't test.
1242 (xclock_gettime, xclockid_t): Define if !HAVE_CLOCK_GETTIME.
1243 (clockid_t, clock_gettime, CLOCK_REALTIME): Likewise.
1244 (ZLIB_CLOCK_GETTIME_ARG): Define.
1245 * configure.ac: Change clock_gettime_link to CLOCK_GETTIME_LINK.
1246 * Makefile.am: Likewise.
1247 * configure, Makefile.in: Rebuild.
1248
dbc31f20
TS
12492017-10-02 Thomas Schwinge <thomas@codesourcery.com>
1250
dd954c67
TS
1251 PR other/67165
1252 * Makefile.am: Append the content of clock_gettime_link to
1253 ztest_LDADD.
1254 * configure.ac: Test for the case that clock_gettime is in librt.
1255 * Makefile.in: Regenerate.
1256 * configure: Likewise.
1257
dbc31f20
TS
1258 PR other/67165
1259 * configure.ac: Check for clock_gettime.
1260 * config.h.in: Regenerate.
1261 * configure: Likewise.
1262 * ztest.c (average_time, test_large): Conditionalize test timing
1263 on clock_gettime availability.
1264
e90c74f5
TR
12652017-09-29 Tony Reix <tony.reix@atos.net>
1266
1267 * xcoff.c: Initial support for DWARF debug sections in XCOFF.
1268 (STYP_DWARF, SSUBTYP_DW*): Define.
1269 (enum dwarf_section): Define.
1270 (struct dwsect_info): Define.
1271 (xcoff_add): Look for DWARF sections, pass them to
1272 backtrace_dwarf_add.
1273
8da872d9
ILT
12742017-09-28 Ian Lance Taylor <iant@golang.org>
1275
1276 PR other/67165
1277 * elf.c (__builtin_prefetch): Define if not __GNUC__.
1278 (unlikely): Define.
1279 (SHF_UNCOMPRESSED, ELFCOMPRESS_ZLIB): Define.
1280 (b_elf_chdr): Define type.
1281 (enum debug_section): Add ZDEBUG_xxx values.
1282 (debug_section_names): Add names for new sections.
1283 (struct debug_section_info): Add compressed field.
1284 (elf_zlib_failed, elf_zlib_fetch): New static functions.
1285 (HUFFMAN_TABLE_SIZE, HUFFMAN_VALUE_MASK): Define.
1286 (HUFFMAN_BITS_SHIFT, HUFFMAN_BITS_MASK): Define.
1287 (HUFFMAN_SECONDARY_SHIFT): Define.
1288 (ZDEBUG_TABLE_SIZE): Define.
1289 (ZDEBUG_TABLE_CODELEN_OFFSET, ZDEBUG_TABLE_WORK_OFFSET): Define.
1290 (final_next_secondary): New static variable if
1291 BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE.
1292 (elf_zlib_inflate_table): New static function.
1293 (BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE): If define, define main
1294 function to produce fixed Huffman table.
1295 (elf_zlib_default_table): New static variable.
1296 (elf_zlib_inflate): New static function.
1297 (elf_zlib_verify_checksum): Likewise.
1298 (elf_zlib_inflate_and_verify): Likewise.
1299 (elf_uncompress_zdebug): Likewise.
1300 (elf_uncompress_chdr): Likewise.
1301 (backtrace_uncompress_zdebug): New extern function.
1302 (elf_add): Look for .zdebug sections and SHF_COMPRESSED debug
1303 sections, and uncompress them.
1304 * internal.h (backtrace_compress_zdebug): Declare.
1305 * ztest.c: New file.
1306 * configure.ac: Check for -lz and check whether the linker
1307 supports --compress-debug-sections.
1308 * Makefile.am (ztest_SOURCES): New variable.
1309 (ztest_CFLAGS, ztest_LDADD): New variables.
1310 (check_PROGRAMS): Add ztest.
1311 (ctestg_SOURCES): New variable.
1312 (ctestg_CFLAGS, ctestg_LDFLAGS, ctestg_LDADD): New variables.
1313 (ctesta_SOURCES): New variable.
1314 (ctesta_CFLAGS, ctesta_LDFLAGS, ctesta_LDADD): New variables.
1315 (check_PROGRAMS): Add ctestg and ctesta.
1316 * configure, config.h.in, Makefile.in: Rebuild.
1317
8c2ea6b2
ILT
13182017-09-22 Ian Lance Taylor <iant@golang.org>
1319
1320 PR sanitizer/77631
1321 * configure.ac: Check for lstat and readlink.
1322 * elf.c (lstat, readlink): Provide dummy versions if real versions
1323 are not available.
1324 * configure, config.h.in: Rebuild.
1325
f0de4542
ILT
13262017-09-21 Ian Lance Taylor <iant@google.com>
1327
1328 PR go/82284
1329 * elf.c (backtrace_initialize): Set pd.exe_filename.
1330
9283471b
ILT
13312017-09-20 Ian Lance Taylor <iant@golang.org>
1332 Denis Khalikov <d.khalikov@partner.samsung.com>
1333
1334 PR sanitizer/77631
1335 Support for external debug info.
1336 * elf.c: Include <errno.h>, <sys/stat.h>, <unistd.h>.
1337 (S_ISLNK): Define if not defined.
1338 (xstrnlen): Define if strnlen is not available.
1339 (b_elf_note): Define type.
1340 (NT_GNU_BUILD_ID): Define macro.
1341 (elf_crc32, elf_crc32_file): New static functions.
1342 (elf_is_symlink, elf_readlink): New static functions.
1343 (elf_open_debugfile_by_buildid): New static function.
1344 (elf_try_debugfile): New static function.
1345 (elf_find_debugfile_by_debuglink): New static function.
1346 (elf_open_debugfile_by_debuglink): New static function.
1347 (elf_add): Add filename and debuginfo parameters. Adjust all
1348 callers. Look for external debug info notes, and try to fetch
1349 debug info from external file.
1350 (struct phdr_data): Add exe_filename field.
1351 (phdr_callback): Pass filename to elf_add.
1352 (backtrace_initialize): Add filename parameter.
1353 * internal.h (backtrace_initialize): Add filename parameter.
1354 * fileline.c (fileline_initialize): Pass filename to
1355 backtrace_initialize.
1356 * pecoff.c (fileline_initialize): Add unused filename parameter.
1357 * unknown.c (fileline_initialize): Likewise.
1358 * xcoff.c (fileline_initialize): Likewise.
1359 * configure.ac: Check for objcopy --add-gnu-debuglink.
1360 * Makefile.am (dtest): New test target.
1361 * configure, Makefile.in: Rebuild.
1362
29788f90
SE
13632017-09-12 Steve Ellcey <sellcey@cavium.com>
1364
1365 PR other/81096
1366 * Makefile.am (ttest_CFLAGS): Add $(AM_CFLAGS)
1367 * Makefile.in: Regenerate.
1368
917a804c
SE
13692017-09-12 Steve Ellcey <sellcey@cavium.com>
1370
1371 PR other/81096
1372 * libbacktrace/Makefile.in
1373 (HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ttest_CFLAGS): Add $(AM_CFLAGS)
1374
2e6af1b8
DE
13752017-08-02 David Edelsohn <dje.gcc@gmail.com>
1376
8a0e6224 1377 PR bootstrap/81638
2e6af1b8
DE
1378 * xcoff.c (xcoff_process_linenos): Initialize incl to NULL.
1379
afce7deb
TR
13802017-07-28 Tony Reix <tony.reix@atos.net>
1381
1382 * xcoff.c: Don't leak a file descriptor if an archive is malformed.
1383
cf311b03
RO
13842017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1385
1386 * fileline.c (fileline_initialize): Print pid_t as long.
1387
7e2a8417
TR
13882017-07-26 Tony Reix <tony.reix@atos.net>
1389
1390 * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
1391 * filetype.awk: Separate AIX XCOFF32 and XCOFF64.
1392 * xcoff.c: Add support for AIX XCOFF32 and XCOFF64 formats.
1393 * configure, config.h.in: Regenerate.
1394
b3530b94
TR
13952017-07-21 Tony Reix <tony.reix@atos.net>
1396
1397 * filetype.awk: Add AIX XCOFF type detection.
1398 * configure.ac: Recognize xcoff format.
1399 * Makefile.am (FORMAT_FILES): Add xcoff.c.
1400 * fileline.c: Include <unistd.h>.
1401 (fileline_initialize): Add case for AIX procfs.
1402 * xcoff.c: New file.
1403 * configure, Makefile.in: Rebuild.
1404
e91a2ddc
RB
14052017-06-21 Richard Biener <rguenther@suse.de>
1406
1407 * configure.ac: Add AC_SYS_LARGEFILE.
1408 * config.h.in: Regenerate.
1409 * configure: Likewise.
1410
d1609a23
ILT
14112017-06-11 Ian Lance Taylor <iant@golang.org>
1412
1413 * elf.c (backtrace_initialize): Always set *fileline_fn.
1414 * ttest.c: New file.
1415 * btest.c: Move support functions into testlib.c. Change calls to
1416 check to pass file name.
1417 * testlib.c: New file, copied from (part of) btest.c.
1418 * testlib.h: New file, declarations for testlib.c.
1419 * edtest.c: Use testlib.h and testlib.c.
1420 * configure.ac: Test for -pthread, set HAVE_PTHREAD conditional.
1421 * Makefile.am (btest_SOURCES): Add testlib.c.
1422 (edtest_SOURCES): Likewise.
1423 (CHECK_PROGRAMS): Add ttest if HAVE_PTHREAD.
1424 (ttest_SOURCES, ttest_CFLAGS, ttest_LDADD): Define.
1425 * configure, Makefile.in: Rebuild.
1426
281161d1
TM
14272017-05-19 Than McIntosh <thanm@google.com>
1428
1429 * dwarf.c (free_line_header): Don't free dirs if dirs_count == 0.
1430 (read_line_header): Don't allocate dirs if dirs_count == 0.
1431 * edtest.c: New file.
1432 * edtest2.c: New file.
1433 * Makefile.am (edtest_SOURCES, edtest_LDADD): Define.
1434 (check_PROGRAMS): Add edtest.
1435 (edtest2_build.c, gen_edtest2_build): New targets.
1436 * Makefile.in: Rebuild.
1437
121eb024
ST
14382017-03-08 Sam Thursfield <sam.thursfield@codethink.co.uk>
1439
1440 * btest.c (test5): Replace #ifdef guard with 'unused' attribute
1441 to fix compile warning when BACKTRACE_SUPPORTED isn't defined.
1442
cbe34bb5
JJ
14432017-01-01 Jakub Jelinek <jakub@redhat.com>
1444
1445 Update copyright years.
1446
84c1b9d3
MK
14472016-11-15 Matthias Klose <doko@ubuntu.com>
1448
1449 * configure: Regenerate.
1450
84ebf639
CL
14512016-09-11 Carlos Liam <carlos@aarzee.me>
1452
1453 * all: Remove meaningless trailing whitespace.
1454
28644f75
UB
14552016-05-18 Uros Bizjak <ubizjak@gmail.com>
1456
1457 PR target/71161
1458 * elf.c (phdr_callback) [__i386__]: Add
1459 __attribute__((__force_align_arg_pointer__)).
1460
26ac52db
MO
14612016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
1462
1463 * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
1464 avoid possible crash.
1465 (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
1466 missing debug info anymore.
1467
09b08e17
JDA
14682016-02-06 John David Anglin <danglin@gcc.gnu.org>
1469
1470 * mmap.c (MAP_FAILED): Define if not defined.
1471
818ab71a
JJ
14722016-01-04 Jakub Jelinek <jakub@redhat.com>
1473
1474 Update copyright years.
1475
5b4bbc7d
AP
14762015-12-18 Andris Pavenis <andris.pavenis@iki.fi>
1477
28644f75
UB
1478 * configure.ac: Specify that DJGPP do not have mmap
1479 even when sys/mman.h exists.
5b4bbc7d
AP
1480 * configure: Regenerate
1481
2f401a8f
JDA
14822015-12-09 John David Anglin <danglin@gcc.gnu.org>
1483
28644f75 1484 PR libgfortran/68115
2f401a8f
JDA
1485 * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
1486 * configure: Regenerate.
1487 * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
1488 to void.
1489
750cdaf7
ILT
14902015-09-17 Ian Lance Taylor <iant@google.com>
1491
1492 * posix.c (backtrace_open): Cast second argument of open() to int.
1493
fc002444
ILT
14942015-09-11 Ian Lance Taylor <iant@google.com>
1495
1496 * Makefile.am (backtrace.lo): Depend on internal.h.
1497 (sort.lo, stest.lo): Add explicit dependencies.
1498 * Makefile.in: Rebuild.
1499
50809ff9
HPN
15002015-09-09 Hans-Peter Nilsson <hp@axis.com>
1501
1502 * backtrace.c: #include <sys/types.h>.
1503
c478516b
ILT
15042015-09-08 Ian Lance Taylor <iant@google.com>
1505
1506 PR other/67457
1507 * backtrace.c: #include "internal.h".
1508 (struct backtrace_data): Add can_alloc field.
1509 (unwind): If can_alloc is false, don't try to get file/line
1510 information.
1511 (backtrace_full): Set can_alloc field in bdata.
1512 * alloc.c (backtrace_alloc): Don't call error_callback if it is
1513 NULL.
1514 * mmap.c (backtrace_alloc): Likewise.
1515 * internal.h: Update comments for backtrace_alloc and
1516 backtrace_free.
1517
981d281f
ILT
15182015-09-08 Ian Lance Taylor <iant@google.com>
1519
1520 PR other/67457
1521 * mmap.c (backtrace_alloc): Correct test for mmap failure.
1522
8f5027bf
UW
15232015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1524
1525 * configure.ac: For spu-*-* targets, set have_fcntl to no.
1526 * configure: Regenerate.
1527
7e5c7547
UW
15282015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1529
1530 * configure.ac: Remove [disable-shared] argument to LT_INIT.
1531 Remove setting PIC_FLAG when building as target library.
1532 * configure: Regenerate.
1533
7ce9cf39
HPN
15342015-08-26 Hans-Peter Nilsson <hp@axis.com>
1535
1536 * configure.ac: Only compile with -fPIC if the target
1537 supports it.
1538 * configure: Regenerate.
1539
1b533361
UW
15402015-08-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1541
1542 * configure.ac: Set have_mmap to no on spu-*-* targets.
1543 * configure: Regenerate.
1544
d96fa208
ILT
15452015-08-13 Ian Lance Taylor <iant@google.com>
1546
1547 * dwarf.c (read_function_entry): Add vec_inlined parameter.
1548 Change all callers.
1549
d99a7b4d
MS
15502015-06-11 Martin Sebor <msebor@redhat.com>
1551
1552 PR sanitizer/65479
1553 * dwarf.c (struct line): Add new field idx.
1554 (line_compare): Use it.
1555 (add_line): Set it.
1556 (read_line_info): Reset it.
1557
e24afc10
TG
15582015-05-29 Tristan Gingold <gingold@adacore.com>
1559
1560 * pecoff.c: New file.
1561 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
1562 * Makefile.in: Regenerate.
1563 * filetype.awk: Detect pecoff.
1564 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
1565 Add pecoff.
1566 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
1567 true.
1568 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
1569 * configure: Regenerate.
1570 * pecoff.c: New file.
1571
df96c0f7
MH
15722015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
1573
1574 * Makefile.in: Regenerated with automake-1.11.6.
1575 * aclocal.m4: Likewise.
1576 * configure: Likewise.
1577
2b8fa469
MK
15782015-01-24 Matthias Klose <doko@ubuntu.com>
1579
1580 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
1581 * configure: Regenerate.
1582
5624e564
JJ
15832015-01-05 Jakub Jelinek <jakub@redhat.com>
1584
1585 Update copyright years.
1586
a699d672
L
15872014-11-21 H.J. Lu <hongjiu.lu@intel.com>
1588
1589 PR bootstrap/63784
1590 * configure: Regenerated.
1591
35485da9
DM
15922014-11-11 David Malcolm <dmalcolm@redhat.com>
1593
1594 * ChangeLog.jit: New.
1595
ebf6d33b
FXC
15962014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1597
1598 PR target/63610
1599 * configure: Regenerate.
1600
c96601d2
ILT
16012014-10-23 Ian Lance Taylor <iant@google.com>
1602
1603 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
1604 Fix to return void *.
1605
d573fd89
ILT
16062014-05-08 Ian Lance Taylor <iant@google.com>
1607
1608 * mmap.c (backtrace_free): If freeing a large aligned block of
1609 memory, call munmap rather than holding onto it.
1610 (backtrace_vector_grow): When growing a vector, double the number
1611 of pages requested. When releasing the old version of a grown
1612 vector, pass the correct size to backtrace_free.
1613
dbe20842
ILT
16142014-03-07 Ian Lance Taylor <iant@google.com>
1615
1616 * sort.c (backtrace_qsort): Use middle element as pivot.
1617
c5604b48
ILT
16182014-03-06 Ian Lance Taylor <iant@google.com>
1619
1620 * sort.c: New file.
1621 * stest.c: New file.
1622 * internal.h (backtrace_qsort): Declare.
1623 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
1624 (read_line_info, read_function_entry): Likewise.
1625 (read_function_info, build_dwarf_data): Likewise.
1626 * elf.c (elf_initialize_syminfo): Likewise.
1627 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
1628 (stest_SOURCES, stest_LDADD): Define.
1629 (check_PROGRAMS): Add stest.
1630
63fefb4b
MDM
16312014-02-07 Misty De Meo <misty@brew.sh>
1632
1633 PR target/58710
1634 * configure.ac: Use AC_LINK_IFELSE in check for
1635 _Unwind_GetIPInfo.
1636 * configure: Regenerate.
1637
afeba5cb
RS
16382014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1639
1640 Update copyright years
1641
0284b52e
JJ
16422013-12-06 Jakub Jelinek <jakub@redhat.com>
1643
1644 * elf.c (ET_DYN): Undefine and define again.
1645 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
1646 return early -1 without closing the descriptor.
1647 (struct phdr_data): Add exe_descriptor.
1648 (phdr_callback): If pd->exe_descriptor is not -1, for very first
1649 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
1650 otherwise backtrace_close the exe_descriptor if not -1. Adjust
1651 call to elf_add.
1652 (backtrace_initialize): Adjust call to elf_add. If it returns
1653 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
1654
bfd74f22
ILT
16552013-12-05 Ian Lance Taylor <iant@google.com>
1656
1657 * alloc.c (backtrace_vector_finish): Add error_callback and data
1658 parameters. Call backtrace_vector_release. Return address base.
1659 * mmap.c (backtrace_vector_finish): Add error_callback and data
1660 parameters. Return address base.
1661 * dwarf.c (read_function_info): Get new address base from
1662 backtrace_vector_finish.
1663 * internal.h (backtrace_vector_finish): Update declaration.
1664
b8ddd61b
ILT
16652013-11-27 Ian Lance Taylor <iant@google.com>
1666
1667 * dwarf.c (find_address_ranges): New static function, broken out
1668 of build_address_map.
1669 (build_address_map): Call it.
1670 * btest.c (check): Check for missing filename or function, rather
1671 than crashing.
1672 (f3): Check that enough frames were returned.
1673
64856e1e
JJ
16742013-11-19 Jakub Jelinek <jakub@redhat.com>
1675
1f96a712
JJ
1676 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
1677 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
1678 last argument.
1679 * btest.c (struct symdata): Add size field.
1680 (callback_three): Add symsize argument. Copy it to the data->size
1681 field.
1682 (f23): Set symdata.size to 0.
1683 (test5): Likewise. If sizeof (int) > 1, lookup address of
1684 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
1685 values.
1686
64856e1e
JJ
1687 * atomic.c: Include sys/types.h.
1688
49579c7e
ILT
16892013-11-18 Ian Lance Taylor <iant@google.com>
1690
1691 * configure.ac: Check for support of __atomic extensions.
1692 * internal.h: Declare or #define atomic functions for use in
1693 backtrace code.
1694 * atomic.c: New file.
1695 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
1696 (dwarf_fileline, backtrace_dwarf_add): Likewise.
1697 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
1698 (backtrace_initialize): Likewise.
1699 * fileline.c (fileline_initialize): Likewise.
1700 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
1701 * configure, config.h.in, Makefile.in: Rebuild.
1702
582f5a2d
JJ
17032013-11-18 Jakub Jelinek <jakub@redhat.com>
1704
f1857815
JJ
1705 * elf.c (SHN_UNDEF): Define.
1706 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
1707 with st_shndx == SHN_UNDEF. Add base_address to address fields.
1708 (elf_add): Adjust caller.
1709
582f5a2d
JJ
1710 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
1711
25e6253e
ILT
17122013-11-16 Ian Lance Taylor <iant@google.com>
1713
1714 * backtrace.h (backtrace_create_state): Correct comment about
1715 threading.
1716
cfa658e4
ILT
17172013-11-15 Ian Lance Taylor <iant@google.com>
1718
1719 * backtrace.h (backtrace_syminfo): Update comment and parameter
1720 name to take any address, not just a PC value.
1721 * elf.c (STT_OBJECT): Define.
1722 (elf_nosyms): Rename parameter pc to addr.
1723 (elf_symbol_search): Rename local variable pc to addr.
1724 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
1725 (elf_syminfo): Rename parameter pc to addr.
1726 * btest.c (global): New global variable.
1727 (test5): New test.
1728 (main): Call test5.
1729
6c084a5b
ILT
17302013-10-17 Ian Lance Taylor <iant@google.com>
1731
1732 * elf.c (elf_add): Don't get the wrong offsets if a debug section
1733 is missing.
1734
459260ec
DM
17352013-10-15 David Malcolm <dmalcolm@redhat.com>
1736
1737 * configure.ac: Add --enable-host-shared, setting up
1738 pre-existing PIC_FLAG variable within Makefile.am et al.
1739 * configure: Regenerate.
1740
3cbe17f7
AM
17412013-09-20 Alan Modra <amodra@gmail.com>
1742
1743 * configure: Regenerate.
1744
78625ce6
AM
17452013-07-23 Alexander Monakov <amonakov@ispras.ru>
1746
1747 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
1748
0153887c
AM
17492013-07-23 Alexander Monakov <amonakov@ispras.ru>
1750
1751 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
1752 dl_iterate_phdr callbacks.
1753
85d8c21e
ILT
17542013-03-25 Ian Lance Taylor <iant@google.com>
1755
1756 * alloc.c: #include <sys/types.h>.
1757 * mmap.c: Likewise.
1758
38811401
ILT
17592013-01-31 Ian Lance Taylor <iant@google.com>
1760
1761 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
1762 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
1763
1e678aed
JJ
17642013-01-25 Jakub Jelinek <jakub@redhat.com>
1765
1766 PR other/56076
1767 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
1768 attribute was not seen.
1769
6b514c53
ILT
17702013-01-16 Ian Lance Taylor <iant@google.com>
1771
1772 * dwarf.c (struct unit): Add filename and abs_filename fields.
1773 (build_address_map): Set new fields when reading unit.
1774 (dwarf_lookup_pc): If we don't find an entry in the line table,
1775 just return the main file name.
1776
f8a7e1a4
RS
17772013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
1778
1779 Update copyright years.
1780
c3de1960
ILT
17812013-01-01 Ian Lance Taylor <iant@google.com>
1782
1783 PR bootstrap/54834
1784 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
1785 $(MULTIBUILDTOP)/../../gcc/include.
1786 * Makefile.in: Rebuild.
1787
2a5195d9
ILT
17882013-01-01 Ian Lance Taylor <iant@google.com>
1789
1790 PR other/55536
1791 * mmap.c (backtrace_alloc): Don't call sync functions if not
1792 threaded.
1793 (backtrace_free): Likewise.
1794
85619b6f
JDA
17952012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1796
1797 * mmapio.c: Define MAP_FAILED if not defined.
1798
36a58fb3
JJ
17992012-12-11 Jakub Jelinek <jakub@redhat.com>
1800
1801 PR bootstrap/54926
1802 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
1803 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
1804 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
1805 accepts it.
1806 * Makefile.in: Regenerated.
1807 * configure: Regenerated.
1808
a58dfde0
JJ
18092012-12-07 Jakub Jelinek <jakub@redhat.com>
1810
1811 PR bootstrap/54926
1812 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
1813 * Makefile.in: Regenerated.
1814
b20ade36
ILT
18152012-11-20 Ian Lance Taylor <iant@google.com>
1816
1817 * dwarf.c (read_attribute): Always clear val.
1818
73c3ed27
ILT
18192012-11-13 Ian Lance Taylor <iant@google.com>
1820
1821 PR other/55312
1822 * configure.ac: Only add -Werror if building a target library.
2a5195d9 1823 * configure: Rebuild.
73c3ed27 1824
33521509
ILT
18252012-11-12 Ian Lance Taylor <iant@google.com>
1826 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1827 Gerald Pfeifer <gerald@pfeifer.com>
1828
1829 * configure.ac: Check for getexecname.
1830 * fileline.c: #include <errno.h>. Define getexecname if not
1831 available.
1832 (fileline_initialize): Try to find the executable in a few
1833 different ways.
1834 * print.c (error_callback): Only print the filename if it came
1835 from the backtrace state.
1836 * configure, config.h.in: Rebuild.
1837
8fe91dea
ILT
18382012-10-29 Ian Lance Taylor <iant@google.com>
1839
1840 * mmap.c (backtrace_vector_release): Correct last patch: add
1841 aligned, not size.
1842
8277de34
ILT
18432012-10-29 Ian Lance Taylor <iant@google.com>
1844
1845 * mmap.c (backtrace_vector_release): Make sure freed block is
1846 aligned on 8-byte boundary.
1847
73f41491
ILT
18482012-10-26 Ian Lance Taylor <iant@google.com>
1849
1850 PR other/55087
1851 * posix.c (backtrace_open): Add does_not_exist parameter.
1852 * elf.c (phdr_callback): Do not warn if shared library could not
1853 be opened.
1854 * fileline.c (fileline_initialize): Update calls to
1855 backtrace_open.
1856 * internal.h (backtrace_open): Update declaration.
1857
385710cf
JH
18582012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
1859
1860 PR target/55061
1861 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
1862 * configure: Regenerate.
1863
32061319
ILT
18642012-10-24 Ian Lance Taylor <iant@google.com>
1865
1866 PR target/55061
1867 * configure.ac: Check whether -funwind-tables option works.
1868 * configure: Rebuild.
1869
5551b12c
ILT
18702012-10-11 Ian Lance Taylor <iant@google.com>
1871
1872 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
1873 * configure: Rebuild.
1874
40d15b5b
ILT
18752012-10-10 Ian Lance Taylor <iant@google.com>
1876
1877 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
1878 lower case.
1879
74f80620
HPN
18802012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
1881
1882 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
1883
ce8aa074
ILT
18842012-10-09 Ian Lance Taylor <iant@google.com>
1885
1886 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
1887 (backtrace_dwarf_add): Likewise.
1888
e561a992
ILT
18892012-10-09 Ian Lance Taylor <iant@google.com>
1890
1891 Add support for tracing through shared libraries.
1892 * configure.ac: Check for link.h and dl_iterate_phdr.
1893 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
1894 ELF macros before #defining them.
1895 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
1896 dl_iterate_phdr.
1897 (struct elf_syminfo_data): Add next field.
1898 (elf_initialize_syminfo): Initialize next field.
1899 (elf_add_syminfo_data): New static function.
1900 (elf_add): New static function, broken out of
1901 backtrace_initialize. Call backtrace_dwarf_add instead of
1902 backtrace_dwarf_initialize.
1903 (struct phdr_data): Define.
1904 (phdr_callback): New static function.
1905 (backtrace_initialize): Call elf_add.
1906 * dwarf.c (struct dwarf_data): Add next and base_address fields.
1907 (add_unit_addr): Add base_address parameter. Change all callers.
1908 (add_unit_ranges, build_address_map): Likewise.
1909 (add_line): Add ddata parameter. Change all callers.
1910 (read_line_program, add_function_range): Likewise.
1911 (dwarf_lookup_pc): New static function, broken out of
1912 dwarf_fileline.
1913 (dwarf_fileline): Call dwarf_lookup_pc.
1914 (build_dwarf_data): New static function.
1915 (backtrace_dwarf_add): New function.
1916 (backtrace_dwarf_initialize): Remove.
1917 * internal.h (backtrace_dwarf_initialize): Don't declare.
1918 (backtrace_dwarf_add): Declare.
1919 * configure, config.h.in: Rebuild.
1920
068ef6d1
GP
19212012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
1922
1923 * btest.c (f23): Avoid uninitialized variable warning.
e561a992 1924
244e2d9c
ILT
19252012-10-04 Ian Lance Taylor <iant@google.com>
1926
1927 * dwarf.c: If the system header files do not declare strnlen,
1928 provide our own version.
1929
be4ba8ae
ILT
19302012-10-03 Ian Lance Taylor <iant@google.com>
1931
1932 * dwarf.c (read_uleb128): Fix overflow test.
1933 (read_sleb128): Likewise.
1934 (build_address_map): Don't change unit_buf.start.
1935
56195009
UB
19362012-10-02 Uros Bizjak <ubizjak@gmail.com>
1937
faf86a02
UB
1938 PR other/54761
1939 * configure.ac (EXTRA_FLAGS): New.
56195009 1940 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
faf86a02 1941 * configure, Makefile.in: Regenerate.
56195009 1942
8a447b3d
ILT
19432012-09-29 Ian Lance Taylor <iant@google.com>
1944
1945 PR other/54749
1946 * fileline.c (fileline_initialize): Pass errnum as -1 when
1947 reporting that we could not read executable information after a
1948 previous failure.
1949
af710874
ILT
19502012-09-27 Ian Lance Taylor <iant@google.com>
1951
1952 PR bootstrap/54732
1953 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
1954 * Makefile.am: Add dependencies for all objects.
1955 * configure, aclocal.m4, Makefile.in: Rebuild.
1956
588f4f8f
ILT
19572012-09-27 Ian Lance Taylor <iant@google.com>
1958
1959 PR other/54726
1960 * elf.c (backtrace_initialize): Set *fileln_fn, not
1961 state->fileln_fn.
1962
64b89453
ILT
19632012-09-19 Ian Lance Taylor <iant@google.com>
1964
1965 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
1966 as a target library.
1967 * configure: Rebuild.
1968
76850556
RO
19692012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1970 Ian Lance Taylor <iant@google.com>
1971
92a285c1
ML
1972 * configure.ac (GCC_HEADER_STDINT): Invoke.
1973 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
1974 * btest.c: Don't include <stdint.h>.
1975 * dwarf.c: Likewise.
1976 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
76850556 1977
9425c00b
ILT
19782012-09-18 Ian Lance Taylor <iant@google.com>
1979
1980 PR bootstrap/54623
1981 * Makefile.am (AM_CPPFLAGS): Define.
1982 (AM_CFLAGS): Remove -I options.
1983 * Makefile.in: Rebuild.
1984
3319ef17
ILT
19852012-09-18 Ian Lance Taylor <iant@google.com>
1986
1987 * posix.c (O_BINARY): Define if not defined.
1988 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
1989 HAVE_FCNTL is defined.
1990 * configure.ac: Test for the fcntl function.
1991 * configure, config.h.in: Rebuild.
1992
bd3e497d
ILT
19932012-09-18 Ian Lance Taylor <iant@google.com>
1994
1995 * btest.c (test1, test2, test3, test4): Add the unused attribute.
1996
30e15876
ILT
19972012-09-18 Ian Lance Taylor <iant@google.com>
1998
1999 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
2000
d4c059d5
ILT
20012012-09-18 Ian Lance Taylor <iant@google.com>
2002
2003 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
2004 * mmapio.c: Don't define _GNU_SOURCE.
2005 * configure, config.h.in: Rebuild.
2006
772a71a9
ILT
20072012-09-18 Ian Lance Taylor <iant@google.com>
2008
2009 * configure.ac: Check whether strnlen is declared.
2010 * dwarf.c: Declare strnlen if not declared.
2011 * configure, config.h.in: Rebuild.
2012
c0558468
RO
20132012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2014
2015 * fileline.c: Include <stdlib.h>.
2016 * mmap.c: Likewise.
2017
c5812e0b
ILT
20182012-09-17 Ian Lance Taylor <iant@google.com>
2019
2020 PR bootstrap/54611
2021 * nounwind.c (backtrace_full): Rename from backtrace. Add state
2022 parameter.
2023
e8f4008a
GP
20242012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
2025
2026 PR bootstrap/54611
2027 * nounwind.c (backtrace_simple): Add state parameter.
2028
f588eb27
ILT
20292012-09-17 Ian Lance Taylor <iant@google.com>
2030
2031 PR bootstrap/54609
2032 * unknown.c (unknown_fileline): Add state parameter, remove
2033 fileline_data parameter, name error_callback parameter.
2034 (backtrace_initialize): Add state parameter.
2035
eff02e4f
ILT
20362012-09-17 Ian Lance Taylor <iant@google.com>
2037
2038 * Initial implementation.
818ab71a 2039\f
6a720d41 2040Copyright (C) 2012-2024 Free Software Foundation, Inc.
818ab71a
JJ
2041
2042Copying and distribution of this file, with or without modification,
2043are permitted in any medium without royalty provided the copyright
2044notice and this notice are preserved.