Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -238,6 +238,32 @@ } } + // DWARFDebugInfoEntry::FastExtract may have failed to decode next DIE. + if (!m_die_array.empty()) { + for (const uint32_t index:die_index_stack) { + DWARFDebugInfoEntry &die = m_die_array[index]; + if (die.GetSibling()) { + die.SetSibling(nullptr); +#if 0 // It locks up on: Module::m_mutex + m_dwarf2Data->GetObjectFile()->GetModule()->ReportWarning( + "DWARF compile unit cu 0x%8.8x terminates at offset " + "0x%8.8" PRIx64 " cutting siblings of DIE 0x%8.8x\n", + GetOffset(), offset, die.GetOffset()); +#endif + } + } + DWARFDebugInfoEntry &die = m_die_array.back(); + if (die.HasChildren()) { + die.SetHasChildren(false); +#if 0 // It locks up on: Module::m_mutex + m_dwarf2Data->GetObjectFile()->GetModule()->ReportWarning( + "DWARF compile unit cu 0x%8.8x terminates at offset " + "0x%8.8" PRIx64 " cutting children of DIE 0x%8.8x\n", + GetOffset(), offset, die.GetOffset()); +#endif + } + } + // Give a little bit of info if we encounter corrupt DWARF (our offset // should always terminate at or before the start of the next compilation // unit header).