[Lldb-commits] [PATCH] D99315: [lldb] Support lazily named classes in the Objective-C classes

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 25 11:15:39 PDT 2021


shafik added inline comments.


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp:199
+
+    ClassInfo *class_infos = (ClassInfo *)class_infos_ptr;
+
----------------
Is this pointer and `realized_class_list` always non-NULL?


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp:201
+
+    unsigned int count = 0;
+    Class* realized_class_list = objc_copyRealizedClassList(&count);
----------------
You use `unsigned int` here, `uint32_t` next and then `unsigned` in the for loop. We should pick one for consistency, probably `uint32_t` since it is fixed width.


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp:1585
       num_class_infos = return_value.GetScalar().ULong();
-      LLDB_LOGF(log, "Discovered %u ObjC classes\n", num_class_infos);
+      LLDB_LOGF(log, "Discovered %u Objective-C classes", num_class_infos);
       if (num_class_infos > 0) {
----------------
For `uint32_t` we should use `PRIu32` for the format.


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp:1867
       num_class_infos = return_value.GetScalar().ULong();
-      LLDB_LOGF(log, "Discovered %u ObjC classes in shared cache\n",
+      LLDB_LOGF(log, "Discovered %u Objective-C classes in the shared cache",
                 num_class_infos);
----------------
For `uint32_t` we need to use `PRIu32`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99315/new/

https://reviews.llvm.org/D99315



More information about the lldb-commits mailing list