libbacktrace: add support of PE/COFF
[gcc.git] / libbacktrace / ChangeLog
1 2015-05-29 Tristan Gingold <gingold@adacore.com>
2
3 * pecoff.c: New file.
4 * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
5 * Makefile.in: Regenerate.
6 * filetype.awk: Detect pecoff.
7 * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
8 Add pecoff.
9 * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
10 true.
11 * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
12 * configure: Regenerate.
13 * pecoff.c: New file.
14
15 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
16
17 * Makefile.in: Regenerated with automake-1.11.6.
18 * aclocal.m4: Likewise.
19 * configure: Likewise.
20
21 2015-01-24 Matthias Klose <doko@ubuntu.com>
22
23 * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
24 * configure: Regenerate.
25
26 2015-01-05 Jakub Jelinek <jakub@redhat.com>
27
28 Update copyright years.
29
30 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
31
32 PR bootstrap/63784
33 * configure: Regenerated.
34
35 2014-11-11 David Malcolm <dmalcolm@redhat.com>
36
37 * ChangeLog.jit: New.
38
39 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
40
41 PR target/63610
42 * configure: Regenerate.
43
44 2014-10-23 Ian Lance Taylor <iant@google.com>
45
46 * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
47 Fix to return void *.
48
49 2014-05-08 Ian Lance Taylor <iant@google.com>
50
51 * mmap.c (backtrace_free): If freeing a large aligned block of
52 memory, call munmap rather than holding onto it.
53 (backtrace_vector_grow): When growing a vector, double the number
54 of pages requested. When releasing the old version of a grown
55 vector, pass the correct size to backtrace_free.
56
57 2014-03-07 Ian Lance Taylor <iant@google.com>
58
59 * sort.c (backtrace_qsort): Use middle element as pivot.
60
61 2014-03-06 Ian Lance Taylor <iant@google.com>
62
63 * sort.c: New file.
64 * stest.c: New file.
65 * internal.h (backtrace_qsort): Declare.
66 * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
67 (read_line_info, read_function_entry): Likewise.
68 (read_function_info, build_dwarf_data): Likewise.
69 * elf.c (elf_initialize_syminfo): Likewise.
70 * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
71 (stest_SOURCES, stest_LDADD): Define.
72 (check_PROGRAMS): Add stest.
73
74 2014-02-07 Misty De Meo <misty@brew.sh>
75
76 PR target/58710
77 * configure.ac: Use AC_LINK_IFELSE in check for
78 _Unwind_GetIPInfo.
79 * configure: Regenerate.
80
81 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
82
83 Update copyright years
84
85 2013-12-06 Jakub Jelinek <jakub@redhat.com>
86
87 * elf.c (ET_DYN): Undefine and define again.
88 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
89 return early -1 without closing the descriptor.
90 (struct phdr_data): Add exe_descriptor.
91 (phdr_callback): If pd->exe_descriptor is not -1, for very first
92 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
93 otherwise backtrace_close the exe_descriptor if not -1. Adjust
94 call to elf_add.
95 (backtrace_initialize): Adjust call to elf_add. If it returns
96 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
97
98 2013-12-05 Ian Lance Taylor <iant@google.com>
99
100 * alloc.c (backtrace_vector_finish): Add error_callback and data
101 parameters. Call backtrace_vector_release. Return address base.
102 * mmap.c (backtrace_vector_finish): Add error_callback and data
103 parameters. Return address base.
104 * dwarf.c (read_function_info): Get new address base from
105 backtrace_vector_finish.
106 * internal.h (backtrace_vector_finish): Update declaration.
107
108 2013-11-27 Ian Lance Taylor <iant@google.com>
109
110 * dwarf.c (find_address_ranges): New static function, broken out
111 of build_address_map.
112 (build_address_map): Call it.
113 * btest.c (check): Check for missing filename or function, rather
114 than crashing.
115 (f3): Check that enough frames were returned.
116
117 2013-11-19 Jakub Jelinek <jakub@redhat.com>
118
119 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
120 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
121 last argument.
122 * btest.c (struct symdata): Add size field.
123 (callback_three): Add symsize argument. Copy it to the data->size
124 field.
125 (f23): Set symdata.size to 0.
126 (test5): Likewise. If sizeof (int) > 1, lookup address of
127 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
128 values.
129
130 * atomic.c: Include sys/types.h.
131
132 2013-11-18 Ian Lance Taylor <iant@google.com>
133
134 * configure.ac: Check for support of __atomic extensions.
135 * internal.h: Declare or #define atomic functions for use in
136 backtrace code.
137 * atomic.c: New file.
138 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
139 (dwarf_fileline, backtrace_dwarf_add): Likewise.
140 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
141 (backtrace_initialize): Likewise.
142 * fileline.c (fileline_initialize): Likewise.
143 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
144 * configure, config.h.in, Makefile.in: Rebuild.
145
146 2013-11-18 Jakub Jelinek <jakub@redhat.com>
147
148 * elf.c (SHN_UNDEF): Define.
149 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
150 with st_shndx == SHN_UNDEF. Add base_address to address fields.
151 (elf_add): Adjust caller.
152
153 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
154
155 2013-11-16 Ian Lance Taylor <iant@google.com>
156
157 * backtrace.h (backtrace_create_state): Correct comment about
158 threading.
159
160 2013-11-15 Ian Lance Taylor <iant@google.com>
161
162 * backtrace.h (backtrace_syminfo): Update comment and parameter
163 name to take any address, not just a PC value.
164 * elf.c (STT_OBJECT): Define.
165 (elf_nosyms): Rename parameter pc to addr.
166 (elf_symbol_search): Rename local variable pc to addr.
167 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
168 (elf_syminfo): Rename parameter pc to addr.
169 * btest.c (global): New global variable.
170 (test5): New test.
171 (main): Call test5.
172
173 2013-10-17 Ian Lance Taylor <iant@google.com>
174
175 * elf.c (elf_add): Don't get the wrong offsets if a debug section
176 is missing.
177
178 2013-10-15 David Malcolm <dmalcolm@redhat.com>
179
180 * configure.ac: Add --enable-host-shared, setting up
181 pre-existing PIC_FLAG variable within Makefile.am et al.
182 * configure: Regenerate.
183
184 2013-09-20 Alan Modra <amodra@gmail.com>
185
186 * configure: Regenerate.
187
188 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
189
190 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
191
192 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
193
194 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
195 dl_iterate_phdr callbacks.
196
197 2013-03-25 Ian Lance Taylor <iant@google.com>
198
199 * alloc.c: #include <sys/types.h>.
200 * mmap.c: Likewise.
201
202 2013-01-31 Ian Lance Taylor <iant@google.com>
203
204 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
205 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
206
207 2013-01-25 Jakub Jelinek <jakub@redhat.com>
208
209 PR other/56076
210 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
211 attribute was not seen.
212
213 2013-01-16 Ian Lance Taylor <iant@google.com>
214
215 * dwarf.c (struct unit): Add filename and abs_filename fields.
216 (build_address_map): Set new fields when reading unit.
217 (dwarf_lookup_pc): If we don't find an entry in the line table,
218 just return the main file name.
219
220 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
221
222 Update copyright years.
223
224 2013-01-01 Ian Lance Taylor <iant@google.com>
225
226 PR bootstrap/54834
227 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
228 $(MULTIBUILDTOP)/../../gcc/include.
229 * Makefile.in: Rebuild.
230
231 2013-01-01 Ian Lance Taylor <iant@google.com>
232
233 PR other/55536
234 * mmap.c (backtrace_alloc): Don't call sync functions if not
235 threaded.
236 (backtrace_free): Likewise.
237
238 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
239
240 * mmapio.c: Define MAP_FAILED if not defined.
241
242 2012-12-11 Jakub Jelinek <jakub@redhat.com>
243
244 PR bootstrap/54926
245 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
246 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
247 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
248 accepts it.
249 * Makefile.in: Regenerated.
250 * configure: Regenerated.
251
252 2012-12-07 Jakub Jelinek <jakub@redhat.com>
253
254 PR bootstrap/54926
255 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
256 * Makefile.in: Regenerated.
257
258 2012-11-20 Ian Lance Taylor <iant@google.com>
259
260 * dwarf.c (read_attribute): Always clear val.
261
262 2012-11-13 Ian Lance Taylor <iant@google.com>
263
264 PR other/55312
265 * configure.ac: Only add -Werror if building a target library.
266 * configure: Rebuild.
267
268 2012-11-12 Ian Lance Taylor <iant@google.com>
269 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
270 Gerald Pfeifer <gerald@pfeifer.com>
271
272 * configure.ac: Check for getexecname.
273 * fileline.c: #include <errno.h>. Define getexecname if not
274 available.
275 (fileline_initialize): Try to find the executable in a few
276 different ways.
277 * print.c (error_callback): Only print the filename if it came
278 from the backtrace state.
279 * configure, config.h.in: Rebuild.
280
281 2012-10-29 Ian Lance Taylor <iant@google.com>
282
283 * mmap.c (backtrace_vector_release): Correct last patch: add
284 aligned, not size.
285
286 2012-10-29 Ian Lance Taylor <iant@google.com>
287
288 * mmap.c (backtrace_vector_release): Make sure freed block is
289 aligned on 8-byte boundary.
290
291 2012-10-26 Ian Lance Taylor <iant@google.com>
292
293 PR other/55087
294 * posix.c (backtrace_open): Add does_not_exist parameter.
295 * elf.c (phdr_callback): Do not warn if shared library could not
296 be opened.
297 * fileline.c (fileline_initialize): Update calls to
298 backtrace_open.
299 * internal.h (backtrace_open): Update declaration.
300
301 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
302
303 PR target/55061
304 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
305 * configure: Regenerate.
306
307 2012-10-24 Ian Lance Taylor <iant@google.com>
308
309 PR target/55061
310 * configure.ac: Check whether -funwind-tables option works.
311 * configure: Rebuild.
312
313 2012-10-11 Ian Lance Taylor <iant@google.com>
314
315 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
316 * configure: Rebuild.
317
318 2012-10-10 Ian Lance Taylor <iant@google.com>
319
320 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
321 lower case.
322
323 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
324
325 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
326
327 2012-10-09 Ian Lance Taylor <iant@google.com>
328
329 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
330 (backtrace_dwarf_add): Likewise.
331
332 2012-10-09 Ian Lance Taylor <iant@google.com>
333
334 Add support for tracing through shared libraries.
335 * configure.ac: Check for link.h and dl_iterate_phdr.
336 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
337 ELF macros before #defining them.
338 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
339 dl_iterate_phdr.
340 (struct elf_syminfo_data): Add next field.
341 (elf_initialize_syminfo): Initialize next field.
342 (elf_add_syminfo_data): New static function.
343 (elf_add): New static function, broken out of
344 backtrace_initialize. Call backtrace_dwarf_add instead of
345 backtrace_dwarf_initialize.
346 (struct phdr_data): Define.
347 (phdr_callback): New static function.
348 (backtrace_initialize): Call elf_add.
349 * dwarf.c (struct dwarf_data): Add next and base_address fields.
350 (add_unit_addr): Add base_address parameter. Change all callers.
351 (add_unit_ranges, build_address_map): Likewise.
352 (add_line): Add ddata parameter. Change all callers.
353 (read_line_program, add_function_range): Likewise.
354 (dwarf_lookup_pc): New static function, broken out of
355 dwarf_fileline.
356 (dwarf_fileline): Call dwarf_lookup_pc.
357 (build_dwarf_data): New static function.
358 (backtrace_dwarf_add): New function.
359 (backtrace_dwarf_initialize): Remove.
360 * internal.h (backtrace_dwarf_initialize): Don't declare.
361 (backtrace_dwarf_add): Declare.
362 * configure, config.h.in: Rebuild.
363
364 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
365
366 * btest.c (f23): Avoid uninitialized variable warning.
367
368 2012-10-04 Ian Lance Taylor <iant@google.com>
369
370 * dwarf.c: If the system header files do not declare strnlen,
371 provide our own version.
372
373 2012-10-03 Ian Lance Taylor <iant@google.com>
374
375 * dwarf.c (read_uleb128): Fix overflow test.
376 (read_sleb128): Likewise.
377 (build_address_map): Don't change unit_buf.start.
378
379 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
380
381 PR other/54761
382 * configure.ac (EXTRA_FLAGS): New.
383 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
384 * configure, Makefile.in: Regenerate.
385
386 2012-09-29 Ian Lance Taylor <iant@google.com>
387
388 PR other/54749
389 * fileline.c (fileline_initialize): Pass errnum as -1 when
390 reporting that we could not read executable information after a
391 previous failure.
392
393 2012-09-27 Ian Lance Taylor <iant@google.com>
394
395 PR bootstrap/54732
396 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
397 * Makefile.am: Add dependencies for all objects.
398 * configure, aclocal.m4, Makefile.in: Rebuild.
399
400 2012-09-27 Ian Lance Taylor <iant@google.com>
401
402 PR other/54726
403 * elf.c (backtrace_initialize): Set *fileln_fn, not
404 state->fileln_fn.
405
406 2012-09-19 Ian Lance Taylor <iant@google.com>
407
408 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
409 as a target library.
410 * configure: Rebuild.
411
412 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
413 Ian Lance Taylor <iant@google.com>
414
415 * configure.ac (GCC_HEADER_STDINT): Invoke.
416 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
417 * btest.c: Don't include <stdint.h>.
418 * dwarf.c: Likewise.
419 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
420
421 2012-09-18 Ian Lance Taylor <iant@google.com>
422
423 PR bootstrap/54623
424 * Makefile.am (AM_CPPFLAGS): Define.
425 (AM_CFLAGS): Remove -I options.
426 * Makefile.in: Rebuild.
427
428 2012-09-18 Ian Lance Taylor <iant@google.com>
429
430 * posix.c (O_BINARY): Define if not defined.
431 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
432 HAVE_FCNTL is defined.
433 * configure.ac: Test for the fcntl function.
434 * configure, config.h.in: Rebuild.
435
436 2012-09-18 Ian Lance Taylor <iant@google.com>
437
438 * btest.c (test1, test2, test3, test4): Add the unused attribute.
439
440 2012-09-18 Ian Lance Taylor <iant@google.com>
441
442 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
443
444 2012-09-18 Ian Lance Taylor <iant@google.com>
445
446 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
447 * mmapio.c: Don't define _GNU_SOURCE.
448 * configure, config.h.in: Rebuild.
449
450 2012-09-18 Ian Lance Taylor <iant@google.com>
451
452 * configure.ac: Check whether strnlen is declared.
453 * dwarf.c: Declare strnlen if not declared.
454 * configure, config.h.in: Rebuild.
455
456 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
457
458 * fileline.c: Include <stdlib.h>.
459 * mmap.c: Likewise.
460
461 2012-09-17 Ian Lance Taylor <iant@google.com>
462
463 PR bootstrap/54611
464 * nounwind.c (backtrace_full): Rename from backtrace. Add state
465 parameter.
466
467 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
468
469 PR bootstrap/54611
470 * nounwind.c (backtrace_simple): Add state parameter.
471
472 2012-09-17 Ian Lance Taylor <iant@google.com>
473
474 PR bootstrap/54609
475 * unknown.c (unknown_fileline): Add state parameter, remove
476 fileline_data parameter, name error_callback parameter.
477 (backtrace_initialize): Add state parameter.
478
479 2012-09-17 Ian Lance Taylor <iant@google.com>
480
481 * Initial implementation.