From 718ae3284e89d830729206725379fcb6e4d3684a Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Wed, 6 Mar 2013 15:33:02 +0000 Subject: 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 --- src/common/linux/dump_symbols.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/common/linux/dump_symbols.cc') 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 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(".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 = -- cgit v1.2.1