[WINESYNC] dbghelp: Read the 32-bit Mach-O header.

It is identical to the 64-bit header, except for the "reserved" field.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id f2e38e17956197180ad730fd00a267fc25d4f238 by Zebediah Figura <zfigura@codeweavers.com>
This commit is contained in:
winesync 2020-09-11 13:14:04 +02:00 committed by Jérôme Gardou
parent 887025f3a0
commit 9985483679
3 changed files with 3 additions and 5 deletions

View file

@ -48,10 +48,8 @@
#include <mach-o/loader.h>
#ifdef _WIN64
typedef struct mach_header_64 macho_mach_header;
typedef struct section_64 macho_section;
#else
typedef struct mach_header macho_mach_header;
typedef struct section macho_section;
#endif
#endif
@ -98,7 +96,7 @@ struct image_file_map
struct image_file_map* dsym; /* the debug symbols file associated with this one */
#ifdef HAVE_MACH_O_LOADER_H
macho_mach_header mach_header;
struct mach_header mach_header;
const struct load_command* load_commands;
const struct uuid_command* uuid;

View file

@ -1196,7 +1196,7 @@ static BOOL image_uses_split_segs(HANDLE process, unsigned long load_addr)
struct process *pcs = process_find_by_handle(process);
cpu_type_t target_cpu = (pcs->is_64bit) ? CPU_TYPE_X86_64 : CPU_TYPE_X86;
uint32_t target_magic = (pcs->is_64bit) ? MH_MAGIC_64 : MH_MAGIC;
macho_mach_header header;
struct mach_header header;
if (ReadProcessMemory(process, (void*)load_addr, &header, sizeof(header), NULL) &&
header.magic == target_magic && header.cputype == target_cpu &&

View file

@ -3,4 +3,4 @@ directories:
files:
include/dbghelp.h: sdk/include/psdk/dbghelp.h
tags:
wine: f0ee3471f369bc3d3911647c7efa63fc503e6ce2
wine: f2e38e17956197180ad730fd00a267fc25d4f238