[Lldb-commits] [lldb] r251889 - Do not try to copy host memory from address 0
Enrico Granata via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 2 18:34:43 PST 2015
Author: enrico
Date: Mon Nov 2 20:34:43 2015
New Revision: 251889
URL: http://llvm.org/viewvc/llvm-project?rev=251889&view=rev
Log:
Do not try to copy host memory from address 0
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=251889&r1=251888&r2=251889&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Mon Nov 2 20:34:43 2015
@@ -1105,7 +1105,7 @@ ValueObject::GetPointeeData (DataExtract
{
size_t bytes_read = std::min<uint64_t>(max_bytes - offset, bytes);
addr = m_value.GetScalar().ULongLong(LLDB_INVALID_ADDRESS);
- if (addr == LLDB_INVALID_ADDRESS)
+ if (addr == 0 || addr == LLDB_INVALID_ADDRESS)
break;
heap_buf_ptr->CopyData((uint8_t*)(addr + offset), bytes_read);
data.SetData(data_sp);
More information about the lldb-commits
mailing list