[Lldb-commits] [lldb] r193704 - <rdar://problem/13308704>
Enrico Granata
egranata at apple.com
Wed Oct 30 10:52:45 PDT 2013
Author: enrico
Date: Wed Oct 30 12:52:44 2013
New Revision: 193704
URL: http://llvm.org/viewvc/llvm-project?rev=193704&view=rev
Log:
<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
Modified:
lldb/trunk/source/Core/ValueObject.cpp
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=193704&r1=193703&r2=193704&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Wed Oct 30 12:52:44 2013
@@ -1030,7 +1030,7 @@ ValueObject::GetPointeeData (DataExtract
{
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;
More information about the lldb-commits
mailing list