gcc/libbacktrace
Ian Lance Taylor e561a9920c Add support for tracing through shared libraries.
* configure.ac: Check for link.h and dl_iterate_phdr.
	* elf.c: #include <link.h> if system has dl_iterate_phdr.  #undef
	ELF macros before #defining them.
	(dl_phdr_info, dl_iterate_phdr): Define if system does not have
	dl_iterate_phdr.
	(struct elf_syminfo_data): Add next field.
	(elf_initialize_syminfo): Initialize next field.
	(elf_add_syminfo_data): New static function.
	(elf_add): New static function, broken out of
	backtrace_initialize.  Call backtrace_dwarf_add instead of
	backtrace_dwarf_initialize.
	(struct phdr_data): Define.
	(phdr_callback): New static function.
	(backtrace_initialize): Call elf_add.
	* dwarf.c (struct dwarf_data): Add next and base_address fields.
	(add_unit_addr): Add base_address parameter.  Change all callers.
	(add_unit_ranges, build_address_map): Likewise.
	(add_line): Add ddata parameter.  Change all callers.
	(read_line_program, add_function_range): Likewise.
	(dwarf_lookup_pc): New static function, broken out of
	dwarf_fileline.
	(dwarf_fileline): Call dwarf_lookup_pc.
	(build_dwarf_data): New static function.
	(backtrace_dwarf_add): New function.
	(backtrace_dwarf_initialize): Remove.
	* internal.h (backtrace_dwarf_initialize): Don't declare.
	(backtrace_dwarf_add): Declare.
	* configure, config.h.in: Rebuild.

From-SVN: r192267
2012-10-09 18:20:45 +00:00
..
aclocal.m4 re PR bootstrap/54732 (Installation failure: libbacktrace rebuilds upon install when built with "make bootstrap-lean") 2012-09-28 06:13:00 +00:00
alloc.c
backtrace-supported.h.in
backtrace.c
backtrace.h configure.ac (GCC_HEADER_STDINT): Invoke. 2012-09-19 13:41:33 +00:00
btest.c * btest.c (f23): Avoid uninitialized variable warning. 2012-10-04 20:16:08 +00:00
ChangeLog Add support for tracing through shared libraries. 2012-10-09 18:20:45 +00:00
config.h.in Add support for tracing through shared libraries. 2012-10-09 18:20:45 +00:00
configure Add support for tracing through shared libraries. 2012-10-09 18:20:45 +00:00
configure.ac Add support for tracing through shared libraries. 2012-10-09 18:20:45 +00:00
dwarf.c Add support for tracing through shared libraries. 2012-10-09 18:20:45 +00:00
elf.c Add support for tracing through shared libraries. 2012-10-09 18:20:45 +00:00
fileline.c re PR other/54749 (libbacktrace) 2012-09-29 17:50:54 +00:00
filetype.awk
internal.h Add support for tracing through shared libraries. 2012-10-09 18:20:45 +00:00
Makefile.am re PR other/54761 (FAIL log) 2012-10-02 15:14:25 +02:00
Makefile.in re PR other/54761 (FAIL log) 2012-10-02 15:14:25 +02:00
mmap.c Fix libbacktrace bootstrap with gcc 4.4 2012-09-18 09:02:50 +00:00
mmapio.c configure.ac: Add AC_USE_SYSTEM_EXTENSIONS. 2012-09-18 16:36:48 +00:00
nounwind.c re PR bootstrap/54611 (Bootstrap failure: conflicting types for 'backtrace_simple') 2012-09-17 21:14:51 +00:00
posix.c posix.c (O_BINARY): Define if not defined. 2012-09-18 18:06:28 +00:00
print.c
read.c
README
simple.c
state.c
unknown.c

The libbacktrace library
Initially written by Ian Lance Taylor <iant@google.com>

The libbacktrace library may be linked into a program or library and
used to produce symbolic backtraces.  Sample uses would be to print a
detailed backtrace when an error occurs or to gather detailed
profiling information.

The libbacktrace library is provided under a BSD license.  See the
source files for the exact license text.

The public functions are declared and documented in the header file
backtrace.h, which should be #include'd by a user of the library.

Building libbacktrace will generate a file backtrace-supported.h,
which a user of the library may use to determine whether backtraces
will work.  See the source file backtrace-supported.h.in for the
macros that it defines.

As of September 2012, libbacktrace only supports ELF executables with
DWARF debugging information.  The library is written to make it
straightforward to add support for other object file and debugging
formats.