ReadPointedString takes a Stream not a DataBuffer.
authorJim Ingham <jingham@apple.com>
Thu, 17 Jul 2014 21:53:48 +0000 (21:53 +0000)
committerJim Ingham <jingham@apple.com>
Thu, 17 Jul 2014 21:53:48 +0000 (21:53 +0000)
llvm-svn: 213314

lldb/source/Target/Process.cpp

index cebe440..aa2b7dd 100644 (file)
@@ -1565,12 +1565,12 @@ Process::LoadImage (const FileSpec &image_spec, Error &error)
                                 {
                                     if (result_valobj_sp->IsCStringContainer(true))
                                     {
-                                        lldb::DataBufferSP buf_sp (new DataBufferHeap());
-                                        size_t num_chars = result_valobj_sp->ReadPointedString (buf_sp, error);
+                                        StreamString s;
+                                        size_t num_chars = result_valobj_sp->ReadPointedString (s, error);
                                         if (error.Success() && num_chars > 0)
                                         {
                                             error.Clear();
-                                            error.SetErrorStringWithFormat("dlopen failed: %s", buf_sp->GetBytes());
+                                            error.SetErrorStringWithFormat("dlopen failed: %s", s.GetData());
                                         }
                                     }
                                 }