Add utilities for processing Linux core dump files.
This patch is part of a bigger patch that helps merging the breakpad code
with the modified version in Chromium OS.
Specifically, this patch makes the following changes:
1. Add an ElfCoreDump class for processing Linux core dump files, which will
later be used to implement the core dump to minidump conversion.
2. Add a CrashGenerator class for generating a crash with a core dump file
for testing the functionalities of ElfCoreDump.
3. Move some utility functions for reading/writing files to file_utils.h.
BUG=455
TEST=Tested the following:
1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6.
2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock).
3. All unit tests pass.
Review URL: http://breakpad.appspot.com/337001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@900 4c0a9323-5329-0410-9bdc-e9ce6186880e
diff --git a/Makefile.am b/Makefile.am
index 6a6ca3f..2294849 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -71,6 +71,7 @@
src/common/convert_UTF.c \
src/common/md5.cc \
src/common/string_conversion.cc \
+ src/common/linux/elf_core_dump.cc \
src/common/linux/file_id.cc \
src/common/linux/guid_creator.cc \
src/common/linux/memory_mapped_file.cc \
@@ -313,6 +314,7 @@
src/client/minidump_file_writer.o \
src/common/convert_UTF.o \
src/common/md5.o \
+ src/common/linux/elf_core_dump.o \
src/common/linux/file_id.o \
src/common/linux/guid_creator.o \
src/common/linux/memory_mapped_file.o \
@@ -380,6 +382,8 @@
src/common/dwarf/dwarf2reader_cfi_unittest.cc \
src/common/linux/dump_symbols.cc \
src/common/linux/dump_symbols_unittest.cc \
+ src/common/linux/elf_core_dump.cc \
+ src/common/linux/elf_core_dump_unittest.cc \
src/common/linux/elf_symbols_to_module.cc \
src/common/linux/elf_symbols_to_module_unittest.cc \
src/common/linux/memory_mapped_file.cc \
@@ -390,6 +394,8 @@
src/common/linux/file_id_unittest.cc \
src/common/linux/safe_readlink.cc \
src/common/linux/safe_readlink_unittest.cc \
+ src/common/linux/tests/crash_generator.cc \
+ src/common/tests/file_utils.cc \
src/testing/gtest/src/gtest-all.cc \
src/testing/gtest/src/gtest_main.cc \
src/testing/src/gmock-all.cc
@@ -398,7 +404,9 @@
-I$(top_srcdir)/src/testing/include \
-I$(top_srcdir)/src/testing/gtest/include \
-I$(top_srcdir)/src/testing/gtest \
- -I$(top_srcdir)/src/testing
+ -I$(top_srcdir)/src/testing \
+ $(PTHREAD_CFLAGS)
+src_common_dumper_unittest_LDADD = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
endif
src_tools_linux_md2core_minidump_2_core_unittest_SOURCES = \