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
This commit is contained in:
parent
983903ee0a
commit
718ae3284e
1 changed files with 8 additions and 0 deletions
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue