<rdar://problem/13092722>
Fix in loading mach files from memory when using DynamicLoaderMacOSXDYLD.
Removed the uuid mismatch warning that could be spit out and any time during debugging and removed the test case that was looking for that. Currently the "add-dsym" or "target symbols add" command will report an error when the UUID's don't match.
Be more careful when checking and resolving section + offset addresses to make sure none of the base addresses are invalid.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174222 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/SectionLoadList.cpp b/source/Target/SectionLoadList.cpp
index 17e5581..6a701b3 100644
--- a/source/Target/SectionLoadList.cpp
+++ b/source/Target/SectionLoadList.cpp
@@ -216,9 +216,10 @@
{
if (load_addr != pos->first && pos != m_addr_to_sect.begin())
--pos;
- if (load_addr >= pos->first)
+ const addr_t pos_load_addr = pos->first;
+ if (load_addr >= pos_load_addr)
{
- addr_t offset = load_addr - pos->first;
+ addr_t offset = load_addr - pos_load_addr;
if (offset < pos->second->GetByteSize())
{
// We have found the top level section, now we need to find the