Revert "[NFC] Refactor symbol table parsing."

This reverts commit 951b107eed.

Buildbots were failing, there is a deadlock in /Users/gclayton/Documents/src/llvm/clean/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_AT_range-DW_FORM_sec_offset.s when ELF files try to relocate things.
This commit is contained in:
Greg Clayton
2021-11-17 18:07:28 -08:00
parent 92eaad2dd7
commit a68ccda203
20 changed files with 364 additions and 313 deletions

View File

@@ -106,10 +106,23 @@ uint32_t ObjectFileJIT::GetAddressByteSize() const {
return m_data.GetAddressByteSize();
}
void ObjectFileJIT::ParseSymtab(Symtab &symtab) {
ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock());
if (delegate_sp)
delegate_sp->PopulateSymtab(this, symtab);
Symtab *ObjectFileJIT::GetSymtab() {
ModuleSP module_sp(GetModule());
if (module_sp) {
std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
if (m_symtab_up == nullptr) {
ElapsedTime elapsed(module_sp->GetSymtabParseTime());
m_symtab_up = std::make_unique<Symtab>(this);
std::lock_guard<std::recursive_mutex> symtab_guard(
m_symtab_up->GetMutex());
ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock());
if (delegate_sp)
delegate_sp->PopulateSymtab(this, *m_symtab_up);
// TODO: get symbols from delegate
m_symtab_up->Finalize();
}
}
return m_symtab_up.get();
}
bool ObjectFileJIT::IsStripped() {