[Lldb-commits] [PATCH] D128306: [lldb] Instantiate lazily named classes on macOS Ventura.
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 21 18:51:49 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc08f61b45e3b: [lldb] Instantiate lazily named classes on macOS Ventura. (authored by JDevlieghere).
Herald added a project: LLDB.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128306/new/
https://reviews.llvm.org/D128306
Files:
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
Index: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
===================================================================
--- lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -205,7 +205,7 @@
{
Class isa = realized_class_list[i];
const char *name_ptr = objc_debug_class_getNameRaw(isa);
- if (name_ptr == NULL)
+ if (!name_ptr)
continue;
const char *s = name_ptr;
uint32_t h = 5381;
@@ -239,6 +239,7 @@
void free(void *ptr);
size_t objc_getRealizedClassList_trylock(Class *buffer, size_t len);
const char* objc_debug_class_getNameRaw(Class cls);
+ const char* class_getName(Class cls);
}
#define DEBUG_PRINTF(fmt, ...) if (should_log) printf(fmt, ## __VA_ARGS__)
@@ -278,7 +279,11 @@
{
Class isa = realized_class_list[i];
const char *name_ptr = objc_debug_class_getNameRaw(isa);
- if (name_ptr == NULL)
+ if (!name_ptr) {
+ class_getName(isa); // Realize name of lazy classes.
+ name_ptr = objc_debug_class_getNameRaw(isa);
+ }
+ if (!name_ptr)
continue;
const char *s = name_ptr;
uint32_t h = 5381;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128306.438888.patch
Type: text/x-patch
Size: 1426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220622/eeb188b8/attachment-0001.bin>
More information about the lldb-commits
mailing list