mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-02-19 00:39:38 +00:00
Breakpad DWARF Parser: Improved DWARF-processing interface.
dwarf2reader::CompilationUnit is a simple and direct parser for DWARF data, but its handler interface is not convenient to use. In particular, the same handler object receives data about all DIEs processed. One can't use distinct classes to separate the information needed to handle different kinds of data. This patch defines a new adapter type, dwarf2reader::DIEHandler, which implements the existing DWARF parser's handler interface, given a handler written to a more comfortable, object-orient interface. The comments in dwarf2diehandler.h provide more detail. a=jimblandy, r=ccoutant git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@495 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -77,6 +77,7 @@ dump_syms: \
|
||||
dump_stabs.o \
|
||||
dump_syms.o \
|
||||
dump_symbols.o \
|
||||
dwarf2diehandler.o \
|
||||
file_id.o \
|
||||
module.o \
|
||||
stabs_reader.o \
|
||||
@@ -97,6 +98,10 @@ COVERAGE_SOURCES += module.cc
|
||||
stabs_reader.o: stabs_reader.cc
|
||||
COVERAGE_SOURCES += stabs_reader.cc
|
||||
|
||||
VPATH += $(SRC)/common/dwarf
|
||||
dwarf2diehandler.o: dwarf2diehandler.cc
|
||||
COVERAGE_SOURCES += dwarf2diehandler.cc
|
||||
|
||||
|
||||
|
||||
### Google C++ Testing Framework.
|
||||
@@ -180,6 +185,23 @@ clean::
|
||||
rm -f dump_stabs_unittest
|
||||
|
||||
|
||||
### Unit tests for dwarf2reader::DwarfDIEDispatcher.
|
||||
check: check-dwarf2diehandler_unittest
|
||||
check-dwarf2diehandler_unittest: dwarf2diehandler_unittest
|
||||
dwarf2diehandler_unittest: \
|
||||
gmock-all.o \
|
||||
gtest-all.o \
|
||||
gtest_main.o \
|
||||
dwarf2diehandler.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
|
||||
|
||||
|
||||
### Generic compilation rules.
|
||||
|
||||
# Link C++ executables using the C++ compiler; see CPP_EXECUTABLES above.
|
||||
|
||||
Reference in New Issue
Block a user