[Lldb-commits] [PATCH] D48596: [SymbolFile] Implement GetCompleteObjCClass for .debug_names
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 26 09:28:08 PDT 2018
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.
The function is looking for the complete objective C type. The code needs to be modified to return the complete type only if one is found, else just one of the other incomplete versions is needed, not many.
================
Comment at: source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp:166
+ if (!cu || !cu->Supports_DW_AT_APPLE_objc_complete_type()) {
+ offsets.push_back(ref);
+ continue;
----------------
Why are we pushing a potentially incomplete ObjC type here? We should keep a list of incomplete types and if we don't find a complete one, then return that as a fallback.
================
Comment at: source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp:173
+ if (!die) {
+ offsets.push_back(ref);
+ continue;
----------------
Why are pushing a DIERef that doesn't produce a DIE? Remove the push_back.
================
Comment at: source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp:178
+ if (die.GetAttributeValueAsUnsigned(DW_AT_APPLE_objc_complete_type, 1))
+ offsets.push_back(ref);
+ }
----------------
If we find this, return right away with only one result: the complete version.
================
Comment at: source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp:180
+ }
+}
+
----------------
We need to add code here to return an incomplete version of the ObjC type from line 166 if no complete versions are found.
Repository:
rL LLVM
https://reviews.llvm.org/D48596
More information about the lldb-commits
mailing list