[Lldb-commits] [lldb] [lldb] Tolerate multiple compile units with the same DWO ID (PR #100577)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 5 08:07:37 PDT 2024
================
@@ -97,12 +97,14 @@ void DWARFUnit::ExtractUnitDIEIfNeeded() {
*m_dwo_id, m_first_die.GetOffset()));
return; // Can't fetch the compile unit from the dwo file.
}
- // If the skeleton compile unit gets its unit DIE parsed first, then this
- // will fill in the DWO file's back pointer to this skeleton compile unit.
- // If the DWO files get parsed on their own first the skeleton back link
- // can be done manually in DWARFUnit::GetSkeletonCompileUnit() which will
- // do a reverse lookup and cache the result.
- dwo_cu->SetSkeletonUnit(this);
+
+ // Link the DWO unit to this object, if it hasn't been linked already (this
+ // can happen when we have an index, and the DWO unit is parsed first).
+ if (!dwo_cu->LinkToSkeletonUnit(*this)) {
+ SetDwoError(Status::createWithFormat(
+ "multiple compile units with Dwo ID {0:x16}", *m_dwo_id));
----------------
labath wrote:
Any thoughts on what I wrote above, Greg?
https://github.com/llvm/llvm-project/pull/100577
More information about the lldb-commits
mailing list