Set the address size based on the target's arch instead

of using the address of the all_image_infos struct.
<rdar://problem/29547847> 

llvm-svn: 289016
This commit is contained in:
Jason Molenda 2016-12-08 02:02:45 +00:00
parent f965cc8632
commit 49034417da
1 changed files with 2 additions and 3 deletions

View File

@ -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);