[Lldb-commits] [PATCH] D39825: [lldb] Fix cu_offset for dwo/dwp used by DWARFCompileUnit::Index

Tamas Berghammer via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 9 10:26:17 PST 2017


tberghammer added a comment.

I never tried debugging Objective-C using dwo but I am pretty sure this won't fix the issue you are seeing for FindCompleteObjCDefinitionTypeForDIE correctly 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. If I am not mistaken then because of this, calling Index on a Dwo file is a pretty bad idea. Instead of trying to get it work we should change it to be an assert so people don't call it by accident.

I am not sure if it makes sense to call FindCompleteObjCDefinitionTypeForDIE on a SymbolFileDWARFDwo because generally you want to do the type lookup in a full object file and not only in a single dwo. Do you have a full stack trace for a scenario where this happens? I suspect that the problem is at a higher layer then you are trying to fix it.

If the problem is actually with FindCompleteObjCDefinitionTypeForDIE then the correct solution would be to override it in SymbolFileDWARFDwo with "return GetBaseSymbolFile()->FindCompleteObjCDefinitionTypeForDIE(...)" as we are already doing it for a few methods.


Repository:
  rL LLVM

https://reviews.llvm.org/D39825





More information about the lldb-commits mailing list