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