[Lldb-commits] [PATCH] D12291: Add split dwarf support to SymbolFileDWARF
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 26 10:48:29 PDT 2015
clayborg added a comment.
In http://reviews.llvm.org/D12291#233274, @tberghammer wrote:
> I though a bit more about the abstraction you plan to introduce (DWARFDIE) and I started to believe we don't need it at all. If we use lldb::user_id_t in the NameToDIE indexes where the first 4 byte is the compile unit offset (for dwo) or the compile unit index (for debug map) and the last 4 byte is the die offset then we will have all of the information we need.
Even if we don't need it to implement the DWO feature, we still need it. There are many places where we pass around a DWARFCompileUnit and a DWARFDebugInfoEntry as two arguments and there are many places where the wrong DWARFCompileUnit might be being used for a DWARFDebugInfoEntry. So even if this doesn't help the DWO stuff, I really want to get this change in so this kind of error doesn't happen.
We should still pull the CU index + DWARF offset tricks you mention for sure.
> In this setup DWARFCompileUnit::Index have to be changed to index the dwo dwarf files also and all function of DWARFDebugInfoEntry have to be changed to check if it was given the compile unit belongs to the actual DIE or it got a pointer to the DIE in the main object file. In the second case it re-calls itself with the correct SymbolFileDwarf and DWARCompileUnit objects. I think this approach will keep the dwo file handling in the DWARFCompileUnit and in the DWARFDebugInfoEntry classes.
Sounds good, but lets build this on top of my DWARFDIE stuff so we can guarantee that we can hand out a DWARFDIE and always have the right DWARFCompileUnit and DWARFDebugInfoEntry. I am almost done with my DWARFDIE changes. Should be later today.
More information about the lldb-commits