summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObject.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-10-23 00:18:49 +0000
committerSean Callanan <scallanan@apple.com>2010-10-23 00:18:49 +0000
commit672ad94681cd121d782b69845a30aecfe55e3bd2 (patch)
tree6d9624f5759611a8b5d8c51687719efbba153617 /lldb/source/Core/ValueObject.cpp
parent92644efaf8234f8d9635c99f87d98c440aff9282 (diff)
downloadbcm5719-llvm-672ad94681cd121d782b69845a30aecfe55e3bd2.tar.gz
bcm5719-llvm-672ad94681cd121d782b69845a30aecfe55e3bd2.zip
Fixed value objects so that they return an
informative message when they have no description. llvm-svn: 117190
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r--lldb/source/Core/ValueObject.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index da613b81e19..4345eecea18 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -565,7 +565,11 @@ ValueObject::GetObjectDescription (ExecutionContextScope *exe_scope)
{
m_object_desc_str.append (s.GetData());
}
- return m_object_desc_str.c_str();
+
+ if (m_object_desc_str.empty())
+ return NULL;
+ else
+ return m_object_desc_str.c_str();
}
const char *
@@ -995,7 +999,7 @@ ValueObject::DumpValueObject
if (object_desc)
s.Printf(" %s\n", object_desc);
else
- s.Printf ("No description available.\n");
+ s.Printf (" [no Objective-C description available]\n");
return;
}
}
OpenPOWER on IntegriCloud