diff options
author | jimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-04-05 19:40:17 +0000 |
---|---|---|
committer | jimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-04-05 19:40:17 +0000 |
commit | 87855248f1fab83caf002418196a34051d359f2c (patch) | |
tree | 349501494aa76b5f15afc0a105bac2455abd2002 /src | |
parent | Breakpad Linux Dumper: Disable warnings about unpaired functions and lines by... (diff) | |
download | breakpad-87855248f1fab83caf002418196a34051d359f2c.tar.xz |
Breakpad symbol dumper: Move Linux dumping classes into src/common.
The Linux symbol dumper's classes are reasonably portable, and should be
usable for the Mac dumper as well. Move them to src/common, along with
their unit tests. Update #include directives and Makefile.
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@567 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r-- | src/common/dump_stabs.cc (renamed from src/common/linux/dump_stabs.cc) | 2 | ||||
-rw-r--r-- | src/common/dump_stabs.h (renamed from src/common/linux/dump_stabs.h) | 4 | ||||
-rw-r--r-- | src/common/dump_stabs_unittest.cc (renamed from src/common/linux/dump_stabs_unittest.cc) | 2 | ||||
-rw-r--r-- | src/common/dwarf_cfi_to_module.cc (renamed from src/common/linux/dwarf_cfi_to_module.cc) | 2 | ||||
-rw-r--r-- | src/common/dwarf_cfi_to_module.h (renamed from src/common/linux/dwarf_cfi_to_module.h) | 2 | ||||
-rw-r--r-- | src/common/dwarf_cfi_to_module_unittest.cc (renamed from src/common/linux/dwarf_cfi_to_module_unittest.cc) | 2 | ||||
-rw-r--r-- | src/common/dwarf_cu_to_module.cc (renamed from src/common/linux/dwarf_cu_to_module.cc) | 4 | ||||
-rw-r--r-- | src/common/dwarf_cu_to_module.h (renamed from src/common/linux/dwarf_cu_to_module.h) | 4 | ||||
-rw-r--r-- | src/common/dwarf_cu_to_module_unittest.cc (renamed from src/common/linux/dwarf_cu_to_module_unittest.cc) | 4 | ||||
-rw-r--r-- | src/common/dwarf_line_to_module.cc (renamed from src/common/linux/dwarf_line_to_module.cc) | 2 | ||||
-rw-r--r-- | src/common/dwarf_line_to_module.h (renamed from src/common/linux/dwarf_line_to_module.h) | 2 | ||||
-rw-r--r-- | src/common/dwarf_line_to_module_unittest.cc (renamed from src/common/linux/dwarf_line_to_module_unittest.cc) | 2 | ||||
-rw-r--r-- | src/common/language.cc (renamed from src/common/linux/language.cc) | 2 | ||||
-rw-r--r-- | src/common/language.h (renamed from src/common/linux/language.h) | 0 | ||||
-rw-r--r-- | src/common/linux/dump_symbols.cc | 12 | ||||
-rw-r--r-- | src/common/module.cc (renamed from src/common/linux/module.cc) | 2 | ||||
-rw-r--r-- | src/common/module.h (renamed from src/common/linux/module.h) | 0 | ||||
-rw-r--r-- | src/common/module_unittest.cc (renamed from src/common/linux/module_unittest.cc) | 2 | ||||
-rw-r--r-- | src/common/stabs_reader.cc (renamed from src/common/linux/stabs_reader.cc) | 2 | ||||
-rw-r--r-- | src/common/stabs_reader.h (renamed from src/common/linux/stabs_reader.h) | 0 | ||||
-rw-r--r-- | src/common/stabs_reader_unittest.cc (renamed from src/common/linux/stabs_reader_unittest.cc) | 14 | ||||
-rw-r--r-- | src/common/testdata/func-line-pairing.h (renamed from src/common/linux/testdata/func-line-pairing.h) | 0 | ||||
-rw-r--r-- | src/common/testdata/stabs_reader_unittest.input1 (renamed from src/common/linux/testdata/stabs_reader_unittest.input1) | 0 | ||||
-rw-r--r-- | src/common/testdata/stabs_reader_unittest.input2 (renamed from src/common/linux/testdata/stabs_reader_unittest.input2) | 0 | ||||
-rw-r--r-- | src/common/testdata/stabs_reader_unittest.input3 (renamed from src/common/linux/testdata/stabs_reader_unittest.input3) | 0 | ||||
-rw-r--r-- | src/common/testdata/stabs_reader_unittest.input4 (renamed from src/common/linux/testdata/stabs_reader_unittest.input4) | 0 | ||||
-rw-r--r-- | src/common/testdata/stabs_reader_unittest.input5 (renamed from src/common/linux/testdata/stabs_reader_unittest.input5) | 0 | ||||
-rw-r--r-- | src/common/testdata/stabs_reader_unittest.input6 (renamed from src/common/linux/testdata/stabs_reader_unittest.input6) | 0 | ||||
-rw-r--r-- | src/tools/linux/dump_syms/Makefile | 8 |
29 files changed, 38 insertions, 36 deletions
diff --git a/src/common/linux/dump_stabs.cc b/src/common/dump_stabs.cc index 6842eae6..436b6215 100644 --- a/src/common/linux/dump_stabs.cc +++ b/src/common/dump_stabs.cc @@ -37,7 +37,7 @@ #include <algorithm> #include <cassert> -#include "common/linux/dump_stabs.h" +#include "common/dump_stabs.h" namespace google_breakpad { diff --git a/src/common/linux/dump_stabs.h b/src/common/dump_stabs.h index e6ea1d54..e5c34409 100644 --- a/src/common/linux/dump_stabs.h +++ b/src/common/dump_stabs.h @@ -43,8 +43,8 @@ #include <string> #include <vector> -#include "common/linux/module.h" -#include "common/linux/stabs_reader.h" +#include "common/module.h" +#include "common/stabs_reader.h" namespace google_breakpad { diff --git a/src/common/linux/dump_stabs_unittest.cc b/src/common/dump_stabs_unittest.cc index 382c4f5f..7d27cb88 100644 --- a/src/common/linux/dump_stabs_unittest.cc +++ b/src/common/dump_stabs_unittest.cc @@ -34,7 +34,7 @@ #include <vector> #include "breakpad_googletest_includes.h" -#include "common/linux/dump_stabs.h" +#include "common/dump_stabs.h" using google_breakpad::DumpStabsHandler; using google_breakpad::Module; diff --git a/src/common/linux/dwarf_cfi_to_module.cc b/src/common/dwarf_cfi_to_module.cc index 603acc0e..49a6d852 100644 --- a/src/common/linux/dwarf_cfi_to_module.cc +++ b/src/common/dwarf_cfi_to_module.cc @@ -36,7 +36,7 @@ #include <sstream> -#include "common/linux/dwarf_cfi_to_module.h" +#include "common/dwarf_cfi_to_module.h" namespace google_breakpad { diff --git a/src/common/linux/dwarf_cfi_to_module.h b/src/common/dwarf_cfi_to_module.h index 9df796f5..002fc90f 100644 --- a/src/common/linux/dwarf_cfi_to_module.h +++ b/src/common/dwarf_cfi_to_module.h @@ -43,7 +43,7 @@ #include <string> #include <vector> -#include "common/linux/module.h" +#include "common/module.h" #include "common/dwarf/dwarf2reader.h" namespace google_breakpad { diff --git a/src/common/linux/dwarf_cfi_to_module_unittest.cc b/src/common/dwarf_cfi_to_module_unittest.cc index d7b08aef..516b9784 100644 --- a/src/common/linux/dwarf_cfi_to_module_unittest.cc +++ b/src/common/dwarf_cfi_to_module_unittest.cc @@ -32,7 +32,7 @@ // dwarf_cfi_to_module_unittest.cc: Tests for google_breakpad::DwarfCFIToModule. #include "breakpad_googletest_includes.h" -#include "common/linux/dwarf_cfi_to_module.h" +#include "common/dwarf_cfi_to_module.h" using google_breakpad::Module; using google_breakpad::DwarfCFIToModule; diff --git a/src/common/linux/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index 59efebc4..3ac833ff 100644 --- a/src/common/linux/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -34,8 +34,8 @@ #include <algorithm> #include <cassert> -#include "common/linux/dwarf_cu_to_module.h" -#include "common/linux/dwarf_line_to_module.h" +#include "common/dwarf_cu_to_module.h" +#include "common/dwarf_line_to_module.h" namespace google_breakpad { diff --git a/src/common/linux/dwarf_cu_to_module.h b/src/common/dwarf_cu_to_module.h index 8d8a0b2c..6f0baeae 100644 --- a/src/common/linux/dwarf_cu_to_module.h +++ b/src/common/dwarf_cu_to_module.h @@ -43,8 +43,8 @@ #include <elf.h> #include <link.h> -#include "common/linux/language.h" -#include "common/linux/module.h" +#include "common/language.h" +#include "common/module.h" #include "common/dwarf/bytereader.h" #include "common/dwarf/dwarf2diehandler.h" #include "common/dwarf/dwarf2reader.h" diff --git a/src/common/linux/dwarf_cu_to_module_unittest.cc b/src/common/dwarf_cu_to_module_unittest.cc index 1cfbee69..f0686de3 100644 --- a/src/common/linux/dwarf_cu_to_module_unittest.cc +++ b/src/common/dwarf_cu_to_module_unittest.cc @@ -34,7 +34,7 @@ #include <vector> #include "breakpad_googletest_includes.h" -#include "common/linux/dwarf_cu_to_module.h" +#include "common/dwarf_cu_to_module.h" using std::vector; @@ -828,7 +828,7 @@ struct Situation { uncovered_functions, uncovered_lines }, Situation situations[] = { -#include "common/linux/testdata/func-line-pairing.h" +#include "common/testdata/func-line-pairing.h" }; #undef PAIRING diff --git a/src/common/linux/dwarf_line_to_module.cc b/src/common/dwarf_line_to_module.cc index c740fa30..75afd93c 100644 --- a/src/common/linux/dwarf_line_to_module.cc +++ b/src/common/dwarf_line_to_module.cc @@ -32,7 +32,7 @@ // dwarf_line_to_module.cc: Implementation of DwarfLineToModule class. // See dwarf_line_to_module.h for details. -#include "common/linux/dwarf_line_to_module.h" +#include "common/dwarf_line_to_module.h" // Trying to support Windows paths in a reasonable way adds a lot of // variations to test; it would be better to just put off dealing with diff --git a/src/common/linux/dwarf_line_to_module.h b/src/common/dwarf_line_to_module.h index 7ff466d7..49b3eb35 100644 --- a/src/common/linux/dwarf_line_to_module.h +++ b/src/common/dwarf_line_to_module.h @@ -38,7 +38,7 @@ #ifndef COMMON_LINUX_DWARF_LINE_TO_MODULE_H #define COMMON_LINUX_DWARF_LINE_TO_MODULE_H -#include "common/linux/module.h" +#include "common/module.h" #include "common/dwarf/dwarf2reader.h" namespace google_breakpad { diff --git a/src/common/linux/dwarf_line_to_module_unittest.cc b/src/common/dwarf_line_to_module_unittest.cc index 54411591..3b8a1360 100644 --- a/src/common/linux/dwarf_line_to_module_unittest.cc +++ b/src/common/dwarf_line_to_module_unittest.cc @@ -32,7 +32,7 @@ // dwarf_line_to_module.cc: Unit tests for google_breakpad::DwarfLineToModule. #include "breakpad_googletest_includes.h" -#include "common/linux/dwarf_line_to_module.h" +#include "common/dwarf_line_to_module.h" using google_breakpad::DwarfLineToModule; using google_breakpad::Module; diff --git a/src/common/linux/language.cc b/src/common/language.cc index 5e6473a1..3d8d9708 100644 --- a/src/common/linux/language.cc +++ b/src/common/language.cc @@ -32,7 +32,7 @@ // language.cc: Subclasses and singletons for google_breakpad::Language. // See language.h for details. -#include "common/linux/language.h" +#include "common/language.h" namespace google_breakpad { diff --git a/src/common/linux/language.h b/src/common/language.h index 03bdf7f0..03bdf7f0 100644 --- a/src/common/linux/language.h +++ b/src/common/language.h diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index eecacd59..ea55cc7b 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -48,14 +48,14 @@ #include "common/dwarf/bytereader-inl.h" #include "common/dwarf/dwarf2diehandler.h" -#include "common/linux/dump_stabs.h" +#include "common/dump_stabs.h" #include "common/linux/dump_symbols.h" -#include "common/linux/dwarf_cfi_to_module.h" -#include "common/linux/dwarf_cu_to_module.h" -#include "common/linux/dwarf_line_to_module.h" +#include "common/dwarf_cfi_to_module.h" +#include "common/dwarf_cu_to_module.h" +#include "common/dwarf_line_to_module.h" #include "common/linux/file_id.h" -#include "common/linux/module.h" -#include "common/linux/stabs_reader.h" +#include "common/module.h" +#include "common/stabs_reader.h" // This namespace contains helper functions. namespace { diff --git a/src/common/linux/module.cc b/src/common/module.cc index f6373895..fd36f3f9 100644 --- a/src/common/linux/module.cc +++ b/src/common/module.cc @@ -34,7 +34,7 @@ #include <cerrno> #include <cstring> -#include "common/linux/module.h" +#include "common/module.h" namespace google_breakpad { diff --git a/src/common/linux/module.h b/src/common/module.h index 7a44d4ab..7a44d4ab 100644 --- a/src/common/linux/module.h +++ b/src/common/module.h diff --git a/src/common/linux/module_unittest.cc b/src/common/module_unittest.cc index 771d91e5..07903411 100644 --- a/src/common/linux/module_unittest.cc +++ b/src/common/module_unittest.cc @@ -40,7 +40,7 @@ #include <string> #include "breakpad_googletest_includes.h" -#include "common/linux/module.h" +#include "common/module.h" using google_breakpad::Module; using std::string; diff --git a/src/common/linux/stabs_reader.cc b/src/common/stabs_reader.cc index a536144f..7c2b1cc4 100644 --- a/src/common/linux/stabs_reader.cc +++ b/src/common/stabs_reader.cc @@ -36,7 +36,7 @@ #include <cstring> #include <cassert> -#include "common/linux/stabs_reader.h" +#include "common/stabs_reader.h" namespace google_breakpad { diff --git a/src/common/linux/stabs_reader.h b/src/common/stabs_reader.h index 5cfcdfb5..5cfcdfb5 100644 --- a/src/common/linux/stabs_reader.h +++ b/src/common/stabs_reader.h diff --git a/src/common/linux/stabs_reader_unittest.cc b/src/common/stabs_reader_unittest.cc index 88fcfe67..a22d9d0e 100644 --- a/src/common/linux/stabs_reader_unittest.cc +++ b/src/common/stabs_reader_unittest.cc @@ -45,7 +45,7 @@ #include <stab.h> #include "breakpad_googletest_includes.h" -#include "common/linux/stabs_reader.h" +#include "common/stabs_reader.h" using std::istream; using std::istringstream; @@ -569,7 +569,7 @@ TEST(StabsReader, MockStabsInput) { ASSERT_TRUE(ApplyHandlerToMockStabsData( &mock_handler, - "common/linux/testdata/stabs_reader_unittest.input1")); + "common/testdata/stabs_reader_unittest.input1")); } TEST(StabsReader, AbruptCU) { @@ -587,7 +587,7 @@ TEST(StabsReader, AbruptCU) { ASSERT_TRUE(ApplyHandlerToMockStabsData( &mock_handler, - "common/linux/testdata/stabs_reader_unittest.input2")); + "common/testdata/stabs_reader_unittest.input2")); } TEST(StabsReader, AbruptFunction) { @@ -609,7 +609,7 @@ TEST(StabsReader, AbruptFunction) { ASSERT_TRUE(ApplyHandlerToMockStabsData( &mock_handler, - "common/linux/testdata/stabs_reader_unittest.input3")); + "common/testdata/stabs_reader_unittest.input3")); } TEST(StabsReader, NoCU) { @@ -622,7 +622,7 @@ TEST(StabsReader, NoCU) { ASSERT_TRUE(ApplyHandlerToMockStabsData( &mock_handler, - "common/linux/testdata/stabs_reader_unittest.input4")); + "common/testdata/stabs_reader_unittest.input4")); } @@ -646,7 +646,7 @@ TEST(StabsReader, NoCUEnd) { ASSERT_TRUE(ApplyHandlerToMockStabsData( &mock_handler, - "common/linux/testdata/stabs_reader_unittest.input5")); + "common/testdata/stabs_reader_unittest.input5")); } @@ -677,7 +677,7 @@ TEST(StabsReader, MultipleCUs) { ASSERT_TRUE(ApplyHandlerToMockStabsData( &mock_handler, - "common/linux/testdata/stabs_reader_unittest.input6")); + "common/testdata/stabs_reader_unittest.input6")); } // name duplication diff --git a/src/common/linux/testdata/func-line-pairing.h b/src/common/testdata/func-line-pairing.h index 05538f96..05538f96 100644 --- a/src/common/linux/testdata/func-line-pairing.h +++ b/src/common/testdata/func-line-pairing.h diff --git a/src/common/linux/testdata/stabs_reader_unittest.input1 b/src/common/testdata/stabs_reader_unittest.input1 index 44b3d0a3..44b3d0a3 100644 --- a/src/common/linux/testdata/stabs_reader_unittest.input1 +++ b/src/common/testdata/stabs_reader_unittest.input1 diff --git a/src/common/linux/testdata/stabs_reader_unittest.input2 b/src/common/testdata/stabs_reader_unittest.input2 index 82efeb92..82efeb92 100644 --- a/src/common/linux/testdata/stabs_reader_unittest.input2 +++ b/src/common/testdata/stabs_reader_unittest.input2 diff --git a/src/common/linux/testdata/stabs_reader_unittest.input3 b/src/common/testdata/stabs_reader_unittest.input3 index 73e6a302..73e6a302 100644 --- a/src/common/linux/testdata/stabs_reader_unittest.input3 +++ b/src/common/testdata/stabs_reader_unittest.input3 diff --git a/src/common/linux/testdata/stabs_reader_unittest.input4 b/src/common/testdata/stabs_reader_unittest.input4 index dfdbf677..dfdbf677 100644 --- a/src/common/linux/testdata/stabs_reader_unittest.input4 +++ b/src/common/testdata/stabs_reader_unittest.input4 diff --git a/src/common/linux/testdata/stabs_reader_unittest.input5 b/src/common/testdata/stabs_reader_unittest.input5 index 7a447c88..7a447c88 100644 --- a/src/common/linux/testdata/stabs_reader_unittest.input5 +++ b/src/common/testdata/stabs_reader_unittest.input5 diff --git a/src/common/linux/testdata/stabs_reader_unittest.input6 b/src/common/testdata/stabs_reader_unittest.input6 index 54c2c9d4..54c2c9d4 100644 --- a/src/common/linux/testdata/stabs_reader_unittest.input6 +++ b/src/common/testdata/stabs_reader_unittest.input6 diff --git a/src/tools/linux/dump_syms/Makefile b/src/tools/linux/dump_syms/Makefile index 76cbf2c1..7a5673c9 100644 --- a/src/tools/linux/dump_syms/Makefile +++ b/src/tools/linux/dump_syms/Makefile @@ -96,7 +96,7 @@ clean:: dump_syms.o: dump_syms.cc -VPATH += $(SRC)/common/linux +VPATH += $(SRC)/common 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 @@ -105,14 +105,16 @@ 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/linux +dump_symbols.o: dump_symbols.cc +file_id.o: file_id.cc + VPATH += $(SRC)/common/dwarf bytereader.o: bytereader.cc COVERAGE_SOURCES += bytereader.cc |