[Lldb-commits] [PATCH] D138618: [LLDB] Enable 64 bit debug/type offset

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 13 05:40:49 PST 2023


labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:402
     DWARFUnit &unit, llvm::function_ref<bool(DWARFDIE die)> callback) {
-  lldbassert(!unit.GetSymbolFileDWARF().GetDwoNum());
+  lldbassert(!unit.GetSymbolFileDWARF().GetFileIndex());
   Index();
----------------
clayborg wrote:
> Does this assert really need to exist? Why would we not require a .dwo file (old code) be able to index? Can we remove this assert? It seems wrong?
That was because it a split dwarf setup, there are two compile units, two symbol files and two CU DIEs. In a DIERef, the unit offset refers to the offset of the main unit within the main symbol file (because that's globally unique), but the die offset refers to the offset in the separate file (because that's where the dies are).  The indexing process needs to start with the main unit (not the one from the split file) in order for the DIERefs to come out right, and these assertions were enforcing that. Therefore, I think we should put all of these back in.

Or at least, that was the case at some point in the past... I don't know whether this has changed since then, but I wouldn't expect it to.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138618/new/

https://reviews.llvm.org/D138618



More information about the lldb-commits mailing list