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