When running the test suite with .debug_names a bunch of tests were failing. Part of that is solved by implementing the missing GetCompleteObjCClass in DebugNamesDWARFIndex.
Details
Diff Detail
Event Timeline
source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp | ||
---|---|---|
157 | Wait.. we accept both structs and classes in LLDB? Should we also switch over to using DW_TAG_class in clang since that sounds more appropriate anyway? |
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.
source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp | ||
---|---|---|
166 | 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. | |
173 | Why are pushing a DIERef that doesn't produce a DIE? Remove the push_back. | |
178 | If we find this, return right away with only one result: the complete version. | |
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. |
- Feedback Greg
source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp | ||
---|---|---|
157 | I'm probably not the right person to answer this. I copied this from HashedNameToDIE: 611 // We don't only want the one true definition, so try and see what we can 612 // find, and only return class or struct DIEs. ... 616 DWARFMappedHash::ExtractClassOrStructDIEArray( |
How are you planning on testing this? Most of the DWARFIndex functionality is tested in terms of lldb-test, but I think this function is not reachable from there. Maybe you could write a specific dotest-test which targets this?
Wait.. we accept both structs and classes in LLDB? Should we also switch over to using DW_TAG_class in clang since that sounds more appropriate anyway?