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