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.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113660 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectFrame.cpp b/source/Commands/CommandObjectFrame.cpp
index 013e8c9..d85a53e 100644
--- a/source/Commands/CommandObjectFrame.cpp
+++ b/source/Commands/CommandObjectFrame.cpp
@@ -444,41 +444,11 @@
                 
                 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;
                 }