[Lldb-commits] [PATCH] D12291: Add split dwarf support to SymbolFileDWARF

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 25 10:51:30 PDT 2015

clayborg added a comment.

For our DWARF in .o files, I have SymbolFileDWARFDebugMap which loads the DWARF from .o files. Each .o file is loaded in a completely unchanged version of SymbolFileDWARF. Any lldb::user_id_t that are generated use:

  SymbolFileDWARF::MakeUserID (dw_offset_t die_offset) const
      return GetID() | die_offset;

For a normal DWARF file GetID() returns 0. When used under a SymbolFileDWARFDebugMap, we set the ID to the index of the DWARF file. This encodes the SymbolFileDWARF's index in SymbolFileDWARFDebugMap's array as the high 32 bits of any IDs that are passed around and allow us to hand out unique IDs where the DIE offset ORed with the SymbolFileDWARF index is the ID. The IDs are then trimmed down to the low 32 bits before the SymbolFileDWARF looks them up. Actually dw_offset_t is 32 bit, so even if you pass a 64 bit value to anything that looks up a DIE, it will get correctly truncated.

So this should be possible. If desired, I can first make a patch that implements the DWARFDIE stuff, then we can update this patch to deal with that after that is done?


More information about the lldb-commits mailing list