[Lldb-commits] [PATCH] D64159: [Core] Generalize ValueObject::MaybeCalculateCompleteType

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 8 14:54:18 PDT 2019

jingham added inline comments.

Comment at: source/Target/ObjCLanguageRuntime.cpp:403
+ObjCLanguageRuntime::CalculateCompleteType(CompilerType base_type) {
+  CompilerType type_to_return;
xiaobai wrote:
> clayborg wrote:
> > So a main question for ObjC here: do we always want to show the runtime type? Should we not check if the class inside of "base_type" is the one true definition and skip grabbing the runtime type here and return {}?
> How do you know which is the "one true definition"?
The only places you can add ivars to an ObjC class are in the @interface declaration (which is usually in the .h file for the class) and in the @implementation and the "class category" - which has to be in the same source file as the @implementation.  So if you find debug information for the .m file that contains the @implementation you have seen all the ivars of the class.  Clang marks that fact by putting "DW_AT_APPLE_objc_complete_type" with value "true" in the DW_TAG_structure_type die for the class.  If you see a type definition so marked, that it the "one true definition".



More information about the lldb-commits mailing list