Charles Davis : dbghelp: Support 64-bit dyld_all_image_infos structures, too.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Feb 6 10:41:39 CST 2015


Module: wine
Branch: master
Commit: b3232e7c9d5232839160380bbbfd246f44862232
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b3232e7c9d5232839160380bbbfd246f44862232

Author: Charles Davis <cdavis5x at gmail.com>
Date:   Thu Feb  5 13:28:59 2015 -0700

dbghelp: Support 64-bit dyld_all_image_infos structures, too.

---

 dlls/dbghelp/macho_module.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c
index 2eb2b94..bb49aa5 100644
--- a/dlls/dbghelp/macho_module.c
+++ b/dlls/dbghelp/macho_module.c
@@ -981,10 +981,10 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
                                            &pbi, sizeof(pbi), NULL);
         if (status == STATUS_SUCCESS)
         {
-            ULONG dyld_image_info;
+            ULONG_PTR dyld_image_info;
 
             /* Read dyld image info address from PEB */
-            if (ReadProcessMemory(pcs->handle, &pbi.PebBaseAddress->Reserved,
+            if (ReadProcessMemory(pcs->handle, &pbi.PebBaseAddress->Reserved[0],
                                   &dyld_image_info, sizeof(dyld_image_info), NULL))
             {
                 TRACE("got dyld_image_info 0x%08x from PEB %p MacDyldImageInfo %p\n",
@@ -994,6 +994,7 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
             }
         }
 
+#ifndef __LP64__ /* No reading the symtab with nlist(3) in LP64 */
         if (!ret)
         {
             static void* dyld_all_image_infos_addr;
@@ -1017,6 +1018,7 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
                 ret = TRUE;
             }
         }
+#endif
     }
 
     if (macho_info->flags & MACHO_INFO_MODULE)




More information about the wine-cvs mailing list