summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-10-30 17:52:44 +0000
committerEnrico Granata <egranata@apple.com>2013-10-30 17:52:44 +0000
commit5e1480c5dc31ea4005ff955c1bff5fd993b4dbe7 (patch)
tree33dfbb938dcf18eccd8809865fd86a3284f22f63
parent82509b66754079b3514ba8dbe08863188d26bc0a (diff)
downloadbcm5719-llvm-5e1480c5dc31ea4005ff955c1bff5fd993b4dbe7.tar.gz
bcm5719-llvm-5e1480c5dc31ea4005ff955c1bff5fd993b4dbe7.zip
<rdar://problem/13308704>
Fixing a problem where ValueObject::GetPointeeData() would not accept "partial" valid reads (i.e. asking for 10 items and getting only 5 back) While suboptimal, this situation is not a flat-out failure and could well be caused by legit scenarios, such as hitting a page boundary Among others, this allows data formatters to print char* buffers allocated under libgmalloc llvm-svn: 193704
-rw-r--r--lldb/source/Core/ValueObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index c9df4f2b228..e9aa349d8b2 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -1030,7 +1030,7 @@ ValueObject::GetPointeeData (DataExtractor& data,
{
heap_buf_ptr->SetByteSize(bytes);
size_t bytes_read = process->ReadMemory(addr + offset, heap_buf_ptr->GetBytes(), bytes, error);
- if (error.Success())
+ if (error.Success() || bytes_read > 0)
{
data.SetData(data_sp);
return bytes_read;
OpenPOWER on IntegriCloud