diff --git a/toolkit/crashreporter/client/crashreporter_win.cpp b/toolkit/crashreporter/client/crashreporter_win.cpp index 4dd5fd04560..1e4003954a4 100644 --- a/toolkit/crashreporter/client/crashreporter_win.cpp +++ b/toolkit/crashreporter/client/crashreporter_win.cpp @@ -255,11 +255,11 @@ static DWORD WINAPI SendThreadProc(LPVOID param) query_parameters[UTF8ToWide(i->first)] = UTF8ToWide(i->second); } - finishedOk = (google_breakpad::CrashReportSender - ::SendCrashReport(td->send_url, - query_parameters, - td->dumpFile, - td->server_response) + google_breakpad::CrashReportSender sender(L""); + finishedOk = (sender.SendCrashReport(td->send_url, + query_parameters, + td->dumpFile, + td->server_response) == google_breakpad::RESULT_SUCCEEDED); } PostMessage(td->hDlg, WM_UPLOADCOMPLETE, finishedOk ? 1 : 0, 0); diff --git a/toolkit/crashreporter/google-breakpad/INSTALL b/toolkit/crashreporter/google-breakpad/INSTALL index 23e5f25d0e5..5458714e1e2 100755 --- a/toolkit/crashreporter/google-breakpad/INSTALL +++ b/toolkit/crashreporter/google-breakpad/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -10,7 +10,10 @@ unlimited permission to copy, distribute and modify it. Basic Installation ================== -These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -78,7 +78,7 @@ details on some of the pertinent environment variables. by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. @@ -87,17 +87,15 @@ Compiling For Multiple Architectures You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== @@ -190,12 +188,12 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== diff --git a/toolkit/crashreporter/google-breakpad/Makefile.am b/toolkit/crashreporter/google-breakpad/Makefile.am index 1cf45cc7407..c78c12930b5 100755 --- a/toolkit/crashreporter/google-breakpad/Makefile.am +++ b/toolkit/crashreporter/google-breakpad/Makefile.am @@ -75,6 +75,8 @@ src_libbreakpad_la_SOURCES = \ src/processor/contained_range_map.h \ src/processor/contained_range_map-inl.h \ src/processor/linked_ptr.h \ + src/processor/logging.h \ + src/processor/logging.cc \ src/processor/minidump.cc \ src/processor/minidump_processor.cc \ src/processor/pathname_stripper.cc \ @@ -126,14 +128,22 @@ TESTS_ENVIRONMENT = src_processor_address_map_unittest_SOURCES = \ src/processor/address_map_unittest.cc +src_processor_address_map_unittest_LDADD = \ + src/processor/logging.lo \ + src/processor/pathname_stripper.lo src_processor_basic_source_line_resolver_unittest_SOURCES = \ src/processor/basic_source_line_resolver_unittest.cc src_processor_basic_source_line_resolver_unittest_LDADD = \ - src/processor/basic_source_line_resolver.lo + src/processor/basic_source_line_resolver.lo \ + src/processor/pathname_stripper.lo \ + src/processor/logging.lo src_processor_contained_range_map_unittest_SOURCES = \ src/processor/contained_range_map_unittest.cc +src_processor_contained_range_map_unittest_LDADD = \ + src/processor/logging.lo \ + src/processor/pathname_stripper.lo src_processor_minidump_processor_unittest_SOURCES = \ src/processor/minidump_processor_unittest.cc @@ -141,8 +151,10 @@ src_processor_minidump_processor_unittest_LDADD = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ src/processor/call_stack.lo \ + src/processor/logging.lo \ src/processor/minidump_processor.lo \ src/processor/minidump.lo \ + src/processor/pathname_stripper.lo \ src/processor/process_state.lo \ src/processor/stackwalker.lo \ src/processor/stackwalker_ppc.lo \ @@ -155,9 +167,15 @@ src_processor_pathname_stripper_unittest_LDADD = \ src_processor_postfix_evaluator_unittest_SOURCES = \ src/processor/postfix_evaluator_unittest.cc +src_processor_postfix_evaluator_unittest_LDADD = \ + src/processor/logging.lo \ + src/processor/pathname_stripper.lo src_processor_range_map_unittest_SOURCES = \ src/processor/range_map_unittest.cc +src_processor_range_map_unittest_LDADD = \ + src/processor/logging.lo \ + src/processor/pathname_stripper.lo src_processor_stackwalker_selftest_SOURCES = \ src/processor/stackwalker_selftest.cc @@ -165,7 +183,9 @@ src_processor_stackwalker_selftest_LDADD = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ src/processor/call_stack.lo \ + src/processor/logging.lo \ src/processor/minidump.lo \ + src/processor/pathname_stripper.lo \ src/processor/stackwalker.lo \ src/processor/stackwalker_ppc.lo \ src/processor/stackwalker_x86.lo @@ -178,7 +198,9 @@ src_processor_minidump_dump_SOURCES = \ src/processor/minidump_dump.cc src_processor_minidump_dump_LDADD = \ src/processor/basic_code_modules.lo \ - src/processor/minidump.lo + src/processor/logging.lo \ + src/processor/minidump.lo \ + src/processor/pathname_stripper.lo src_processor_minidump_stackwalk_SOURCES = \ src/processor/minidump_stackwalk.cc @@ -186,6 +208,7 @@ src_processor_minidump_stackwalk_LDADD = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ src/processor/call_stack.lo \ + src/processor/logging.lo \ src/processor/minidump.lo \ src/processor/minidump_processor.lo \ src/processor/pathname_stripper.lo \ diff --git a/toolkit/crashreporter/google-breakpad/Makefile.in b/toolkit/crashreporter/google-breakpad/Makefile.in index 69d4291032e..c6283f55a51 100755 --- a/toolkit/crashreporter/google-breakpad/Makefile.in +++ b/toolkit/crashreporter/google-breakpad/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -46,15 +46,11 @@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -81,19 +77,19 @@ check_PROGRAMS = src/processor/address_map_unittest$(EXEEXT) \ @SELFTEST_TRUE@ src/processor/stackwalker_selftest noinst_PROGRAMS = +subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/configure $(top_srcdir)/src/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS autotools/config.guess \ autotools/config.sub autotools/depcomp autotools/install-sh \ autotools/ltmain.sh autotools/missing -subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = @@ -111,8 +107,8 @@ src_libbreakpad_la_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp am_src_libbreakpad_la_OBJECTS = src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ - src/processor/call_stack.lo src/processor/minidump.lo \ - src/processor/minidump_processor.lo \ + src/processor/call_stack.lo src/processor/logging.lo \ + src/processor/minidump.lo src/processor/minidump_processor.lo \ src/processor/pathname_stripper.lo \ src/processor/process_state.lo \ src/processor/simple_symbol_supplier.lo \ @@ -127,23 +123,27 @@ am_src_processor_address_map_unittest_OBJECTS = \ src/processor/address_map_unittest.$(OBJEXT) src_processor_address_map_unittest_OBJECTS = \ $(am_src_processor_address_map_unittest_OBJECTS) -src_processor_address_map_unittest_LDADD = $(LDADD) +src_processor_address_map_unittest_DEPENDENCIES = \ + src/processor/logging.lo src/processor/pathname_stripper.lo am_src_processor_basic_source_line_resolver_unittest_OBJECTS = \ src/processor/basic_source_line_resolver_unittest.$(OBJEXT) src_processor_basic_source_line_resolver_unittest_OBJECTS = $(am_src_processor_basic_source_line_resolver_unittest_OBJECTS) src_processor_basic_source_line_resolver_unittest_DEPENDENCIES = \ - src/processor/basic_source_line_resolver.lo + src/processor/basic_source_line_resolver.lo \ + src/processor/pathname_stripper.lo src/processor/logging.lo am_src_processor_contained_range_map_unittest_OBJECTS = \ src/processor/contained_range_map_unittest.$(OBJEXT) src_processor_contained_range_map_unittest_OBJECTS = \ $(am_src_processor_contained_range_map_unittest_OBJECTS) -src_processor_contained_range_map_unittest_LDADD = $(LDADD) +src_processor_contained_range_map_unittest_DEPENDENCIES = \ + src/processor/logging.lo src/processor/pathname_stripper.lo am_src_processor_minidump_dump_OBJECTS = \ src/processor/minidump_dump.$(OBJEXT) src_processor_minidump_dump_OBJECTS = \ $(am_src_processor_minidump_dump_OBJECTS) src_processor_minidump_dump_DEPENDENCIES = \ - src/processor/basic_code_modules.lo src/processor/minidump.lo + src/processor/basic_code_modules.lo src/processor/logging.lo \ + src/processor/minidump.lo src/processor/pathname_stripper.lo am_src_processor_minidump_processor_unittest_OBJECTS = \ src/processor/minidump_processor_unittest.$(OBJEXT) src_processor_minidump_processor_unittest_OBJECTS = \ @@ -151,8 +151,9 @@ src_processor_minidump_processor_unittest_OBJECTS = \ src_processor_minidump_processor_unittest_DEPENDENCIES = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ - src/processor/call_stack.lo \ + src/processor/call_stack.lo src/processor/logging.lo \ src/processor/minidump_processor.lo src/processor/minidump.lo \ + src/processor/pathname_stripper.lo \ src/processor/process_state.lo src/processor/stackwalker.lo \ src/processor/stackwalker_ppc.lo \ src/processor/stackwalker_x86.lo @@ -163,8 +164,8 @@ src_processor_minidump_stackwalk_OBJECTS = \ src_processor_minidump_stackwalk_DEPENDENCIES = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ - src/processor/call_stack.lo src/processor/minidump.lo \ - src/processor/minidump_processor.lo \ + src/processor/call_stack.lo src/processor/logging.lo \ + src/processor/minidump.lo src/processor/minidump_processor.lo \ src/processor/pathname_stripper.lo \ src/processor/process_state.lo \ src/processor/simple_symbol_supplier.lo \ @@ -180,12 +181,14 @@ am_src_processor_postfix_evaluator_unittest_OBJECTS = \ src/processor/postfix_evaluator_unittest.$(OBJEXT) src_processor_postfix_evaluator_unittest_OBJECTS = \ $(am_src_processor_postfix_evaluator_unittest_OBJECTS) -src_processor_postfix_evaluator_unittest_LDADD = $(LDADD) +src_processor_postfix_evaluator_unittest_DEPENDENCIES = \ + src/processor/logging.lo src/processor/pathname_stripper.lo am_src_processor_range_map_unittest_OBJECTS = \ src/processor/range_map_unittest.$(OBJEXT) src_processor_range_map_unittest_OBJECTS = \ $(am_src_processor_range_map_unittest_OBJECTS) -src_processor_range_map_unittest_LDADD = $(LDADD) +src_processor_range_map_unittest_DEPENDENCIES = \ + src/processor/logging.lo src/processor/pathname_stripper.lo am_src_processor_stackwalker_selftest_OBJECTS = \ src/processor/stackwalker_selftest.$(OBJEXT) src_processor_stackwalker_selftest_OBJECTS = \ @@ -193,29 +196,32 @@ src_processor_stackwalker_selftest_OBJECTS = \ src_processor_stackwalker_selftest_DEPENDENCIES = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ - src/processor/call_stack.lo src/processor/minidump.lo \ + src/processor/call_stack.lo src/processor/logging.lo \ + src/processor/minidump.lo src/processor/pathname_stripper.lo \ src/processor/stackwalker.lo src/processor/stackwalker_ppc.lo \ src/processor/stackwalker_x86.lo SCRIPTS = $(noinst_SCRIPTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src +DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(src_libbreakpad_la_SOURCES) \ $(src_processor_address_map_unittest_SOURCES) \ $(src_processor_basic_source_line_resolver_unittest_SOURCES) \ @@ -254,8 +260,6 @@ GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -283,6 +287,7 @@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -295,6 +300,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -304,19 +310,17 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ -SELFTEST_FALSE = @SELFTEST_FALSE@ -SELFTEST_TRUE = @SELFTEST_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -328,6 +332,7 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) @@ -355,8 +360,11 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ # This allows #includes to be relative to src/ AM_CPPFLAGS = -I$(top_srcdir)/src @@ -395,6 +403,8 @@ src_libbreakpad_la_SOURCES = \ src/processor/contained_range_map.h \ src/processor/contained_range_map-inl.h \ src/processor/linked_ptr.h \ + src/processor/logging.h \ + src/processor/logging.cc \ src/processor/minidump.cc \ src/processor/minidump_processor.cc \ src/processor/pathname_stripper.cc \ @@ -424,15 +434,25 @@ TESTS_ENVIRONMENT = src_processor_address_map_unittest_SOURCES = \ src/processor/address_map_unittest.cc +src_processor_address_map_unittest_LDADD = \ + src/processor/logging.lo \ + src/processor/pathname_stripper.lo + src_processor_basic_source_line_resolver_unittest_SOURCES = \ src/processor/basic_source_line_resolver_unittest.cc src_processor_basic_source_line_resolver_unittest_LDADD = \ - src/processor/basic_source_line_resolver.lo + src/processor/basic_source_line_resolver.lo \ + src/processor/pathname_stripper.lo \ + src/processor/logging.lo src_processor_contained_range_map_unittest_SOURCES = \ src/processor/contained_range_map_unittest.cc +src_processor_contained_range_map_unittest_LDADD = \ + src/processor/logging.lo \ + src/processor/pathname_stripper.lo + src_processor_minidump_processor_unittest_SOURCES = \ src/processor/minidump_processor_unittest.cc @@ -440,8 +460,10 @@ src_processor_minidump_processor_unittest_LDADD = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ src/processor/call_stack.lo \ + src/processor/logging.lo \ src/processor/minidump_processor.lo \ src/processor/minidump.lo \ + src/processor/pathname_stripper.lo \ src/processor/process_state.lo \ src/processor/stackwalker.lo \ src/processor/stackwalker_ppc.lo \ @@ -456,9 +478,17 @@ src_processor_pathname_stripper_unittest_LDADD = \ src_processor_postfix_evaluator_unittest_SOURCES = \ src/processor/postfix_evaluator_unittest.cc +src_processor_postfix_evaluator_unittest_LDADD = \ + src/processor/logging.lo \ + src/processor/pathname_stripper.lo + src_processor_range_map_unittest_SOURCES = \ src/processor/range_map_unittest.cc +src_processor_range_map_unittest_LDADD = \ + src/processor/logging.lo \ + src/processor/pathname_stripper.lo + src_processor_stackwalker_selftest_SOURCES = \ src/processor/stackwalker_selftest.cc @@ -466,7 +496,9 @@ src_processor_stackwalker_selftest_LDADD = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ src/processor/call_stack.lo \ + src/processor/logging.lo \ src/processor/minidump.lo \ + src/processor/pathname_stripper.lo \ src/processor/stackwalker.lo \ src/processor/stackwalker_ppc.lo \ src/processor/stackwalker_x86.lo @@ -477,7 +509,9 @@ src_processor_minidump_dump_SOURCES = \ src_processor_minidump_dump_LDADD = \ src/processor/basic_code_modules.lo \ - src/processor/minidump.lo + src/processor/logging.lo \ + src/processor/minidump.lo \ + src/processor/pathname_stripper.lo src_processor_minidump_stackwalk_SOURCES = \ src/processor/minidump_stackwalk.cc @@ -486,6 +520,7 @@ src_processor_minidump_stackwalk_LDADD = \ src/processor/basic_code_modules.lo \ src/processor/basic_source_line_resolver.lo \ src/processor/call_stack.lo \ + src/processor/logging.lo \ src/processor/minidump.lo \ src/processor/minidump_processor.lo \ src/processor/pathname_stripper.lo \ @@ -611,7 +646,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) src/config.h: src/stamp-h1 @if test ! -f $@; then \ rm -f src/stamp-h1; \ - $(MAKE) src/stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) src/stamp-h1; \ else :; fi src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status @@ -626,7 +661,7 @@ distclean-hdr: -rm -f src/config.h src/stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ @@ -637,7 +672,7 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ @@ -652,10 +687,10 @@ clean-libLTLIBRARIES: rm -f "$${dir}/so_locations"; \ done src/processor/$(am__dirstamp): - @$(mkdir_p) src/processor + @$(MKDIR_P) src/processor @: > src/processor/$(am__dirstamp) src/processor/$(DEPDIR)/$(am__dirstamp): - @$(mkdir_p) src/processor/$(DEPDIR) + @$(MKDIR_P) src/processor/$(DEPDIR) @: > src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/basic_code_modules.lo: src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) @@ -664,6 +699,8 @@ src/processor/basic_source_line_resolver.lo: \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/call_stack.lo: src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) +src/processor/logging.lo: src/processor/$(am__dirstamp) \ + src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/minidump.lo: src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/minidump_processor.lo: src/processor/$(am__dirstamp) \ @@ -682,13 +719,13 @@ src/processor/stackwalker_ppc.lo: src/processor/$(am__dirstamp) \ src/processor/stackwalker_x86.lo: src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/$(am__dirstamp): - @$(mkdir_p) src + @$(MKDIR_P) src @: > src/$(am__dirstamp) src/libbreakpad.la: $(src_libbreakpad_la_OBJECTS) $(src_libbreakpad_la_DEPENDENCIES) src/$(am__dirstamp) - $(CXXLINK) -rpath $(libdir) $(src_libbreakpad_la_LDFLAGS) $(src_libbreakpad_la_OBJECTS) $(src_libbreakpad_la_LIBADD) $(LIBS) + $(CXXLINK) -rpath $(libdir) $(src_libbreakpad_la_OBJECTS) $(src_libbreakpad_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ @@ -733,60 +770,60 @@ src/processor/address_map_unittest.$(OBJEXT): \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/address_map_unittest$(EXEEXT): $(src_processor_address_map_unittest_OBJECTS) $(src_processor_address_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/address_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_address_map_unittest_LDFLAGS) $(src_processor_address_map_unittest_OBJECTS) $(src_processor_address_map_unittest_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_address_map_unittest_OBJECTS) $(src_processor_address_map_unittest_LDADD) $(LIBS) src/processor/basic_source_line_resolver_unittest.$(OBJEXT): \ src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/basic_source_line_resolver_unittest$(EXEEXT): $(src_processor_basic_source_line_resolver_unittest_OBJECTS) $(src_processor_basic_source_line_resolver_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/basic_source_line_resolver_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_basic_source_line_resolver_unittest_LDFLAGS) $(src_processor_basic_source_line_resolver_unittest_OBJECTS) $(src_processor_basic_source_line_resolver_unittest_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_basic_source_line_resolver_unittest_OBJECTS) $(src_processor_basic_source_line_resolver_unittest_LDADD) $(LIBS) src/processor/contained_range_map_unittest.$(OBJEXT): \ src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/contained_range_map_unittest$(EXEEXT): $(src_processor_contained_range_map_unittest_OBJECTS) $(src_processor_contained_range_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/contained_range_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_contained_range_map_unittest_LDFLAGS) $(src_processor_contained_range_map_unittest_OBJECTS) $(src_processor_contained_range_map_unittest_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_contained_range_map_unittest_OBJECTS) $(src_processor_contained_range_map_unittest_LDADD) $(LIBS) src/processor/minidump_dump.$(OBJEXT): src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/minidump_dump$(EXEEXT): $(src_processor_minidump_dump_OBJECTS) $(src_processor_minidump_dump_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/minidump_dump$(EXEEXT) - $(CXXLINK) $(src_processor_minidump_dump_LDFLAGS) $(src_processor_minidump_dump_OBJECTS) $(src_processor_minidump_dump_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_minidump_dump_OBJECTS) $(src_processor_minidump_dump_LDADD) $(LIBS) src/processor/minidump_processor_unittest.$(OBJEXT): \ src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/minidump_processor_unittest$(EXEEXT): $(src_processor_minidump_processor_unittest_OBJECTS) $(src_processor_minidump_processor_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/minidump_processor_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_minidump_processor_unittest_LDFLAGS) $(src_processor_minidump_processor_unittest_OBJECTS) $(src_processor_minidump_processor_unittest_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_minidump_processor_unittest_OBJECTS) $(src_processor_minidump_processor_unittest_LDADD) $(LIBS) src/processor/minidump_stackwalk.$(OBJEXT): \ src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/minidump_stackwalk$(EXEEXT): $(src_processor_minidump_stackwalk_OBJECTS) $(src_processor_minidump_stackwalk_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/minidump_stackwalk$(EXEEXT) - $(CXXLINK) $(src_processor_minidump_stackwalk_LDFLAGS) $(src_processor_minidump_stackwalk_OBJECTS) $(src_processor_minidump_stackwalk_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_minidump_stackwalk_OBJECTS) $(src_processor_minidump_stackwalk_LDADD) $(LIBS) src/processor/pathname_stripper_unittest.$(OBJEXT): \ src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/pathname_stripper_unittest$(EXEEXT): $(src_processor_pathname_stripper_unittest_OBJECTS) $(src_processor_pathname_stripper_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/pathname_stripper_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_pathname_stripper_unittest_LDFLAGS) $(src_processor_pathname_stripper_unittest_OBJECTS) $(src_processor_pathname_stripper_unittest_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_pathname_stripper_unittest_OBJECTS) $(src_processor_pathname_stripper_unittest_LDADD) $(LIBS) src/processor/postfix_evaluator_unittest.$(OBJEXT): \ src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/postfix_evaluator_unittest$(EXEEXT): $(src_processor_postfix_evaluator_unittest_OBJECTS) $(src_processor_postfix_evaluator_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/postfix_evaluator_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_postfix_evaluator_unittest_LDFLAGS) $(src_processor_postfix_evaluator_unittest_OBJECTS) $(src_processor_postfix_evaluator_unittest_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_postfix_evaluator_unittest_OBJECTS) $(src_processor_postfix_evaluator_unittest_LDADD) $(LIBS) src/processor/range_map_unittest.$(OBJEXT): \ src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/range_map_unittest$(EXEEXT): $(src_processor_range_map_unittest_OBJECTS) $(src_processor_range_map_unittest_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/range_map_unittest$(EXEEXT) - $(CXXLINK) $(src_processor_range_map_unittest_LDFLAGS) $(src_processor_range_map_unittest_OBJECTS) $(src_processor_range_map_unittest_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_range_map_unittest_OBJECTS) $(src_processor_range_map_unittest_LDADD) $(LIBS) src/processor/stackwalker_selftest.$(OBJEXT): \ src/processor/$(am__dirstamp) \ src/processor/$(DEPDIR)/$(am__dirstamp) src/processor/stackwalker_selftest$(EXEEXT): $(src_processor_stackwalker_selftest_OBJECTS) $(src_processor_stackwalker_selftest_DEPENDENCIES) src/processor/$(am__dirstamp) @rm -f src/processor/stackwalker_selftest$(EXEEXT) - $(CXXLINK) $(src_processor_stackwalker_selftest_LDFLAGS) $(src_processor_stackwalker_selftest_OBJECTS) $(src_processor_stackwalker_selftest_LDADD) $(LIBS) + $(CXXLINK) $(src_processor_stackwalker_selftest_OBJECTS) $(src_processor_stackwalker_selftest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -799,6 +836,8 @@ mostlyclean-compile: -rm -f src/processor/call_stack.$(OBJEXT) -rm -f src/processor/call_stack.lo -rm -f src/processor/contained_range_map_unittest.$(OBJEXT) + -rm -f src/processor/logging.$(OBJEXT) + -rm -f src/processor/logging.lo -rm -f src/processor/minidump.$(OBJEXT) -rm -f src/processor/minidump.lo -rm -f src/processor/minidump_dump.$(OBJEXT) @@ -832,6 +871,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/basic_source_line_resolver_unittest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/call_stack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/contained_range_map_unittest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/logging.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/minidump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/minidump_dump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/minidump_processor.Plo@am__quote@ @@ -849,25 +889,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/processor/$(DEPDIR)/stackwalker_x86.Plo@am__quote@ .cc.o: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \ -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \ -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \ -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -882,10 +922,9 @@ clean-libtool: distclean-libtool: -rm -f libtool -uninstall-info-am: install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) - test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)" + test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(dist_doc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -950,9 +989,9 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ srcdir=$(srcdir); export srcdir; \ - list='$(TESTS)'; \ + list=' $(TESTS) '; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ @@ -961,7 +1000,7 @@ check-TESTS: $(TESTS) if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ + *$$ws$$tst$$ws*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ @@ -973,7 +1012,7 @@ check-TESTS: $(TESTS) elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ + *$$ws$$tst$$ws*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ @@ -1024,24 +1063,22 @@ check-TESTS: $(TESTS) distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/autotools $(distdir)/src $(distdir)/src/client $(distdir)/src/client/mac/handler $(distdir)/src/client/mac/handler/minidump_test.xcodeproj $(distdir)/src/client/windows $(distdir)/src/client/windows/handler $(distdir)/src/client/windows/sender $(distdir)/src/common $(distdir)/src/common/mac $(distdir)/src/common/windows $(distdir)/src/processor $(distdir)/src/processor/testdata $(distdir)/src/processor/testdata/symbols/kernel32.pdb/BCE8785C57B44245A669896B6A19B9542 $(distdir)/src/processor/testdata/symbols/test_app.pdb/5A9832E5287241C1838ED98914E9B7FF1 $(distdir)/src/tools/mac/crash_report $(distdir)/src/tools/mac/crash_report/crash_report.xcodeproj $(distdir)/src/tools/mac/dump_syms $(distdir)/src/tools/mac/dump_syms/dump_syms.xcodeproj $(distdir)/src/tools/mac/symupload $(distdir)/src/tools/mac/symupload/symupload.xcodeproj $(distdir)/src/tools/windows/converter $(distdir)/src/tools/windows/dump_syms $(distdir)/src/tools/windows/dump_syms/testdata $(distdir)/src/tools/windows/symupload - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -1055,7 +1092,7 @@ distdir: $(DISTFILES) -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz @@ -1130,7 +1167,7 @@ distcheck: dist $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -1158,7 +1195,7 @@ install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -1212,12 +1249,20 @@ info-am: install-data-am: install-dist_docDATA +install-dvi: install-dvi-am + install-exec-am: install-binPROGRAMS install-libLTLIBRARIES +install-html: install-html-am + install-info: install-info-am install-man: +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -1241,7 +1286,9 @@ ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \ - uninstall-info-am uninstall-libLTLIBRARIES + uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ clean clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ @@ -1252,14 +1299,15 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ - install-dist_docDATA install-exec install-exec-am install-info \ - install-info-am install-libLTLIBRARIES install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dist_docDATA uninstall-info-am \ - uninstall-libLTLIBRARIES + install-dist_docDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-dist_docDATA uninstall-libLTLIBRARIES libtool: $(LIBTOOL_DEPS) diff --git a/toolkit/crashreporter/google-breakpad/aclocal.m4 b/toolkit/crashreporter/google-breakpad/aclocal.m4 index 12d1afbe9a1..8db1f44bdd3 100755 --- a/toolkit/crashreporter/google-breakpad/aclocal.m4 +++ b/toolkit/crashreporter/google-breakpad/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,6 +11,11 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 48 AC_PROG_LIBTOOL @@ -6388,7 +6393,7 @@ SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6398,14 +6403,29 @@ AC_MSG_RESULT([$SED]) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -6462,14 +6482,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -6478,8 +6498,10 @@ AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -6493,15 +6515,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -6529,6 +6550,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -6594,6 +6616,7 @@ AC_CACHE_CHECK([dependency style of $depcc], depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -6646,7 +6669,8 @@ if test "x$enable_dependency_tracking" != xno; then AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -6671,8 +6695,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -6731,8 +6756,8 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6755,16 +6780,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -6784,6 +6813,9 @@ m4_ifval([$2], AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -6819,6 +6851,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) @@ -6854,7 +6890,7 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -6932,14 +6968,14 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -6955,6 +6991,7 @@ AC_SUBST($1)]) # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then @@ -6965,7 +7002,7 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6973,60 +7010,23 @@ fi # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) # Helper functions for option handling. -*- Autoconf -*- @@ -7155,9 +7155,21 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. diff --git a/toolkit/crashreporter/google-breakpad/autotools/config.guess b/toolkit/crashreporter/google-breakpad/autotools/config.guess index e3ef63f6cb4..396482d6cb5 100755 --- a/toolkit/crashreporter/google-breakpad/autotools/config.guess +++ b/toolkit/crashreporter/google-breakpad/autotools/config.guess @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-12-13' +timestamp='2006-07-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -106,7 +107,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -206,8 +207,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -764,7 +768,14 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -779,8 +790,11 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[345]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks @@ -817,6 +831,9 @@ EOF arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -851,7 +868,11 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -870,7 +891,11 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) @@ -967,7 +992,7 @@ EOF LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -977,7 +1002,11 @@ EOF LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit diff --git a/toolkit/crashreporter/google-breakpad/autotools/config.sub b/toolkit/crashreporter/google-breakpad/autotools/config.sub index 285164700dd..fab0aa35566 100755 --- a/toolkit/crashreporter/google-breakpad/autotools/config.sub +++ b/toolkit/crashreporter/google-breakpad/autotools/config.sub @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-12-11' +timestamp='2006-09-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -240,7 +241,7 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ @@ -248,7 +249,8 @@ case $basic_machine in | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -268,26 +270,25 @@ case $basic_machine in | mn10200 | mn10300 \ | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; - m32c) - basic_machine=$basic_machine-unknown - ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -317,7 +318,7 @@ case $basic_machine in | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ + | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ @@ -328,7 +329,7 @@ case $basic_machine in | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -350,29 +351,28 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; - m32c-*) - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -818,6 +818,12 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -904,6 +910,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -1120,7 +1130,7 @@ case $basic_machine in sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1193,7 +1203,8 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ @@ -1208,7 +1219,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos*) + | -skyos* | -haiku* | -rdos* | -toppers*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1360,6 +1371,12 @@ else # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1369,9 +1386,9 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 diff --git a/toolkit/crashreporter/google-breakpad/autotools/depcomp b/toolkit/crashreporter/google-breakpad/autotools/depcomp index 04701da536f..ca5ea4e1ef9 100755 --- a/toolkit/crashreporter/google-breakpad/autotools/depcomp +++ b/toolkit/crashreporter/google-breakpad/autotools/depcomp @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-07-09.11 +scriptversion=2006-10-15.18 -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -91,7 +92,20 @@ gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -276,6 +290,46 @@ icc) rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +342,13 @@ tru64) if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is diff --git a/toolkit/crashreporter/google-breakpad/autotools/install-sh b/toolkit/crashreporter/google-breakpad/autotools/install-sh index 4d4a9519eaf..4fbbae7b7ff 100755 --- a/toolkit/crashreporter/google-breakpad/autotools/install-sh +++ b/toolkit/crashreporter/google-breakpad/autotools/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-05-14.22 +scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,15 +39,24 @@ scriptversion=2005-05-14.22 # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" @@ -58,7 +67,13 @@ stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -chmodcmd="$chmodprog 0755" +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= @@ -95,7 +110,7 @@ Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in -c) shift continue;; @@ -111,9 +126,15 @@ while test -n "$1"; do --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" + -m) mode=$2 shift shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac continue;; -o) chowncmd="$chownprog $2" @@ -136,25 +157,33 @@ while test -n "$1"; do --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done + --) shift break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac done -if test -z "$1"; then +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -164,6 +193,33 @@ if test -z "$1"; then exit 0 fi +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do # Protect names starting with `-'. @@ -173,15 +229,11 @@ do if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -208,53 +260,188 @@ do echo "$0: $dstarg: Is a directory" >&2 exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + obsolete_mkdir_used=false - # Make sure that the destination directory exists. + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi - pathcomp= + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -262,10 +449,9 @@ do # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -276,10 +462,10 @@ do { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not @@ -291,11 +477,12 @@ do # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else @@ -304,16 +491,13 @@ do } && # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + $doit $mvcmd "$dsttmp" "$dst" } - } - fi || { (exit 1); exit 1; } -done + } || exit 1 -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} + trap '' 0 + fi +done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/toolkit/crashreporter/google-breakpad/autotools/missing b/toolkit/crashreporter/google-breakpad/autotools/missing index 894e786e16c..1c8ff7049d8 100755 --- a/toolkit/crashreporter/google-breakpad/autotools/missing +++ b/toolkit/crashreporter/google-breakpad/autotools/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -33,6 +33,8 @@ if test $# -eq 0; then fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +46,7 @@ fi msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +79,7 @@ Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -106,7 +109,7 @@ esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case "$1" in +case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -135,7 +138,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg. You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file @@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 diff --git a/toolkit/crashreporter/google-breakpad/configure b/toolkit/crashreporter/google-breakpad/configure index 7143684ed14..97ba42dd7f1 100755 --- a/toolkit/crashreporter/google-breakpad/configure +++ b/toolkit/crashreporter/google-breakpad/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for breakpad 0.1. +# Generated by GNU Autoconf 2.61 for breakpad 0.1. # # Report bugs to . # @@ -12,7 +12,8 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -21,10 +22,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -217,7 +221,7 @@ test \$exitcode = 0) || { (exit 1); exit 1; } else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -235,7 +239,6 @@ IFS=$as_save_IFS # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -244,10 +247,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : _ASEOF @@ -255,7 +260,6 @@ _ASEOF CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -264,10 +268,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : (as_func_return () { @@ -514,19 +520,28 @@ else as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -721,36 +736,36 @@ ac_unique_file="README" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif" @@ -794,6 +809,7 @@ target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA +am__isrc CYGPATH_W PACKAGE VERSION @@ -866,6 +882,7 @@ target_alias CC CFLAGS LDFLAGS +LIBS CPPFLAGS CPP CXX @@ -979,10 +996,10 @@ do -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) @@ -998,10 +1015,10 @@ do -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ @@ -1195,19 +1212,19 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) @@ -1476,6 +1493,7 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor @@ -1550,7 +1568,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF breakpad configure 0.1 -generated by GNU Autoconf 2.60 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -1564,7 +1582,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by breakpad $as_me 0.1, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1949,7 +1967,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -am__api_version="1.9" +am__api_version='1.10' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1986,7 +2005,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2101,38 +2120,53 @@ else echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" else - mkdir_p='$(install_sh) -d' + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" fi fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac for ac_prog in gawk mawk nawk awk do @@ -2152,7 +2186,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2215,12 +2249,16 @@ else fi rmdir .tst 2>/dev/null -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } + fi fi # test whether we have cygpath @@ -2263,7 +2301,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right @@ -2287,7 +2325,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2327,7 +2365,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2367,7 +2405,7 @@ else fi fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -2487,7 +2525,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2527,7 +2565,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2584,7 +2622,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2625,7 +2663,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2683,7 +2721,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2727,7 +2765,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2868,7 +2906,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in @@ -2896,6 +2934,12 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2907,8 +2951,6 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -3086,27 +3128,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -3161,27 +3186,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -3216,27 +3224,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -3272,27 +3263,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -3408,27 +3382,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 @@ -3517,9 +3474,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -3529,7 +3484,6 @@ fi - depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 @@ -3597,6 +3551,7 @@ else depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -3626,9 +3581,7 @@ fi echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -3691,17 +3644,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3735,17 +3681,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3810,17 +3749,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3854,17 +3786,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3925,7 +3850,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3969,7 +3894,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4082,27 +4007,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -4157,27 +4065,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 @@ -4212,27 +4103,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -4268,27 +4142,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 @@ -4396,6 +4253,7 @@ else depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -4425,9 +4283,7 @@ fi echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= @@ -4672,7 +4528,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4754,7 +4610,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -5235,7 +5091,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5238 "configure"' > conftest.$ac_ext + echo '#line 5094 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5359,27 +5215,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 @@ -5388,7 +5228,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5468,27 +5308,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -5664,27 +5487,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 @@ -5747,27 +5553,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5803,17 +5592,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5930,17 +5712,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -5974,17 +5749,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -6049,17 +5817,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -6093,17 +5854,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -6144,7 +5898,7 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -6162,7 +5916,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6188,7 +5942,7 @@ fi fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -6206,7 +5960,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6313,27 +6067,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -6376,27 +6113,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 @@ -6851,7 +6571,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6891,7 +6611,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6947,7 +6667,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6987,7 +6707,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7043,7 +6763,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7083,7 +6803,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7400,11 +7120,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7403: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7123: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7407: \$? = $ac_status" >&5 + echo "$as_me:7127: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7668,11 +7388,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7671: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7391: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7675: \$? = $ac_status" >&5 + echo "$as_me:7395: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7772,11 +7492,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7775: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7495: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7779: \$? = $ac_status" >&5 + echo "$as_me:7499: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8252,27 +7972,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -8286,7 +7990,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -8327,27 +8031,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -8361,7 +8049,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -9609,27 +9297,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -9638,7 +9310,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -9720,27 +9392,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 @@ -9749,7 +9405,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 @@ -9799,27 +9455,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 @@ -9828,7 +9468,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -9900,27 +9540,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -9929,7 +9553,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 @@ -9979,27 +9603,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -10008,7 +9616,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10059,27 +9667,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -10088,7 +9680,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10139,27 +9731,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 @@ -10168,7 +9744,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10224,7 +9800,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -11445,7 +11005,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -11487,27 +11047,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -11521,7 +11065,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -12692,11 +12236,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12695: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12239: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12699: \$? = $ac_status" >&5 + echo "$as_me:12243: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12796,11 +12340,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12799: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12343: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12803: \$? = $ac_status" >&5 + echo "$as_me:12347: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14366,11 +13910,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14369: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13913: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14373: \$? = $ac_status" >&5 + echo "$as_me:13917: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14470,11 +14014,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14473: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14017: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14477: \$? = $ac_status" >&5 + echo "$as_me:14021: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14940,27 +14484,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -14974,7 +14502,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -15005,27 +14533,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -15039,7 +14551,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -16700,11 +16212,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16703: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16215: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16707: \$? = $ac_status" >&5 + echo "$as_me:16219: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16968,11 +16480,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16971: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16483: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16975: \$? = $ac_status" >&5 + echo "$as_me:16487: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17072,11 +16584,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17075: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16587: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17079: \$? = $ac_status" >&5 + echo "$as_me:16591: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17552,27 +17064,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -17586,7 +17082,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -17627,27 +17123,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -17661,7 +17141,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -19805,27 +19285,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -19979,9 +19442,7 @@ else selftest=false fi - - -if test x$selftest = xtrue; then + if test x$selftest = xtrue; then SELFTEST_TRUE= SELFTEST_FALSE='#' else @@ -20140,7 +19601,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -20149,10 +19611,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -20376,19 +19841,28 @@ else as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -20404,7 +19878,7 @@ exec 6>&1 # values after options handling. ac_log=" This file was extended by breakpad $as_me 0.1, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -20433,7 +19907,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -20457,7 +19931,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ breakpad config.status 0.1 -configured by $0, generated by GNU Autoconf 2.60, +configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. @@ -20467,6 +19941,7 @@ gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -20674,6 +20149,7 @@ target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim @@ -20730,7 +20206,6 @@ ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim CXXCPP!$CXXCPP$ac_delim -F77!$F77$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -20772,6 +20247,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim @@ -20782,7 +20258,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -21009,6 +20485,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -21062,6 +20543,7 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out @@ -21226,8 +20708,9 @@ echo "$as_me: executing $ac_file commands" >&6;} # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ diff --git a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/dynamic_images.cc b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/dynamic_images.cc index e2a9d485441..32a57e82bec 100644 --- a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/dynamic_images.cc +++ b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/dynamic_images.cc @@ -104,6 +104,19 @@ void DynamicImage::CalculateMemoryInfo() { slide_ = 0; } +void DynamicImage::Print() { + const char *path = GetFilePath(); + if (!path) { + path = "(unknown)"; + } + printf("%p: %s\n", GetLoadAddress(), path); + mach_header *header = GetMachHeader(); + MachHeader(*header).Print(); + printf("vmaddr\t\t: %p\n", reinterpret_cast(GetVMAddr())); + printf("vmsize\t\t: %d\n", GetVMSize()); + printf("slide\t\t: %d\n", GetVMAddrSlide()); +} + #pragma mark - //============================================================================== @@ -123,7 +136,7 @@ void DynamicImages::ReadImageInfoForTask() { // which lives in "dyld". This structure contains information about all // of the loaded dynamic images. struct nlist &list = l[0]; - list.n_un.n_name = "_dyld_all_image_infos"; + list.n_un.n_name = const_cast("_dyld_all_image_infos"); nlist("/usr/lib/dyld", &list); if (list.n_value) { diff --git a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/dynamic_images.h b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/dynamic_images.h index 2242899c8ea..497f4eb48ab 100644 --- a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/dynamic_images.h +++ b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/dynamic_images.h @@ -147,19 +147,8 @@ class DynamicImage { } // Debugging - void Print() { - char *path = GetFilePath(); - if (!path) { - path = "(unknown)"; - } - printf("%p: %s\n", GetLoadAddress(), path); - mach_header *header = GetMachHeader(); - MachHeader(*header).Print(); - printf("vmaddr\t\t: %p\n", reinterpret_cast(GetVMAddr())); - printf("vmsize\t\t: %d\n", GetVMSize()); - printf("slide\t\t: %d\n", GetVMAddrSlide()); - } - + void Print(); + private: friend class DynamicImages; diff --git a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/minidump_generator.cc b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/minidump_generator.cc index 5ae61351921..f6d1811de12 100644 --- a/toolkit/crashreporter/google-breakpad/src/client/mac/handler/minidump_generator.cc +++ b/toolkit/crashreporter/google-breakpad/src/client/mac/handler/minidump_generator.cc @@ -47,28 +47,36 @@ using MacStringUtils::ConvertToString; using MacStringUtils::IntegerValueAtIndex; namespace google_breakpad { - + +// constructor when generating from within the crashed process MinidumpGenerator::MinidumpGenerator() : exception_type_(0), exception_code_(0), exception_thread_(0), crashing_task_(mach_task_self()), - handler_thread_(mach_thread_self()) { - dynamic_images_ = new DynamicImages(mach_task_self()); + handler_thread_(mach_thread_self()), + dynamic_images_(NULL) { GatherSystemInformation(); } +// constructor when generating from a different process than the crashed process MinidumpGenerator::MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread) : exception_type_(0), exception_code_(0), exception_thread_(0), crashing_task_(crashing_task), handler_thread_(handler_thread) { - dynamic_images_ = new DynamicImages(crashing_task_); + if (crashing_task != mach_task_self()) { + dynamic_images_ = new DynamicImages(crashing_task_); + } else { + dynamic_images_ = NULL; + } + GatherSystemInformation(); } MinidumpGenerator::~MinidumpGenerator() { + delete dynamic_images_; } char MinidumpGenerator::build_string_[16]; @@ -240,12 +248,14 @@ bool MinidumpGenerator::WriteStackFromStartAddress( if (!memory.Allocate(size)) return false; - void *stack_memory = ReadTaskMemory(crashing_task_, (void*)start_addr, size); - - bool result = memory.Copy(stack_memory, size); - - free(stack_memory); - + bool result; + if (dynamic_images_) { + void *stack_memory = ReadTaskMemory(crashing_task_, (void*)start_addr, size); + result = memory.Copy(stack_memory, size); + free(stack_memory); + } else { + result = memory.Copy(reinterpret_cast(start_addr), size); + } stack_location->start_of_memory_range = start_addr; stack_location->memory = memory.location(); @@ -493,6 +503,35 @@ bool MinidumpGenerator::WriteSystemInfoStream( break; case CPU_TYPE_I386: info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_X86; +#ifdef __i386__ + // ebx is used for PIC code, so we need + // to preserve it. +#define cpuid(op,eax,ebx,ecx,edx) \ + asm ("pushl %%ebx \n\t" \ + "cpuid \n\t" \ + "movl %%ebx,%1 \n\t" \ + "popl %%ebx" \ + : "=a" (eax), \ + "=g" (ebx), \ + "=c" (ecx), \ + "=d" (edx) \ + : "0" (op)) + int unused, unused2; + // get vendor id + cpuid(0, unused, info_ptr->cpu.x86_cpu_info.vendor_id[0], + info_ptr->cpu.x86_cpu_info.vendor_id[2], + info_ptr->cpu.x86_cpu_info.vendor_id[1]); + // get version and feature info + cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2, + info_ptr->cpu.x86_cpu_info.feature_information); + // family + info_ptr->processor_level = + (info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8; + // 0xMMSS (Model, Stepping) + info_ptr->processor_revision = + (info_ptr->cpu.x86_cpu_info.version_information & 0xF) | + ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4); +#endif // __i386__ break; default: info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; @@ -518,42 +557,95 @@ bool MinidumpGenerator::WriteSystemInfoStream( bool MinidumpGenerator::WriteModuleStream(unsigned int index, MDRawModule *module) { - DynamicImage *image = dynamic_images_->GetImage(index); + if (dynamic_images_) { + // we're in a different process than the crashed process + DynamicImage *image = dynamic_images_->GetImage(index); - if (!image) - return false; + if (!image) + return false; - const mach_header *header = image->GetMachHeader(); + const mach_header *header = image->GetMachHeader(); - if (!header) - return false; + if (!header) + return false; - int cpu_type = header->cputype; + int cpu_type = header->cputype; - memset(module, 0, sizeof(MDRawModule)); + memset(module, 0, sizeof(MDRawModule)); - MDLocationDescriptor string_location; + MDLocationDescriptor string_location; - const char* name = image->GetFilePath(); - if (!writer_.WriteString(name, 0, &string_location)) - return false; + const char* name = image->GetFilePath(); + if (!writer_.WriteString(name, 0, &string_location)) + return false; - module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide(); - module->size_of_image = image->GetVMSize(); - module->module_name_rva = string_location.rva; + module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide(); + module->size_of_image = image->GetVMSize(); + module->module_name_rva = string_location.rva; - if (!WriteCVRecord(module, cpu_type, name)) { - return false; + if (!WriteCVRecord(module, cpu_type, name)) { + return false; + } + } else { + // we're getting module info in the crashed process + const struct mach_header *header = _dyld_get_image_header(index); + + if (!header) + return false; + + int cpu_type = header->cputype; + unsigned long slide = _dyld_get_image_vmaddr_slide(index); + const char* name = _dyld_get_image_name(index); + const struct load_command *cmd = + reinterpret_cast(header + 1); + + memset(module, 0, sizeof(MDRawModule)); + + for (unsigned int i = 0; cmd && (i < header->ncmds); i++) { + if (cmd->cmd == LC_SEGMENT) { + const struct segment_command *seg = + reinterpret_cast(cmd); + if (!strcmp(seg->segname, "__TEXT")) { + MDLocationDescriptor string_location; + + if (!writer_.WriteString(name, 0, &string_location)) + return false; + + module->base_of_image = seg->vmaddr + slide; + module->size_of_image = seg->vmsize; + module->module_name_rva = string_location.rva; + + if (!WriteCVRecord(module, cpu_type, name)) + return false; + + return true; + } + } + + cmd = reinterpret_cast((char *)cmd + cmd->cmdsize); + } } - + return true; } int MinidumpGenerator::FindExecutableModule() { - int index = dynamic_images_->GetExecutableImageIndex(); + if (dynamic_images_) { + int index = dynamic_images_->GetExecutableImageIndex(); - if (index >= 0) { - return index; + if (index >= 0) { + return index; + } + } else { + int image_count = _dyld_image_count(); + const struct mach_header *header; + + for (int index = 0; index < image_count; ++index) { + header = _dyld_get_image_header(index); + + if (header->filetype == MH_EXECUTE) + return index; + } } // failed - just use the first image @@ -565,7 +657,7 @@ bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type, TypedMDRVA cv(&writer_); // Only return the last path component of the full module path - char *module_name = strrchr(module_path, '/'); + const char *module_name = strrchr(module_path, '/'); // Increment past the slash if (module_name) @@ -616,7 +708,8 @@ bool MinidumpGenerator::WriteModuleListStream( if (!_dyld_present()) return false; - int image_count = dynamic_images_->GetImageCount(); + int image_count = dynamic_images_ ? + dynamic_images_->GetImageCount() : _dyld_image_count(); if (!list.AllocateObjectAndArray(image_count, MD_MODULE_SIZE)) return false; diff --git a/toolkit/crashreporter/google-breakpad/src/client/minidump_file_writer-inl.h b/toolkit/crashreporter/google-breakpad/src/client/minidump_file_writer-inl.h index 98958be0a2d..4505b4f2cc6 100755 --- a/toolkit/crashreporter/google-breakpad/src/client/minidump_file_writer-inl.h +++ b/toolkit/crashreporter/google-breakpad/src/client/minidump_file_writer-inl.h @@ -76,7 +76,8 @@ inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) { template inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index, - void *src, size_t size) { + const void *src, + size_t size) { assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY); return writer_->Copy(position_ + sizeof(MDType) + index * size, src, size); } diff --git a/toolkit/crashreporter/google-breakpad/src/client/minidump_file_writer.h b/toolkit/crashreporter/google-breakpad/src/client/minidump_file_writer.h index 9747c7dca72..39fc90b810e 100755 --- a/toolkit/crashreporter/google-breakpad/src/client/minidump_file_writer.h +++ b/toolkit/crashreporter/google-breakpad/src/client/minidump_file_writer.h @@ -228,7 +228,7 @@ class TypedMDRVA : public UntypedMDRVA { // Copy |size| bytes starting at |str| to |index| // Must have been allocated using AllocateObjectAndArray(). // Return true on success, or false on failure - bool CopyIndexAfterObject(unsigned int index, void *src, size_t size); + bool CopyIndexAfterObject(unsigned int index, const void *src, size_t size); // Write data_ bool Flush(); diff --git a/toolkit/crashreporter/google-breakpad/src/client/windows/handler/exception_handler.cc b/toolkit/crashreporter/google-breakpad/src/client/windows/handler/exception_handler.cc index ba14e4d223c..5a1444c2bb3 100755 --- a/toolkit/crashreporter/google-breakpad/src/client/windows/handler/exception_handler.cc +++ b/toolkit/crashreporter/google-breakpad/src/client/windows/handler/exception_handler.cc @@ -64,6 +64,7 @@ ExceptionHandler::ExceptionHandler(const wstring &dump_path, minidump_write_dump_(NULL), installed_handler_(install_handler), previous_filter_(NULL), + previous_pch_(NULL), handler_thread_(0), handler_critical_section_(), handler_start_semaphore_(NULL), @@ -124,6 +125,8 @@ ExceptionHandler::ExceptionHandler(const wstring &dump_path, previous_iph_ = _set_invalid_parameter_handler(HandleInvalidParameter); #endif // _MSC_VER >= 1400 + previous_pch_ = _set_purecall_handler(HandlePureVirtualCall); + LeaveCriticalSection(&handler_stack_critical_section_); } } @@ -142,6 +145,8 @@ ExceptionHandler::~ExceptionHandler() { _set_invalid_parameter_handler(previous_iph_); #endif // _MSC_VER >= 1400 + _set_purecall_handler(previous_pch_); + if (handler_stack_->back() == this) { handler_stack_->pop_back(); } else { @@ -233,6 +238,7 @@ class AutoExceptionHandler { #if _MSC_VER >= 1400 // MSVC 2005/8 _set_invalid_parameter_handler(handler_->previous_iph_); #endif // _MSC_VER >= 1400 + _set_purecall_handler(handler_->previous_pch_); } ~AutoExceptionHandler() { @@ -241,6 +247,7 @@ class AutoExceptionHandler { #if _MSC_VER >= 1400 // MSVC 2005/8 _set_invalid_parameter_handler(ExceptionHandler::HandleInvalidParameter); #endif // _MSC_VER >= 1400 + _set_purecall_handler(ExceptionHandler::HandlePureVirtualCall); EnterCriticalSection(&ExceptionHandler::handler_stack_critical_section_); --ExceptionHandler::handler_stack_index_; @@ -349,6 +356,33 @@ void ExceptionHandler::HandleInvalidParameter(const wchar_t *expression, } #endif // _MSC_VER >= 1400 +// static +void ExceptionHandler::HandlePureVirtualCall() { + AutoExceptionHandler auto_exception_handler; + ExceptionHandler *current_handler = auto_exception_handler.get_handler(); + + MDRawAssertionInfo assertion; + memset(&assertion, 0, sizeof(assertion)); + assertion.type = MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL; + + if (!current_handler->WriteMinidumpOnHandlerThread(NULL, &assertion)) { + if (current_handler->previous_pch_) { + // The handler didn't fully handle the exception. Give it to the + // previous purecall handler. + current_handler->previous_pch_(); + } else { + // If there's no previous handler, return and let _purecall handle it. + // This will just put up an assertion dialog. + return; + } + } + + // The handler either took care of the invalid parameter problem itself, + // or passed it on to another handler. "Swallow" it by exiting, paralleling + // the behavior of "swallowing" exceptions. + exit(0); +} + bool ExceptionHandler::WriteMinidumpOnHandlerThread( EXCEPTION_POINTERS *exinfo, MDRawAssertionInfo *assertion) { EnterCriticalSection(&handler_critical_section_); diff --git a/toolkit/crashreporter/google-breakpad/src/client/windows/handler/exception_handler.h b/toolkit/crashreporter/google-breakpad/src/client/windows/handler/exception_handler.h index f7bfe6cb33d..e4b3f3bb2a3 100755 --- a/toolkit/crashreporter/google-breakpad/src/client/windows/handler/exception_handler.h +++ b/toolkit/crashreporter/google-breakpad/src/client/windows/handler/exception_handler.h @@ -183,6 +183,10 @@ class ExceptionHandler { uintptr_t reserved); #endif // _MSC_VER >= 1400 + // This function will be called by the CRT when a pure virtual + // function is called. + static void HandlePureVirtualCall(); + // This is called on the exception thread or on another thread that // the user wishes to produce a dump from. It calls // WriteMinidumpWithException on the handler thread, avoiding stack @@ -254,6 +258,10 @@ class ExceptionHandler { _invalid_parameter_handler previous_iph_; #endif // _MSC_VER >= 1400 + // The CRT allows you to override the default handler for pure + // virtual function calls. + _purecall_handler previous_pch_; + // The exception handler thread. HANDLE handler_thread_; diff --git a/toolkit/crashreporter/google-breakpad/src/client/windows/sender/crash_report_sender.cc b/toolkit/crashreporter/google-breakpad/src/client/windows/sender/crash_report_sender.cc index 793d69868ef..453adb63b51 100755 --- a/toolkit/crashreporter/google-breakpad/src/client/windows/sender/crash_report_sender.cc +++ b/toolkit/crashreporter/google-breakpad/src/client/windows/sender/crash_report_sender.cc @@ -33,17 +33,43 @@ #include "client/windows/sender/crash_report_sender.h" #include "common/windows/http_upload.h" +#if _MSC_VER < 1400 // MSVC 2005/8 +// Older MSVC doesn't have fscanf_s, but they are compatible as long as +// we don't use the string conversions (%s/%c/%S/%C). +#define fscanf_s fscanf +#endif + namespace google_breakpad { -// static +static const char kCheckpointSignature[] = "GBP1\n"; + +CrashReportSender::CrashReportSender(const wstring &checkpoint_file) + : checkpoint_file_(checkpoint_file), + max_reports_per_day_(-1), + last_sent_date_(-1), + reports_sent_(0) { + FILE *fd; + if (OpenCheckpointFile(L"r", &fd) == 0) { + ReadCheckpoint(fd); + fclose(fd); + } +} + ReportResult CrashReportSender::SendCrashReport( const wstring &url, const map ¶meters, const wstring &dump_file_name, wstring *report_code) { + int today = GetCurrentDate(); + if (today == last_sent_date_ && + max_reports_per_day_ != -1 && + reports_sent_ >= max_reports_per_day_) { + return RESULT_THROTTLED; + } int http_response = 0; bool result = HTTPUpload::SendRequest( url, parameters, dump_file_name, L"upload_file_minidump", report_code, &http_response); + ReportSent(today); if (result) { return RESULT_SUCCEEDED; @@ -55,4 +81,58 @@ ReportResult CrashReportSender::SendCrashReport( } } +void CrashReportSender::ReadCheckpoint(FILE *fd) { + char buf[128]; + if (!fgets(buf, sizeof(buf), fd) || + strcmp(buf, kCheckpointSignature) != 0) { + return; + } + + if (fscanf_s(fd, "%d\n", &last_sent_date_) != 1) { + last_sent_date_ = -1; + return; + } + if (fscanf_s(fd, "%d\n", &reports_sent_) != 1) { + reports_sent_ = 0; + return; + } +} + +void CrashReportSender::ReportSent(int today) { + // Update the report stats + if (today != last_sent_date_) { + last_sent_date_ = today; + reports_sent_ = 0; + } + ++reports_sent_; + + // Update the checkpoint file + FILE *fd; + if (OpenCheckpointFile(L"w", &fd) == 0) { + fputs(kCheckpointSignature, fd); + fprintf(fd, "%d\n", last_sent_date_); + fprintf(fd, "%d\n", reports_sent_); + fclose(fd); + } +} + +int CrashReportSender::GetCurrentDate() const { + SYSTEMTIME system_time; + GetSystemTime(&system_time); + return (system_time.wYear * 10000) + (system_time.wMonth * 100) + + system_time.wDay; +} + +int CrashReportSender::OpenCheckpointFile(const wchar_t *mode, FILE **fd) { +#if _MSC_VER >= 1400 // MSVC 2005/8 + return _wfopen_s(fd, checkpoint_file_.c_str(), mode); +#else + *fd = _wfopen(checkpoint_file_.c_str(), mode); + if (*fd == NULL) { + return errno; + } + return 0; +#endif +} + } // namespace google_breakpad diff --git a/toolkit/crashreporter/google-breakpad/src/client/windows/sender/crash_report_sender.h b/toolkit/crashreporter/google-breakpad/src/client/windows/sender/crash_report_sender.h index bc0f295bc9c..da1ed0af8b9 100755 --- a/toolkit/crashreporter/google-breakpad/src/client/windows/sender/crash_report_sender.h +++ b/toolkit/crashreporter/google-breakpad/src/client/windows/sender/crash_report_sender.h @@ -54,11 +54,29 @@ typedef enum { RESULT_FAILED = 0, // Failed to communicate with the server; try later. RESULT_REJECTED, // Successfully sent the crash report, but the // server rejected it; don't resend this report. - RESULT_SUCCEEDED // The server accepted the crash report. + RESULT_SUCCEEDED, // The server accepted the crash report. + RESULT_THROTTLED // No attempt was made to send the crash report, because + // we exceeded the maximum reports per day. } ReportResult; class CrashReportSender { public: + // Initializes a CrashReportSender instance. + // If checkpoint_file is non-empty, breakpad will persist crash report + // state to this file. A checkpoint file is required for + // set_max_reports_per_day() to function properly. + explicit CrashReportSender(const wstring &checkpoint_file); + ~CrashReportSender() {} + + // Sets the maximum number of crash reports that will be sent in a 24-hour + // period. This uses the state persisted to the checkpoint file. + // The default value of -1 means that there is no limit on reports sent. + void set_max_reports_per_day(int reports) { + max_reports_per_day_ = reports; + } + + int max_reports_per_day() const { return max_reports_per_day_; } + // Sends the specified minidump file, along with the map of // name value pairs, as a multipart POST request to the given URL. // Parameter names must contain only printable ASCII characters, @@ -69,18 +87,35 @@ class CrashReportSender { // the return value is RESULT_SUCCEEDED), a code uniquely identifying the // report will be returned in report_code. // (Otherwise, report_code will be unchanged.) - static ReportResult SendCrashReport(const wstring &url, - const map ¶meters, - const wstring &dump_file_name, - wstring *report_code); + ReportResult SendCrashReport(const wstring &url, + const map ¶meters, + const wstring &dump_file_name, + wstring *report_code); private: - // No instances of this class should be created. - // Disallow all constructors, destructors, and operator=. - CrashReportSender(); + // Reads persistent state from a checkpoint file. + void ReadCheckpoint(FILE *fd); + + // Called when a new report has been sent, to update the checkpoint state. + void ReportSent(int today); + + // Returns today's date (UTC) formatted as YYYYMMDD. + int GetCurrentDate() const; + + // Opens the checkpoint file with the specified mode. + // Returns zero on success, or an error code on failure. + int OpenCheckpointFile(const wchar_t *mode, FILE **fd); + + wstring checkpoint_file_; + int max_reports_per_day_; + // The last date on which we sent a report, expressed as YYYYMMDD. + int last_sent_date_; + // Number of reports sent on last_sent_date_ + int reports_sent_; + + // Disallow copy constructor and operator= explicit CrashReportSender(const CrashReportSender &); void operator=(const CrashReportSender &); - ~CrashReportSender(); }; } // namespace google_breakpad diff --git a/toolkit/crashreporter/google-breakpad/src/common/mac/dump_syms.mm b/toolkit/crashreporter/google-breakpad/src/common/mac/dump_syms.mm index 4feb78801ec..7b5e8e63e14 100644 --- a/toolkit/crashreporter/google-breakpad/src/common/mac/dump_syms.mm +++ b/toolkit/crashreporter/google-breakpad/src/common/mac/dump_syms.mm @@ -276,11 +276,8 @@ static const int kTextSection = 1; int line = list->n_desc; - // We only care about line number information in __TEXT __text + // __TEXT __text section uint32_t mainSection = [[sectionNumbers_ objectForKey:@"__TEXT__text" ] unsignedLongValue]; - if(list->n_sect != mainSection) { - line = 0; - } // Extract debugging information: // Doc: http://developer.apple.com/documentation/DeveloperTools/gdb/stabs/stabs_toc.html diff --git a/toolkit/crashreporter/google-breakpad/src/google_breakpad/common/minidump_format.h b/toolkit/crashreporter/google-breakpad/src/google_breakpad/common/minidump_format.h index c83274fc8e6..9606dff9023 100644 --- a/toolkit/crashreporter/google-breakpad/src/google_breakpad/common/minidump_format.h +++ b/toolkit/crashreporter/google-breakpad/src/google_breakpad/common/minidump_format.h @@ -867,7 +867,7 @@ typedef struct { typedef union { struct { - u_int32_t vendor_id[3]; /* cpuid 0: eax, ebx, ecx */ + u_int32_t vendor_id[3]; /* cpuid 0: ebx, edx, ecx */ u_int32_t version_information; /* cpuid 1: eax */ u_int32_t feature_information; /* cpuid 1: edx */ u_int32_t amd_extended_cpu_features; /* cpuid 0x80000001, ebx */ @@ -1046,13 +1046,17 @@ typedef struct { u_int32_t type; } MDRawAssertionInfo; -/* For (MDRawAssertionInfo).info: */ +/* For (MDRawAssertionInfo).type: */ typedef enum { MD_ASSERTION_INFO_TYPE_UNKNOWN = 0, /* Used for assertions that would be raised by the MSVC CRT but are * directed to an invalid parameter handler instead. */ - MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER + MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER, + + /* Used for assertions that would be raised by the MSVC CRT but are + * directed to a pure virtual call handler instead. */ + MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL } MDAssertionInfoData; #if defined(_MSC_VER) diff --git a/toolkit/crashreporter/google-breakpad/src/google_breakpad/processor/minidump_processor.h b/toolkit/crashreporter/google-breakpad/src/google_breakpad/processor/minidump_processor.h index 9c53ed74eb4..9e7ea191092 100644 --- a/toolkit/crashreporter/google-breakpad/src/google_breakpad/processor/minidump_processor.h +++ b/toolkit/crashreporter/google-breakpad/src/google_breakpad/processor/minidump_processor.h @@ -63,13 +63,15 @@ class MinidumpProcessor { // Populates the cpu_* fields of the |info| parameter with textual // representations of the CPU type that the minidump in |dump| was - // produced on. - static void GetCPUInfo(Minidump *dump, SystemInfo *info); + // produced on. Returns false if this information is not available in + // the minidump. + static bool GetCPUInfo(Minidump *dump, SystemInfo *info); // Populates the os_* fields of the |info| parameter with textual // representations of the operating system that the minidump in |dump| - // was produced on. - static void GetOSInfo(Minidump *dump, SystemInfo *info); + // was produced on. Returns false if this information is not available in + // the minidump. + static bool GetOSInfo(Minidump *dump, SystemInfo *info); // Returns a textual representation of the reason that a crash occurred, // if the minidump in dump was produced as a result of a crash. Returns diff --git a/toolkit/crashreporter/google-breakpad/src/processor/address_map-inl.h b/toolkit/crashreporter/google-breakpad/src/processor/address_map-inl.h index e09dcae59db..d88b4fcc5bc 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/address_map-inl.h +++ b/toolkit/crashreporter/google-breakpad/src/processor/address_map-inl.h @@ -36,7 +36,10 @@ #ifndef PROCESSOR_ADDRESS_MAP_INL_H__ #define PROCESSOR_ADDRESS_MAP_INL_H__ +#include + #include "processor/address_map.h" +#include "processor/logging.h" namespace google_breakpad { @@ -45,8 +48,11 @@ bool AddressMap::Store(const AddressType &address, const EntryType &entry) { // Ensure that the specified address doesn't conflict with something already // in the map. - if (map_.find(address) != map_.end()) + if (map_.find(address) != map_.end()) { + BPLOG(INFO) << "Store failed, address " << HexString(address) << + " is already present"; return false; + } map_.insert(MapValue(address, entry)); return true; @@ -56,8 +62,8 @@ template bool AddressMap::Retrieve( const AddressType &address, EntryType *entry, AddressType *entry_address) const { - if (!entry) - return false; + BPLOG_IF(ERROR, !entry) << "AddressMap::Retrieve requires |entry|"; + assert(entry); // upper_bound gives the first element whose key is greater than address, // but we want the first element whose key is less than or equal to address. diff --git a/toolkit/crashreporter/google-breakpad/src/processor/address_map.h b/toolkit/crashreporter/google-breakpad/src/processor/address_map.h index 44632323686..14139e7a123 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/address_map.h +++ b/toolkit/crashreporter/google-breakpad/src/processor/address_map.h @@ -53,8 +53,8 @@ class AddressMap { bool Store(const AddressType &address, const EntryType &entry); // Locates the entry stored at the highest address less than or equal to - // the address argument. If there is no such range, or if there is a - // parameter error, returns false. The entry is returned in entry. If + // the address argument. If there is no such range, returns false. The + // entry is returned in entry, which is a required argument. If // entry_address is not NULL, it will be set to the address that the entry // was stored at. bool Retrieve(const AddressType &address, diff --git a/toolkit/crashreporter/google-breakpad/src/processor/address_map_unittest.cc b/toolkit/crashreporter/google-breakpad/src/processor/address_map_unittest.cc index cd6b5a79971..3c8658957e1 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/address_map_unittest.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/address_map_unittest.cc @@ -107,7 +107,6 @@ static bool DoAddressMapTest() { ASSERT_EQ(entry->id(), 1); ASSERT_EQ(address, 10); ASSERT_TRUE(test_map.Retrieve(11, &entry, &address)); - ASSERT_FALSE(test_map.Retrieve(11, NULL, &address)); // parameter error ASSERT_TRUE(test_map.Retrieve(11, &entry, NULL)); // NULL ok here // Add some more elements. diff --git a/toolkit/crashreporter/google-breakpad/src/processor/basic_code_modules.cc b/toolkit/crashreporter/google-breakpad/src/processor/basic_code_modules.cc index 1e3ba99a5d1..a21491c495a 100644 --- a/toolkit/crashreporter/google-breakpad/src/processor/basic_code_modules.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/basic_code_modules.cc @@ -39,6 +39,7 @@ #include "processor/basic_code_modules.h" #include "google_breakpad/processor/code_module.h" #include "processor/linked_ptr.h" +#include "processor/logging.h" #include "processor/range_map-inl.h" namespace google_breakpad { @@ -46,6 +47,8 @@ namespace google_breakpad { BasicCodeModules::BasicCodeModules(const CodeModules *that) : main_address_(0), map_(new RangeMap >()) { + BPLOG_IF(ERROR, !that) << "BasicCodeModules::BasicCodeModules requires " + "|that|"; assert(that); const CodeModule *main_module = that->GetMainModule(); @@ -61,8 +64,11 @@ BasicCodeModules::BasicCodeModules(const CodeModules *that) // entire list, and GetModuleAtIndex may be faster than // GetModuleAtSequence. const CodeModule *module = that->GetModuleAtIndex(module_sequence)->Copy(); - map_->StoreRange(module->base_address(), module->size(), - linked_ptr(module)); + if (!map_->StoreRange(module->base_address(), module->size(), + linked_ptr(module))) { + BPLOG(ERROR) << "Module " << module->code_file() << + " could not be stored"; + } } } @@ -77,8 +83,10 @@ unsigned int BasicCodeModules::module_count() const { const CodeModule* BasicCodeModules::GetModuleForAddress( u_int64_t address) const { linked_ptr module; - if (!map_->RetrieveRange(address, &module, NULL, NULL)) + if (!map_->RetrieveRange(address, &module, NULL, NULL)) { + BPLOG(INFO) << "No module at " << HexString(address); return NULL; + } return module.get(); } @@ -90,8 +98,10 @@ const CodeModule* BasicCodeModules::GetMainModule() const { const CodeModule* BasicCodeModules::GetModuleAtSequence( unsigned int sequence) const { linked_ptr module; - if (!map_->RetrieveRangeAtIndex(sequence, &module, NULL, NULL)) + if (!map_->RetrieveRangeAtIndex(sequence, &module, NULL, NULL)) { + BPLOG(ERROR) << "RetrieveRangeAtIndex failed for sequence " << sequence; return NULL; + } return module.get(); } diff --git a/toolkit/crashreporter/google-breakpad/src/processor/basic_source_line_resolver.cc b/toolkit/crashreporter/google-breakpad/src/processor/basic_source_line_resolver.cc index a66a4700ee7..e5d1bd7f5d5 100644 --- a/toolkit/crashreporter/google-breakpad/src/processor/basic_source_line_resolver.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/basic_source_line_resolver.cc @@ -145,7 +145,7 @@ class BasicSourceLineResolver::Module { static bool Tokenize(char *line, int max_tokens, vector *tokens); // Parses a file declaration - void ParseFile(char *file_line); + bool ParseFile(char *file_line); // Parses a function declaration, returning a new Function object. Function* ParseFunction(char *function_line); @@ -188,9 +188,13 @@ bool BasicSourceLineResolver::LoadModule(const string &module_name, const string &map_file) { // Make sure we don't already have a module with the given name. if (modules_->find(module_name) != modules_->end()) { + BPLOG(INFO) << "Symbols for module " << module_name << " already loaded"; return false; } + BPLOG(INFO) << "Loading symbols for module " << module_name << " from " << + map_file; + Module *module = new Module(module_name); if (!module->LoadMap(map_file)) { delete module; @@ -216,28 +220,56 @@ StackFrameInfo* BasicSourceLineResolver::FillSourceLineInfo( return NULL; } +class AutoFileCloser { + public: + AutoFileCloser(FILE *file) : file_(file) {} + ~AutoFileCloser() { + if (file_) + fclose(file_); + } + + private: + FILE *file_; +}; + bool BasicSourceLineResolver::Module::LoadMap(const string &map_file) { FILE *f = fopen(map_file.c_str(), "r"); if (!f) { + string error_string; + int error_code = ErrnoString(&error_string); + BPLOG(ERROR) << "Could not open " << map_file << + ", error " << error_code << ": " << error_string; return false; } + AutoFileCloser closer(f); + // TODO(mmentovai): this might not be large enough to handle really long // lines, which might be present for FUNC lines of highly-templatized // code. char buffer[8192]; linked_ptr cur_func; + int line_number = 0; while (fgets(buffer, sizeof(buffer), f)) { + ++line_number; if (strncmp(buffer, "FILE ", 5) == 0) { - ParseFile(buffer); + if (!ParseFile(buffer)) { + BPLOG(ERROR) << "ParseFile failed at " << + map_file << ":" << line_number; + return false; + } } else if (strncmp(buffer, "STACK ", 6) == 0) { if (!ParseStackInfo(buffer)) { + BPLOG(ERROR) << "ParseStackInfo failed at " << + map_file << ":" << line_number; return false; } } else if (strncmp(buffer, "FUNC ", 5) == 0) { cur_func.reset(ParseFunction(buffer)); if (!cur_func.get()) { + BPLOG(ERROR) << "ParseFunction failed at " << + map_file << ":" << line_number; return false; } // StoreRange will fail if the function has an invalid address or size. @@ -249,6 +281,8 @@ bool BasicSourceLineResolver::Module::LoadMap(const string &map_file) { cur_func.reset(); if (!ParsePublicSymbol(buffer)) { + BPLOG(ERROR) << "ParsePublicSymbol failed at " << + map_file << ":" << line_number; return false; } } else if (strncmp(buffer, "MODULE ", 7) == 0) { @@ -260,10 +294,14 @@ bool BasicSourceLineResolver::Module::LoadMap(const string &map_file) { // MODULE } else { if (!cur_func.get()) { + BPLOG(ERROR) << "Found source line data without a function at " << + map_file << ":" << line_number; return false; } Line *line = ParseLine(buffer); if (!line) { + BPLOG(ERROR) << "ParseLine failed at " << + map_file << ":" << line_number; return false; } cur_func->lines.StoreRange(line->address, line->size, @@ -271,7 +309,6 @@ bool BasicSourceLineResolver::Module::LoadMap(const string &map_file) { } } - fclose(f); return true; } @@ -387,24 +424,27 @@ bool BasicSourceLineResolver::Module::Tokenize(char *line, int max_tokens, return tokens->size() == static_cast(max_tokens); } -void BasicSourceLineResolver::Module::ParseFile(char *file_line) { +bool BasicSourceLineResolver::Module::ParseFile(char *file_line) { // FILE file_line += 5; // skip prefix vector tokens; if (!Tokenize(file_line, 2, &tokens)) { - return; + return false; } int index = atoi(tokens[0]); if (index < 0) { - return; + return false; } char *filename = tokens[1]; - if (filename) { - files_.insert(make_pair(index, string(filename))); + if (!filename) { + return false; } + + files_.insert(make_pair(index, string(filename))); + return true; } BasicSourceLineResolver::Function* diff --git a/toolkit/crashreporter/google-breakpad/src/processor/contained_range_map-inl.h b/toolkit/crashreporter/google-breakpad/src/processor/contained_range_map-inl.h index 5f029712f84..97f9fdbe82c 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/contained_range_map-inl.h +++ b/toolkit/crashreporter/google-breakpad/src/processor/contained_range_map-inl.h @@ -37,7 +37,10 @@ #define PROCESSOR_CONTAINED_RANGE_MAP_INL_H__ +#include + #include "processor/contained_range_map.h" +#include "processor/logging.h" namespace google_breakpad { @@ -56,8 +59,11 @@ bool ContainedRangeMap::StoreRange( AddressType high = base + size - 1; // Check for undersize or overflow. - if (size <= 0 || high < base) + if (size <= 0 || high < base) { + BPLOG(INFO) << "StoreRange failed, " << HexString(base) << "+" << + HexString(size) << ", " << HexString(high); return false; + } if (!map_) map_ = new AddressToRangeMap(); @@ -74,8 +80,11 @@ bool ContainedRangeMap::StoreRange( // range's, it violates the containment rules, and an attempt to store // it must fail. iterator_base->first contains the key, which was the // containing child's high address. - if (iterator_base->second->base_ == base && iterator_base->first == high) + if (iterator_base->second->base_ == base && iterator_base->first == high) { + BPLOG(INFO) << "StoreRange failed, identical range is already " + "present: " << HexString(base) << "+" << HexString(size); return false; + } // Pass the new range on to the child to attempt to store. return iterator_base->second->StoreRange(base, size, entry); @@ -92,6 +101,12 @@ bool ContainedRangeMap::StoreRange( // fully. Partial containment isn't allowed. if ((iterator_base != iterator_end && base > iterator_base->second->base_) || (contains_high && high < iterator_high->first)) { + // TODO(mmentovai): Some symbol files will trip this check frequently + // on STACK lines. Too many messages will be produced. These are more + // suitable for a DEBUG channel than an INFO channel. + // BPLOG(INFO) << "StoreRange failed, new range partially contains " + // "existing range: " << HexString(base) << "+" << + // HexString(size); return false; } @@ -130,7 +145,12 @@ bool ContainedRangeMap::StoreRange( template bool ContainedRangeMap::RetrieveRange( const AddressType &address, EntryType *entry) const { - if (!entry || !map_) + BPLOG_IF(ERROR, !entry) << "ContainedRangeMap::RetrieveRange requires " + "|entry|"; + assert(entry); + + // If nothing was ever stored, then there's nothing to retrieve. + if (!map_) return false; // Get an iterator to the child range whose high address is equal to or diff --git a/toolkit/crashreporter/google-breakpad/src/processor/contained_range_map.h b/toolkit/crashreporter/google-breakpad/src/processor/contained_range_map.h index deb1e061f91..f30016f3213 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/contained_range_map.h +++ b/toolkit/crashreporter/google-breakpad/src/processor/contained_range_map.h @@ -92,8 +92,7 @@ class ContainedRangeMap { // the specified address. This method will only return entries held by // child ranges, and not the entry contained by |this|. This is necessary // to support a sparsely-populated root range. If no descendant range - // encompasses the address, or if there is a parameter error, returns - // false. + // encompasses the address, returns false. bool RetrieveRange(const AddressType &address, EntryType *entry) const; // Removes all children. Note that Clear only removes descendants, diff --git a/toolkit/crashreporter/google-breakpad/src/processor/minidump.cc b/toolkit/crashreporter/google-breakpad/src/processor/minidump.cc index 062347f472e..7126ede8030 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/minidump.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/minidump.cc @@ -49,6 +49,7 @@ typedef SSIZE_T ssize_t; #endif // _WIN32 #include +#include #include #include @@ -57,12 +58,14 @@ typedef SSIZE_T ssize_t; #include "google_breakpad/processor/minidump.h" #include "processor/basic_code_module.h" #include "processor/basic_code_modules.h" +#include "processor/logging.h" #include "processor/scoped_ptr.h" namespace google_breakpad { +using std::numeric_limits; using std::vector; @@ -189,18 +192,23 @@ static string* UTF16ToUTF8(const vector& in, // Convert the input value (in_word) into a Unicode code point (unichar). u_int32_t unichar; if (in_word >= 0xdc00 && in_word <= 0xdcff) { - // Low surrogate not following high surrogate, fail. + BPLOG(ERROR) << "UTF16ToUTF8 found low surrogate " << + HexString(in_word) << " without high"; return NULL; } else if (in_word >= 0xd800 && in_word <= 0xdbff) { // High surrogate. unichar = (in_word - 0xd7c0) << 10; if (++iterator == in.end()) { - // End of input + BPLOG(ERROR) << "UTF16ToUTF8 found high surrogate " << + HexString(in_word) << " at end of string"; return NULL; } + u_int32_t high_word = in_word; in_word = *iterator; if (in_word < 0xdc00 || in_word > 0xdcff) { - // Expected low surrogate, found something else + BPLOG(ERROR) << "UTF16ToUTF8 found high surrogate " << + HexString(high_word) << " without low " << + HexString(in_word); return NULL; } unichar |= in_word & 0x03ff; @@ -227,7 +235,8 @@ static string* UTF16ToUTF8(const vector& in, (*out) += 0x80 | ((unichar >> 6) & 0x3f); (*out) += 0x80 | (unichar & 0x3f); } else { - // Some (high) value that's not (presently) defined in UTF-8 + BPLOG(ERROR) << "UTF16ToUTF8 cannot represent high value " << + HexString(unichar) << " in UTF-8"; return NULL; } } @@ -280,8 +289,10 @@ bool MinidumpContext::Read(u_int32_t expected_size) { // First, figure out what type of CPU this context structure is for. u_int32_t context_flags; - if (!minidump_->ReadBytes(&context_flags, sizeof(context_flags))) + if (!minidump_->ReadBytes(&context_flags, sizeof(context_flags))) { + BPLOG(ERROR) << "MinidumpContext could not read context flags"; return false; + } if (minidump_->swap()) Swap(&context_flags); @@ -293,8 +304,11 @@ bool MinidumpContext::Read(u_int32_t expected_size) { // when only one of them will be used. switch (cpu_type) { case MD_CONTEXT_X86: { - if (expected_size != sizeof(MDRawContextX86)) + if (expected_size != sizeof(MDRawContextX86)) { + BPLOG(ERROR) << "MinidumpContext x86 size mismatch, " << + expected_size << " != " << sizeof(MDRawContextX86); return false; + } scoped_ptr context_x86(new MDRawContextX86()); @@ -308,13 +322,16 @@ bool MinidumpContext::Read(u_int32_t expected_size) { reinterpret_cast(context_x86.get()) + flags_size; if (!minidump_->ReadBytes(context_after_flags, sizeof(MDRawContextX86) - flags_size)) { + BPLOG(ERROR) << "MinidumpContext could not read x86 context"; return false; } // Do this after reading the entire MDRawContext structure because // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) + if (!CheckAgainstSystemInfo(cpu_type)) { + BPLOG(ERROR) << "MinidumpContext x86 does not match system info"; return false; + } if (minidump_->swap()) { // context_x86->context_flags was already swapped. @@ -360,8 +377,11 @@ bool MinidumpContext::Read(u_int32_t expected_size) { } case MD_CONTEXT_PPC: { - if (expected_size != sizeof(MDRawContextPPC)) + if (expected_size != sizeof(MDRawContextPPC)) { + BPLOG(ERROR) << "MinidumpContext ppc size mismatch, " << + expected_size << " != " << sizeof(MDRawContextPPC); return false; + } scoped_ptr context_ppc(new MDRawContextPPC()); @@ -375,13 +395,16 @@ bool MinidumpContext::Read(u_int32_t expected_size) { reinterpret_cast(context_ppc.get()) + flags_size; if (!minidump_->ReadBytes(context_after_flags, sizeof(MDRawContextPPC) - flags_size)) { + BPLOG(ERROR) << "MinidumpContext could not read ppc context"; return false; } // Do this after reading the entire MDRawContext structure because // GetSystemInfo may seek minidump to a new position. - if (!CheckAgainstSystemInfo(cpu_type)) + if (!CheckAgainstSystemInfo(cpu_type)) { + BPLOG(ERROR) << "MinidumpContext ppc does not match system info"; return false; + } // Normalize the 128-bit types in the dump. // Since this is PowerPC, by definition, the values are big-endian. @@ -431,6 +454,8 @@ bool MinidumpContext::Read(u_int32_t expected_size) { default: { // Unknown context type + BPLOG(ERROR) << "MinidumpContext unknown context type " << + HexString(cpu_type); return false; break; } @@ -442,17 +467,33 @@ bool MinidumpContext::Read(u_int32_t expected_size) { u_int32_t MinidumpContext::GetContextCPU() const { - return valid_ ? context_.base->context_flags & MD_CONTEXT_CPU_MASK : 0; + if (!valid_) { + // Don't log a message, GetContextCPU can be legitimately called with + // valid_ false by FreeContext, which is called by Read. + return 0; + } + + return context_.base->context_flags & MD_CONTEXT_CPU_MASK; } const MDRawContextX86* MinidumpContext::GetContextX86() const { - return GetContextCPU() == MD_CONTEXT_X86 ? context_.x86 : NULL; + if (GetContextCPU() != MD_CONTEXT_X86) { + BPLOG(ERROR) << "MinidumpContext cannot get x86 context"; + return NULL; + } + + return context_.x86; } const MDRawContextPPC* MinidumpContext::GetContextPPC() const { - return GetContextCPU() == MD_CONTEXT_PPC ? context_.ppc : NULL; + if (GetContextCPU() != MD_CONTEXT_PPC) { + BPLOG(ERROR) << "MinidumpContext cannot get ppc context"; + return NULL; + } + + return context_.ppc; } @@ -481,43 +522,55 @@ bool MinidumpContext::CheckAgainstSystemInfo(u_int32_t context_cpu_type) { // It's OK if the minidump doesn't contain an MD_SYSTEM_INFO_STREAM, // as this function just implements a sanity check. MinidumpSystemInfo* system_info = minidump_->GetSystemInfo(); - if (!system_info) + if (!system_info) { + BPLOG(INFO) << "MinidumpContext could not be compared against " + "MinidumpSystemInfo"; return true; + } // If there is an MD_SYSTEM_INFO_STREAM, it should contain valid system info. const MDRawSystemInfo* raw_system_info = system_info->system_info(); - if (!raw_system_info) + if (!raw_system_info) { + BPLOG(INFO) << "MinidumpContext could not be compared against " + "MDRawSystemInfo"; return false; + } MDCPUArchitecture system_info_cpu_type = static_cast( raw_system_info->processor_architecture); // Compare the CPU type of the context record to the CPU type in the // minidump's system info stream. + bool return_value = false; switch (context_cpu_type) { case MD_CONTEXT_X86: - if (system_info_cpu_type != MD_CPU_ARCHITECTURE_X86 && - system_info_cpu_type != MD_CPU_ARCHITECTURE_X86_WIN64) { - return false; + if (system_info_cpu_type == MD_CPU_ARCHITECTURE_X86 || + system_info_cpu_type == MD_CPU_ARCHITECTURE_X86_WIN64) { + return_value = true; } break; case MD_CONTEXT_PPC: - if (system_info_cpu_type != MD_CPU_ARCHITECTURE_PPC) - return false; - break; - - default: - // Unknown context_cpu_type, this should not happen. - return false; + if (system_info_cpu_type == MD_CPU_ARCHITECTURE_PPC) + return_value = true; break; } - return true; + BPLOG_IF(ERROR, !return_value) << "MinidumpContext CPU " << + HexString(context_cpu_type) << + " wrong for MinidumpSysmtemInfo CPU " << + HexString(system_info_cpu_type); + + return return_value; } void MinidumpContext::Print() { + if (!valid_) { + BPLOG(ERROR) << "MinidumpContext cannot print invalid data"; + return; + } + switch (GetContextCPU()) { case MD_CONTEXT_X86: { const MDRawContextX86* context_x86 = GetContextX86(); @@ -648,29 +701,37 @@ MinidumpMemoryRegion::~MinidumpMemoryRegion() { void MinidumpMemoryRegion::SetDescriptor(MDMemoryDescriptor* descriptor) { descriptor_ = descriptor; valid_ = descriptor && - (descriptor_->start_of_memory_range + - descriptor_->memory.data_size) > - descriptor_->start_of_memory_range; + descriptor_->memory.data_size <= + numeric_limits::max() - + descriptor_->start_of_memory_range; } const u_int8_t* MinidumpMemoryRegion::GetMemory() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetMemory"; return NULL; + } if (!memory_) { - if (descriptor_->memory.data_size == 0) + if (descriptor_->memory.data_size == 0) { + BPLOG(ERROR) << "MinidumpMemoryRegion is empty"; return NULL; + } - if (!minidump_->SeekSet(descriptor_->memory.rva)) + if (!minidump_->SeekSet(descriptor_->memory.rva)) { + BPLOG(ERROR) << "MinidumpMemoryRegion could not seek to memory region"; return NULL; + } // TODO(mmentovai): verify rational size! scoped_ptr< vector > memory( new vector(descriptor_->memory.data_size)); - if (!minidump_->ReadBytes(&(*memory)[0], descriptor_->memory.data_size)) + if (!minidump_->ReadBytes(&(*memory)[0], descriptor_->memory.data_size)) { + BPLOG(ERROR) << "MinidumpMemoryRegion could not read memory region"; return NULL; + } memory_ = memory.release(); } @@ -680,13 +741,22 @@ const u_int8_t* MinidumpMemoryRegion::GetMemory() { u_int64_t MinidumpMemoryRegion::GetBase() { - return valid_ ? - descriptor_->start_of_memory_range : static_cast(-1); + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetBase"; + return static_cast(-1); + } + + return descriptor_->start_of_memory_range; } u_int32_t MinidumpMemoryRegion::GetSize() { - return valid_ ? descriptor_->memory.data_size : 0; + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for GetSize"; + return 0; + } + + return descriptor_->memory.data_size; } @@ -699,18 +769,33 @@ void MinidumpMemoryRegion::FreeMemory() { template bool MinidumpMemoryRegion::GetMemoryAtAddressInternal(u_int64_t address, T* value) { - if (!valid_ || !value) + BPLOG_IF(ERROR, !value) << "MinidumpMemoryRegion::GetMemoryAtAddressInternal " + "requires |value|"; + assert(value); + *value = 0; + + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpMemoryRegion for " + "GetMemoryAtAddressInternal"; return false; + } if (address < descriptor_->start_of_memory_range || + sizeof(T) > numeric_limits::max() - address || address + sizeof(T) > descriptor_->start_of_memory_range + descriptor_->memory.data_size) { + BPLOG(ERROR) << "MinidumpMemoryRegion request out of range: " << + HexString(address) << "+" << sizeof(T) << "/" << + HexString(descriptor_->start_of_memory_range) << "+" << + HexString(descriptor_->memory.data_size); return false; } const u_int8_t* memory = GetMemory(); - if (!memory) + if (!memory) { + // GetMemory already logged a perfectly good message. return false; + } // If the CPU requires memory accesses to be aligned, this can crash. // x86 and ppc are able to cope, though. @@ -749,8 +834,10 @@ bool MinidumpMemoryRegion::GetMemoryAtAddress(u_int64_t address, void MinidumpMemoryRegion::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpMemoryRegion cannot print invalid data"; return; + } const u_int8_t* memory = GetMemory(); if (memory) { @@ -795,8 +882,10 @@ bool MinidumpThread::Read() { valid_ = false; - if (!minidump_->ReadBytes(&thread_, sizeof(thread_))) + if (!minidump_->ReadBytes(&thread_, sizeof(thread_))) { + BPLOG(ERROR) << "MinidumpThread cannot read thread"; return false; + } if (minidump_->swap()) { Swap(&thread_.thread_id); @@ -808,13 +897,15 @@ bool MinidumpThread::Read() { Swap(&thread_.thread_context); } - // Check for base + size overflow or undersize. A separate size==0 - // check is needed in case base == 0. - u_int64_t high_address = thread_.stack.start_of_memory_range + - thread_.stack.memory.data_size - 1; + // Check for base + size overflow or undersize. if (thread_.stack.memory.data_size == 0 || - high_address < thread_.stack.start_of_memory_range) + thread_.stack.memory.data_size > numeric_limits::max() - + thread_.stack.start_of_memory_range) { + BPLOG(ERROR) << "MinidumpThread has a memory region problem, " << + HexString(thread_.stack.start_of_memory_range) << "+" << + HexString(thread_.stack.memory.data_size); return false; + } memory_ = new MinidumpMemoryRegion(minidump_); memory_->SetDescriptor(&thread_.stack); @@ -825,22 +916,33 @@ bool MinidumpThread::Read() { MinidumpMemoryRegion* MinidumpThread::GetMemory() { - return !valid_ ? NULL : memory_; + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpThread for GetMemory"; + return NULL; + } + + return memory_; } MinidumpContext* MinidumpThread::GetContext() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpThread for GetContext"; return NULL; + } if (!context_) { - if (!minidump_->SeekSet(thread_.thread_context.rva)) + if (!minidump_->SeekSet(thread_.thread_context.rva)) { + BPLOG(ERROR) << "MinidumpThread cannot seek to context"; return NULL; + } scoped_ptr context(new MinidumpContext(minidump_)); - if (!context->Read(thread_.thread_context.data_size)) + if (!context->Read(thread_.thread_context.data_size)) { + BPLOG(ERROR) << "MinidumpThread cannot read context"; return NULL; + } context_ = context.release(); } @@ -850,8 +952,15 @@ MinidumpContext* MinidumpThread::GetContext() { bool MinidumpThread::GetThreadID(u_int32_t *thread_id) const { - if (!thread_id || !valid_) + BPLOG_IF(ERROR, !thread_id) << "MinidumpThread::GetThreadID requires " + "|thread_id|"; + assert(thread_id); + *thread_id = 0; + + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpThread for GetThreadID"; return false; + } *thread_id = thread_.thread_id; return true; @@ -859,8 +968,10 @@ bool MinidumpThread::GetThreadID(u_int32_t *thread_id) const { void MinidumpThread::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpThread cannot print invalid data"; return; + } printf("MDRawThread\n"); printf(" thread_id = 0x%x\n", thread_.thread_id); @@ -926,16 +1037,30 @@ bool MinidumpThreadList::Read(u_int32_t expected_size) { valid_ = false; u_int32_t thread_count; - if (expected_size < sizeof(thread_count)) + if (expected_size < sizeof(thread_count)) { + BPLOG(ERROR) << "MinidumpThreadList count size mismatch, " << + expected_size << " < " << sizeof(thread_count); return false; - if (!minidump_->ReadBytes(&thread_count, sizeof(thread_count))) + } + if (!minidump_->ReadBytes(&thread_count, sizeof(thread_count))) { + BPLOG(ERROR) << "MinidumpThreadList cannot read thread count"; return false; + } if (minidump_->swap()) Swap(&thread_count); + if (thread_count > numeric_limits::max() / sizeof(MDRawThread)) { + BPLOG(ERROR) << "MinidumpThreadList thread count " << thread_count << + " would cause multiplication overflow"; + return false; + } + if (expected_size != sizeof(thread_count) + thread_count * sizeof(MDRawThread)) { + BPLOG(ERROR) << "MinidumpThreadList size mismatch, " << expected_size << + " != " << + sizeof(thread_count) + thread_count * sizeof(MDRawThread); return false; } @@ -950,15 +1075,24 @@ bool MinidumpThreadList::Read(u_int32_t expected_size) { MinidumpThread* thread = &(*threads)[thread_index]; // Assume that the file offset is correct after the last read. - if (!thread->Read()) + if (!thread->Read()) { + BPLOG(ERROR) << "MinidumpThreadList cannot read thread " << + thread_index << "/" << thread_count; return false; + } u_int32_t thread_id; - if (!thread->GetThreadID(&thread_id)) + if (!thread->GetThreadID(&thread_id)) { + BPLOG(ERROR) << "MinidumpThreadList cannot get thread ID for thread " << + thread_index << "/" << thread_count; return false; + } if (GetThreadByID(thread_id)) { // Another thread with this ID is already in the list. Data error. + BPLOG(ERROR) << "MinidumpThreadList found multiple threads with ID " << + HexString(thread_id) << " at thread " << + thread_index << "/" << thread_count; return false; } id_to_thread_map_[thread_id] = thread; @@ -976,8 +1110,16 @@ bool MinidumpThreadList::Read(u_int32_t expected_size) { MinidumpThread* MinidumpThreadList::GetThreadAtIndex(unsigned int index) const { - if (!valid_ || index >= thread_count_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpThreadList for GetThreadAtIndex"; return NULL; + } + + if (index >= thread_count_) { + BPLOG(ERROR) << "MinidumpThreadList index out of range: " << + index << "/" << thread_count_; + return NULL; + } return &(*threads_)[index]; } @@ -991,8 +1133,10 @@ MinidumpThread* MinidumpThreadList::GetThreadByID(u_int32_t thread_id) { void MinidumpThreadList::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpThreadList cannot print invalid data"; return; + } printf("MinidumpThreadList\n"); printf(" thread_count = %d\n", thread_count_); @@ -1044,8 +1188,10 @@ bool MinidumpModule::Read() { module_valid_ = false; valid_ = false; - if (!minidump_->ReadBytes(&module_, MD_MODULE_SIZE)) + if (!minidump_->ReadBytes(&module_, MD_MODULE_SIZE)) { + BPLOG(ERROR) << "MinidumpModule cannot read module"; return false; + } if (minidump_->swap()) { Swap(&module_.base_of_image); @@ -1072,11 +1218,15 @@ bool MinidumpModule::Read() { // are their proper widths). } - // Check for base + size overflow or undersize. A separate size==0 - // check is needed in case base == 0. - u_int64_t high_address = module_.base_of_image + module_.size_of_image - 1; - if (module_.size_of_image == 0 || high_address < module_.base_of_image) + // Check for base + size overflow or undersize. + if (module_.size_of_image == 0 || + module_.size_of_image > + numeric_limits::max() - module_.base_of_image) { + BPLOG(ERROR) << "MinidumpModule has a module problem, " << + HexString(module_.base_of_image) << "+" << + HexString(module_.size_of_image); return false; + } module_valid_ = true; return true; @@ -1084,21 +1234,31 @@ bool MinidumpModule::Read() { bool MinidumpModule::ReadAuxiliaryData() { - if (!module_valid_) + if (!module_valid_) { + BPLOG(ERROR) << "Invalid MinidumpModule for ReadAuxiliaryData"; return false; + } // Each module must have a name. name_ = minidump_->ReadString(module_.module_name_rva); - if (!name_) + if (!name_) { + BPLOG(ERROR) << "MinidumpModule could not read name"; return false; + } // CodeView and miscellaneous debug records are only required if the // module indicates that they exist. - if (module_.cv_record.data_size && !GetCVRecord(NULL)) + if (module_.cv_record.data_size && !GetCVRecord(NULL)) { + BPLOG(ERROR) << "MinidumpModule has no CodeView record, " + "but one was expected"; return false; + } - if (module_.misc_record.data_size && !GetMiscRecord(NULL)) + if (module_.misc_record.data_size && !GetMiscRecord(NULL)) { + BPLOG(ERROR) << "MinidumpModule has no miscellaneous debug record, " + "but one was expected"; return false; + } valid_ = true; return true; @@ -1106,24 +1266,33 @@ bool MinidumpModule::ReadAuxiliaryData() { string MinidumpModule::code_file() const { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModule for code_file"; return ""; + } return *name_; } string MinidumpModule::code_identifier() const { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModule for code_identifier"; return ""; + } MinidumpSystemInfo *minidump_system_info = minidump_->GetSystemInfo(); - if (!minidump_system_info) + if (!minidump_system_info) { + BPLOG(ERROR) << "MinidumpModule code_identifier requires " + "MinidumpSystemInfo"; return ""; + } const MDRawSystemInfo *raw_system_info = minidump_system_info->system_info(); - if (!raw_system_info) + if (!raw_system_info) { + BPLOG(ERROR) << "MinidumpModule code_identifier requires MDRawSystemInfo"; return ""; + } string identifier; @@ -1150,6 +1319,8 @@ string MinidumpModule::code_identifier() const { default: { // Without knowing what OS generated the dump, we can't generate a good // identifier. Return an empty string, signalling failure. + BPLOG(ERROR) << "MinidumpModule code_identifier requires known platform, " + "found " << HexString(raw_system_info->platform_id); break; } } @@ -1159,8 +1330,10 @@ string MinidumpModule::code_identifier() const { string MinidumpModule::debug_file() const { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModule for debug_file"; return ""; + } string file; // Prefer the CodeView record if present. @@ -1225,13 +1398,18 @@ string MinidumpModule::debug_file() const { } } + BPLOG_IF(ERROR, file.empty()) << "MinidumpModule could not determine " + "debug_file for " << *name_; + return file; } string MinidumpModule::debug_identifier() const { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModule for debug_identifier"; return ""; + } string identifier; @@ -1285,13 +1463,18 @@ string MinidumpModule::debug_identifier() const { // TODO(mmentovai): on the Mac, provide fallbacks as in code_identifier(). + BPLOG_IF(ERROR, identifier.empty()) << "MinidumpModule could not determine " + "debug_identifier for " << *name_; + return identifier; } string MinidumpModule::version() const { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModule for version"; return ""; + } string version; @@ -1312,6 +1495,9 @@ string MinidumpModule::version() const { // Mac OS X and Linux, instead of forcing them to adhere to the dotted // quad of 16-bit ints that Windows uses. + BPLOG_IF(INFO, version.empty()) << "MinidumpModule could not determine " + "version for " << *name_; + return version; } @@ -1322,17 +1508,22 @@ const CodeModule* MinidumpModule::Copy() const { const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) { - if (!module_valid_) + if (!module_valid_) { + BPLOG(ERROR) << "Invalid MinidumpModule for GetCVRecord"; return NULL; + } if (!cv_record_) { // This just guards against 0-sized CodeView records; more specific checks // are used when the signature is checked against various structure types. - if (!module_.cv_record.data_size) + if (module_.cv_record.data_size == 0) { return NULL; + } - if (!minidump_->SeekSet(module_.cv_record.rva)) + if (!minidump_->SeekSet(module_.cv_record.rva)) { + BPLOG(ERROR) << "MinidumpModule could not seek to CodeView record"; return NULL; + } // TODO(mmentovai): verify rational size! @@ -1346,8 +1537,10 @@ const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) { scoped_ptr< vector > cv_record( new vector(module_.cv_record.data_size)); - if (!minidump_->ReadBytes(&(*cv_record)[0], module_.cv_record.data_size)) + if (!minidump_->ReadBytes(&(*cv_record)[0], module_.cv_record.data_size)) { + BPLOG(ERROR) << "MinidumpModule could not read CodeView record"; return NULL; + } u_int32_t signature = MD_CVINFOUNKNOWN_SIGNATURE; if (module_.cv_record.data_size > sizeof(signature)) { @@ -1360,8 +1553,12 @@ const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) { if (signature == MD_CVINFOPDB70_SIGNATURE) { // Now that the structure type is known, recheck the size. - if (sizeof(MDCVInfoPDB70) > module_.cv_record.data_size) + if (sizeof(MDCVInfoPDB70) > module_.cv_record.data_size) { + BPLOG(ERROR) << "MinidumpModule CodeView7 record size mismatch, " << + sizeof(MDCVInfoPDB70) << " > " << + module_.cv_record.data_size; return NULL; + } if (minidump_->swap()) { MDCVInfoPDB70* cv_record_70 = @@ -1375,12 +1572,19 @@ const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) { // The last field of either structure is null-terminated 8-bit character // data. Ensure that it's null-terminated. - if ((*cv_record)[module_.cv_record.data_size - 1] != '\0') + if ((*cv_record)[module_.cv_record.data_size - 1] != '\0') { + BPLOG(ERROR) << "MinidumpModule CodeView7 record string is not " + "0-terminated"; return NULL; + } } else if (signature == MD_CVINFOPDB20_SIGNATURE) { // Now that the structure type is known, recheck the size. - if (sizeof(MDCVInfoPDB20) > module_.cv_record.data_size) + if (sizeof(MDCVInfoPDB20) > module_.cv_record.data_size) { + BPLOG(ERROR) << "MinidumpModule CodeView2 record size mismatch, " << + sizeof(MDCVInfoPDB20) << " > " << + module_.cv_record.data_size; return NULL; + } if (minidump_->swap()) { MDCVInfoPDB20* cv_record_20 = reinterpret_cast(&(*cv_record)[0]); @@ -1394,8 +1598,11 @@ const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) { // The last field of either structure is null-terminated 8-bit character // data. Ensure that it's null-terminated. - if ((*cv_record)[module_.cv_record.data_size - 1] != '\0') + if ((*cv_record)[module_.cv_record.data_size - 1] != '\0') { + BPLOG(ERROR) << "MindumpModule CodeView2 record string is not " + "0-terminated"; return NULL; + } } // If the signature doesn't match something above, it's not something @@ -1418,15 +1625,28 @@ const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) { const MDImageDebugMisc* MinidumpModule::GetMiscRecord(u_int32_t* size) { - if (!module_valid_) + if (!module_valid_) { + BPLOG(ERROR) << "Invalid MinidumpModule for GetMiscRecord"; return NULL; + } if (!misc_record_) { - if (sizeof(MDImageDebugMisc) > module_.misc_record.data_size) + if (module_.misc_record.data_size == 0) { return NULL; + } - if (!minidump_->SeekSet(module_.misc_record.rva)) + if (sizeof(MDImageDebugMisc) > module_.misc_record.data_size) { + BPLOG(ERROR) << "MinidumpModule miscellaneous debugging record " + "size mismatch, " << sizeof(MDImageDebugMisc) << " > " << + module_.misc_record.data_size; return NULL; + } + + if (!minidump_->SeekSet(module_.misc_record.rva)) { + BPLOG(ERROR) << "MinidumpModule could not seek to miscellaneous " + "debugging record"; + return NULL; + } // TODO(mmentovai): verify rational size! @@ -1441,8 +1661,11 @@ const MDImageDebugMisc* MinidumpModule::GetMiscRecord(u_int32_t* size) { MDImageDebugMisc* misc_record = reinterpret_cast(&(*misc_record_mem)[0]); - if (!minidump_->ReadBytes(misc_record, module_.misc_record.data_size)) + if (!minidump_->ReadBytes(misc_record, module_.misc_record.data_size)) { + BPLOG(ERROR) << "MinidumpModule could not read miscellaneous debugging " + "record"; return NULL; + } if (minidump_->swap()) { Swap(&misc_record->data_type); @@ -1465,8 +1688,12 @@ const MDImageDebugMisc* MinidumpModule::GetMiscRecord(u_int32_t* size) { } } - if (module_.misc_record.data_size != misc_record->length) + if (module_.misc_record.data_size != misc_record->length) { + BPLOG(ERROR) << "MinidumpModule miscellaneous debugging record data " + "size mismatch, " << module_.misc_record.data_size << + " != " << misc_record->length; return NULL; + } // Store the vector type because that's how storage was allocated, but // return it casted to MDImageDebugMisc*. @@ -1481,8 +1708,10 @@ const MDImageDebugMisc* MinidumpModule::GetMiscRecord(u_int32_t* size) { void MinidumpModule::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpModule cannot print invalid data"; return; + } printf("MDRawModule\n"); printf(" base_of_image = 0x%llx\n", @@ -1641,16 +1870,30 @@ bool MinidumpModuleList::Read(u_int32_t expected_size) { valid_ = false; u_int32_t module_count; - if (expected_size < sizeof(module_count)) + if (expected_size < sizeof(module_count)) { + BPLOG(ERROR) << "MinidumpModuleList count size mismatch, " << + expected_size << " < " << sizeof(module_count); return false; - if (!minidump_->ReadBytes(&module_count, sizeof(module_count))) + } + if (!minidump_->ReadBytes(&module_count, sizeof(module_count))) { + BPLOG(ERROR) << "MinidumpModuleList could not read module count"; return false; + } if (minidump_->swap()) Swap(&module_count); + if (module_count > numeric_limits::max() / MD_MODULE_SIZE) { + BPLOG(ERROR) << "MinidumpModuleList module count " << module_count << + " would cause multiplication overflow"; + return false; + } + if (expected_size != sizeof(module_count) + module_count * MD_MODULE_SIZE) { + BPLOG(ERROR) << "MinidumpModuleList size mismatch, " << expected_size << + " != " << + sizeof(module_count) + module_count * MD_MODULE_SIZE; return false; } @@ -1665,8 +1908,11 @@ bool MinidumpModuleList::Read(u_int32_t expected_size) { MinidumpModule* module = &(*modules)[module_index]; // Assume that the file offset is correct after the last read. - if (!module->Read()) + if (!module->Read()) { + BPLOG(ERROR) << "MinidumpModuleList could not read module " << + module_index << "/" << module_count; return false; + } } // Loop through the module list once more to read additional data and @@ -1679,16 +1925,33 @@ bool MinidumpModuleList::Read(u_int32_t expected_size) { ++module_index) { MinidumpModule* module = &(*modules)[module_index]; - if (!module->ReadAuxiliaryData()) + if (!module->ReadAuxiliaryData()) { + BPLOG(ERROR) << "MinidumpModuleList could not read module auxiliary " + "data for module " << + module_index << "/" << module_count; return false; + } + + // It is safe to use module->code_file() after successfully calling + // module->ReadAuxiliaryData. u_int64_t base_address = module->base_address(); u_int64_t module_size = module->size(); - if (base_address == static_cast(-1)) + if (base_address == static_cast(-1)) { + BPLOG(ERROR) << "MinidumpModuleList found bad base address " + "for module " << module_index << "/" << module_count << + ", " << module->code_file(); return false; + } - if (!range_map_->StoreRange(base_address, module_size, module_index)) + if (!range_map_->StoreRange(base_address, module_size, module_index)) { + BPLOG(ERROR) << "MinidumpModuleList could not store module " << + module_index << "/" << module_count << ", " << + module->code_file() << ", " << + HexString(base_address) << "+" << + HexString(module_size); return false; + } } modules_ = modules.release(); @@ -1703,20 +1966,27 @@ bool MinidumpModuleList::Read(u_int32_t expected_size) { const MinidumpModule* MinidumpModuleList::GetModuleForAddress( u_int64_t address) const { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleForAddress"; return NULL; + } unsigned int module_index; - if (!range_map_->RetrieveRange(address, &module_index, NULL, NULL)) + if (!range_map_->RetrieveRange(address, &module_index, NULL, NULL)) { + BPLOG(INFO) << "MinidumpModuleList has no module at " << + HexString(address); return NULL; + } return GetModuleAtIndex(module_index); } const MinidumpModule* MinidumpModuleList::GetMainModule() const { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModuleList for GetMainModule"; return NULL; + } // The main code module is the first one present in a minidump file's // MDRawModuleList. @@ -1726,12 +1996,22 @@ const MinidumpModule* MinidumpModuleList::GetMainModule() const { const MinidumpModule* MinidumpModuleList::GetModuleAtSequence( unsigned int sequence) const { - if (!valid_ || sequence >= module_count_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleAtSequence"; return NULL; + } + + if (sequence >= module_count_) { + BPLOG(ERROR) << "MinidumpModuleList sequence out of range: " << + sequence << "/" << module_count_; + return NULL; + } unsigned int module_index; - if (!range_map_->RetrieveRangeAtIndex(sequence, &module_index, NULL, NULL)) + if (!range_map_->RetrieveRangeAtIndex(sequence, &module_index, NULL, NULL)) { + BPLOG(ERROR) << "MinidumpModuleList has no module at sequence " << sequence; return NULL; + } return GetModuleAtIndex(module_index); } @@ -1739,8 +2019,16 @@ const MinidumpModule* MinidumpModuleList::GetModuleAtSequence( const MinidumpModule* MinidumpModuleList::GetModuleAtIndex( unsigned int index) const { - if (!valid_ || index >= module_count_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleAtIndex"; return NULL; + } + + if (index >= module_count_) { + BPLOG(ERROR) << "MinidumpModuleList index out of range: " << + index << "/" << module_count_; + return NULL; + } return &(*modules_)[index]; } @@ -1752,8 +2040,10 @@ const CodeModules* MinidumpModuleList::Copy() const { void MinidumpModuleList::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpModuleList cannot print invalid data"; return; + } printf("MinidumpModuleList\n"); printf(" module_count = %d\n", module_count_); @@ -1802,16 +2092,30 @@ bool MinidumpMemoryList::Read(u_int32_t expected_size) { valid_ = false; u_int32_t region_count; - if (expected_size < sizeof(region_count)) + if (expected_size < sizeof(region_count)) { + BPLOG(ERROR) << "MinidumpMemoryList count size mismatch, " << + expected_size << " < " << sizeof(region_count); return false; - if (!minidump_->ReadBytes(®ion_count, sizeof(region_count))) + } + if (!minidump_->ReadBytes(®ion_count, sizeof(region_count))) { + BPLOG(ERROR) << "MinidumpMemoryList could not read memory region count"; return false; + } if (minidump_->swap()) Swap(®ion_count); + if (region_count > + numeric_limits::max() / sizeof(MDMemoryDescriptor)) { + BPLOG(ERROR) << "MinidumpMemoryList region count " << region_count << + " would cause multiplication overflow"; + return false; + } + if (expected_size != sizeof(region_count) + region_count * sizeof(MDMemoryDescriptor)) { + BPLOG(ERROR) << "MinidumpMemoryList size mismatch, " << expected_size << + " != " << region_count * sizeof(MDMemoryDescriptor); return false; } @@ -1824,6 +2128,7 @@ bool MinidumpMemoryList::Read(u_int32_t expected_size) { // at a time in the loop. if (!minidump_->ReadBytes(&(*descriptors)[0], sizeof(MDMemoryDescriptor) * region_count)) { + BPLOG(ERROR) << "MinidumpMemoryList could not read memory region list"; return false; } @@ -1841,14 +2146,23 @@ bool MinidumpMemoryList::Read(u_int32_t expected_size) { u_int64_t base_address = descriptor->start_of_memory_range; u_int32_t region_size = descriptor->memory.data_size; - // Check for base + size overflow or undersize. A separate size==0 - // check is needed in case base == 0. - u_int64_t high_address = base_address + region_size - 1; - if (region_size == 0 || high_address < base_address) + // Check for base + size overflow or undersize. + if (region_size == 0 || + region_size > numeric_limits::max() - base_address) { + BPLOG(ERROR) << "MinidumpMemoryList has a memory region problem, " << + " region " << region_index << "/" << region_count << + ", " << HexString(base_address) << "+" << + HexString(region_size); return false; + } - if (!range_map_->StoreRange(base_address, region_size, region_index)) + if (!range_map_->StoreRange(base_address, region_size, region_index)) { + BPLOG(ERROR) << "MinidumpMemoryList could not store memory region " << + region_index << "/" << region_count << ", " << + HexString(base_address) << "+" << + HexString(region_size); return false; + } (*regions)[region_index].SetDescriptor(descriptor); } @@ -1866,8 +2180,16 @@ bool MinidumpMemoryList::Read(u_int32_t expected_size) { MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionAtIndex( unsigned int index) { - if (!valid_ || index >= region_count_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpMemoryList for GetMemoryRegionAtIndex"; return NULL; + } + + if (index >= region_count_) { + BPLOG(ERROR) << "MinidumpMemoryList index out of range: " << + index << "/" << region_count_; + return NULL; + } return &(*regions_)[index]; } @@ -1875,20 +2197,27 @@ MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionAtIndex( MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionForAddress( u_int64_t address) { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpMemoryList for GetMemoryRegionForAddress"; return NULL; + } unsigned int region_index; - if (!range_map_->RetrieveRange(address, ®ion_index, NULL, NULL)) + if (!range_map_->RetrieveRange(address, ®ion_index, NULL, NULL)) { + BPLOG(INFO) << "MinidumpMemoryList has no memory region at " << + HexString(address); return NULL; + } return GetMemoryRegionAtIndex(region_index); } void MinidumpMemoryList::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpMemoryList cannot print invalid data"; return; + } printf("MinidumpMemoryList\n"); printf(" region_count = %d\n", region_count_); @@ -1940,11 +2269,16 @@ bool MinidumpException::Read(u_int32_t expected_size) { valid_ = false; - if (expected_size != sizeof(exception_)) + if (expected_size != sizeof(exception_)) { + BPLOG(ERROR) << "MinidumpException size mismatch, " << expected_size << + " != " << sizeof(exception_); return false; + } - if (!minidump_->ReadBytes(&exception_, sizeof(exception_))) + if (!minidump_->ReadBytes(&exception_, sizeof(exception_))) { + BPLOG(ERROR) << "MinidumpException cannot read exception"; return false; + } if (minidump_->swap()) { Swap(&exception_.thread_id); @@ -1971,8 +2305,15 @@ bool MinidumpException::Read(u_int32_t expected_size) { bool MinidumpException::GetThreadID(u_int32_t *thread_id) const { - if (!thread_id || !valid_) + BPLOG_IF(ERROR, !thread_id) << "MinidumpException::GetThreadID requires " + "|thread_id|"; + assert(thread_id); + *thread_id = 0; + + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpException for GetThreadID"; return false; + } *thread_id = exception_.thread_id; return true; @@ -1980,17 +2321,23 @@ bool MinidumpException::GetThreadID(u_int32_t *thread_id) const { MinidumpContext* MinidumpException::GetContext() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpException for GetContext"; return NULL; + } if (!context_) { - if (!minidump_->SeekSet(exception_.thread_context.rva)) + if (!minidump_->SeekSet(exception_.thread_context.rva)) { + BPLOG(ERROR) << "MinidumpException cannot seek to context"; return NULL; + } scoped_ptr context(new MinidumpContext(minidump_)); - if (!context->Read(exception_.thread_context.data_size)) + if (!context->Read(exception_.thread_context.data_size)) { + BPLOG(ERROR) << "MinidumpException cannot read context"; return NULL; + } context_ = context.release(); } @@ -2000,8 +2347,10 @@ MinidumpContext* MinidumpException::GetContext() { void MinidumpException::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpException cannot print invalid data"; return; + } printf("MDException\n"); printf(" thread_id = 0x%x\n", @@ -2066,11 +2415,16 @@ bool MinidumpSystemInfo::Read(u_int32_t expected_size) { valid_ = false; - if (expected_size != sizeof(system_info_)) + if (expected_size != sizeof(system_info_)) { + BPLOG(ERROR) << "MinidumpSystemInfo size mismatch, " << expected_size << + " != " << sizeof(system_info_); return false; + } - if (!minidump_->ReadBytes(&system_info_, sizeof(system_info_))) + if (!minidump_->ReadBytes(&system_info_, sizeof(system_info_))) { + BPLOG(ERROR) << "MinidumpSystemInfo cannot read system info"; return false; + } if (minidump_->swap()) { Swap(&system_info_.processor_architecture); @@ -2105,8 +2459,10 @@ bool MinidumpSystemInfo::Read(u_int32_t expected_size) { string MinidumpSystemInfo::GetOS() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetOS"; return NULL; + } string os; @@ -2123,6 +2479,11 @@ string MinidumpSystemInfo::GetOS() { case MD_OS_LINUX: os = "linux"; break; + + default: + BPLOG(ERROR) << "MinidumpSystemInfo unknown OS for platform " << + HexString(system_info_.platform_id); + break; } return os; @@ -2130,8 +2491,10 @@ string MinidumpSystemInfo::GetOS() { string MinidumpSystemInfo::GetCPU() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCPU"; return ""; + } string cpu; @@ -2144,6 +2507,11 @@ string MinidumpSystemInfo::GetCPU() { case MD_CPU_ARCHITECTURE_PPC: cpu = "ppc"; break; + + default: + BPLOG(ERROR) << "MinidumpSystemInfo unknown CPU for architecture " << + HexString(system_info_.processor_architecture); + break; } return cpu; @@ -2151,19 +2519,26 @@ string MinidumpSystemInfo::GetCPU() { const string* MinidumpSystemInfo::GetCSDVersion() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCSDVersion"; return NULL; + } if (!csd_version_) csd_version_ = minidump_->ReadString(system_info_.csd_version_rva); + BPLOG_IF(ERROR, !csd_version_) << "MinidumpSystemInfo could not read " + "CSD version"; + return csd_version_; } const string* MinidumpSystemInfo::GetCPUVendor() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpSystemInfo for GetCPUVendor"; return NULL; + } // CPU vendor information can only be determined from x86 minidumps. if (!cpu_vendor_ && @@ -2192,8 +2567,10 @@ const string* MinidumpSystemInfo::GetCPUVendor() { void MinidumpSystemInfo::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpSystemInfo cannot print invalid data"; return; + } printf("MDRawSystemInfo\n"); printf(" processor_architecture = %d\n", @@ -2262,11 +2639,16 @@ bool MinidumpMiscInfo::Read(u_int32_t expected_size) { if (expected_size != MD_MISCINFO_SIZE && expected_size != MD_MISCINFO2_SIZE) { + BPLOG(ERROR) << "MinidumpMiscInfo size mismatch, " << expected_size << + " != " << MD_MISCINFO_SIZE << ", " << MD_MISCINFO2_SIZE << + ")"; return false; } - if (!minidump_->ReadBytes(&misc_info_, expected_size)) + if (!minidump_->ReadBytes(&misc_info_, expected_size)) { + BPLOG(ERROR) << "MinidumpMiscInfo cannot read miscellaneous info"; return false; + } if (minidump_->swap()) { Swap(&misc_info_.size_of_info); @@ -2284,8 +2666,11 @@ bool MinidumpMiscInfo::Read(u_int32_t expected_size) { } } - if (misc_info_.size_of_info != expected_size) + if (expected_size != misc_info_.size_of_info) { + BPLOG(ERROR) << "MinidumpMiscInfo size mismatch, " << + expected_size << " != " << misc_info_.size_of_info; return false; + } valid_ = true; return true; @@ -2293,8 +2678,10 @@ bool MinidumpMiscInfo::Read(u_int32_t expected_size) { void MinidumpMiscInfo::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpMiscInfo cannot print invalid data"; return; + } printf("MDRawMiscInfo\n"); printf(" size_of_info = %d\n", misc_info_.size_of_info); @@ -2336,11 +2723,16 @@ MinidumpBreakpadInfo::MinidumpBreakpadInfo(Minidump* minidump) bool MinidumpBreakpadInfo::Read(u_int32_t expected_size) { valid_ = false; - if (expected_size != sizeof(breakpad_info_)) + if (expected_size != sizeof(breakpad_info_)) { + BPLOG(ERROR) << "MinidumpBreakpadInfo size mismatch, " << expected_size << + " != " << sizeof(breakpad_info_); return false; + } - if (!minidump_->ReadBytes(&breakpad_info_, sizeof(breakpad_info_))) + if (!minidump_->ReadBytes(&breakpad_info_, sizeof(breakpad_info_))) { + BPLOG(ERROR) << "MinidumpBreakpadInfo cannot read Breakpad info"; return false; + } if (minidump_->swap()) { Swap(&breakpad_info_.validity); @@ -2354,8 +2746,18 @@ bool MinidumpBreakpadInfo::Read(u_int32_t expected_size) { bool MinidumpBreakpadInfo::GetDumpThreadID(u_int32_t *thread_id) const { - if (!thread_id || !valid_ || - !(breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID)) { + BPLOG_IF(ERROR, !thread_id) << "MinidumpBreakpadInfo::GetDumpThreadID " + "requires |thread_id|"; + assert(thread_id); + *thread_id = 0; + + if (!valid_) { + BPLOG(ERROR) << "Invalid MinidumpBreakpadInfo for GetDumpThreadID"; + return false; + } + + if (!(breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID)) { + BPLOG(INFO) << "MinidumpBreakpadInfo has no dump thread"; return false; } @@ -2366,8 +2768,19 @@ bool MinidumpBreakpadInfo::GetDumpThreadID(u_int32_t *thread_id) const { bool MinidumpBreakpadInfo::GetRequestingThreadID(u_int32_t *thread_id) const { - if (!thread_id || !valid_ || - !(breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID)) { + BPLOG_IF(ERROR, !thread_id) << "MinidumpBreakpadInfo::GetRequestingThreadID " + "requires |thread_id|"; + assert(thread_id); + *thread_id = 0; + + if (!thread_id || !valid_) { + BPLOG(ERROR) << "Invalid MinidumpBreakpadInfo for GetRequestingThreadID"; + return false; + } + + if (!(breakpad_info_.validity & + MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID)) { + BPLOG(INFO) << "MinidumpBreakpadInfo has no requesting thread"; return false; } @@ -2377,8 +2790,10 @@ bool MinidumpBreakpadInfo::GetRequestingThreadID(u_int32_t *thread_id) void MinidumpBreakpadInfo::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "MinidumpBreakpadInfo cannot print invalid data"; return; + } printf("MDRawBreakpadInfo\n"); printf(" validity = 0x%x\n", breakpad_info_.validity); @@ -2419,13 +2834,17 @@ Minidump::Minidump(const string& path) Minidump::~Minidump() { delete directory_; delete stream_map_; - if (fd_ != -1) + if (fd_ != -1) { + BPLOG(INFO) << "Minidump closing minidump on fd " << fd_; close(fd_); + } } bool Minidump::Open() { if (fd_ != -1) { + BPLOG(INFO) << "Minidump reopening minidump " << path_ << " on fd " << fd_; + // The file is already open. Seek to the beginning, which is the position // the file would be at if it were opened anew. return SeekSet(0); @@ -2434,9 +2853,15 @@ bool Minidump::Open() { // O_BINARY is useful (and defined) on Windows. On other platforms, it's // useless, and because it's defined as 0 above, harmless. fd_ = open(path_.c_str(), O_RDONLY | O_BINARY); - if (fd_ == -1) + if (fd_ == -1) { + string error_string; + int error_code = ErrnoString(&error_string); + BPLOG(ERROR) << "Minidump could not open minidump " << path_ << + ", error " << error_code << ": " << error_string; return false; + } + BPLOG(INFO) << "Minidump opened minidump " << path_ << " on fd " << fd_; return true; } @@ -2449,11 +2874,15 @@ bool Minidump::Read() { valid_ = false; - if (!Open()) + if (!Open()) { + BPLOG(ERROR) << "Minidump cannot open minidump"; return false; + } - if (!ReadBytes(&header_, sizeof(MDRawHeader))) + if (!ReadBytes(&header_, sizeof(MDRawHeader))) { + BPLOG(ERROR) << "Minidump cannot read header"; return false; + } if (header_.signature != MD_HEADER_SIGNATURE) { // The file may be byte-swapped. Under the present architecture, these @@ -2464,6 +2893,10 @@ bool Minidump::Read() { Swap(&signature_swapped); if (signature_swapped != MD_HEADER_SIGNATURE) { // This isn't a minidump or a byte-swapped minidump. + BPLOG(ERROR) << "Minidump header signature mismatch: (" << + HexString(header_.signature) << ", " << + HexString(signature_swapped) << ") != " << + HexString(MD_HEADER_SIGNATURE); return false; } swap_ = true; @@ -2473,6 +2906,9 @@ bool Minidump::Read() { swap_ = false; } + BPLOG(INFO) << "Minidump " << (swap_ ? "" : "not ") << + "byte-swapping minidump"; + if (swap_) { Swap(&header_.signature); Swap(&header_.version); @@ -2486,11 +2922,16 @@ bool Minidump::Read() { // Version check. The high 16 bits of header_.version contain something // else "implementation specific." if ((header_.version & 0x0000ffff) != MD_HEADER_VERSION) { + BPLOG(ERROR) << "Minidump version mismatch: " << + HexString(header_.version & 0x0000ffff) << " != " << + HexString(MD_HEADER_VERSION); return false; } - if (!SeekSet(header_.stream_directory_rva)) + if (!SeekSet(header_.stream_directory_rva)) { + BPLOG(ERROR) << "Minidump cannot seek to stream directory"; return false; + } if (header_.stream_count) { // TODO(mmentovai): verify rational size! @@ -2500,8 +2941,10 @@ bool Minidump::Read() { // Read the entire array in one fell swoop, instead of reading one entry // at a time in the loop. if (!ReadBytes(&(*directory)[0], - sizeof(MDRawDirectory) * header_.stream_count)) + sizeof(MDRawDirectory) * header_.stream_count)) { + BPLOG(ERROR) << "Minidump cannot read stream directory"; return false; + } for (unsigned int stream_index = 0; stream_index < header_.stream_count; @@ -2527,6 +2970,8 @@ bool Minidump::Read() { if (stream_map_->find(stream_type) != stream_map_->end()) { // Another stream with this type was already found. A minidump // file should contain at most one of each of these stream types. + BPLOG(ERROR) << "Minidump found multiple streams of type " << + stream_type << ", but can only deal with one"; return false; } // Fall through to default @@ -2591,8 +3036,10 @@ MinidumpBreakpadInfo* Minidump::GetBreakpadInfo() { void Minidump::Print() { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Minidump cannot print invalid data"; return; + } printf("MDRawHeader\n"); printf(" signature = 0x%x\n", header_.signature); @@ -2637,8 +3084,16 @@ void Minidump::Print() { const MDRawDirectory* Minidump::GetDirectoryEntryAtIndex(unsigned int index) const { - if (!valid_ || index >= header_.stream_count) + if (!valid_) { + BPLOG(ERROR) << "Invalid Minidump for GetDirectoryEntryAtIndex"; return NULL; + } + + if (index >= header_.stream_count) { + BPLOG(ERROR) << "Minidump stream directory index out of range: " << + index << "/" << header_.stream_count; + return NULL; + } return &(*directory_)[index]; } @@ -2650,8 +3105,16 @@ bool Minidump::ReadBytes(void* bytes, size_t count) { // depends on is mFD, and an unset or invalid fd may generate an // error but should not cause a crash. ssize_t bytes_read = read(fd_, bytes, count); - if (static_cast(bytes_read) != count) + if (static_cast(bytes_read) != count) { + if (bytes_read == -1) { + string error_string; + int error_code = ErrnoString(&error_string); + BPLOG(ERROR) << "ReadBytes: error " << error_code << ": " << error_string; + } else { + BPLOG(ERROR) << "ReadBytes: read " << bytes_read << "/" << count; + } return false; + } return true; } @@ -2662,26 +3125,43 @@ bool Minidump::SeekSet(off_t offset) { // depends on is mFD, and an unset or invalid fd may generate an // error but should not cause a crash. off_t sought = lseek(fd_, offset, SEEK_SET); - if (sought != offset) + if (sought != offset) { + if (sought == -1) { + string error_string; + int error_code = ErrnoString(&error_string); + BPLOG(ERROR) << "SeekSet: error " << error_code << ": " << error_string; + } else { + BPLOG(ERROR) << "SeekSet: sought " << sought << "/" << offset; + } return false; + } return true; } string* Minidump::ReadString(off_t offset) { - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid Minidump for ReadString"; return NULL; - if (!SeekSet(offset)) + } + if (!SeekSet(offset)) { + BPLOG(ERROR) << "ReadString could not seek to string"; return NULL; + } u_int32_t bytes; - if (!ReadBytes(&bytes, sizeof(bytes))) + if (!ReadBytes(&bytes, sizeof(bytes))) { + BPLOG(ERROR) << "ReadString could not read string size"; return NULL; + } if (swap_) Swap(&bytes); - if (bytes % 2 != 0) + if (bytes % 2 != 0) { + BPLOG(ERROR) << "ReadString found odd-sized string of " << bytes << + " bytes at offset " << offset; return NULL; + } unsigned int utf16_words = bytes / 2; // TODO(mmentovai): verify rational size! @@ -2689,6 +3169,7 @@ string* Minidump::ReadString(off_t offset) { if (utf16_words) { if (!ReadBytes(&string_utf16[0], bytes)) { + BPLOG(ERROR) << "ReadString could not read string"; return NULL; } } @@ -2699,22 +3180,37 @@ string* Minidump::ReadString(off_t offset) { bool Minidump::SeekToStreamType(u_int32_t stream_type, u_int32_t* stream_length) { - if (!valid_ || !stream_length) + BPLOG_IF(ERROR, !stream_length) << "Minidump::SeekToStreamType requires " + "|stream_length|"; + assert(stream_length); + *stream_length = 0; + + if (!valid_) { + BPLOG(ERROR) << "Invalid Mindump for SeekToStreamType"; return false; + } MinidumpStreamMap::const_iterator iterator = stream_map_->find(stream_type); if (iterator == stream_map_->end()) { // This stream type didn't exist in the directory. + BPLOG(INFO) << "SeekToStreamType: type " << stream_type << " not present"; return false; } MinidumpStreamInfo info = iterator->second; - if (info.stream_index >= header_.stream_count) + if (info.stream_index >= header_.stream_count) { + BPLOG(ERROR) << "SeekToStreamType: type " << stream_type << + " out of range: " << + info.stream_index << "/" << header_.stream_count; return false; + } MDRawDirectory* directory_entry = &(*directory_)[info.stream_index]; - if (!SeekSet(directory_entry->location.rva)) + if (!SeekSet(directory_entry->location.rva)) { + BPLOG(ERROR) << "SeekToStreamType could not seek to stream type " << + stream_type; return false; + } *stream_length = directory_entry->location.data_size; @@ -2727,17 +3223,22 @@ T* Minidump::GetStream(T** stream) { // stream is a garbage parameter that's present only to account for C++'s // inability to overload a method based solely on its return type. - if (!stream) - return NULL; + const u_int32_t stream_type = T::kStreamType; + + BPLOG_IF(ERROR, !stream) << "Minidump::GetStream type " << stream_type << + " requires |stream|"; + assert(stream); *stream = NULL; - if (!valid_) + if (!valid_) { + BPLOG(ERROR) << "Invalid Minidump for GetStream type " << stream_type; return NULL; + } - u_int32_t stream_type = T::kStreamType; MinidumpStreamMap::iterator iterator = stream_map_->find(stream_type); if (iterator == stream_map_->end()) { // This stream type didn't exist in the directory. + BPLOG(INFO) << "GetStream: type " << stream_type << " not present"; return NULL; } @@ -2752,13 +3253,17 @@ T* Minidump::GetStream(T** stream) { } u_int32_t stream_length; - if (!SeekToStreamType(stream_type, &stream_length)) + if (!SeekToStreamType(stream_type, &stream_length)) { + BPLOG(ERROR) << "GetStream could not seek to stream type " << stream_type; return NULL; + } scoped_ptr new_stream(new T(this)); - if (!new_stream->Read(stream_length)) + if (!new_stream->Read(stream_length)) { + BPLOG(ERROR) << "GetStream could not read stream type " << stream_type; return NULL; + } *stream = new_stream.release(); info->stream = *stream; diff --git a/toolkit/crashreporter/google-breakpad/src/processor/minidump_processor.cc b/toolkit/crashreporter/google-breakpad/src/processor/minidump_processor.cc index 8134e441c2b..a2a3142729d 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/minidump_processor.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/minidump_processor.cc @@ -33,6 +33,7 @@ #include "google_breakpad/processor/call_stack.h" #include "google_breakpad/processor/minidump.h" #include "google_breakpad/processor/process_state.h" +#include "processor/logging.h" #include "processor/scoped_ptr.h" #include "processor/stackwalker_x86.h" @@ -48,19 +49,23 @@ MinidumpProcessor::~MinidumpProcessor() { MinidumpProcessor::ProcessResult MinidumpProcessor::Process( const string &minidump_file, ProcessState *process_state) { + BPLOG(INFO) << "Processing minidump in file " << minidump_file; + Minidump dump(minidump_file); if (!dump.Read()) { + BPLOG(ERROR) << "Minidump " << minidump_file << " could not be read"; return PROCESS_ERROR; } process_state->Clear(); const MDRawHeader *header = dump.header(); + BPLOG_IF(ERROR, !header) << "Minidump " << minidump_file << " has no header"; assert(header); process_state->time_date_stamp_ = header->time_date_stamp; - GetCPUInfo(&dump, &process_state->system_info_); - GetOSInfo(&dump, &process_state->system_info_); + bool has_cpu_info = GetCPUInfo(&dump, &process_state->system_info_); + bool has_os_info = GetOSInfo(&dump, &process_state->system_info_); u_int32_t dump_thread_id = 0; bool has_dump_thread = false; @@ -93,24 +98,45 @@ MinidumpProcessor::ProcessResult MinidumpProcessor::Process( MinidumpThreadList *threads = dump.GetThreadList(); if (!threads) { + BPLOG(ERROR) << "Minidump " << minidump_file << " has no thread list"; return PROCESS_ERROR; } + BPLOG(INFO) << "Minidump " << minidump_file << " has " << + (has_cpu_info ? "" : "no ") << "CPU info, " << + (has_os_info ? "" : "no ") << "OS info, " << + (breakpad_info != NULL ? "" : "no ") << "Breakpad info, " << + (exception != NULL ? "" : "no ") << "exception, " << + (module_list != NULL ? "" : "no ") << "module list, " << + (threads != NULL ? "" : "no ") << "thread list, " << + (has_dump_thread ? "" : "no ") << "dump thread, and " << + (has_requesting_thread ? "" : "no ") << "requesting thread"; + bool found_requesting_thread = false; unsigned int thread_count = threads->thread_count(); for (unsigned int thread_index = 0; thread_index < thread_count; ++thread_index) { + char thread_string_buffer[64]; + snprintf(thread_string_buffer, sizeof(thread_string_buffer), "%d/%d", + thread_index, thread_count); + string thread_string = minidump_file + ":" + thread_string_buffer; + MinidumpThread *thread = threads->GetThreadAtIndex(thread_index); if (!thread) { + BPLOG(ERROR) << "Could not get thread for " << thread_string; return PROCESS_ERROR; } u_int32_t thread_id; if (!thread->GetThreadID(&thread_id)) { + BPLOG(ERROR) << "Could not get thread ID for " << thread_string; return PROCESS_ERROR; } + thread_string += " id " + HexString(thread_id); + BPLOG(INFO) << "Looking at thread " << thread_string; + // If this thread is the thread that produced the minidump, don't process // it. Because of the problems associated with a thread producing a // dump of itself (when both its context and its stack are in flux), @@ -124,6 +150,7 @@ MinidumpProcessor::ProcessResult MinidumpProcessor::Process( if (has_requesting_thread && thread_id == requesting_thread_id) { if (found_requesting_thread) { // There can't be more than one requesting thread. + BPLOG(ERROR) << "Duplicate requesting thread: " << thread_string; return PROCESS_ERROR; } @@ -150,6 +177,7 @@ MinidumpProcessor::ProcessResult MinidumpProcessor::Process( MinidumpMemoryRegion *thread_memory = thread->GetMemory(); if (!thread_memory) { + BPLOG(ERROR) << "No memory region for " << thread_string; return PROCESS_ERROR; } @@ -169,11 +197,14 @@ MinidumpProcessor::ProcessResult MinidumpProcessor::Process( supplier_, resolver_)); if (!stackwalker.get()) { + BPLOG(ERROR) << "No stackwalker for " << thread_string; return PROCESS_ERROR; } scoped_ptr stack(new CallStack()); if (!stackwalker->Walk(stack.get())) { + BPLOG(INFO) << "Processing interrupted by stackwalker (missing " << + "symbols?) at " << thread_string; return PROCESS_INTERRUPTED; } process_state->threads_.push_back(stack.release()); @@ -182,9 +213,13 @@ MinidumpProcessor::ProcessResult MinidumpProcessor::Process( // If a requesting thread was indicated, it must be present. if (has_requesting_thread && !found_requesting_thread) { // Don't mark as an error, but invalidate the requesting thread + BPLOG(ERROR) << "Minidump indicated requesting thread " << + HexString(requesting_thread_id) << ", not found in " << + minidump_file; process_state->requesting_thread_ = -1; } + BPLOG(INFO) << "Processed " << minidump_file; return PROCESS_OK; } @@ -204,7 +239,7 @@ static const MDRawSystemInfo* GetSystemInfo(Minidump *dump, } // static -void MinidumpProcessor::GetCPUInfo(Minidump *dump, SystemInfo *info) { +bool MinidumpProcessor::GetCPUInfo(Minidump *dump, SystemInfo *info) { assert(dump); assert(info); @@ -214,7 +249,7 @@ void MinidumpProcessor::GetCPUInfo(Minidump *dump, SystemInfo *info) { MinidumpSystemInfo *system_info; const MDRawSystemInfo *raw_system_info = GetSystemInfo(dump, &system_info); if (!raw_system_info) - return; + return false; switch (raw_system_info->processor_architecture) { case MD_CPU_ARCHITECTURE_X86: { @@ -248,10 +283,12 @@ void MinidumpProcessor::GetCPUInfo(Minidump *dump, SystemInfo *info) { break; } } + + return true; } // static -void MinidumpProcessor::GetOSInfo(Minidump *dump, SystemInfo *info) { +bool MinidumpProcessor::GetOSInfo(Minidump *dump, SystemInfo *info) { assert(dump); assert(info); @@ -262,7 +299,7 @@ void MinidumpProcessor::GetOSInfo(Minidump *dump, SystemInfo *info) { MinidumpSystemInfo *system_info; const MDRawSystemInfo *raw_system_info = GetSystemInfo(dump, &system_info); if (!raw_system_info) - return; + return false; info->os_short = system_info->GetOS(); @@ -309,6 +346,8 @@ void MinidumpProcessor::GetOSInfo(Minidump *dump, SystemInfo *info) { info->os_version.append(" "); info->os_version.append(*csd_version); } + + return true; } // static @@ -375,6 +414,7 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { break; default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; @@ -403,6 +443,7 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { break; default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; @@ -429,12 +470,14 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { break; default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; } default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; @@ -471,6 +514,7 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { reason.append("EXC_PPC_ALTIVECASSIST"); default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; @@ -503,12 +547,14 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { break; default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; } default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; @@ -529,6 +575,7 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { break; default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; @@ -542,6 +589,7 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { break; default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; @@ -556,12 +604,14 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { break; default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; } default: reason.append(flags_string); + BPLOG(INFO) << "Unknown exception reason " << reason; break; } break; @@ -668,7 +718,16 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) { case MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK: reason = "EXCEPTION_POSSIBLE_DEADLOCK"; break; + default: + BPLOG(INFO) << "Unknown exception reason " << reason; + break; } + break; + } + + default: { + BPLOG(INFO) << "Unknown exception reason " << reason; + break; } } diff --git a/toolkit/crashreporter/google-breakpad/src/processor/minidump_stackwalk.cc b/toolkit/crashreporter/google-breakpad/src/processor/minidump_stackwalk.cc index 8c8952f69a9..6be2551e07c 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/minidump_stackwalk.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/minidump_stackwalk.cc @@ -255,7 +255,8 @@ static void PrintModules(const CodeModules *modules) { // PrintModulesMachineReadable outputs a list of loaded modules, // one per line, in the following machine-readable pipe-delimited // text format: -// Module|{Module Filename}|{Version}|{Base Address}|{Max Address}|{Main} +// Module|{Module Filename}|{Version}|{Debug Filename}|{Debug Identifier}| +// {Base Address}|{Max Address}|{Main} static void PrintModulesMachineReadable(const CodeModules *modules) { if (!modules) return; @@ -272,10 +273,14 @@ static void PrintModulesMachineReadable(const CodeModules *modules) { ++module_sequence) { const CodeModule *module = modules->GetModuleAtSequence(module_sequence); u_int64_t base_address = module->base_address(); - printf("Module%c%s%c%s%c0x%08llx%c0x%08llx%c%d\n", + printf("Module%c%s%c%s%c%s%c%s%c0x%08llx%c0x%08llx%c%d\n", kOutputSeparator, StripSeparator(PathnameStripper::File(module->code_file())).c_str(), kOutputSeparator, StripSeparator(module->version()).c_str(), + kOutputSeparator, + StripSeparator(PathnameStripper::File(module->debug_file())).c_str(), + kOutputSeparator, + StripSeparator(module->debug_identifier()).c_str(), kOutputSeparator, base_address, kOutputSeparator, base_address + module->size() - 1, kOutputSeparator, base_address == main_address ? 1 : 0); diff --git a/toolkit/crashreporter/google-breakpad/src/processor/postfix_evaluator-inl.h b/toolkit/crashreporter/google-breakpad/src/processor/postfix_evaluator-inl.h index 54796df1a37..0b5f9c9b5a8 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/postfix_evaluator-inl.h +++ b/toolkit/crashreporter/google-breakpad/src/processor/postfix_evaluator-inl.h @@ -27,6 +27,7 @@ #include "processor/postfix_evaluator.h" #include "google_breakpad/processor/memory_region.h" +#include "processor/logging.h" namespace google_breakpad { @@ -83,8 +84,11 @@ bool PostfixEvaluator::Evaluate(const string &expression, if (operation != BINARY_OP_NONE) { // Get the operands. ValueType operand1, operand2; - if (!PopValues(&operand1, &operand2)) + if (!PopValues(&operand1, &operand2)) { + BPLOG(ERROR) << "Could not PopValues to get two values for binary " + "operation " << token << ": " << expression; return false; + } // Perform the operation. ValueType result; @@ -107,6 +111,7 @@ bool PostfixEvaluator::Evaluate(const string &expression, case BINARY_OP_NONE: // This will not happen, but compilers will want a default or // BINARY_OP_NONE case. + BPLOG(ERROR) << "Not reached!"; return false; break; } @@ -115,32 +120,51 @@ bool PostfixEvaluator::Evaluate(const string &expression, PushValue(result); } else if (token == "^") { // ^ for unary dereference. Can't dereference without memory. - if (!memory_) + if (!memory_) { + BPLOG(ERROR) << "Attempt to dereference without memory: " << + expression; return false; + } ValueType address; - if (!PopValue(&address)) + if (!PopValue(&address)) { + BPLOG(ERROR) << "Could not PopValue to get value to derefence: " << + expression; return false; + } ValueType value; - if (!memory_->GetMemoryAtAddress(address, &value)) + if (!memory_->GetMemoryAtAddress(address, &value)) { + BPLOG(ERROR) << "Could not dereference memory at address " << + HexString(address) << ": " << expression; return false; + } PushValue(value); } else if (token == "=") { // = for assignment. ValueType value; - if (!PopValue(&value)) + if (!PopValue(&value)) { + BPLOG(ERROR) << "Could not PopValue to get value to assign: " << + expression; return false; + } // Assignment is only meaningful when assigning into an identifier. // The identifier must name a variable, not a constant. Variables // begin with '$'. string identifier; - if (PopValueOrIdentifier(NULL, &identifier) != POP_RESULT_IDENTIFIER) + if (PopValueOrIdentifier(NULL, &identifier) != POP_RESULT_IDENTIFIER) { + BPLOG(ERROR) << "PopValueOrIdentifier returned a value, but an " + "identifier is needed to assign " << + HexString(value) << ": " << expression; return false; - if (identifier.empty() || identifier[0] != '$') + } + if (identifier.empty() || identifier[0] != '$') { + BPLOG(ERROR) << "Can't assign " << HexString(value) << " to " << + identifier << ": " << expression; return false; + } (*dictionary_)[identifier] = value; if (assigned) @@ -157,6 +181,7 @@ bool PostfixEvaluator::Evaluate(const string &expression, // If there's anything left on the stack, it indicates incomplete execution. // This is a failure case. If the stack is empty, evalution was complete // and successful. + BPLOG_IF(ERROR, !stack_.empty()) << "Incomplete execution: " << expression; return stack_.empty(); } @@ -210,6 +235,7 @@ bool PostfixEvaluator::PopValue(ValueType *value) { if (iterator == dictionary_->end()) { // The identifier wasn't found in the dictionary. Don't imply any // default value, just fail. + BPLOG(ERROR) << "Identifier " << token << " not in dictionary"; return false; } diff --git a/toolkit/crashreporter/google-breakpad/src/processor/range_map-inl.h b/toolkit/crashreporter/google-breakpad/src/processor/range_map-inl.h index 3b01f9e3b1c..17169ea465b 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/range_map-inl.h +++ b/toolkit/crashreporter/google-breakpad/src/processor/range_map-inl.h @@ -38,6 +38,7 @@ #include "processor/range_map.h" +#include "processor/logging.h" namespace google_breakpad { @@ -50,8 +51,15 @@ bool RangeMap::StoreRange(const AddressType &base, AddressType high = base + size - 1; // Check for undersize or overflow. - if (size <= 0 || high < base) + if (size <= 0 || high < base) { + // The processor will hit this case too frequently with common symbol + // files in the size == 0 case, which is more suited to a DEBUG channel. + // Filter those out since there's no DEBUG channel at the moment. + BPLOG_IF(INFO, size != 0) << "StoreRange failed, " << HexString(base) << + "+" << HexString(size) << ", " << + HexString(high); return false; + } // Ensure that this range does not overlap with another one already in the // map. @@ -62,14 +70,27 @@ bool RangeMap::StoreRange(const AddressType &base, // Some other range begins in the space used by this range. It may be // contained within the space used by this range, or it may extend lower. // Regardless, it is an error. + AddressType other_base = iterator_base->second.base(); + AddressType other_size = iterator_base->first - other_base + 1; + BPLOG(INFO) << "StoreRange failed, an existing range is contained by or " + "extends lower than the new range: new " << + HexString(base) << "+" << HexString(size) << ", existing " << + HexString(other_base) << "+" << HexString(other_size); return false; } if (iterator_high != map_.end()) { if (iterator_high->second.base() <= high) { // The range above this one overlaps with this one. It may fully - // contain this range, or it may begin within this range and extend + // contain this range, or it may begin within this range and extend // higher. Regardless, it's an error. + AddressType other_base = iterator_high->second.base(); + AddressType other_size = iterator_high->first - other_base + 1; + BPLOG(INFO) << "StoreRange failed, an existing range contains or " + "extends higher than the new range: new " << + HexString(base) << "+" << HexString(size) << + ", existing " << + HexString(other_base) << "+" << HexString(other_size); return false; } } @@ -85,8 +106,8 @@ template bool RangeMap::RetrieveRange( const AddressType &address, EntryType *entry, AddressType *entry_base, AddressType *entry_size) const { - if (!entry) - return false; + BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveRange requires |entry|"; + assert(entry); MapConstIterator iterator = map_.lower_bound(address); if (iterator == map_.end()) @@ -114,8 +135,8 @@ template bool RangeMap::RetrieveNearestRange( const AddressType &address, EntryType *entry, AddressType *entry_base, AddressType *entry_size) const { - if (!entry) - return false; + BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveNearestRange requires |entry|"; + assert(entry); // If address is within a range, RetrieveRange can handle it. if (RetrieveRange(address, entry, entry_base, entry_size)) @@ -145,8 +166,13 @@ template bool RangeMap::RetrieveRangeAtIndex( int index, EntryType *entry, AddressType *entry_base, AddressType *entry_size) const { - if (!entry || index >= GetCount()) + BPLOG_IF(ERROR, !entry) << "RangeMap::RetrieveRangeAtIndex requires |entry|"; + assert(entry); + + if (index >= GetCount()) { + BPLOG(ERROR) << "Index out of range: " << index << "/" << GetCount(); return false; + } // Walk through the map. Although it's ordered, it's not a vector, so it // can't be addressed directly by index. diff --git a/toolkit/crashreporter/google-breakpad/src/processor/range_map.h b/toolkit/crashreporter/google-breakpad/src/processor/range_map.h index 9366563df66..a7b67412f5c 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/range_map.h +++ b/toolkit/crashreporter/google-breakpad/src/processor/range_map.h @@ -60,9 +60,8 @@ class RangeMap { const EntryType &entry); // Locates the range encompassing the supplied address. If there is - // no such range, or if there is a parameter error, returns false. - // entry_base and entry_size, if non-NULL, are set to the base and size - // of the entry's range. + // no such range, returns false. entry_base and entry_size, if non-NULL, + // are set to the base and size of the entry's range. bool RetrieveRange(const AddressType &address, EntryType *entry, AddressType *entry_base, AddressType *entry_size) const; @@ -77,9 +76,9 @@ class RangeMap { // Treating all ranges as a list ordered by the address spaces that they // occupy, locates the range at the index specified by index. Returns - // false if index is larger than the number of ranges stored, or if another - // parameter error occurs. entry_base and entry_size, if non-NULL, are set - // to the base and size of the entry's range. + // false if index is larger than the number of ranges stored. entry_base + // and entry_size, if non-NULL, are set to the base and size of the entry's + // range. // // RetrieveRangeAtIndex is not optimized for speedy operation. bool RetrieveRangeAtIndex(int index, EntryType *entry, diff --git a/toolkit/crashreporter/google-breakpad/src/processor/simple_symbol_supplier.cc b/toolkit/crashreporter/google-breakpad/src/processor/simple_symbol_supplier.cc index 734a7f77b26..628000131f1 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/simple_symbol_supplier.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/simple_symbol_supplier.cc @@ -41,6 +41,7 @@ #include "processor/simple_symbol_supplier.h" #include "google_breakpad/processor/code_module.h" #include "google_breakpad/processor/system_info.h" +#include "processor/logging.h" #include "processor/pathname_stripper.h" namespace google_breakpad { @@ -53,7 +54,11 @@ static bool file_exists(const string &file_name) { SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFile( const CodeModule *module, const SystemInfo *system_info, string *symbol_file) { + BPLOG_IF(ERROR, !symbol_file) << "SimpleSymbolSupplier::GetSymbolFile " + "requires |symbol_file|"; assert(symbol_file); + symbol_file->clear(); + for (unsigned int path_index = 0; path_index < paths_.size(); ++path_index) { SymbolResult result; if ((result = GetSymbolFileAtPath(module, system_info, paths_[path_index], @@ -67,7 +72,11 @@ SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFile( SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPath( const CodeModule *module, const SystemInfo *system_info, const string &root_path, string *symbol_file) { + BPLOG_IF(ERROR, !symbol_file) << "SimpleSymbolSupplier::GetSymbolFileAtPath " + "requires |symbol_file|"; assert(symbol_file); + symbol_file->clear(); + if (!module) return NOT_FOUND; @@ -77,15 +86,24 @@ SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPath( // Append the debug (pdb) file name as a directory name. path.append("/"); string debug_file_name = PathnameStripper::File(module->debug_file()); - if (debug_file_name.empty()) + if (debug_file_name.empty()) { + BPLOG(ERROR) << "Can't construct symbol file path without debug_file " + "(code_file = " << + PathnameStripper::File(module->code_file()) << ")"; return NOT_FOUND; + } path.append(debug_file_name); // Append the identifier as a directory name. path.append("/"); string identifier = module->debug_identifier(); - if (identifier.empty()) + if (identifier.empty()) { + BPLOG(ERROR) << "Can't construct symbol file path without debug_identifier " + "(code_file = " << + PathnameStripper::File(module->code_file()) << + ", debug_file = " << debug_file_name << ")"; return NOT_FOUND; + } path.append(identifier); // Transform the debug file name into one ending in .sym. If the existing @@ -103,8 +121,10 @@ SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPath( } path.append(".sym"); - if (!file_exists(path)) + if (!file_exists(path)) { + BPLOG(INFO) << "No symbol file at " << path; return NOT_FOUND; + } *symbol_file = path; return FOUND; diff --git a/toolkit/crashreporter/google-breakpad/src/processor/stackwalker.cc b/toolkit/crashreporter/google-breakpad/src/processor/stackwalker.cc index 00eaa6afb1a..46d8384b8fd 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/stackwalker.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/stackwalker.cc @@ -45,6 +45,7 @@ #include "google_breakpad/processor/stack_frame.h" #include "google_breakpad/processor/symbol_supplier.h" #include "processor/linked_ptr.h" +#include "processor/logging.h" #include "processor/scoped_ptr.h" #include "processor/stack_frame_info.h" #include "processor/stackwalker_ppc.h" @@ -67,6 +68,7 @@ Stackwalker::Stackwalker(const SystemInfo *system_info, bool Stackwalker::Walk(CallStack *stack) { + BPLOG_IF(ERROR, !stack) << "Stackwalker::Walk requires |stack|"; assert(stack); stack->Clear(); @@ -139,8 +141,10 @@ Stackwalker* Stackwalker::StackwalkerForCPU( const CodeModules *modules, SymbolSupplier *supplier, SourceLineResolverInterface *resolver) { - if (!context) + if (!context) { + BPLOG(ERROR) << "Can't choose a stackwalker implementation without context"; return NULL; + } Stackwalker *cpu_stackwalker = NULL; @@ -161,6 +165,9 @@ Stackwalker* Stackwalker::StackwalkerForCPU( break; } + BPLOG_IF(ERROR, !cpu_stackwalker) << "Unknown CPU type " << HexString(cpu) << + ", can't choose a stackwalker " + "implementation"; return cpu_stackwalker; } diff --git a/toolkit/crashreporter/google-breakpad/src/processor/stackwalker_ppc.cc b/toolkit/crashreporter/google-breakpad/src/processor/stackwalker_ppc.cc index 044ae99b12d..02a49b21b98 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/stackwalker_ppc.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/stackwalker_ppc.cc @@ -38,6 +38,7 @@ #include "google_breakpad/processor/call_stack.h" #include "google_breakpad/processor/memory_region.h" #include "google_breakpad/processor/stack_frame_cpu.h" +#include "processor/logging.h" namespace google_breakpad { @@ -54,14 +55,19 @@ StackwalkerPPC::StackwalkerPPC(const SystemInfo *system_info, // This implementation only covers 32-bit ppc CPUs. The limits of the // supplied stack are invalid. Mark memory_ = NULL, which will cause // stackwalking to fail. + BPLOG(ERROR) << "Memory out of range for stackwalking: " << + HexString(memory_->GetBase()) << "+" << + HexString(memory_->GetSize()); memory_ = NULL; } } StackFrame* StackwalkerPPC::GetContextFrame() { - if (!context_ || !memory_) + if (!context_ || !memory_) { + BPLOG(ERROR) << "Can't get context frame without context or memory"; return NULL; + } StackFramePPC *frame = new StackFramePPC(); @@ -78,8 +84,10 @@ StackFrame* StackwalkerPPC::GetContextFrame() { StackFrame* StackwalkerPPC::GetCallerFrame( const CallStack *stack, const vector< linked_ptr > &stack_frame_info) { - if (!memory_ || !stack) + if (!memory_ || !stack) { + BPLOG(ERROR) << "Can't get caller frame without memory or stack"; return NULL; + } // The instruction pointers for previous frames are saved on the stack. // The typical ppc calling convention is for the called procedure to store diff --git a/toolkit/crashreporter/google-breakpad/src/processor/stackwalker_x86.cc b/toolkit/crashreporter/google-breakpad/src/processor/stackwalker_x86.cc index cb8be3ed7b0..e39df17f26c 100755 --- a/toolkit/crashreporter/google-breakpad/src/processor/stackwalker_x86.cc +++ b/toolkit/crashreporter/google-breakpad/src/processor/stackwalker_x86.cc @@ -42,6 +42,7 @@ #include "google_breakpad/processor/memory_region.h" #include "google_breakpad/processor/stack_frame_cpu.h" #include "processor/linked_ptr.h" +#include "processor/logging.h" #include "processor/stack_frame_info.h" namespace google_breakpad { @@ -58,14 +59,19 @@ StackwalkerX86::StackwalkerX86(const SystemInfo *system_info, if (memory_->GetBase() + memory_->GetSize() - 1 > 0xffffffff) { // The x86 is a 32-bit CPU, the limits of the supplied stack are invalid. // Mark memory_ = NULL, which will cause stackwalking to fail. + BPLOG(ERROR) << "Memory out of range for stackwalking: " << + HexString(memory_->GetBase()) << "+" << + HexString(memory_->GetSize()); memory_ = NULL; } } StackFrame* StackwalkerX86::GetContextFrame() { - if (!context_ || !memory_) + if (!context_ || !memory_) { + BPLOG(ERROR) << "Can't get context frame without context or memory"; return NULL; + } StackFrameX86 *frame = new StackFrameX86(); @@ -82,8 +88,10 @@ StackFrame* StackwalkerX86::GetContextFrame() { StackFrame* StackwalkerX86::GetCallerFrame( const CallStack *stack, const vector< linked_ptr > &stack_frame_info) { - if (!memory_ || !stack) + if (!memory_ || !stack) { + BPLOG(ERROR) << "Can't get caller frame without memory or stack"; return NULL; + } StackFrameX86 *last_frame = static_cast( stack->frames()->back()); @@ -223,9 +231,7 @@ StackFrame* StackwalkerX86::GetCallerFrame( "$esp .raSearchStart 4 + ="; } else { // The function corresponding to the last frame doesn't use %ebp at - // all. The callee frame is located relative to %esp. %ebp is reset - // to itself only to cause it to appear to have been set in - // dictionary_validity. + // all. The callee frame is located relative to %esp. // // The called procedure's instruction pointer and stack pointer are // recovered in the same way as the case above, except that no @@ -244,8 +250,7 @@ StackFrame* StackwalkerX86::GetCallerFrame( // %esp_new = %esp_old + callee_params + saved_regs + locals + 4 // %ebp_new = %ebp_old program_string = "$eip .raSearchStart ^ = " - "$esp .raSearchStart 4 + = " - "$ebp $ebp ="; + "$esp .raSearchStart 4 + ="; recover_ebp = false; } } else { @@ -280,15 +285,14 @@ StackFrame* StackwalkerX86::GetCallerFrame( "$ebp $ebp ^ ="; } - // Now crank it out, making sure that the program string set the three - // required variables. + // Now crank it out, making sure that the program string set at least the + // two required variables. PostfixEvaluator evaluator = PostfixEvaluator(&dictionary, memory_); PostfixEvaluator::DictionaryValidityType dictionary_validity; if (!evaluator.Evaluate(program_string, &dictionary_validity) || dictionary_validity.find("$eip") == dictionary_validity.end() || - dictionary_validity.find("$esp") == dictionary_validity.end() || - dictionary_validity.find("$ebp") == dictionary_validity.end()) { + dictionary_validity.find("$esp") == dictionary_validity.end()) { return NULL; } diff --git a/toolkit/crashreporter/google-breakpad/src/processor/testdata/minidump2.stackwalk.machine_readable.out b/toolkit/crashreporter/google-breakpad/src/processor/testdata/minidump2.stackwalk.machine_readable.out index 53eab90a989..a292c8fd3dc 100644 --- a/toolkit/crashreporter/google-breakpad/src/processor/testdata/minidump2.stackwalk.machine_readable.out +++ b/toolkit/crashreporter/google-breakpad/src/processor/testdata/minidump2.stackwalk.machine_readable.out @@ -1,19 +1,19 @@ OS|Windows NT|5.1.2600 Service Pack 2 CPU|x86|GenuineIntel family 6 model 13 stepping 8 Crash|EXCEPTION_ACCESS_VIOLATION|0x45|0 -Module|test_app.exe||0x00400000|0x0042cfff|1 -Module|dbghelp.dll|5.1.2600.2180|0x59a60000|0x59b00fff|0 -Module|imm32.dll|5.1.2600.2180|0x76390000|0x763acfff|0 -Module|psapi.dll|5.1.2600.2180|0x76bf0000|0x76bfafff|0 -Module|ole32.dll|5.1.2600.2726|0x774e0000|0x7761cfff|0 -Module|version.dll|5.1.2600.2180|0x77c00000|0x77c07fff|0 -Module|msvcrt.dll|7.0.2600.2180|0x77c10000|0x77c67fff|0 -Module|user32.dll|5.1.2600.2622|0x77d40000|0x77dcffff|0 -Module|advapi32.dll|5.1.2600.2180|0x77dd0000|0x77e6afff|0 -Module|rpcrt4.dll|5.1.2600.2180|0x77e70000|0x77f00fff|0 -Module|gdi32.dll|5.1.2600.2818|0x77f10000|0x77f56fff|0 -Module|kernel32.dll|5.1.2600.2945|0x7c800000|0x7c8f3fff|0 -Module|ntdll.dll|5.1.2600.2180|0x7c900000|0x7c9affff|0 +Module|test_app.exe||test_app.pdb|5A9832E5287241C1838ED98914E9B7FF1|0x00400000|0x0042cfff|1 +Module|dbghelp.dll|5.1.2600.2180|dbghelp.pdb|39559573E21B46F28E286923BE9E6A761|0x59a60000|0x59b00fff|0 +Module|imm32.dll|5.1.2600.2180|imm32.pdb|2C17A49C251B4C8EB9E2AD13D7D9EA162|0x76390000|0x763acfff|0 +Module|psapi.dll|5.1.2600.2180|psapi.pdb|A5C3A1F9689F43D8AD228A09293889702|0x76bf0000|0x76bfafff|0 +Module|ole32.dll|5.1.2600.2726|ole32.pdb|683B65B246F4418796D2EE6D4C55EB112|0x774e0000|0x7761cfff|0 +Module|version.dll|5.1.2600.2180|version.pdb|180A90C40384463E82DDC45B2C8AB76E2|0x77c00000|0x77c07fff|0 +Module|msvcrt.dll|7.0.2600.2180|msvcrt.pdb|A678F3C30DED426B839032B996987E381|0x77c10000|0x77c67fff|0 +Module|user32.dll|5.1.2600.2622|user32.pdb|EE2B714D83A34C9D88027621272F83262|0x77d40000|0x77dcffff|0 +Module|advapi32.dll|5.1.2600.2180|advapi32.pdb|455D6C5F184D45BBB5C5F30F829751142|0x77dd0000|0x77e6afff|0 +Module|rpcrt4.dll|5.1.2600.2180|rpcrt4.pdb|BEA45A721DA141DAA3BA86B3A20311532|0x77e70000|0x77f00fff|0 +Module|gdi32.dll|5.1.2600.2818|gdi32.pdb|C0EA66BE00A64BD7AEF79E443A91869C2|0x77f10000|0x77f56fff|0 +Module|kernel32.dll|5.1.2600.2945|kernel32.pdb|BCE8785C57B44245A669896B6A19B9542|0x7c800000|0x7c8f3fff|0 +Module|ntdll.dll|5.1.2600.2180|ntdll.pdb|36515FB5D04345E491F672FA2E2878C02|0x7c900000|0x7c9affff|0 0|0|test_app.exe|`anonymous namespace'::CrashFunction|c:\test_app.cc|58|0x3 0|1|test_app.exe|main|c:\test_app.cc|65|0x4