[Lldb-commits] [lldb] r212825 - Modify ObjectFileELF::GetArchitecture() to avoid calling ParseSectionHeaders() when we have headers.
Todd Fiala
todd.fiala at gmail.com
Fri Jul 11 08:43:51 PDT 2014
Author: tfiala
Date: Fri Jul 11 10:43:51 2014
New Revision: 212825
URL: http://llvm.org/viewvc/llvm-project?rev=212825&view=rev
Log:
Modify ObjectFileELF::GetArchitecture() to avoid calling ParseSectionHeaders() when we have headers.
Change by Matthew Gardiner.
Modified:
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=212825&r1=212824&r2=212825&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Fri Jul 11 10:43:51 2014
@@ -2569,8 +2569,11 @@ ObjectFileELF::GetArchitecture (ArchSpec
if (!ParseHeader())
return false;
- // Allow elf notes to be parsed which may affect the detected architecture.
- ParseSectionHeaders();
+ if (m_section_headers.empty())
+ {
+ // Allow elf notes to be parsed which may affect the detected architecture.
+ ParseSectionHeaders();
+ }
arch = m_arch_spec;
return true;
More information about the lldb-commits
mailing list