[PATCH 2/6] dbghelp: Read the 32-bit Mach-O header.

Zebediah Figura zfigura at codeweavers.com
Thu Jun 14 16:58:14 CDT 2018


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

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/dbghelp/image_private.h | 4 +---
 dlls/dbghelp/macho_module.c  | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h
index b12cacb..60cdd35 100644
--- a/dlls/dbghelp/image_private.h
+++ b/dlls/dbghelp/image_private.h
@@ -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;
 
diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c
index ee35af5..679c203 100644
--- a/dlls/dbghelp/macho_module.c
+++ b/dlls/dbghelp/macho_module.c
@@ -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 &&
-- 
2.7.4




More information about the wine-devel mailing list