[Lldb-commits] [lldb] r123615 - /lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Greg Clayton gclayton at apple.com
Sun Jan 16 20:34:27 PST 2011


Author: gclayton
Date: Sun Jan 16 22:34:26 2011
New Revision: 123615

URL: http://llvm.org/viewvc/llvm-project?rev=123615&view=rev
Log:
Fix the objective C object validator that I broke. When we have ObjC runtime
V2 and we only have gdb_class_getClass, then make sure the isa isn't NULL 
before trying to call gdb_class_getClass otherwise we end up deadlocking the
objective C runtime.


Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=123615&r1=123614&r2=123615&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Sun Jan 16 22:34:26 2011
@@ -156,7 +156,7 @@
                           "   if ($__lldb_arg_obj == (void *)0)                 \n"
                           "       return; // nil is ok                          \n" 
                           "    void **$isa_ptr = (void **)$__lldb_arg_obj;      \n"
-                          "    if (!gdb_class_getClass(*$isa_ptr))              \n"
+                          "    if (*$isa_ptr == NULL || !gdb_class_getClass(*$isa_ptr)) \n"
                           "       *((volatile int *)0) = 'ocgc';                \n"
                           "}                                                    \n", 
                           name);





More information about the lldb-commits mailing list