Delete an old Makefile and fix lots of lint errors.

Review URL: http://breakpad.appspot.com/225001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@727 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
thestig@chromium.org 2010-11-08 19:49:25 +00:00
parent 67b65a379c
commit f66ff1afd2
4 changed files with 36 additions and 148 deletions

View file

@ -1,115 +0,0 @@
CXX=g++
CC=gcc
CXXFLAGS=-gstabs+ -I../../ -I../../testing/gtest/include -I../../testing -I../../third_party/linux/include -I../../testing/include -I../../testing/gtest -D_REENTRANT -Wall
CFLAGS=$(CXXFLAGS)
LDFLAGS=-lpthread
OBJ_DIR=.
BIN_DIR=.
# Source vars for components
# Google Test (meant to be included in each test source list)
GOOGLETEST_CC_SRC=../../testing/gtest/src/gtest_main.cc \
../../testing/gtest/src/gtest-all.cc \
../../testing/src/gmock-all.cc
# Google Logging
GOOGLELOG_LIB=../../third_party/glog/glog/src/glog/libglog.a
# Google Flags lib
GOOGLEFLAGS_LIB=../../third_party/linux/lib/gflags/libgflags.a
# Client exception handling & minidump writing library
LIB_CC_SRC= \
crash_generation/crash_generation_client.cc \
crash_generation/crash_generation_server.cc \
handler/exception_handler.cc \
minidump_writer/linux_dumper.cc \
minidump_writer/minidump_writer.cc \
../minidump_file_writer.cc \
../../common/linux/file_id.cc \
../../common/linux/guid_creator.cc \
../../common/string_conversion.cc
LIB_C_SRC = ../../common/convert_UTF.c
LIB_CC_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o,$(LIB_CC_SRC))
LIB_C_OBJ=$(patsubst %.c, $(OBJ_DIR)/%.o, $(LIB_C_SRC))
DUMPER_HELPER_TEST_C_SRC=minidump_writer/linux_dumper_unittest_helper.cc
DUMPER_HELPER_TEST_C_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o, \
$(DUMPER_HELPER_TEST_C_SRC))
# Unit tests for client library
TEST_CC_SRC=handler/exception_handler_unittest.cc \
minidump_writer/directory_reader_unittest.cc \
minidump_writer/line_reader_unittest.cc \
minidump_writer/linux_dumper_unittest.cc \
minidump_writer/minidump_writer_unittest.cc \
$(GOOGLETEST_CC_SRC)
TEST_CC_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o,$(TEST_CC_SRC))
# Library for crash dump uploader
SENDER_LIBRARY_SRC=../../common/linux/google_crashdump_uploader.cc ../../common/linux/libcurl_wrapper.cc
SENDER_LIBRARY_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o,$(SENDER_LIBRARY_SRC))
SENDER_LDFLAGS=-ldl
# Unit test for crash dump uploader
SENDER_TEST_SRC=../../common/linux/google_crashdump_uploader_test.cc \
$(GOOGLETEST_CC_SRC)
SENDER_TEST_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o,$(SENDER_TEST_SRC))
# CLI tool for crash dump uploaer
SENDER_TOOL_SRC=sender/google_crash_report_sender.cc
SENDER_TOOL_OBJ=$(patsubst %.cc, $(OBJ_DIR)/%.o,$(SENDER_TOOL_SRC))
# Vars for binary targets
BREAKPAD_LIBRARY=$(BIN_DIR)/libbreakpad.a
SENDER_LIBRARY=$(BIN_DIR)/libcrash_sender.a
# Client unit test binary
UNITTEST_BIN=$(BIN_DIR)/linux_client_test
# Uploader unit test binary
SENDER_UNITTEST_BIN=$(BIN_DIR)/google_crashdump_uploader_test
# Sender CLI tool binary
SENDER_CLI_TOOL_BIN=$(BIN_DIR)/google_crashdump_uploader
DUMPER_HELPER_TEST_BIN=$(BIN_DIR)/linux_dumper_unittest_helper
.PHONY:all clean
all:$(BREAKPAD_LIBRARY) $(UNITTEST_BIN) #$(SENDER_LIBRARY) $(SENDER_UNITTEST_BIN) $(SENDER_CLI_TOOL_BIN)
check:$(UNITTEST_BIN) $(SENDER_UNITTEST_BIN)
$(UNITTEST_BIN)
$(SENDER_UNITTEST_BIN)
$(BIN_DIR)/libbreakpad.a:$(LIB_CC_OBJ) $(LIB_C_OBJ)
$(AR) rcs $@ $^
$(BIN_DIR)/linux_dumper_unittest_helper:$(DUMPER_HELPER_TEST_C_OBJ)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@
$(BIN_DIR)/linux_client_test:$(TEST_CC_OBJ) $(BREAKPAD_LIBRARY) $(DUMPER_HELPER_TEST_BIN)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TEST_CC_OBJ) $(BREAKPAD_LIBRARY) -o $@
$(BIN_DIR)/libcrash_sender.a:$(SENDER_LIBRARY_OBJ)
$(AR) rcs $@ $^
$(BIN_DIR)/google_crashdump_uploader_test:$(SENDER_TEST_OBJ) $(SENDER_LIBRARY) \
$(GOOGLELOG_LIB)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(SENDER_LDFLAGS) $^ -o $@
$(BIN_DIR)/google_crashdump_uploader:$(SENDER_TOOL_OBJ) $(SENDER_LIBRARY) \
$(GOOGLELOG_LIB) $(GOOGLEFLAGS_LIB)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(SENDER_LDFLAGS) $^ -o $@
clean:
rm -f $(UNITTEST_BIN) $(BREAKPAD_LIBRARY) $(LIB_CC_OBJ) $(LIB_C_OBJ) \
$(TEST_CC_OBJ) $(SENDER_LIBRARY_OBJ) $(SENDER_LIBRARY) \
$(SENDER_TOOL_OBJ) $(SENDER_CLI_TOOL_BIN) $(SENDER_UNITTEST_BIN) \
$(DUMPER_HELPER_TEST_BIN) core

View file

@ -39,6 +39,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <vector>
#include "client/linux/crash_generation/crash_generation_server.h" #include "client/linux/crash_generation/crash_generation_server.h"
#include "client/linux/crash_generation/client_info.h" #include "client/linux/crash_generation/client_info.h"
#include "client/linux/handler/exception_handler.h" #include "client/linux/handler/exception_handler.h"

View file

@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <stdint.h> #include <stdint.h>
#include <unistd.h> #include <unistd.h>
#include <signal.h> #include <signal.h>
@ -38,6 +36,8 @@
#include <sys/uio.h> #include <sys/uio.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <string>
#include "breakpad_googletest_includes.h" #include "breakpad_googletest_includes.h"
#include "client/linux/handler/exception_handler.h" #include "client/linux/handler/exception_handler.h"
#include "client/linux/minidump_writer/minidump_writer.h" #include "client/linux/minidump_writer/minidump_writer.h"

View file

@ -1,4 +1,4 @@
// Copyright (c) 2009, Google Inc. // Copyright (c) 2010, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -46,8 +46,6 @@
#include "client/linux/minidump_writer/minidump_writer.h" #include "client/linux/minidump_writer/minidump_writer.h"
#include "client/minidump_file_writer-inl.h" #include "client/minidump_file_writer-inl.h"
#include <algorithm>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#if !defined(__ANDROID__) #if !defined(__ANDROID__)
@ -61,6 +59,8 @@
#endif #endif
#include <sys/utsname.h> #include <sys/utsname.h>
#include <algorithm>
#include "client/minidump_file_writer.h" #include "client/minidump_file_writer.h"
#include "google_breakpad/common/minidump_format.h" #include "google_breakpad/common/minidump_format.h"
#include "google_breakpad/common/minidump_cpu_amd64.h" #include "google_breakpad/common/minidump_cpu_amd64.h"
@ -409,9 +409,10 @@ class MinidumpWriter {
if (dyn.d_tag == DT_DEBUG) { if (dyn.d_tag == DT_DEBUG) {
r_debug = (struct r_debug*)dyn.d_un.d_ptr; r_debug = (struct r_debug*)dyn.d_un.d_ptr;
continue; continue;
} else if (dyn.d_tag == DT_NULL) } else if (dyn.d_tag == DT_NULL) {
break; break;
} }
}
#endif #endif
// A minidump file contains a number of tagged streams. This is the number // A minidump file contains a number of tagged streams. This is the number
@ -742,8 +743,8 @@ class MinidumpWriter {
} }
static bool ShouldIncludeMapping(const MappingInfo& mapping) { static bool ShouldIncludeMapping(const MappingInfo& mapping) {
if (mapping.name[0] == 0 || // we only want modules with filenames. if (mapping.name[0] == 0 || // only want modules with filenames.
mapping.offset || // we only want to include one mapping per shared lib. mapping.offset || // only want to include one mapping per shared lib.
mapping.size < 4096) { // too small to get a signature for. mapping.size < 4096) { // too small to get a signature for.
return false; return false;
} }