Breakpad Linux Dumper: Add DWARF support.

This adds DWARF support to the Breakpad Linux dumper. This is
implemented as two handler classes: google_breakpad::DwarfCUToModule
accepts data from dwarf2reader::CompilationUnit, and
google_breakpad::DwarfLineToModule accepts data from a
dwarf2reader::LineInfo, each populating a google_breakpad::Module with
the results. Behaviors specific to particular source languages are
handled by instances of a new class, google_breakpad::Language.

An input executable may contain both STABS and DWARF debugging
information: the dumper automatically recognizes what sorts of
information are available, and integrates the data into a single
output file.

All classes have unit tests, providing line and branch coverage of all
interesting code. Unit tests are written using the Google C++ Testing
Framework, and the Google C++ Mocking Framework where appropriate.

a=jimblandy, r=ccoutant


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@497 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
jimblandy 2010-01-23 05:29:16 +00:00
parent 32d1b2882b
commit 057aa1f617
11 changed files with 3996 additions and 28 deletions

View file

@ -74,11 +74,16 @@ COVERAGE_SOURCES =
### debugging information in Linux executables.
all:: dump_syms
dump_syms: \
bytereader.o \
dwarf_cu_to_module.o \
dwarf_line_to_module.o \
dump_stabs.o \
dump_syms.o \
dump_symbols.o \
dump_syms.o \
dwarf2diehandler.o \
dwarf2reader.o \
file_id.o \
language.o \
module.o \
stabs_reader.o \
$(empty)
@ -89,18 +94,25 @@ clean::
dump_syms.o: dump_syms.cc
VPATH += $(SRC)/common/linux
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
dump_stabs.o: dump_stabs.cc
COVERAGE_SOURCES += dump_stabs.cc
dump_symbols.o: dump_symbols.cc
file_id.o: file_id.cc
language.o: language.cc
module.o: module.cc
COVERAGE_SOURCES += module.cc
stabs_reader.o: stabs_reader.cc
COVERAGE_SOURCES += stabs_reader.cc
VPATH += $(SRC)/common/dwarf
bytereader.o: bytereader.cc
dwarf2diehandler.o: dwarf2diehandler.cc
COVERAGE_SOURCES += dwarf2diehandler.cc
dwarf2reader.o: dwarf2reader.cc
@ -202,6 +214,48 @@ 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: \
gtest-all.o \
gtest_main.o \
module.o \
dwarf_line_to_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: \
bytereader.o \
dwarf2reader.o \
dwarf_cu_to_module.o \
dwarf_line_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
### Generic compilation rules.
# Link C++ executables using the C++ compiler; see CPP_EXECUTABLES above.