aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2010-09-10 23:12:17 +0000
committerJim Ingham <jingham@apple.com>2010-09-10 23:12:17 +0000
commit53c47f1e2f61c5ab5060970e49fc5dfc3cdaac9f (patch)
tree97b684cb5064d6b325eaaa5d6d9ea9b720087b88 /lldb/source/Commands/CommandObjectFrame.cpp
parentcc766a20d35a336802f0c7ba344956b90d1f715d (diff)
downloadllvm-53c47f1e2f61c5ab5060970e49fc5dfc3cdaac9f.zip
llvm-53c47f1e2f61c5ab5060970e49fc5dfc3cdaac9f.tar.gz
llvm-53c47f1e2f61c5ab5060970e49fc5dfc3cdaac9f.tar.bz2
Move the "Object Description" into the ValueObject, and the add an API to
SBValue to access it. For now this is just the result of ObjC NSPrintForDebugger, but could be extended. Also store the results of the ObjC Object Printer in a Stream, not a ConstString. llvm-svn: 113660
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp40
1 files changed, 5 insertions, 35 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 013e8c9..d85a53e01 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -444,41 +444,11 @@ public:
if (use_objc)
{
- if (!ClangASTContext::IsPointerType (valobj->GetOpaqueClangQualType()))
- return;
-
- if (!valobj->GetValueIsValid())
- return;
-
- Process *process = exe_scope->CalculateProcess();
-
- if (!process)
- return;
-
- Scalar scalar;
-
- if (!ClangASTType::GetValueAsScalar (valobj->GetClangAST(),
- valobj->GetOpaqueClangQualType(),
- valobj->GetDataExtractor(),
- 0,
- valobj->GetByteSize(),
- scalar))
- return;
-
- ConstString po_output;
-
- ExecutionContext exe_ctx;
- exe_scope->Calculate(exe_ctx);
-
- Value val(scalar);
- val.SetContext(Value::eContextTypeOpaqueClangQualType,
- ClangASTContext::GetVoidPtrType(valobj->GetClangAST(), false));
-
- if (!process->GetObjCObjectPrinter().PrintObject(po_output, val, exe_ctx))
- return;
-
- s.Printf("\n%s\n", po_output.GetCString());
-
+ const char *object_desc = valobj->GetObjectDescription(exe_scope);
+ if (object_desc)
+ s.Printf("\n%s\n", object_desc);
+ else
+ s.Printf ("No description available.\n");
return;
}