summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObject.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2010-12-23 02:29:54 +0000
committerJim Ingham <jingham@apple.com>2010-12-23 02:29:54 +0000
commita2cf2637da779df8060f34e0ea08c71668135fe0 (patch)
tree369166ec99e1c606595c2c8d51dbf9f91d2fedbf /lldb/source/Core/ValueObject.cpp
parentff471a9402d78d83cf5fd42e7d55a293648eebd6 (diff)
downloadbcm5719-llvm-a2cf2637da779df8060f34e0ea08c71668135fe0.tar.gz
bcm5719-llvm-a2cf2637da779df8060f34e0ea08c71668135fe0.zip
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...
llvm-svn: 122465
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r--lldb/source/Core/ValueObject.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 47b0c76359d..1307da92052 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -590,6 +590,18 @@ ValueObject::GetObjectDescription (ExecutionContextScope *exe_scope)
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());
OpenPOWER on IntegriCloud