[Lldb-commits] [lldb] r122465 - /lldb/trunk/source/Core/ValueObject.cpp

Jim Ingham jingham at apple.com
Wed Dec 22 18:29:54 PST 2010


Author: jingham
Date: Wed Dec 22 20:29:54 2010
New Revision: 122465

URL: http://llvm.org/viewvc/llvm-project?rev=122465&view=rev
Log:
For the language check in GetObjectDescription, if we can't find a language runtime for the value we're looking at, BUT it IS at least a pointer, try the ObjCRuntime language.  That's currently the only language runtime that has an object description method anyway...

Modified:
    lldb/trunk/source/Core/ValueObject.cpp

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=122465&r1=122464&r2=122465&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Wed Dec 22 20:29:54 2010
@@ -590,6 +590,18 @@
     lldb::LanguageType language = GetObjectRuntimeLanguage();
     LanguageRuntime *runtime = process->GetLanguageRuntime(language);
     
+    if (runtime == NULL)
+    {
+        // Aw, hell, if the things a pointer, let's try ObjC anyway...
+        clang_type_t opaque_qual_type = GetClangType();
+        if (opaque_qual_type != NULL)
+        {
+            clang::QualType qual_type (clang::QualType::getFromOpaquePtr(opaque_qual_type).getNonReferenceType());
+            if (qual_type->isAnyPointerType())
+                runtime = process->GetLanguageRuntime(lldb::eLanguageTypeObjC);
+        }
+    }
+    
     if (runtime && runtime->GetObjectDescription(s, *this, exe_scope))
     {
         m_object_desc_str.append (s.GetData());





More information about the lldb-commits mailing list