[Lldb-commits] [PATCH] D39825: [lldb] Fix cu_offset for dwo/dwp used by DWARFCompileUnit::Index
Alexander Shaposhnikov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 9 11:01:15 PST 2017
alexshap added a comment.
@tberghammer, SymbolFileDWARF (the base class of SymbolFileDWARFDwo) calls Index()
"lazily" in may places, so indexing of dwo happens almost inevitably (at the moment)
(FindCompleteObjCDefinitionTypeForDIE is just one example).
> because this way you will index the compile unit twice (once from the main object file and once from the dwo),
> then create 2 CompilerType for the 2 indexed version and will start hitting random issues in
> expression evaluation when clang will get confused by 2 declaration for the same type.
there are two separate CompileUnits here, not one,
There is a compile unit represented by m_base_dwarf_cu (roughly speaking for .o) and and there is another one
(which we can get, for example, via SymbolFileDWARFDwo::GetCompileUnit()) (roughly speaking for dwo).
(please, correct me if i'm wrong). For the latter GetOffset() would typically return 0,
for the former GetOffset() typically returns the higher 32 bits of Id.
Repository:
rL LLVM
https://reviews.llvm.org/D39825
More information about the lldb-commits
mailing list