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>
This commit is contained in:
parent
f0ee3471f3
commit
f2e38e1795
|
@ -46,10 +46,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
|
||||
|
@ -96,7 +94,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;
|
||||
|
||||
|
|
|
@ -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 &&
|
||||
|
|
Loading…
Reference in New Issue