1 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5 2013-12-06 Jakub Jelinek <jakub@redhat.com>
7 * elf.c (ET_DYN): Undefine and define again.
8 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
9 return early -1 without closing the descriptor.
10 (struct phdr_data): Add exe_descriptor.
11 (phdr_callback): If pd->exe_descriptor is not -1, for very first
12 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
13 otherwise backtrace_close the exe_descriptor if not -1. Adjust
15 (backtrace_initialize): Adjust call to elf_add. If it returns
16 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
18 2013-12-05 Ian Lance Taylor <iant@google.com>
20 * alloc.c (backtrace_vector_finish): Add error_callback and data
21 parameters. Call backtrace_vector_release. Return address base.
22 * mmap.c (backtrace_vector_finish): Add error_callback and data
23 parameters. Return address base.
24 * dwarf.c (read_function_info): Get new address base from
25 backtrace_vector_finish.
26 * internal.h (backtrace_vector_finish): Update declaration.
28 2013-11-27 Ian Lance Taylor <iant@google.com>
30 * dwarf.c (find_address_ranges): New static function, broken out
32 (build_address_map): Call it.
33 * btest.c (check): Check for missing filename or function, rather
35 (f3): Check that enough frames were returned.
37 2013-11-19 Jakub Jelinek <jakub@redhat.com>
39 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
40 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
42 * btest.c (struct symdata): Add size field.
43 (callback_three): Add symsize argument. Copy it to the data->size
45 (f23): Set symdata.size to 0.
46 (test5): Likewise. If sizeof (int) > 1, lookup address of
47 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
50 * atomic.c: Include sys/types.h.
52 2013-11-18 Ian Lance Taylor <iant@google.com>
54 * configure.ac: Check for support of __atomic extensions.
55 * internal.h: Declare or #define atomic functions for use in
58 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
59 (dwarf_fileline, backtrace_dwarf_add): Likewise.
60 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
61 (backtrace_initialize): Likewise.
62 * fileline.c (fileline_initialize): Likewise.
63 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
64 * configure, config.h.in, Makefile.in: Rebuild.
66 2013-11-18 Jakub Jelinek <jakub@redhat.com>
68 * elf.c (SHN_UNDEF): Define.
69 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
70 with st_shndx == SHN_UNDEF. Add base_address to address fields.
71 (elf_add): Adjust caller.
73 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
75 2013-11-16 Ian Lance Taylor <iant@google.com>
77 * backtrace.h (backtrace_create_state): Correct comment about
80 2013-11-15 Ian Lance Taylor <iant@google.com>
82 * backtrace.h (backtrace_syminfo): Update comment and parameter
83 name to take any address, not just a PC value.
84 * elf.c (STT_OBJECT): Define.
85 (elf_nosyms): Rename parameter pc to addr.
86 (elf_symbol_search): Rename local variable pc to addr.
87 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
88 (elf_syminfo): Rename parameter pc to addr.
89 * btest.c (global): New global variable.
93 2013-10-17 Ian Lance Taylor <iant@google.com>
95 * elf.c (elf_add): Don't get the wrong offsets if a debug section
98 2013-10-15 David Malcolm <dmalcolm@redhat.com>
100 * configure.ac: Add --enable-host-shared, setting up
101 pre-existing PIC_FLAG variable within Makefile.am et al.
102 * configure: Regenerate.
104 2013-09-20 Alan Modra <amodra@gmail.com>
106 * configure: Regenerate.
108 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
110 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
112 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
114 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
115 dl_iterate_phdr callbacks.
117 2013-03-25 Ian Lance Taylor <iant@google.com>
119 * alloc.c: #include <sys/types.h>.
122 2013-01-31 Ian Lance Taylor <iant@google.com>
124 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
125 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
127 2013-01-25 Jakub Jelinek <jakub@redhat.com>
130 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
131 attribute was not seen.
133 2013-01-16 Ian Lance Taylor <iant@google.com>
135 * dwarf.c (struct unit): Add filename and abs_filename fields.
136 (build_address_map): Set new fields when reading unit.
137 (dwarf_lookup_pc): If we don't find an entry in the line table,
138 just return the main file name.
140 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
142 Update copyright years.
144 2013-01-01 Ian Lance Taylor <iant@google.com>
147 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
148 $(MULTIBUILDTOP)/../../gcc/include.
149 * Makefile.in: Rebuild.
151 2013-01-01 Ian Lance Taylor <iant@google.com>
154 * mmap.c (backtrace_alloc): Don't call sync functions if not
156 (backtrace_free): Likewise.
158 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
160 * mmapio.c: Define MAP_FAILED if not defined.
162 2012-12-11 Jakub Jelinek <jakub@redhat.com>
165 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
166 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
167 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
169 * Makefile.in: Regenerated.
170 * configure: Regenerated.
172 2012-12-07 Jakub Jelinek <jakub@redhat.com>
175 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
176 * Makefile.in: Regenerated.
178 2012-11-20 Ian Lance Taylor <iant@google.com>
180 * dwarf.c (read_attribute): Always clear val.
182 2012-11-13 Ian Lance Taylor <iant@google.com>
185 * configure.ac: Only add -Werror if building a target library.
186 * configure: Rebuild.
188 2012-11-12 Ian Lance Taylor <iant@google.com>
189 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
190 Gerald Pfeifer <gerald@pfeifer.com>
192 * configure.ac: Check for getexecname.
193 * fileline.c: #include <errno.h>. Define getexecname if not
195 (fileline_initialize): Try to find the executable in a few
197 * print.c (error_callback): Only print the filename if it came
198 from the backtrace state.
199 * configure, config.h.in: Rebuild.
201 2012-10-29 Ian Lance Taylor <iant@google.com>
203 * mmap.c (backtrace_vector_release): Correct last patch: add
206 2012-10-29 Ian Lance Taylor <iant@google.com>
208 * mmap.c (backtrace_vector_release): Make sure freed block is
209 aligned on 8-byte boundary.
211 2012-10-26 Ian Lance Taylor <iant@google.com>
214 * posix.c (backtrace_open): Add does_not_exist parameter.
215 * elf.c (phdr_callback): Do not warn if shared library could not
217 * fileline.c (fileline_initialize): Update calls to
219 * internal.h (backtrace_open): Update declaration.
221 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
224 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
225 * configure: Regenerate.
227 2012-10-24 Ian Lance Taylor <iant@google.com>
230 * configure.ac: Check whether -funwind-tables option works.
231 * configure: Rebuild.
233 2012-10-11 Ian Lance Taylor <iant@google.com>
235 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
236 * configure: Rebuild.
238 2012-10-10 Ian Lance Taylor <iant@google.com>
240 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
243 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
245 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
247 2012-10-09 Ian Lance Taylor <iant@google.com>
249 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
250 (backtrace_dwarf_add): Likewise.
252 2012-10-09 Ian Lance Taylor <iant@google.com>
254 Add support for tracing through shared libraries.
255 * configure.ac: Check for link.h and dl_iterate_phdr.
256 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
257 ELF macros before #defining them.
258 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
260 (struct elf_syminfo_data): Add next field.
261 (elf_initialize_syminfo): Initialize next field.
262 (elf_add_syminfo_data): New static function.
263 (elf_add): New static function, broken out of
264 backtrace_initialize. Call backtrace_dwarf_add instead of
265 backtrace_dwarf_initialize.
266 (struct phdr_data): Define.
267 (phdr_callback): New static function.
268 (backtrace_initialize): Call elf_add.
269 * dwarf.c (struct dwarf_data): Add next and base_address fields.
270 (add_unit_addr): Add base_address parameter. Change all callers.
271 (add_unit_ranges, build_address_map): Likewise.
272 (add_line): Add ddata parameter. Change all callers.
273 (read_line_program, add_function_range): Likewise.
274 (dwarf_lookup_pc): New static function, broken out of
276 (dwarf_fileline): Call dwarf_lookup_pc.
277 (build_dwarf_data): New static function.
278 (backtrace_dwarf_add): New function.
279 (backtrace_dwarf_initialize): Remove.
280 * internal.h (backtrace_dwarf_initialize): Don't declare.
281 (backtrace_dwarf_add): Declare.
282 * configure, config.h.in: Rebuild.
284 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
286 * btest.c (f23): Avoid uninitialized variable warning.
288 2012-10-04 Ian Lance Taylor <iant@google.com>
290 * dwarf.c: If the system header files do not declare strnlen,
291 provide our own version.
293 2012-10-03 Ian Lance Taylor <iant@google.com>
295 * dwarf.c (read_uleb128): Fix overflow test.
296 (read_sleb128): Likewise.
297 (build_address_map): Don't change unit_buf.start.
299 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
302 * configure.ac (EXTRA_FLAGS): New.
303 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
304 * configure, Makefile.in: Regenerate.
306 2012-09-29 Ian Lance Taylor <iant@google.com>
309 * fileline.c (fileline_initialize): Pass errnum as -1 when
310 reporting that we could not read executable information after a
313 2012-09-27 Ian Lance Taylor <iant@google.com>
316 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
317 * Makefile.am: Add dependencies for all objects.
318 * configure, aclocal.m4, Makefile.in: Rebuild.
320 2012-09-27 Ian Lance Taylor <iant@google.com>
323 * elf.c (backtrace_initialize): Set *fileln_fn, not
326 2012-09-19 Ian Lance Taylor <iant@google.com>
328 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
330 * configure: Rebuild.
332 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
333 Ian Lance Taylor <iant@google.com>
335 * configure.ac (GCC_HEADER_STDINT): Invoke.
336 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
337 * btest.c: Don't include <stdint.h>.
339 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
341 2012-09-18 Ian Lance Taylor <iant@google.com>
344 * Makefile.am (AM_CPPFLAGS): Define.
345 (AM_CFLAGS): Remove -I options.
346 * Makefile.in: Rebuild.
348 2012-09-18 Ian Lance Taylor <iant@google.com>
350 * posix.c (O_BINARY): Define if not defined.
351 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
352 HAVE_FCNTL is defined.
353 * configure.ac: Test for the fcntl function.
354 * configure, config.h.in: Rebuild.
356 2012-09-18 Ian Lance Taylor <iant@google.com>
358 * btest.c (test1, test2, test3, test4): Add the unused attribute.
360 2012-09-18 Ian Lance Taylor <iant@google.com>
362 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
364 2012-09-18 Ian Lance Taylor <iant@google.com>
366 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
367 * mmapio.c: Don't define _GNU_SOURCE.
368 * configure, config.h.in: Rebuild.
370 2012-09-18 Ian Lance Taylor <iant@google.com>
372 * configure.ac: Check whether strnlen is declared.
373 * dwarf.c: Declare strnlen if not declared.
374 * configure, config.h.in: Rebuild.
376 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
378 * fileline.c: Include <stdlib.h>.
381 2012-09-17 Ian Lance Taylor <iant@google.com>
384 * nounwind.c (backtrace_full): Rename from backtrace. Add state
387 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
390 * nounwind.c (backtrace_simple): Add state parameter.
392 2012-09-17 Ian Lance Taylor <iant@google.com>
395 * unknown.c (unknown_fileline): Add state parameter, remove
396 fileline_data parameter, name error_callback parameter.
397 (backtrace_initialize): Add state parameter.
399 2012-09-17 Ian Lance Taylor <iant@google.com>
401 * Initial implementation.