aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/dump_symbols.cc
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-06 15:33:02 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-06 15:33:02 +0000
commit718ae3284e89d830729206725379fcb6e4d3684a (patch)
treed7d0b00948aaf78d1402bb50d80118224cb0f160 /src/common/linux/dump_symbols.cc
parentAllow reading just CFI data when reading symbols (diff)
downloadbreakpad-718ae3284e89d830729206725379fcb6e4d3684a.tar.xz
Allow building symbol dumping without STABS support
R=mark at https://breakpad.appspot.com/536002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1125 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/dump_symbols.cc')
-rw-r--r--src/common/linux/dump_symbols.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc
index f2d42660..eec5373c 100644
--- a/src/common/linux/dump_symbols.cc
+++ b/src/common/linux/dump_symbols.cc
@@ -63,8 +63,10 @@
#include "common/linux/file_id.h"
#include "common/module.h"
#include "common/scoped_ptr.h"
+#ifndef NO_STABS_SUPPORT
#include "common/stabs_reader.h"
#include "common/stabs_to_module.h"
+#endif
#include "common/using_std_string.h"
// This namespace contains helper functions.
@@ -80,7 +82,9 @@ using google_breakpad::FindElfSectionByName;
using google_breakpad::GetOffset;
using google_breakpad::IsValidElf;
using google_breakpad::Module;
+#ifndef NO_STABS_SUPPORT
using google_breakpad::StabsToModule;
+#endif
using google_breakpad::scoped_ptr;
//
@@ -158,6 +162,7 @@ typename ElfClass::Addr GetLoadingAddress(
return 0;
}
+#ifndef NO_STABS_SUPPORT
template<typename ElfClass>
bool LoadStabs(const typename ElfClass::Ehdr* elf_header,
const typename ElfClass::Shdr* stab_section,
@@ -183,6 +188,7 @@ bool LoadStabs(const typename ElfClass::Ehdr* elf_header,
handler.Finalize();
return true;
}
+#endif // NO_STABS_SUPPORT
// A line-to-module loader that accepts line number info parsed by
// dwarf2reader::LineInfo and populates a Module and a line vector
@@ -537,6 +543,7 @@ bool LoadSymbols(const string& obj_file,
bool found_usable_info = false;
if (symbol_data != ONLY_CFI) {
+#ifndef NO_STABS_SUPPORT
// Look for STABS debugging information, and load it if present.
const Shdr* stab_section =
FindElfSectionByName<ElfClass>(".stab", SHT_PROGBITS,
@@ -555,6 +562,7 @@ bool LoadSymbols(const string& obj_file,
}
}
}
+#endif // NO_STABS_SUPPORT
// Look for DWARF debugging information, and load it if present.
const Shdr* dwarf_section =