From: Jason Molenda Date: Thu, 8 Dec 2016 02:02:45 +0000 (+0000) Subject: Set the address size based on the target's arch instead X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49034417dad38fb0b6f6b486108d8e6d7495ff6d;p=platform%2Fupstream%2Fllvm.git Set the address size based on the target's arch instead of using the address of the all_image_infos struct. llvm-svn: 289016 --- diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index bbaa1ba..9c5f1bc 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -430,9 +430,8 @@ bool DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure() { if (m_dyld_all_image_infos_addr != LLDB_INVALID_ADDRESS) { ByteOrder byte_order = m_process->GetTarget().GetArchitecture().GetByteOrder(); - uint32_t addr_size = 4; - if (m_dyld_all_image_infos_addr > UINT32_MAX) - addr_size = 8; + uint32_t addr_size = + m_process->GetTarget().GetArchitecture().GetAddressByteSize(); uint8_t buf[256]; DataExtractor data(buf, sizeof(buf), byte_order, addr_size);