Skip to content
Snippets Groups Projects
Commit b3232e7c authored by Chip Davis's avatar Chip Davis Committed by Alexandre Julliard
Browse files

dbghelp: Support 64-bit dyld_all_image_infos structures, too.

parent 97bda9a0
No related branches found
No related tags found
No related merge requests found
...@@ -981,10 +981,10 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename, ...@@ -981,10 +981,10 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
&pbi, sizeof(pbi), NULL); &pbi, sizeof(pbi), NULL);
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
ULONG dyld_image_info; ULONG_PTR dyld_image_info;
/* Read dyld image info address from PEB */ /* 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)) &dyld_image_info, sizeof(dyld_image_info), NULL))
{ {
TRACE("got dyld_image_info 0x%08x from PEB %p MacDyldImageInfo %p\n", 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, ...@@ -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) if (!ret)
{ {
static void* dyld_all_image_infos_addr; static void* dyld_all_image_infos_addr;
...@@ -1017,6 +1018,7 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename, ...@@ -1017,6 +1018,7 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
ret = TRUE; ret = TRUE;
} }
} }
#endif
} }
if (macho_info->flags & MACHO_INFO_MODULE) if (macho_info->flags & MACHO_INFO_MODULE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment