[Lldb-commits] [lldb] r289016 - Set the address size based on the target's arch instead

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 7 18:02:45 PST 2016


Author: jmolenda
Date: Wed Dec  7 20:02:45 2016
New Revision: 289016

URL: http://llvm.org/viewvc/llvm-project?rev=289016&view=rev
Log:
Set the address size based on the target's arch instead
of using the address of the all_image_infos struct.
<rdar://problem/29547847> 

Modified:
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=289016&r1=289015&r2=289016&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Wed Dec  7 20:02:45 2016
@@ -430,9 +430,8 @@ bool DynamicLoaderMacOSXDYLD::ReadAllIma
   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);




More information about the lldb-commits mailing list