From bc64ee962f7a3518a5d8fef96cda2ad325a19d23 Mon Sep 17 00:00:00 2001 From: jimblandy Date: Sat, 23 Jan 2010 01:20:55 +0000 Subject: 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 --- src/tools/linux/dump_syms/Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/tools/linux/dump_syms') diff --git a/src/tools/linux/dump_syms/Makefile b/src/tools/linux/dump_syms/Makefile index 78a1a1ab..b944f3cf 100644 --- a/src/tools/linux/dump_syms/Makefile +++ b/src/tools/linux/dump_syms/Makefile @@ -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. -- cgit v1.2.1