diff options
author | Jim Ingham <jingham@apple.com> | 2013-07-03 01:21:46 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-07-03 01:21:46 +0000 |
commit | a1e159a28135342da4396ea54f0d6fc63376f84b (patch) | |
tree | a95bbc697445cff3872a004c083091f8ae6b3e56 /lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | |
parent | 78fcf490d824352fddc3d9574ececb63a26750c4 (diff) | |
download | bcm5719-llvm-a1e159a28135342da4396ea54f0d6fc63376f84b.tar.gz bcm5719-llvm-a1e159a28135342da4396ea54f0d6fc63376f84b.zip |
Workaround for infinite recursion in InitOSO->GetByteSize->GetSymbolVendor.
llvm-svn: 185491
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 4b18d586093..1c6d9ac6d89 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -367,7 +367,13 @@ SymbolFileDWARFDebugMap::InitOSO() { const Symbol *symbol = symtab->SymbolAtIndex(sym_idx); lldb::addr_t file_addr = symbol->GetAddress().GetFileAddress(); - lldb::addr_t byte_size = symbol->GetByteSize(); + // The N_GSYM and N_STSYM symbols have a byte size and calling + // symbol->GetByteSize() can cause an infinite loop where + // InitOSO() gets called over and over if we are in the process + // of getting the symbol vendor (module->SymbolVendor()). So + // use a safer call for now until we can fix this. This is related + // to the unified section/symtab changes that just went in. + lldb::addr_t byte_size = symtab->CalculateSymbolSize(const_cast<Symbol *>(symbol)); DebugMap::Entry debug_map_entry(file_addr, byte_size, OSOEntry(sym_idx, LLDB_INVALID_ADDRESS)); m_debug_map.Append(debug_map_entry); } |