1 2013-12-06 Jakub Jelinek <jakub@redhat.com>
3 * elf.c (ET_DYN): Undefine and define again.
4 (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
5 return early -1 without closing the descriptor.
6 (struct phdr_data): Add exe_descriptor.
7 (phdr_callback): If pd->exe_descriptor is not -1, for very first
8 call if dlpi_name is NULL just call elf_add with the exe_descriptor,
9 otherwise backtrace_close the exe_descriptor if not -1. Adjust
11 (backtrace_initialize): Adjust call to elf_add. If it returns
12 -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
14 2013-12-05 Ian Lance Taylor <iant@google.com>
16 * alloc.c (backtrace_vector_finish): Add error_callback and data
17 parameters. Call backtrace_vector_release. Return address base.
18 * mmap.c (backtrace_vector_finish): Add error_callback and data
19 parameters. Return address base.
20 * dwarf.c (read_function_info): Get new address base from
21 backtrace_vector_finish.
22 * internal.h (backtrace_vector_finish): Update declaration.
24 2013-11-27 Ian Lance Taylor <iant@google.com>
26 * dwarf.c (find_address_ranges): New static function, broken out
28 (build_address_map): Call it.
29 * btest.c (check): Check for missing filename or function, rather
31 (f3): Check that enough frames were returned.
33 2013-11-19 Jakub Jelinek <jakub@redhat.com>
35 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
36 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
38 * btest.c (struct symdata): Add size field.
39 (callback_three): Add symsize argument. Copy it to the data->size
41 (f23): Set symdata.size to 0.
42 (test5): Likewise. If sizeof (int) > 1, lookup address of
43 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
46 * atomic.c: Include sys/types.h.
48 2013-11-18 Ian Lance Taylor <iant@google.com>
50 * configure.ac: Check for support of __atomic extensions.
51 * internal.h: Declare or #define atomic functions for use in
54 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
55 (dwarf_fileline, backtrace_dwarf_add): Likewise.
56 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
57 (backtrace_initialize): Likewise.
58 * fileline.c (fileline_initialize): Likewise.
59 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
60 * configure, config.h.in, Makefile.in: Rebuild.
62 2013-11-18 Jakub Jelinek <jakub@redhat.com>
64 * elf.c (SHN_UNDEF): Define.
65 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
66 with st_shndx == SHN_UNDEF. Add base_address to address fields.
67 (elf_add): Adjust caller.
69 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
71 2013-11-16 Ian Lance Taylor <iant@google.com>
73 * backtrace.h (backtrace_create_state): Correct comment about
76 2013-11-15 Ian Lance Taylor <iant@google.com>
78 * backtrace.h (backtrace_syminfo): Update comment and parameter
79 name to take any address, not just a PC value.
80 * elf.c (STT_OBJECT): Define.
81 (elf_nosyms): Rename parameter pc to addr.
82 (elf_symbol_search): Rename local variable pc to addr.
83 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
84 (elf_syminfo): Rename parameter pc to addr.
85 * btest.c (global): New global variable.
89 2013-10-17 Ian Lance Taylor <iant@google.com>
91 * elf.c (elf_add): Don't get the wrong offsets if a debug section
94 2013-10-15 David Malcolm <dmalcolm@redhat.com>
96 * configure.ac: Add --enable-host-shared, setting up
97 pre-existing PIC_FLAG variable within Makefile.am et al.
98 * configure: Regenerate.
100 2013-09-20 Alan Modra <amodra@gmail.com>
102 * configure: Regenerate.
104 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
106 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
108 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
110 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
111 dl_iterate_phdr callbacks.
113 2013-03-25 Ian Lance Taylor <iant@google.com>
115 * alloc.c: #include <sys/types.h>.
118 2013-01-31 Ian Lance Taylor <iant@google.com>
120 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
121 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
123 2013-01-25 Jakub Jelinek <jakub@redhat.com>
126 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
127 attribute was not seen.
129 2013-01-16 Ian Lance Taylor <iant@google.com>
131 * dwarf.c (struct unit): Add filename and abs_filename fields.
132 (build_address_map): Set new fields when reading unit.
133 (dwarf_lookup_pc): If we don't find an entry in the line table,
134 just return the main file name.
136 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
138 Update copyright years.
140 2013-01-01 Ian Lance Taylor <iant@google.com>
143 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
144 $(MULTIBUILDTOP)/../../gcc/include.
145 * Makefile.in: Rebuild.
147 2013-01-01 Ian Lance Taylor <iant@google.com>
150 * mmap.c (backtrace_alloc): Don't call sync functions if not
152 (backtrace_free): Likewise.
154 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
156 * mmapio.c: Define MAP_FAILED if not defined.
158 2012-12-11 Jakub Jelinek <jakub@redhat.com>
161 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
162 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
163 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
165 * Makefile.in: Regenerated.
166 * configure: Regenerated.
168 2012-12-07 Jakub Jelinek <jakub@redhat.com>
171 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
172 * Makefile.in: Regenerated.
174 2012-11-20 Ian Lance Taylor <iant@google.com>
176 * dwarf.c (read_attribute): Always clear val.
178 2012-11-13 Ian Lance Taylor <iant@google.com>
181 * configure.ac: Only add -Werror if building a target library.
182 * configure: Rebuild.
184 2012-11-12 Ian Lance Taylor <iant@google.com>
185 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
186 Gerald Pfeifer <gerald@pfeifer.com>
188 * configure.ac: Check for getexecname.
189 * fileline.c: #include <errno.h>. Define getexecname if not
191 (fileline_initialize): Try to find the executable in a few
193 * print.c (error_callback): Only print the filename if it came
194 from the backtrace state.
195 * configure, config.h.in: Rebuild.
197 2012-10-29 Ian Lance Taylor <iant@google.com>
199 * mmap.c (backtrace_vector_release): Correct last patch: add
202 2012-10-29 Ian Lance Taylor <iant@google.com>
204 * mmap.c (backtrace_vector_release): Make sure freed block is
205 aligned on 8-byte boundary.
207 2012-10-26 Ian Lance Taylor <iant@google.com>
210 * posix.c (backtrace_open): Add does_not_exist parameter.
211 * elf.c (phdr_callback): Do not warn if shared library could not
213 * fileline.c (fileline_initialize): Update calls to
215 * internal.h (backtrace_open): Update declaration.
217 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
220 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
221 * configure: Regenerate.
223 2012-10-24 Ian Lance Taylor <iant@google.com>
226 * configure.ac: Check whether -funwind-tables option works.
227 * configure: Rebuild.
229 2012-10-11 Ian Lance Taylor <iant@google.com>
231 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
232 * configure: Rebuild.
234 2012-10-10 Ian Lance Taylor <iant@google.com>
236 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
239 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
241 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
243 2012-10-09 Ian Lance Taylor <iant@google.com>
245 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
246 (backtrace_dwarf_add): Likewise.
248 2012-10-09 Ian Lance Taylor <iant@google.com>
250 Add support for tracing through shared libraries.
251 * configure.ac: Check for link.h and dl_iterate_phdr.
252 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
253 ELF macros before #defining them.
254 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
256 (struct elf_syminfo_data): Add next field.
257 (elf_initialize_syminfo): Initialize next field.
258 (elf_add_syminfo_data): New static function.
259 (elf_add): New static function, broken out of
260 backtrace_initialize. Call backtrace_dwarf_add instead of
261 backtrace_dwarf_initialize.
262 (struct phdr_data): Define.
263 (phdr_callback): New static function.
264 (backtrace_initialize): Call elf_add.
265 * dwarf.c (struct dwarf_data): Add next and base_address fields.
266 (add_unit_addr): Add base_address parameter. Change all callers.
267 (add_unit_ranges, build_address_map): Likewise.
268 (add_line): Add ddata parameter. Change all callers.
269 (read_line_program, add_function_range): Likewise.
270 (dwarf_lookup_pc): New static function, broken out of
272 (dwarf_fileline): Call dwarf_lookup_pc.
273 (build_dwarf_data): New static function.
274 (backtrace_dwarf_add): New function.
275 (backtrace_dwarf_initialize): Remove.
276 * internal.h (backtrace_dwarf_initialize): Don't declare.
277 (backtrace_dwarf_add): Declare.
278 * configure, config.h.in: Rebuild.
280 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
282 * btest.c (f23): Avoid uninitialized variable warning.
284 2012-10-04 Ian Lance Taylor <iant@google.com>
286 * dwarf.c: If the system header files do not declare strnlen,
287 provide our own version.
289 2012-10-03 Ian Lance Taylor <iant@google.com>
291 * dwarf.c (read_uleb128): Fix overflow test.
292 (read_sleb128): Likewise.
293 (build_address_map): Don't change unit_buf.start.
295 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
298 * configure.ac (EXTRA_FLAGS): New.
299 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
300 * configure, Makefile.in: Regenerate.
302 2012-09-29 Ian Lance Taylor <iant@google.com>
305 * fileline.c (fileline_initialize): Pass errnum as -1 when
306 reporting that we could not read executable information after a
309 2012-09-27 Ian Lance Taylor <iant@google.com>
312 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
313 * Makefile.am: Add dependencies for all objects.
314 * configure, aclocal.m4, Makefile.in: Rebuild.
316 2012-09-27 Ian Lance Taylor <iant@google.com>
319 * elf.c (backtrace_initialize): Set *fileln_fn, not
322 2012-09-19 Ian Lance Taylor <iant@google.com>
324 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
326 * configure: Rebuild.
328 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
329 Ian Lance Taylor <iant@google.com>
331 * configure.ac (GCC_HEADER_STDINT): Invoke.
332 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
333 * btest.c: Don't include <stdint.h>.
335 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
337 2012-09-18 Ian Lance Taylor <iant@google.com>
340 * Makefile.am (AM_CPPFLAGS): Define.
341 (AM_CFLAGS): Remove -I options.
342 * Makefile.in: Rebuild.
344 2012-09-18 Ian Lance Taylor <iant@google.com>
346 * posix.c (O_BINARY): Define if not defined.
347 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
348 HAVE_FCNTL is defined.
349 * configure.ac: Test for the fcntl function.
350 * configure, config.h.in: Rebuild.
352 2012-09-18 Ian Lance Taylor <iant@google.com>
354 * btest.c (test1, test2, test3, test4): Add the unused attribute.
356 2012-09-18 Ian Lance Taylor <iant@google.com>
358 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
360 2012-09-18 Ian Lance Taylor <iant@google.com>
362 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
363 * mmapio.c: Don't define _GNU_SOURCE.
364 * configure, config.h.in: Rebuild.
366 2012-09-18 Ian Lance Taylor <iant@google.com>
368 * configure.ac: Check whether strnlen is declared.
369 * dwarf.c: Declare strnlen if not declared.
370 * configure, config.h.in: Rebuild.
372 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
374 * fileline.c: Include <stdlib.h>.
377 2012-09-17 Ian Lance Taylor <iant@google.com>
380 * nounwind.c (backtrace_full): Rename from backtrace. Add state
383 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
386 * nounwind.c (backtrace_simple): Add state parameter.
388 2012-09-17 Ian Lance Taylor <iant@google.com>
391 * unknown.c (unknown_fileline): Add state parameter, remove
392 fileline_data parameter, name error_callback parameter.
393 (backtrace_initialize): Add state parameter.
395 2012-09-17 Ian Lance Taylor <iant@google.com>
397 * Initial implementation.