mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-23 22:15:41 +01:00
Make programs in src/tools/linux build via the automake build system
R=jimb at http://breakpad.appspot.com/265001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@775 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
d2b6b9ae82
commit
dbf409ca20
82
Makefile.am
82
Makefile.am
@ -73,7 +73,7 @@ src_client_linux_libbreakpad_client_a_SOURCES = \
|
||||
src/common/string_conversion.cc \
|
||||
src/common/linux/file_id.cc \
|
||||
src/common/linux/guid_creator.cc
|
||||
endif
|
||||
endif LINUX_HOST
|
||||
|
||||
if !DISABLE_PROCESSOR
|
||||
src_libbreakpad_a_SOURCES = \
|
||||
@ -216,7 +216,16 @@ endif !DISABLE_PROCESSOR
|
||||
if LINUX_HOST
|
||||
bin_PROGRAMS += \
|
||||
src/client/linux/linux_dumper_unittest_helper
|
||||
|
||||
if !DISABLE_TOOLS
|
||||
bin_PROGRAMS += \
|
||||
src/tools/linux/dump_syms/dump_syms \
|
||||
src/tools/linux/md2core/minidump-2-core \
|
||||
src/tools/linux/symupload/minidump_upload \
|
||||
src/tools/linux/symupload/sym_upload
|
||||
endif
|
||||
endif LINUX_HOST
|
||||
|
||||
|
||||
## Tests
|
||||
if !DISABLE_PROCESSOR
|
||||
@ -252,7 +261,12 @@ endif
|
||||
if LINUX_HOST
|
||||
check_PROGRAMS += \
|
||||
src/client/linux/linux_client_unittest
|
||||
|
||||
if !DISABLE_TOOLS
|
||||
check_PROGRAMS += \
|
||||
src/common/dumper_unittest
|
||||
endif
|
||||
endif LINUX_HOST
|
||||
|
||||
if !DISABLE_PROCESSOR
|
||||
if SELFTEST
|
||||
@ -312,7 +326,73 @@ src_client_linux_linux_client_unittest_LDADD = \
|
||||
src/common/string_conversion.o
|
||||
|
||||
src_client_linux_linux_client_unittest_DEPENDENCIES = src/client/linux/linux_dumper_unittest_helper src/client/linux/libbreakpad_client.a src/libbreakpad.a
|
||||
|
||||
if !DISABLE_TOOLS
|
||||
src_tools_linux_dump_syms_dump_syms_SOURCES = \
|
||||
src/common/dwarf_cfi_to_module.cc \
|
||||
src/common/dwarf_cu_to_module.cc \
|
||||
src/common/dwarf_line_to_module.cc \
|
||||
src/common/language.cc \
|
||||
src/common/module.cc \
|
||||
src/common/stabs_reader.cc \
|
||||
src/common/stabs_to_module.cc \
|
||||
src/common/dwarf/bytereader.cc \
|
||||
src/common/dwarf/dwarf2diehandler.cc \
|
||||
src/common/dwarf/dwarf2reader.cc \
|
||||
src/common/linux/dump_symbols.cc \
|
||||
src/common/linux/file_id.cc \
|
||||
src/tools/linux/dump_syms/dump_syms.cc
|
||||
|
||||
src_tools_linux_md2core_minidump_2_core_SOURCES = \
|
||||
src/tools/linux/md2core/minidump-2-core.cc
|
||||
|
||||
src_tools_linux_symupload_minidump_upload_SOURCES = \
|
||||
src/common/linux/http_upload.cc \
|
||||
src/tools/linux/symupload/minidump_upload.cc
|
||||
src_tools_linux_symupload_minidump_upload_LDFLAGS = -ldl
|
||||
|
||||
src_tools_linux_symupload_sym_upload_SOURCES = \
|
||||
src/common/linux/http_upload.cc \
|
||||
src/tools/linux/symupload/sym_upload.cc
|
||||
src_tools_linux_symupload_sym_upload_LDFLAGS = -ldl
|
||||
|
||||
src_common_dumper_unittest_SOURCES = \
|
||||
src/common/byte_cursor_unittest.cc \
|
||||
src/common/dwarf_cfi_to_module.cc \
|
||||
src/common/dwarf_cfi_to_module_unittest.cc \
|
||||
src/common/dwarf_cu_to_module.cc \
|
||||
src/common/dwarf_cu_to_module_unittest.cc \
|
||||
src/common/dwarf_line_to_module.cc \
|
||||
src/common/dwarf_line_to_module_unittest.cc \
|
||||
src/common/language.cc \
|
||||
src/common/module.cc \
|
||||
src/common/module_unittest.cc \
|
||||
src/common/stabs_reader.cc \
|
||||
src/common/stabs_reader_unittest.cc \
|
||||
src/common/stabs_to_module.cc \
|
||||
src/common/stabs_to_module_unittest.cc \
|
||||
src/common/test_assembler.cc \
|
||||
src/common/dwarf/bytereader.cc \
|
||||
src/common/dwarf/bytereader_unittest.cc \
|
||||
src/common/dwarf/cfi_assembler.cc \
|
||||
src/common/dwarf/dwarf2diehandler.cc \
|
||||
src/common/dwarf/dwarf2diehandler_unittest.cc \
|
||||
src/common/dwarf/dwarf2reader.cc \
|
||||
src/common/dwarf/dwarf2reader_cfi_unittest.cc \
|
||||
src/common/linux/dump_symbols.cc \
|
||||
src/common/linux/file_id.cc \
|
||||
src/common/linux/file_id_unittest.cc \
|
||||
src/testing/gtest/src/gtest-all.cc \
|
||||
src/testing/gtest/src/gtest_main.cc \
|
||||
src/testing/src/gmock-all.cc
|
||||
src_common_dumper_unittest_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/testing/include \
|
||||
-I$(top_srcdir)/src/testing/gtest/include \
|
||||
-I$(top_srcdir)/src/testing/gtest \
|
||||
-I$(top_srcdir)/src/testing
|
||||
endif
|
||||
endif LINUX_HOST
|
||||
|
||||
if !DISABLE_PROCESSOR
|
||||
src_processor_address_map_unittest_SOURCES = \
|
||||
|
877
Makefile.in
877
Makefile.in
File diff suppressed because it is too large
Load Diff
236
configure
vendored
236
configure
vendored
@ -231,10 +231,10 @@ fi
|
||||
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
|
||||
else
|
||||
$as_echo "$0: Please tell bug-autoconf@gnu.org and
|
||||
$0: google-breakpad-dev@googlegroups.com about your system, including any
|
||||
$0: error possibly output before this message. Then install
|
||||
$0: a modern shell, or manually run the script under such a
|
||||
$0: shell if you do have one."
|
||||
$0: google-breakpad-dev@googlegroups.com about your system,
|
||||
$0: including any error possibly output before this
|
||||
$0: message. Then install a modern shell, or manually run
|
||||
$0: the script under such a shell if you do have one."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
@ -558,12 +558,50 @@ PACKAGE_BUGREPORT='google-breakpad-dev@googlegroups.com'
|
||||
PACKAGE_URL=''
|
||||
|
||||
ac_unique_file="README"
|
||||
# Factoring default headers for most tests.
|
||||
ac_includes_default="\
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
#else
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='am__EXEEXT_FALSE
|
||||
am__EXEEXT_TRUE
|
||||
LTLIBOBJS
|
||||
LIBOBJS
|
||||
SELFTEST_FALSE
|
||||
SELFTEST_TRUE
|
||||
DISABLE_TOOLS_FALSE
|
||||
DISABLE_TOOLS_TRUE
|
||||
DISABLE_PROCESSOR_FALSE
|
||||
DISABLE_PROCESSOR_TRUE
|
||||
LINUX_HOST_FALSE
|
||||
@ -673,6 +711,7 @@ enable_option_checking
|
||||
enable_dependency_tracking
|
||||
enable_m32
|
||||
enable_processor
|
||||
enable_tools
|
||||
enable_selftest
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
@ -1310,6 +1349,7 @@ Optional Features:
|
||||
--enable-dependency-tracking do not reject slow dependency extractors
|
||||
--enable-m32 Compile/build with -m32 (default is no)
|
||||
--disable-processor Don't build processor library (default is no)
|
||||
--disable-tools Don't build tool binaries (default is no)
|
||||
--enable-selftest Run extra tests with "make check" (may conflict with
|
||||
optimizations) (default is no)
|
||||
|
||||
@ -1606,6 +1646,130 @@ fi
|
||||
|
||||
} # ac_fn_c_try_link
|
||||
|
||||
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
|
||||
# -------------------------------------------------------
|
||||
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
|
||||
# the include files in INCLUDES and setting the cache variable VAR
|
||||
# accordingly.
|
||||
ac_fn_c_check_header_mongrel ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
else
|
||||
# Is the header compilable?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
|
||||
$as_echo_n "checking $2 usability... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_header_compiler=yes
|
||||
else
|
||||
ac_header_compiler=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
|
||||
$as_echo "$ac_header_compiler" >&6; }
|
||||
|
||||
# Is the header present?
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
|
||||
$as_echo_n "checking $2 presence... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_cpp "$LINENO"; then :
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
|
||||
$as_echo "$ac_header_preproc" >&6; }
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
|
||||
yes:no: )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
;;
|
||||
no:yes:* )
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
|
||||
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
|
||||
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
|
||||
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
|
||||
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
|
||||
( cat <<\_ASBOX
|
||||
## --------------------------------------------------- ##
|
||||
## Report this to google-breakpad-dev@googlegroups.com ##
|
||||
## --------------------------------------------------- ##
|
||||
_ASBOX
|
||||
) | sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
eval "$3=\$ac_header_compiler"
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
fi
|
||||
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
|
||||
|
||||
} # ac_fn_c_check_header_mongrel
|
||||
|
||||
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
|
||||
# -------------------------------------------------------
|
||||
# Tests whether HEADER exists and can be compiled using the include files in
|
||||
# INCLUDES, setting the cache variable VAR accordingly.
|
||||
ac_fn_c_check_header_compile ()
|
||||
{
|
||||
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
|
||||
$as_echo_n "checking for $2... " >&6; }
|
||||
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
$4
|
||||
#include <$2>
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
eval "$3=yes"
|
||||
else
|
||||
eval "$3=no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
eval ac_res=\$$3
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
|
||||
|
||||
} # ac_fn_c_check_header_compile
|
||||
|
||||
# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
|
||||
# ----------------------------------------------------
|
||||
# Tries to find if the field MEMBER exists in type AGGR, after including
|
||||
@ -5089,6 +5253,36 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
|
||||
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
|
||||
"
|
||||
eval as_val=\$$as_ac_Header
|
||||
if test "x$as_val" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
for ac_header in a.out.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "a.out.h" "ac_cv_header_a_out_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_a_out_h" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_A_OUT_H 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
# Only build Linux client libs when compiling for Linux
|
||||
case $host in
|
||||
@ -5151,8 +5345,34 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue; then
|
||||
as_fn_error "--disable-processor was specified, and not building for Linux. Nothing to build!" "$LINENO" 5
|
||||
# Check whether --enable-tools was given.
|
||||
if test "${enable_tools+set}" = set; then :
|
||||
enableval=$enable_tools; case "${enableval}" in
|
||||
yes)
|
||||
disable_tools=false
|
||||
;;
|
||||
no)
|
||||
disable_tools=true
|
||||
;;
|
||||
*)
|
||||
as_fn_error "bad value ${enableval} for --disable-tools" "$LINENO" 5
|
||||
;;
|
||||
esac
|
||||
else
|
||||
disable_tools=false
|
||||
fi
|
||||
|
||||
if test x$disable_tools = xtrue; then
|
||||
DISABLE_TOOLS_TRUE=
|
||||
DISABLE_TOOLS_FALSE='#'
|
||||
else
|
||||
DISABLE_TOOLS_TRUE='#'
|
||||
DISABLE_TOOLS_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools = xtrue; then
|
||||
as_fn_error "--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!" "$LINENO" 5
|
||||
fi
|
||||
|
||||
ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
|
||||
@ -5322,6 +5542,10 @@ if test -z "${DISABLE_PROCESSOR_TRUE}" && test -z "${DISABLE_PROCESSOR_FALSE}";
|
||||
as_fn_error "conditional \"DISABLE_PROCESSOR\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${DISABLE_TOOLS_TRUE}" && test -z "${DISABLE_TOOLS_FALSE}"; then
|
||||
as_fn_error "conditional \"DISABLE_TOOLS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${SELFTEST_TRUE}" && test -z "${SELFTEST_FALSE}"; then
|
||||
as_fn_error "conditional \"SELFTEST\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
23
configure.ac
23
configure.ac
@ -49,6 +49,7 @@ AC_PROG_RANLIB
|
||||
AC_HEADER_STDC
|
||||
m4_include(m4/ax_pthread.m4)
|
||||
AX_PTHREAD
|
||||
AC_CHECK_HEADERS([a.out.h])
|
||||
|
||||
# Only build Linux client libs when compiling for Linux
|
||||
case $host in
|
||||
@ -95,8 +96,26 @@ AC_ARG_ENABLE(processor,
|
||||
[disable_processor=false])
|
||||
AM_CONDITIONAL(DISABLE_PROCESSOR, test x$disable_processor = xtrue)
|
||||
|
||||
if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue; then
|
||||
AC_MSG_ERROR([--disable-processor was specified, and not building for Linux. Nothing to build!])
|
||||
AC_ARG_ENABLE(tools,
|
||||
AS_HELP_STRING([--disable-tools],
|
||||
[Don't build tool binaries]
|
||||
[(default is no)]),
|
||||
[case "${enableval}" in
|
||||
yes)
|
||||
disable_tools=false
|
||||
;;
|
||||
no)
|
||||
disable_tools=true
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(bad value ${enableval} for --disable-tools)
|
||||
;;
|
||||
esac],
|
||||
[disable_tools=false])
|
||||
AM_CONDITIONAL(DISABLE_TOOLS, test x$disable_tools = xtrue)
|
||||
|
||||
if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools = xtrue; then
|
||||
AC_MSG_ERROR([--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!])
|
||||
fi
|
||||
|
||||
AC_CHECK_MEMBER(struct sockaddr.sa_len,
|
||||
|
@ -677,10 +677,10 @@ void CUFixtureBase::TestLine(int i, int j,
|
||||
#define TestLineCount(a,b) TRACE(TestLineCount((a),(b)))
|
||||
#define TestLine(a,b,c,d,e,f) TRACE(TestLine((a),(b),(c),(d),(e),(f)))
|
||||
|
||||
class Simple: public CUFixtureBase, public Test {
|
||||
class SimpleCU: public CUFixtureBase, public Test {
|
||||
};
|
||||
|
||||
TEST_F(Simple, OneFunc) {
|
||||
TEST_F(SimpleCU, OneFunc) {
|
||||
PushLine(0x938cf8c07def4d34ULL, 0x55592d727f6cd01fLL, "line-file", 246571772);
|
||||
|
||||
StartCU();
|
||||
@ -695,7 +695,7 @@ TEST_F(Simple, OneFunc) {
|
||||
246571772);
|
||||
}
|
||||
|
||||
TEST_F(Simple, IrrelevantRootChildren) {
|
||||
TEST_F(SimpleCU, IrrelevantRootChildren) {
|
||||
StartCU();
|
||||
dwarf2reader::AttributeList no_attrs;
|
||||
EXPECT_FALSE(root_handler_
|
||||
@ -703,7 +703,7 @@ TEST_F(Simple, IrrelevantRootChildren) {
|
||||
dwarf2reader::DW_TAG_lexical_block, no_attrs));
|
||||
}
|
||||
|
||||
TEST_F(Simple, IrrelevantNamedScopeChildren) {
|
||||
TEST_F(SimpleCU, IrrelevantNamedScopeChildren) {
|
||||
StartCU();
|
||||
dwarf2reader::AttributeList no_attrs;
|
||||
DIEHandler *class_A_handler
|
||||
@ -717,7 +717,7 @@ TEST_F(Simple, IrrelevantNamedScopeChildren) {
|
||||
}
|
||||
|
||||
// Verify that FileContexts can safely be deleted unused.
|
||||
TEST_F(Simple, UnusedFileContext) {
|
||||
TEST_F(SimpleCU, UnusedFileContext) {
|
||||
Module m("module-name", "module-os", "module-arch", "module-id");
|
||||
DwarfCUToModule::FileContext fc("dwarf-filename", &m);
|
||||
|
||||
@ -725,7 +725,7 @@ TEST_F(Simple, UnusedFileContext) {
|
||||
reporter_.SetCUName("compilation-unit-name");
|
||||
}
|
||||
|
||||
TEST_F(Simple, InlineFunction) {
|
||||
TEST_F(SimpleCU, InlineFunction) {
|
||||
PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118);
|
||||
|
||||
StartCU();
|
||||
@ -740,7 +740,7 @@ TEST_F(Simple, InlineFunction) {
|
||||
0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL);
|
||||
}
|
||||
|
||||
TEST_F(Simple, InlineFunctionSignedAttribute) {
|
||||
TEST_F(SimpleCU, InlineFunctionSignedAttribute) {
|
||||
PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118);
|
||||
|
||||
StartCU();
|
||||
@ -759,7 +759,7 @@ TEST_F(Simple, InlineFunctionSignedAttribute) {
|
||||
// Any DIE with an DW_AT_inline attribute can be cited by
|
||||
// DW_AT_abstract_origin attributes --- even if the value of the
|
||||
// DW_AT_inline attribute is DW_INL_not_inlined.
|
||||
TEST_F(Simple, AbstractOriginNotInlined) {
|
||||
TEST_F(SimpleCU, AbstractOriginNotInlined) {
|
||||
PushLine(0x2805c4531be6ca0eULL, 0x686b52155a8d4d2cULL, "line-file", 6111581);
|
||||
|
||||
StartCU();
|
||||
@ -774,7 +774,7 @@ TEST_F(Simple, AbstractOriginNotInlined) {
|
||||
0x2805c4531be6ca0eULL, 0x686b52155a8d4d2cULL);
|
||||
}
|
||||
|
||||
TEST_F(Simple, UnknownAbstractOrigin) {
|
||||
TEST_F(SimpleCU, UnknownAbstractOrigin) {
|
||||
EXPECT_CALL(reporter_, UnknownAbstractOrigin(_, 1ULL)).WillOnce(Return());
|
||||
PushLine(0x1758a0f941b71efbULL, 0x1cf154f1f545e146ULL, "line-file", 75173118);
|
||||
|
||||
@ -1556,9 +1556,9 @@ TEST_F(Specifications, PreferSpecificationParents) {
|
||||
0xbbd9d54dce3b95b7ULL, 0x39188b7b52b0899fULL);
|
||||
}
|
||||
|
||||
class Errors: public CUFixtureBase, public Test { };
|
||||
class CUErrors: public CUFixtureBase, public Test { };
|
||||
|
||||
TEST_F(Errors, BadStmtList) {
|
||||
TEST_F(CUErrors, BadStmtList) {
|
||||
EXPECT_CALL(reporter_, BadLineInfoOffset(dummy_line_size_ + 10)).Times(1);
|
||||
|
||||
ASSERT_TRUE(root_handler_
|
||||
@ -1582,7 +1582,7 @@ TEST_F(Errors, BadStmtList) {
|
||||
root_handler_.Finish();
|
||||
}
|
||||
|
||||
TEST_F(Errors, NoLineSection) {
|
||||
TEST_F(CUErrors, NoLineSection) {
|
||||
EXPECT_CALL(reporter_, MissingSection(".debug_line")).Times(1);
|
||||
PushLine(0x88507fb678052611ULL, 0x42c8e9de6bbaa0faULL, "line-file", 64472290);
|
||||
// Delete the entry for .debug_line added by the fixture class's constructor.
|
||||
@ -1592,7 +1592,7 @@ TEST_F(Errors, NoLineSection) {
|
||||
root_handler_.Finish();
|
||||
}
|
||||
|
||||
TEST_F(Errors, BadDwarfVersion1) {
|
||||
TEST_F(CUErrors, BadDwarfVersion1) {
|
||||
// Kludge: satisfy reporter_'s expectation.
|
||||
reporter_.SetCUName("compilation-unit-name");
|
||||
|
||||
@ -1601,7 +1601,7 @@ TEST_F(Errors, BadDwarfVersion1) {
|
||||
0xc9de224ccb99ac3eULL, 1));
|
||||
}
|
||||
|
||||
TEST_F(Errors, GoodDwarfVersion2) {
|
||||
TEST_F(CUErrors, GoodDwarfVersion2) {
|
||||
// Kludge: satisfy reporter_'s expectation.
|
||||
reporter_.SetCUName("compilation-unit-name");
|
||||
|
||||
@ -1610,7 +1610,7 @@ TEST_F(Errors, GoodDwarfVersion2) {
|
||||
0xc9de224ccb99ac3eULL, 2));
|
||||
}
|
||||
|
||||
TEST_F(Errors, GoodDwarfVersion3) {
|
||||
TEST_F(CUErrors, GoodDwarfVersion3) {
|
||||
// Kludge: satisfy reporter_'s expectation.
|
||||
reporter_.SetCUName("compilation-unit-name");
|
||||
|
||||
@ -1619,7 +1619,7 @@ TEST_F(Errors, GoodDwarfVersion3) {
|
||||
0xc9de224ccb99ac3eULL, 3));
|
||||
}
|
||||
|
||||
TEST_F(Errors, BadCURootDIETag) {
|
||||
TEST_F(CUErrors, BadCURootDIETag) {
|
||||
// Kludge: satisfy reporter_'s expectation.
|
||||
reporter_.SetCUName("compilation-unit-name");
|
||||
|
||||
|
@ -38,7 +38,7 @@ using google_breakpad::DwarfLineToModule;
|
||||
using google_breakpad::Module;
|
||||
using google_breakpad::Module;
|
||||
|
||||
TEST(Simple, One) {
|
||||
TEST(SimpleModule, One) {
|
||||
Module m("name", "os", "architecture", "id");
|
||||
vector<Module::Line> lines;
|
||||
DwarfLineToModule h(&m, &lines);
|
||||
@ -59,7 +59,7 @@ TEST(Simple, One) {
|
||||
EXPECT_EQ(0x4c090cbf, lines[0].number);
|
||||
}
|
||||
|
||||
TEST(Simple, Many) {
|
||||
TEST(SimpleModule, Many) {
|
||||
Module m("name", "os", "architecture", "id");
|
||||
vector<Module::Line> lines;
|
||||
DwarfLineToModule h(&m, &lines);
|
||||
@ -196,7 +196,7 @@ TEST(Filenames, StrangeDirectoryAndFile) {
|
||||
|
||||
// We should silently ignore attempts to define directory number zero,
|
||||
// since that is always the compilation directory.
|
||||
TEST(Errors, DirectoryZero) {
|
||||
TEST(ModuleErrors, DirectoryZero) {
|
||||
Module m("name", "os", "architecture", "id");
|
||||
vector<Module::Line> lines;
|
||||
DwarfLineToModule h(&m, &lines);
|
||||
@ -212,7 +212,7 @@ TEST(Errors, DirectoryZero) {
|
||||
|
||||
// We should refuse to add lines with bogus file numbers. We should
|
||||
// produce only one warning, however.
|
||||
TEST(Errors, BadFileNumber) {
|
||||
TEST(ModuleErrors, BadFileNumber) {
|
||||
Module m("name", "os", "architecture", "id");
|
||||
vector<Module::Line> lines;
|
||||
DwarfLineToModule h(&m, &lines);
|
||||
@ -226,7 +226,7 @@ TEST(Errors, BadFileNumber) {
|
||||
|
||||
// We should treat files with bogus directory numbers as relative to
|
||||
// the compilation unit.
|
||||
TEST(Errors, BadDirectoryNumber) {
|
||||
TEST(ModuleErrors, BadDirectoryNumber) {
|
||||
Module m("name", "os", "architecture", "id");
|
||||
vector<Module::Line> lines;
|
||||
DwarfLineToModule h(&m, &lines);
|
||||
@ -241,7 +241,7 @@ TEST(Errors, BadDirectoryNumber) {
|
||||
}
|
||||
|
||||
// We promise not to report empty lines.
|
||||
TEST(Errors, EmptyLine) {
|
||||
TEST(ModuleErrors, EmptyLine) {
|
||||
Module m("name", "os", "architecture", "id");
|
||||
vector<Module::Line> lines;
|
||||
DwarfLineToModule h(&m, &lines);
|
||||
@ -254,7 +254,7 @@ TEST(Errors, EmptyLine) {
|
||||
|
||||
// We are supposed to clip lines that extend beyond the end of the
|
||||
// address space.
|
||||
TEST(Errors, BigLine) {
|
||||
TEST(ModuleErrors, BigLine) {
|
||||
Module m("name", "os", "architecture", "id");
|
||||
vector<Module::Line> lines;
|
||||
DwarfLineToModule h(&m, &lines);
|
||||
|
@ -49,6 +49,10 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_A_OUT_H
|
||||
#include <a.out.h>
|
||||
#endif
|
||||
|
@ -3,9 +3,39 @@
|
||||
/* actual length of specific struct sockaddr */
|
||||
#undef GET_SA_LEN
|
||||
|
||||
/* Define to 1 if you have the <a.out.h> header file. */
|
||||
#undef HAVE_A_OUT_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
#undef HAVE_PTHREAD
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
|
||||
|
@ -1,410 +0,0 @@
|
||||
# Build all executables.
|
||||
all::
|
||||
|
||||
# Delete all generated files: executables, object files, test coverage
|
||||
# reports, etc.
|
||||
clean::
|
||||
|
||||
# Run all tests.
|
||||
# You can run a specific test FOO with the command: 'make check-FOO'.
|
||||
check:
|
||||
|
||||
# Generate coverage reports for the execution that has taken place
|
||||
# since the coverage data files were last deleted. Only files that
|
||||
# have been added to COVERAGE_SOURCES (see below) get reported on.
|
||||
coverage:
|
||||
|
||||
# Reset all coverage counts. When coverage is enabled, each time you
|
||||
# run the program, it adds its execution counts into the profiling
|
||||
# data files in the build directory. 'make coverage-reset' deletes
|
||||
# those files, so the counts reported by 'make coverage' start from
|
||||
# zero again. Note that 'make clean' does this automatically.
|
||||
coverage-reset:
|
||||
|
||||
.PHONY: all clean check coverage coverage-reset
|
||||
|
||||
### Variables that are useful to override on the command line.
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CXXFLAGS = -g3 -O2 -Wall -m32
|
||||
|
||||
# To produce test coverage reports:
|
||||
# 1) Build all .o files and executables without optimization and with
|
||||
# 'COVERAGE=1' on the make command line.
|
||||
# 2) Run the tests.
|
||||
# 3) Do 'make coverage'.
|
||||
# All in one command:
|
||||
# $ make CFLAGS='-O0' CXXFLAGS='-O0' COVERAGE=1 clean check coverage
|
||||
COVERAGE=
|
||||
|
||||
# A wrapper for running 'make check' targets. This is inserted before
|
||||
# the test executable name in the commands for 'check' targets. So if
|
||||
# 'make check' would normally execute some test program with the
|
||||
# command:
|
||||
#
|
||||
# SOME_ENV_VAR=value ./some-test-executable test-args
|
||||
#
|
||||
# then setting TEST_WRAPPER to 'valgrind' (say) would have 'make
|
||||
# check' run the this command line:
|
||||
#
|
||||
# SOME_ENV_VAR=value valgrind ./some-test-executable test-args
|
||||
TEST_WRAPPER=
|
||||
|
||||
# Arguments to pass to the test programs.
|
||||
TEST_ARGS=
|
||||
|
||||
### Variables used internally by this Makefile.
|
||||
|
||||
# The top of the breakpad source tree.
|
||||
SRC = ../../..
|
||||
|
||||
# A list of the executables that we should use the C++ compiler to
|
||||
# link. GNU make's default executable-from-object rule uses $(CC),
|
||||
# which doesn't include libstdc++, and perhaps does some other things
|
||||
# wrong as well. Every executable listed in this variable uses the
|
||||
# pattern rule provided at the bottom, which links all the
|
||||
# dependencies using $(CXX). Value accumulated throughout the file.
|
||||
CPP_EXECUTABLES =
|
||||
|
||||
# Add the names of source files whose coverage you'd like 'make
|
||||
# coverage' to report on to this variable. Value accumulated
|
||||
# throughout the file.
|
||||
COVERAGE_SOURCES =
|
||||
|
||||
|
||||
### dump_syms: a program to produce Breakpad symbol files from the
|
||||
### debugging information in Linux executables.
|
||||
all:: dump_syms
|
||||
dump_syms: \
|
||||
bytereader.o \
|
||||
dump_symbols.o \
|
||||
dump_syms.o \
|
||||
dwarf2diehandler.o \
|
||||
dwarf2reader.o \
|
||||
dwarf_cfi_to_module.o \
|
||||
dwarf_cu_to_module.o \
|
||||
dwarf_line_to_module.o \
|
||||
file_id.o \
|
||||
language.o \
|
||||
module.o \
|
||||
stabs_reader.o \
|
||||
stabs_to_module.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += dump_syms
|
||||
clean::
|
||||
rm -f dump_syms
|
||||
|
||||
dump_syms.o: dump_syms.cc
|
||||
|
||||
VPATH += $(SRC)/common
|
||||
dwarf_cfi_to_module.o: dwarf_cfi_to_module.cc
|
||||
COVERAGE_SOURCES += dwarf_cfi_to_module.cc
|
||||
dwarf_cu_to_module.o: dwarf_cu_to_module.cc
|
||||
COVERAGE_SOURCES += dwarf_cu_to_module.cc
|
||||
dwarf_line_to_module.o: dwarf_line_to_module.cc
|
||||
COVERAGE_SOURCES += dwarf_line_to_module.cc
|
||||
language.o: language.cc
|
||||
module.o: module.cc
|
||||
COVERAGE_SOURCES += module.cc
|
||||
stabs_reader.o: stabs_reader.cc
|
||||
COVERAGE_SOURCES += stabs_reader.cc
|
||||
stabs_to_module.o: stabs_to_module.cc
|
||||
COVERAGE_SOURCES += stabs_to_module.cc
|
||||
|
||||
VPATH += $(SRC)/common/linux
|
||||
dump_symbols.o: dump_symbols.cc
|
||||
file_id.o: file_id.cc
|
||||
|
||||
VPATH += $(SRC)/common/dwarf
|
||||
bytereader.o: bytereader.cc
|
||||
COVERAGE_SOURCES += bytereader.cc
|
||||
cfi_assembler.o: cfi_assembler.cc
|
||||
dwarf2diehandler.o: dwarf2diehandler.cc
|
||||
COVERAGE_SOURCES += dwarf2diehandler.cc
|
||||
dwarf2reader.o: dwarf2reader.cc
|
||||
COVERAGE_SOURCES += dwarf2reader.cc
|
||||
|
||||
|
||||
### Google C++ Testing Framework.
|
||||
VPATH += $(SRC)/testing/gtest/src
|
||||
GTEST_CPPFLAGS = -I$(SRC)/testing/gtest/include -I$(SRC)/testing/gtest
|
||||
gtest-all.o: gtest-all.cc
|
||||
gtest_main.o: gtest_main.cc
|
||||
gtest-all.o gtest_main.o: override CPPFLAGS += $(GTEST_CPPFLAGS)
|
||||
|
||||
|
||||
### Google C++ Mocking Framework.
|
||||
VPATH += $(SRC)/testing/src
|
||||
GMOCK_CPPFLAGS = -I$(SRC)/testing -I$(SRC)/testing/include
|
||||
gmock-all.o: gmock-all.cc
|
||||
gmock-all.o: override CPPFLAGS += $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS)
|
||||
|
||||
|
||||
### google_breakpad::TestAssembler, for constructing binary test data
|
||||
VPATH += $(SRC)/common
|
||||
test_assembler.o: test_assembler.cc
|
||||
test_assembler.o: override CPPFLAGS += $(TEST_ASSEMBLER_CPPFLAGS)
|
||||
|
||||
|
||||
### Unit tests for google_breakpad::StabsReader.
|
||||
check: check-stabs_reader_unittest
|
||||
check-stabs_reader_unittest: stabs_reader_unittest
|
||||
stabs_reader_unittest: \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
stabs_reader.o \
|
||||
test_assembler.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += stabs_reader_unittest
|
||||
stabs_reader_unittest.o: stabs_reader_unittest.cc
|
||||
stabs_reader_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f stabs_reader_unittest
|
||||
|
||||
### Unit tests for google_breakpad::FileID.
|
||||
check: check-file_id_unittest
|
||||
check-file_id_unittest: file_id_unittest
|
||||
file_id_unittest: \
|
||||
file_id.o \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += file_id_unittest
|
||||
file_id_unittest.o: file_id_unittest.cc
|
||||
file_id_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f file_id_unittest
|
||||
|
||||
|
||||
### Unit tests for google_breakpad::Module.
|
||||
check: check-module_unittest
|
||||
check-module_unittest: module_unittest
|
||||
module_unittest: \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
module.o \
|
||||
module_unittest.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += module_unittest
|
||||
module_unittest.o: module_unittest.cc
|
||||
module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f module_unittest
|
||||
|
||||
|
||||
### Unit tests for google_breakpad::DumpStabsHandler.
|
||||
check: check-stabs_to_module_unittest
|
||||
check-stabs_to_module_unittest: stabs_to_module_unittest
|
||||
stabs_to_module_unittest: \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
module.o \
|
||||
stabs_to_module.o \
|
||||
stabs_to_module_unittest.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += stabs_to_module_unittest
|
||||
stabs_to_module_unittest.o: stabs_to_module_unittest.cc
|
||||
stabs_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f stabs_to_module_unittest
|
||||
|
||||
|
||||
### Unit tests for dwarf2reader::DwarfDIEDispatcher.
|
||||
check: check-dwarf2diehandler_unittest
|
||||
check-dwarf2diehandler_unittest: dwarf2diehandler_unittest
|
||||
dwarf2diehandler_unittest: \
|
||||
dwarf2diehandler.o \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += dwarf2diehandler_unittest
|
||||
dwarf2diehandler_unittest.o: dwarf2diehandler_unittest.cc
|
||||
dwarf2diehandler_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f dwarf2diehandler_unittest
|
||||
|
||||
|
||||
|
||||
### Unit tests for google_breakpad::DwarfLineToModule.
|
||||
check: check-dwarf_line_to_module_unittest
|
||||
check-dwarf_line_to_module_unittest: dwarf_line_to_module_unittest
|
||||
dwarf_line_to_module_unittest: \
|
||||
dwarf_line_to_module.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
module.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += dwarf_line_to_module_unittest
|
||||
dwarf_line_to_module_unittest.o: dwarf_line_to_module_unittest.cc
|
||||
dwarf_line_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f dwarf_line_to_module_unittest
|
||||
|
||||
|
||||
|
||||
### Unit tests for google_breakpad::DwarfCUToModule.
|
||||
check: check-dwarf_cu_to_module_unittest
|
||||
check-dwarf_cu_to_module_unittest: dwarf_cu_to_module_unittest
|
||||
dwarf_cu_to_module_unittest: \
|
||||
dwarf_cu_to_module.o \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
language.o \
|
||||
module.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += dwarf_cu_to_module_unittest
|
||||
dwarf_cu_to_module_unittest.o: dwarf_cu_to_module_unittest.cc
|
||||
dwarf_cu_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f dwarf_cu_to_module_unittest
|
||||
|
||||
|
||||
|
||||
### Unit tests for dwarf2reader::CallFrameInfo.
|
||||
check: check-dwarf2reader_cfi_unittest
|
||||
check-dwarf2reader_cfi_unittest: dwarf2reader_cfi_unittest
|
||||
dwarf2reader_cfi_unittest: \
|
||||
bytereader.o \
|
||||
cfi_assembler.o \
|
||||
dwarf2reader.o \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
test_assembler.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += dwarf2reader_cfi_unittest
|
||||
dwarf2reader_cfi_unittest.o: dwarf2reader_cfi_unittest.cc
|
||||
dwarf2reader_cfi_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS) \
|
||||
$(TEST_ASSEMBLER_CPPFLAGS)
|
||||
clean::
|
||||
rm -f dwarf2reader_cfi_unittest
|
||||
|
||||
|
||||
|
||||
### Unit tests for google_breakpad::DwarfCFIToModule.
|
||||
check: check-dwarf_cfi_to_module_unittest
|
||||
check-dwarf_cfi_to_module_unittest: dwarf_cfi_to_module_unittest
|
||||
dwarf_cfi_to_module_unittest: \
|
||||
dwarf_cfi_to_module.o \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
module.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += dwarf_cfi_to_module_unittest
|
||||
dwarf_cfi_to_module_unittest.o: dwarf_cfi_to_module_unittest.cc
|
||||
dwarf_cfi_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f dwarf_cfi_to_module_unittest
|
||||
|
||||
|
||||
|
||||
### Unit tests for google_breakpad::ByteReader
|
||||
check: check-bytereader_unittest
|
||||
check-bytereader_unittest: bytereader_unittest
|
||||
bytereader_unittest: \
|
||||
bytereader.o \
|
||||
cfi_assembler.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
test_assembler.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += bytereader_unittest
|
||||
bytereader_unittest.o: bytereader_unittest.cc
|
||||
bytereader_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
clean::
|
||||
rm -f bytereader_unittest
|
||||
|
||||
|
||||
|
||||
### Unit tests for google_breakpad::ByteBuffer and google_breakpad::ByteCursor.
|
||||
check: check-byte_cursor_unittest
|
||||
check-byte_cursor_unittest: byte_cursor_unittest
|
||||
byte_cursor_unittest: \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
$(empty)
|
||||
CPP_EXECUTABLES += byte_cursor_unittest
|
||||
VPATH += $(SRC)/common
|
||||
byte_cursor_unittest.o: byte_cursor_unittest.cc
|
||||
byte_cursor_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \
|
||||
$(GMOCK_CPPFLAGS)
|
||||
COVERAGE_SOURCES += byte_cursor_unittest.cc
|
||||
clean::
|
||||
rm -f byte_cursor_unittest
|
||||
|
||||
|
||||
|
||||
### Generic compilation rules.
|
||||
|
||||
# Link C++ executables using the C++ compiler; see CPP_EXECUTABLES above.
|
||||
$(CPP_EXECUTABLES): %: %.o
|
||||
$(CXX) $(CXXFLAGS) $(COVERAGE_LDFLAGS) $(LDFLAGS) -o $@ $^
|
||||
|
||||
# Allow #include directives to refer to files below 'src'; generate
|
||||
# dependency files automatically; and I doubt _REENTRANT is needed at all.
|
||||
BREAKPAD_CPPFLAGS = -I$(SRC) -MMD -D_REENTRANT -DHAVE_A_OUT_H
|
||||
|
||||
# Bring in whatever dependency files we have generated by compiling with -MMD.
|
||||
-include *.d
|
||||
|
||||
%.o: %.cc
|
||||
$(CXX) -c $< -o $@ $(CPPFLAGS) $(BREAKPAD_CPPFLAGS) $(CXXFLAGS)
|
||||
%.o: %.c
|
||||
$(CC) -c $< -o $@ $(CPPFLAGS) $(BREAKPAD_CPPFLAGS) $(CFLAGS)
|
||||
|
||||
clean::
|
||||
rm -f *.o *.d core
|
||||
|
||||
### Generic testing rules.
|
||||
|
||||
### To define a test, make the 'check' target depend on a particular
|
||||
### target 'check-FOO' that runs your test, where FOO is the name of
|
||||
### the test executable, or something else people will expect.
|
||||
###
|
||||
### This pattern rule provides commands for 'check-FOO' that are
|
||||
### appropriate for Google C++ Testing Framework test programs. But
|
||||
### you can provide your own commands.
|
||||
check-%: %
|
||||
$(TEST_WRAPPER) ./$< $(TEST_ARGS)
|
||||
|
||||
|
||||
### Generic coverage reporting rules.
|
||||
coverage:
|
||||
gcov --branch-probabilities $(COVERAGE_SOURCES)
|
||||
|
||||
coverage-reset:
|
||||
rm -f *.gcda
|
||||
|
||||
# If code coverage is enabled, pass the appropriate coverage flags to
|
||||
# the compiler for the sources we care about.
|
||||
ifdef COVERAGE
|
||||
|
||||
COVERAGE_C_SOURCES = $(filter %.c,$(COVERAGE_SOURCES))
|
||||
$(COVERAGE_C_SOURCES:.c=.o): override CFLAGS += --coverage
|
||||
|
||||
COVERAGE_CXX_SOURCES = $(filter %.cc,$(COVERAGE_SOURCES))
|
||||
$(COVERAGE_CXX_SOURCES:.cc=.o): override CXXFLAGS += --coverage
|
||||
|
||||
COVERAGE_LDFLAGS = --coverage
|
||||
|
||||
endif
|
||||
|
||||
clean:: coverage-reset
|
||||
clean::
|
||||
rm -f *.gcno *.gcov
|
@ -1,24 +0,0 @@
|
||||
CXX=g++
|
||||
|
||||
CXXFLAGS=-gstabs -I../../.. -Wall -D_REENTRANT
|
||||
|
||||
.PHONY:all clean
|
||||
|
||||
BIN=minidump_upload sym_upload
|
||||
|
||||
all:$(BIN)
|
||||
|
||||
DUMP_UPLOAD_OBJ=minidump_upload.o http_upload.o
|
||||
SYM_UPLOAD_OBJ=sym_upload.o http_upload.o
|
||||
|
||||
minidump_upload:$(DUMP_UPLOAD_OBJ)
|
||||
$(CXX) $(CXXFLAGS) -ldl -o $@ $^
|
||||
|
||||
sym_upload:$(SYM_UPLOAD_OBJ)
|
||||
$(CXX) $(CXXFLAGS) -ldl -o $@ $^
|
||||
|
||||
http_upload.o:../../../common/linux/http_upload.cc
|
||||
$(CXX) $(CXXFLAGS) `curl-config --cflags` -c $^
|
||||
|
||||
clean:
|
||||
rm *.o $(BIN)
|
Loading…
Reference in New Issue
Block a user