[Lldb-commits] [PATCH] D87545: [lldb] Use GetNonKVOClassDescriptor to get the NSDictionary class descriptor

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 11 12:43:58 PDT 2020


JDevlieghere created this revision.
JDevlieghere added a reviewer: jingham.
JDevlieghere requested review of this revision.

On macOS Big Sur the class descriptor contains the `NSKVONotifying_` prefix. This is covered by `TestDataFormatterObjCKVO`.


https://reviews.llvm.org/D87545

Files:
  lldb/source/Plugins/Language/ObjC/NSDictionary.cpp


Index: lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
===================================================================
--- lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
+++ lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
@@ -388,7 +388,7 @@
     return false;
 
   ObjCLanguageRuntime::ClassDescriptorSP descriptor(
-      runtime->GetClassDescriptor(valobj));
+      runtime->GetNonKVOClassDescriptor(valobj));
 
   if (!descriptor || !descriptor->IsValid())
     return false;
@@ -403,7 +403,7 @@
 
   uint64_t value = 0;
 
-  ConstString class_name(descriptor->GetClassName());
+  ConstString class_name = descriptor->GetClassName();
 
   static const ConstString g_DictionaryI("__NSDictionaryI");
   static const ConstString g_DictionaryM("__NSDictionaryM");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87545.291315.patch
Type: text/x-patch
Size: 778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200911/3a6fa927/attachment.bin>


More information about the lldb-commits mailing list