Index: source/Symbol/DWARFCallFrameInfo.cpp
===================================================================
--- source/Symbol/DWARFCallFrameInfo.cpp	(revision 303350)
+++ source/Symbol/DWARFCallFrameInfo.cpp	(working copy)
@@ -461,10 +461,19 @@
       m_fde_index_initialized = true;
       return;
     }
+
+    if ((cie_id == 0 && m_is_eh_frame) || cie_id == UINT32_MAX || len == 0) {
+      m_cie_map[current_entry] = ParseCIE(current_entry);
+      offset = next_entry;
+      continue;
+    }
+    
+    if (!m_is_eh_frame)
+      cie_offset = cie_id; // debug_frame section's FDE contains CIE offset instead of id
+
     if (cie_offset > m_cfi_data.GetByteSize()) {
-      Host::SystemLog(
-          Host::eSystemLogError,
-          "error: Invalid cie offset of 0x%x found in cie/fde at 0x%x\n",
+      Host::SystemLog(Host::eSystemLogError, "error: Invalid cie offset of 0x%x "
+                                             "found in cie/fde at 0x%x\n",
           cie_offset, current_entry);
       // Don't trust anything in this eh_frame section if we find blatantly
       // invalid data.
@@ -473,12 +482,6 @@
       return;
     }
 
-    if (cie_id == 0 || cie_id == UINT32_MAX || len == 0) {
-      m_cie_map[current_entry] = ParseCIE(current_entry);
-      offset = next_entry;
-      continue;
-    }
-
     const CIE *cie = GetCIE(cie_offset);
     if (cie) {
       const lldb::addr_t pc_rel_addr = m_section_sp->GetFileAddress();
@@ -531,7 +534,7 @@
     cie_offset = m_cfi_data.GetU32(&offset);
   }
 
-  assert(cie_offset != 0 && cie_offset != UINT32_MAX);
+  assert(!(m_is_eh_frame && 0 == cie_offset) && cie_offset != UINT32_MAX);
 
   // Translate the CIE_id from the eh_frame format, which
   // is relative to the FDE offset, into a __eh_frame section
