diff options
author | Enrico Granata <egranata@apple.com> | 2014-10-30 18:27:31 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2014-10-30 18:27:31 +0000 |
commit | 2206b48d6ddabad61979fa69ba09e6b6fb19b0b2 (patch) | |
tree | 615c6a82c84cb7a44d26173afa5fb32440ced6d7 /lldb/source/Target/Process.cpp | |
parent | 516e983dd4e145176eb17b2de2cb1457880457da (diff) | |
download | bcm5719-llvm-2206b48d6ddabad61979fa69ba09e6b6fb19b0b2.tar.gz bcm5719-llvm-2206b48d6ddabad61979fa69ba09e6b6fb19b0b2.zip |
Also port the C string reading code in ValueObject over to using StringPrinter API
llvm-svn: 220917
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 7bf75a65b80..0cc15e13aa7 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1882,12 +1882,17 @@ Process::LoadImage (const FileSpec &image_spec, Error &error) { if (error_str_sp->IsCStringContainer(true)) { - StreamString s; - size_t num_chars = error_str_sp->ReadPointedString (s, error); + DataBufferSP buffer_sp(new DataBufferHeap(10240,0)); + size_t num_chars = error_str_sp->ReadPointedString (buffer_sp, error, 10240); if (error.Success() && num_chars > 0) { error.Clear(); - error.SetErrorStringWithFormat("dlopen error: %s", s.GetData()); + error.SetErrorStringWithFormat("dlopen error: %s", buffer_sp->GetBytes()); + } + else + { + error.Clear(); + error.SetErrorStringWithFormat("dlopen failed for unknown reasons."); } } } |