1 2013-11-27 Ian Lance Taylor <iant@google.com>
3 * dwarf.c (find_address_ranges): New static function, broken out
5 (build_address_map): Call it.
6 * btest.c (check): Check for missing filename or function, rather
8 (f3): Check that enough frames were returned.
10 2013-11-19 Jakub Jelinek <jakub@redhat.com>
12 * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
13 * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
15 * btest.c (struct symdata): Add size field.
16 (callback_three): Add symsize argument. Copy it to the data->size
18 (f23): Set symdata.size to 0.
19 (test5): Likewise. If sizeof (int) > 1, lookup address of
20 ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
23 * atomic.c: Include sys/types.h.
25 2013-11-18 Ian Lance Taylor <iant@google.com>
27 * configure.ac: Check for support of __atomic extensions.
28 * internal.h: Declare or #define atomic functions for use in
31 * dwarf.c (dwarf_lookup_pc): Use atomic functions.
32 (dwarf_fileline, backtrace_dwarf_add): Likewise.
33 * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
34 (backtrace_initialize): Likewise.
35 * fileline.c (fileline_initialize): Likewise.
36 * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
37 * configure, config.h.in, Makefile.in: Rebuild.
39 2013-11-18 Jakub Jelinek <jakub@redhat.com>
41 * elf.c (SHN_UNDEF): Define.
42 (elf_initialize_syminfo): Add base_address argument. Ignore symbols
43 with st_shndx == SHN_UNDEF. Add base_address to address fields.
44 (elf_add): Adjust caller.
46 * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
48 2013-11-16 Ian Lance Taylor <iant@google.com>
50 * backtrace.h (backtrace_create_state): Correct comment about
53 2013-11-15 Ian Lance Taylor <iant@google.com>
55 * backtrace.h (backtrace_syminfo): Update comment and parameter
56 name to take any address, not just a PC value.
57 * elf.c (STT_OBJECT): Define.
58 (elf_nosyms): Rename parameter pc to addr.
59 (elf_symbol_search): Rename local variable pc to addr.
60 (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
61 (elf_syminfo): Rename parameter pc to addr.
62 * btest.c (global): New global variable.
66 2013-10-17 Ian Lance Taylor <iant@google.com>
68 * elf.c (elf_add): Don't get the wrong offsets if a debug section
71 2013-10-15 David Malcolm <dmalcolm@redhat.com>
73 * configure.ac: Add --enable-host-shared, setting up
74 pre-existing PIC_FLAG variable within Makefile.am et al.
75 * configure: Regenerate.
77 2013-09-20 Alan Modra <amodra@gmail.com>
79 * configure: Regenerate.
81 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
83 * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
85 2013-07-23 Alexander Monakov <amonakov@ispras.ru>
87 * elf.c (backtrace_initialize): Pass elf_fileline_fn to
88 dl_iterate_phdr callbacks.
90 2013-03-25 Ian Lance Taylor <iant@google.com>
92 * alloc.c: #include <sys/types.h>.
95 2013-01-31 Ian Lance Taylor <iant@google.com>
97 * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
98 (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
100 2013-01-25 Jakub Jelinek <jakub@redhat.com>
103 * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
104 attribute was not seen.
106 2013-01-16 Ian Lance Taylor <iant@google.com>
108 * dwarf.c (struct unit): Add filename and abs_filename fields.
109 (build_address_map): Set new fields when reading unit.
110 (dwarf_lookup_pc): If we don't find an entry in the line table,
111 just return the main file name.
113 2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
115 Update copyright years.
117 2013-01-01 Ian Lance Taylor <iant@google.com>
120 * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
121 $(MULTIBUILDTOP)/../../gcc/include.
122 * Makefile.in: Rebuild.
124 2013-01-01 Ian Lance Taylor <iant@google.com>
127 * mmap.c (backtrace_alloc): Don't call sync functions if not
129 (backtrace_free): Likewise.
131 2012-12-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
133 * mmapio.c: Define MAP_FAILED if not defined.
135 2012-12-11 Jakub Jelinek <jakub@redhat.com>
138 * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
139 * configure.ac: If --with-target-subdir, add -frandom-seed=$@
140 to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
142 * Makefile.in: Regenerated.
143 * configure: Regenerated.
145 2012-12-07 Jakub Jelinek <jakub@redhat.com>
148 * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
149 * Makefile.in: Regenerated.
151 2012-11-20 Ian Lance Taylor <iant@google.com>
153 * dwarf.c (read_attribute): Always clear val.
155 2012-11-13 Ian Lance Taylor <iant@google.com>
158 * configure.ac: Only add -Werror if building a target library.
159 * configure: Rebuild.
161 2012-11-12 Ian Lance Taylor <iant@google.com>
162 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
163 Gerald Pfeifer <gerald@pfeifer.com>
165 * configure.ac: Check for getexecname.
166 * fileline.c: #include <errno.h>. Define getexecname if not
168 (fileline_initialize): Try to find the executable in a few
170 * print.c (error_callback): Only print the filename if it came
171 from the backtrace state.
172 * configure, config.h.in: Rebuild.
174 2012-10-29 Ian Lance Taylor <iant@google.com>
176 * mmap.c (backtrace_vector_release): Correct last patch: add
179 2012-10-29 Ian Lance Taylor <iant@google.com>
181 * mmap.c (backtrace_vector_release): Make sure freed block is
182 aligned on 8-byte boundary.
184 2012-10-26 Ian Lance Taylor <iant@google.com>
187 * posix.c (backtrace_open): Add does_not_exist parameter.
188 * elf.c (phdr_callback): Do not warn if shared library could not
190 * fileline.c (fileline_initialize): Update calls to
192 * internal.h (backtrace_open): Update declaration.
194 2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu>
197 * configure.ac: Check for _Unwind_GetIPInfo function declaration.
198 * configure: Regenerate.
200 2012-10-24 Ian Lance Taylor <iant@google.com>
203 * configure.ac: Check whether -funwind-tables option works.
204 * configure: Rebuild.
206 2012-10-11 Ian Lance Taylor <iant@google.com>
208 * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
209 * configure: Rebuild.
211 2012-10-10 Ian Lance Taylor <iant@google.com>
213 * elf.c: Rename all Elf typedefs to start with b_elf, and be all
216 2012-10-10 Hans-Peter Nilsson <hp@bitrange.com>
218 * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
220 2012-10-09 Ian Lance Taylor <iant@google.com>
222 * dwarf.c (dwarf_fileline): Add cast to avoid warning.
223 (backtrace_dwarf_add): Likewise.
225 2012-10-09 Ian Lance Taylor <iant@google.com>
227 Add support for tracing through shared libraries.
228 * configure.ac: Check for link.h and dl_iterate_phdr.
229 * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
230 ELF macros before #defining them.
231 (dl_phdr_info, dl_iterate_phdr): Define if system does not have
233 (struct elf_syminfo_data): Add next field.
234 (elf_initialize_syminfo): Initialize next field.
235 (elf_add_syminfo_data): New static function.
236 (elf_add): New static function, broken out of
237 backtrace_initialize. Call backtrace_dwarf_add instead of
238 backtrace_dwarf_initialize.
239 (struct phdr_data): Define.
240 (phdr_callback): New static function.
241 (backtrace_initialize): Call elf_add.
242 * dwarf.c (struct dwarf_data): Add next and base_address fields.
243 (add_unit_addr): Add base_address parameter. Change all callers.
244 (add_unit_ranges, build_address_map): Likewise.
245 (add_line): Add ddata parameter. Change all callers.
246 (read_line_program, add_function_range): Likewise.
247 (dwarf_lookup_pc): New static function, broken out of
249 (dwarf_fileline): Call dwarf_lookup_pc.
250 (build_dwarf_data): New static function.
251 (backtrace_dwarf_add): New function.
252 (backtrace_dwarf_initialize): Remove.
253 * internal.h (backtrace_dwarf_initialize): Don't declare.
254 (backtrace_dwarf_add): Declare.
255 * configure, config.h.in: Rebuild.
257 2012-10-04 Gerald Pfeifer <gerald@pfeifer.com>
259 * btest.c (f23): Avoid uninitialized variable warning.
261 2012-10-04 Ian Lance Taylor <iant@google.com>
263 * dwarf.c: If the system header files do not declare strnlen,
264 provide our own version.
266 2012-10-03 Ian Lance Taylor <iant@google.com>
268 * dwarf.c (read_uleb128): Fix overflow test.
269 (read_sleb128): Likewise.
270 (build_address_map): Don't change unit_buf.start.
272 2012-10-02 Uros Bizjak <ubizjak@gmail.com>
275 * configure.ac (EXTRA_FLAGS): New.
276 * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
277 * configure, Makefile.in: Regenerate.
279 2012-09-29 Ian Lance Taylor <iant@google.com>
282 * fileline.c (fileline_initialize): Pass errnum as -1 when
283 reporting that we could not read executable information after a
286 2012-09-27 Ian Lance Taylor <iant@google.com>
289 * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
290 * Makefile.am: Add dependencies for all objects.
291 * configure, aclocal.m4, Makefile.in: Rebuild.
293 2012-09-27 Ian Lance Taylor <iant@google.com>
296 * elf.c (backtrace_initialize): Set *fileln_fn, not
299 2012-09-19 Ian Lance Taylor <iant@google.com>
301 * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
303 * configure: Rebuild.
305 2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
306 Ian Lance Taylor <iant@google.com>
308 * configure.ac (GCC_HEADER_STDINT): Invoke.
309 * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
310 * btest.c: Don't include <stdint.h>.
312 * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
314 2012-09-18 Ian Lance Taylor <iant@google.com>
317 * Makefile.am (AM_CPPFLAGS): Define.
318 (AM_CFLAGS): Remove -I options.
319 * Makefile.in: Rebuild.
321 2012-09-18 Ian Lance Taylor <iant@google.com>
323 * posix.c (O_BINARY): Define if not defined.
324 (backtrace_open): Pass O_BINARY to open. Only call fcntl if
325 HAVE_FCNTL is defined.
326 * configure.ac: Test for the fcntl function.
327 * configure, config.h.in: Rebuild.
329 2012-09-18 Ian Lance Taylor <iant@google.com>
331 * btest.c (test1, test2, test3, test4): Add the unused attribute.
333 2012-09-18 Ian Lance Taylor <iant@google.com>
335 * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
337 2012-09-18 Ian Lance Taylor <iant@google.com>
339 * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
340 * mmapio.c: Don't define _GNU_SOURCE.
341 * configure, config.h.in: Rebuild.
343 2012-09-18 Ian Lance Taylor <iant@google.com>
345 * configure.ac: Check whether strnlen is declared.
346 * dwarf.c: Declare strnlen if not declared.
347 * configure, config.h.in: Rebuild.
349 2012-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
351 * fileline.c: Include <stdlib.h>.
354 2012-09-17 Ian Lance Taylor <iant@google.com>
357 * nounwind.c (backtrace_full): Rename from backtrace. Add state
360 2012-09-17 Gerald Pfeifer <gerald@pfeifer.com>
363 * nounwind.c (backtrace_simple): Add state parameter.
365 2012-09-17 Ian Lance Taylor <iant@google.com>
368 * unknown.c (unknown_fileline): Add state parameter, remove
369 fileline_data parameter, name error_callback parameter.
370 (backtrace_initialize): Add state parameter.
372 2012-09-17 Ian Lance Taylor <iant@google.com>
374 * Initial implementation.