From ae08e479aad9dd186065160983efe7ae42e4e15c Mon Sep 17 00:00:00 2001 From: Antonio Afonso Date: Fri, 4 Oct 2019 01:45:58 +0000 Subject: Revert "Explicitly set entry point arch when it's thumb" Backing out because SymbolFile/Breakpad/symtab.test is failing and it seems to be a legit issue. Will investigate. This reverts commit 72153f95ee4c1b52d2f4f483f0ea4f650ec863be. llvm-svn: 373687 --- .../Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 40 ---------------------- 1 file changed, 40 deletions(-) (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp') diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index 76abe32ff512..e507f0e4d745 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -2703,46 +2703,6 @@ Symtab *ObjectFileELF::GetSymtab() { if (m_symtab_up == nullptr) m_symtab_up.reset(new Symtab(this)); - // In the event that there's no symbol entry for the entry point we'll - // artifically create one. We delegate to the symtab object the figuring - // out of the proper size, this will usually make it span til the next - // symbol it finds in the section. This means that if there are missing - // symbols the entry point might span beyond its function definition. - // We're fine with this as it doesn't make it worse than not having a - // symbol entry at all. - ArchSpec arch = GetArchitecture(); - auto entry_point_addr = GetEntryPointAddress().GetFileAddress(); - if (entry_point_addr != LLDB_INVALID_ADDRESS) { - if (!m_symtab_up->FindSymbolContainingFileAddress(entry_point_addr)) { - uint64_t symbol_id = m_symtab_up->GetNumSymbols(); - SectionSP section_sp = - GetSectionList()->FindSectionContainingFileAddress(entry_point_addr); - Symbol symbol( - symbol_id, - GetNextSyntheticSymbolName().GetCString(), // Symbol name. - false, // Is the symbol name mangled? - eSymbolTypeCode, // Type of this symbol. - true, // Is this globally visible? - false, // Is this symbol debug info? - false, // Is this symbol a trampoline? - true, // Is this symbol artificial? - section_sp, // Section in which this symbol is defined or null. - 0, // Offset in section or symbol value. - 0, // Size. - false, // Size is valid. - false, // Contains linker annotations? - 0); // Symbol flags. - m_symtab_up->AddSymbol(symbol); - // When the entry point is arm thumb we need to explicitly set its - // class address to reflect that. This is important because expression - // evaluation relies on correctly setting a breakpoint at this address. - if (arch.GetMachine() == llvm::Triple::arm && (entry_point_addr & 1)) - m_address_class_map[entry_point_addr ^ 1] = AddressClass::eCodeAlternateISA; - else - m_address_class_map[entry_point_addr] = AddressClass::eCode; - } - } - m_symtab_up->CalculateSymbolSizes(); } -- cgit v1.2.3