From 3e768ed9c01a244cdb1bc0d6aec34fb25821fbcc Mon Sep 17 00:00:00 2001 From: jimblandy Date: Tue, 16 Mar 2010 16:31:49 +0000 Subject: Breakpad Linux dumper: Add support for dumping DWARF CFI as STACK CFI records. Define a new DWARF parser class, dwarf2reader::CallFrameInfo. Extend google_breakpad::Module to store and write out 'STACK CFI' records. Define a new google_breakpad::DwarfCFIToModule class, to accept DWARF CFI data from the parser and populate a Module with the equivalent STACK CFI records. Extend the Linux symbol dumping tool, dump_syms, to use dwarf2reader::CallFrameInfo, google_breakpad::DwarfCFIToModule, and google_breakpad::Module to extract DWARF CFI from the executable or shared library files and write it to the Breakpad symbol file. Define CFISection, a new class derived from TestAssembler::Section, for use in creating DWARF CFI data for test cases. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@550 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/tools/linux/dump_syms/Makefile | 55 +++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/linux/dump_syms/Makefile b/src/tools/linux/dump_syms/Makefile index b02731b6..f00c34af 100644 --- a/src/tools/linux/dump_syms/Makefile +++ b/src/tools/linux/dump_syms/Makefile @@ -77,6 +77,7 @@ COVERAGE_SOURCES = all:: dump_syms dump_syms: \ bytereader.o \ + dwarf_cfi_to_module.o \ dwarf_cu_to_module.o \ dwarf_line_to_module.o \ dump_stabs.o \ @@ -96,6 +97,8 @@ clean:: dump_syms.o: dump_syms.cc VPATH += $(SRC)/common/linux +dwarf_cfi_to_module.o: dwarf_cfi_to_module.cc +COVERAGE_SOURCES += dwarf_cfi_to_module.cc 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 @@ -112,10 +115,11 @@ COVERAGE_SOURCES += stabs_reader.cc VPATH += $(SRC)/common/dwarf bytereader.o: bytereader.cc +cfi_assembler.o: cfi_assembler.cc dwarf2diehandler.o: dwarf2diehandler.cc COVERAGE_SOURCES += dwarf2diehandler.cc dwarf2reader.o: dwarf2reader.cc - +COVERAGE_SOURCES += dwarf2reader.cc ### Google C++ Testing Framework. @@ -133,6 +137,13 @@ gmock-all.o: gmock-all.cc gmock-all.o: override CPPFLAGS += $(GTEST_CPPFLAGS) $(GMOCK_CPPFLAGS) +### google_breakpad::TestAssembler, for constructing binary test data +VPATH += $(SRC)/processor +TEST_ASSEMBLER_CPPFLAGS = -I$(SRC)/processor +test_assembler.o: test_assembler.cc +test_assembler.o: override CPPFLAGS += $(TEST_ASSEMBLER_CPPFLAGS) + + ### Unit tests for google_breakpad::StabsReader. check: check-stabs_reader_unittest check-stabs_reader_unittest: stabs_reader_unittest @@ -170,6 +181,7 @@ clean:: check: check-module_unittest check-module_unittest: module_unittest module_unittest: \ + gmock-all.o \ gtest-all.o \ gtest_main.o \ module.o \ @@ -258,6 +270,47 @@ clean:: +### Unit tests for dwarf2reader::CallFrameInfo. +check: check-dwarf2reader_cfi_unittest +check-dwarf2reader_cfi_unittest: dwarf2reader_cfi_unittest +dwarf2reader_cfi_unittest: \ + bytereader.o \ + cfi_assembler.o \ + dwarf2reader.o \ + gmock-all.o \ + gtest-all.o \ + gtest_main.o \ + test_assembler.o \ + $(empty) +CPP_EXECUTABLES += dwarf2reader_cfi_unittest +dwarf2reader_cfi_unittest.o: dwarf2reader_cfi_unittest.cc +dwarf2reader_cfi_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \ + $(GMOCK_CPPFLAGS) \ + $(TEST_ASSEMBLER_CPPFLAGS) +clean:: + rm -f dwarf2reader_cfi_unittest + + + +### Unit tests for google_breakpad::DwarfCFIToModule. +check: check-dwarf_cfi_to_module_unittest +check-dwarf_cfi_to_module_unittest: dwarf_cfi_to_module_unittest +dwarf_cfi_to_module_unittest: \ + dwarf_cfi_to_module.o \ + gmock-all.o \ + gtest-all.o \ + gtest_main.o \ + module.o \ + $(empty) +CPP_EXECUTABLES += dwarf_cfi_to_module_unittest +dwarf_cfi_to_module_unittest.o: dwarf_cfi_to_module_unittest.cc +dwarf_cfi_to_module_unittest.o: override CPPFLAGS += $(GTEST_CPPFLAGS) \ + $(GMOCK_CPPFLAGS) +clean:: + rm -f dwarf_cfi_to_module_unittest + + + ### Generic compilation rules. # Link C++ executables using the C++ compiler; see CPP_EXECUTABLES above. -- cgit v1.2.1