Don't try to read the eh_frame section out of a dSYM.
authorJason Molenda <jmolenda@apple.com>
Fri, 22 Mar 2013 00:38:45 +0000 (00:38 +0000)
committerJason Molenda <jmolenda@apple.com>
Fri, 22 Mar 2013 00:38:45 +0000 (00:38 +0000)
It won't have one and it isn't needed.

llvm-svn: 177688

lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

index 6f30932..069d23e 100644 (file)
@@ -1477,7 +1477,11 @@ ObjectFileMachO::ParseSymtab (bool minimize)
         } 
         else
         {
-            if (text_section_sp.get() && eh_frame_section_sp.get())
+            // If m_type is eTypeDebugInfo, then this is a dSYM - it will have the load command claiming an eh_frame
+            // but it doesn't actually have the eh_frame content.  And if we have a dSYM, we don't need to do any
+            // of this fill-in-the-missing-symbols works anyway - the debug info should give us all the functions in
+            // the module.
+            if (text_section_sp.get() && eh_frame_section_sp.get() && m_type != eTypeDebugInfo)
             {
                 DWARFCallFrameInfo eh_frame(*this, eh_frame_section_sp, eRegisterKindGCC, true);
                 DWARFCallFrameInfo::FunctionAddressAndSizeVector functions;