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
This commit is contained in:
Jim Ingham 2010-12-23 02:29:54 +00:00
parent ff471a9402
commit a2cf2637da
1 changed files with 12 additions and 0 deletions

View File

@ -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());