diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index e8611ce27f3..3114c1c72f9 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -700,6 +700,7 @@ typedef struct unsigned int header_size; unsigned int file_size; unsigned int checksum; + cpu_type_t cpu; } pe_image_info_t; #define IMAGE_FLAGS_ComPlusNativeReady 0x01 #define IMAGE_FLAGS_ComPlusILOnly 0x02 @@ -6531,6 +6532,6 @@ union generic_reply struct terminate_job_reply terminate_job_reply; }; -#define SERVER_PROTOCOL_VERSION 565 +#define SERVER_PROTOCOL_VERSION 566 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/mapping.c b/server/mapping.c index 2955766eea2..affe8fcffa1 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -600,14 +600,17 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s switch (nt.FileHeader.Machine) { case IMAGE_FILE_MACHINE_I386: + mapping->image.cpu = CPU_x86; if (cpu_mask & (CPU_FLAG(CPU_x86) | CPU_FLAG(CPU_x86_64))) break; return STATUS_INVALID_IMAGE_FORMAT; case IMAGE_FILE_MACHINE_ARM: case IMAGE_FILE_MACHINE_THUMB: case IMAGE_FILE_MACHINE_ARMNT: + mapping->image.cpu = CPU_ARM; if (cpu_mask & (CPU_FLAG(CPU_ARM) | CPU_FLAG(CPU_ARM64))) break; return STATUS_INVALID_IMAGE_FORMAT; case IMAGE_FILE_MACHINE_POWERPC: + mapping->image.cpu = CPU_POWERPC; if (cpu_mask & CPU_FLAG(CPU_POWERPC)) break; return STATUS_INVALID_IMAGE_FORMAT; default: @@ -643,9 +646,11 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s switch (nt.FileHeader.Machine) { case IMAGE_FILE_MACHINE_AMD64: + mapping->image.cpu = CPU_x86_64; if (cpu_mask & (CPU_FLAG(CPU_x86) | CPU_FLAG(CPU_x86_64))) break; return STATUS_INVALID_IMAGE_FORMAT; case IMAGE_FILE_MACHINE_ARM64: + mapping->image.cpu = CPU_ARM64; if (cpu_mask & (CPU_FLAG(CPU_ARM) | CPU_FLAG(CPU_ARM64))) break; return STATUS_INVALID_IMAGE_FORMAT; default: diff --git a/server/protocol.def b/server/protocol.def index 1a76f226c7e..e72dea6f8a0 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -716,6 +716,7 @@ typedef struct unsigned int header_size; unsigned int file_size; unsigned int checksum; + cpu_type_t cpu; } pe_image_info_t; #define IMAGE_FLAGS_ComPlusNativeReady 0x01 #define IMAGE_FLAGS_ComPlusILOnly 0x02 diff --git a/server/trace.c b/server/trace.c index 5140ab18381..6ccc777360b 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1177,10 +1177,12 @@ static void dump_varargs_pe_image_info( const char *prefix, data_size_t size ) dump_uint64( ",stack_commit=", &info.stack_commit ); fprintf( stderr, ",zerobits=%08x,subsystem=%08x,subsystem_low=%04x,subsystem_high=%04x,gp=%08x" ",image_charact=%04x,dll_charact=%04x,machine=%04x,contains_code=%u,image_flags=%02x" - ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x}", + ",loader_flags=%08x,header_size=%08x,file_size=%08x,checksum=%08x", info.zerobits, info.subsystem, info.subsystem_low, info.subsystem_high, info.gp, info.image_charact, info.dll_charact, info.machine, info.contains_code, info.image_flags, info.loader_flags, info.header_size, info.file_size, info.checksum ); + dump_cpu_type( ",cpu=", &info.cpu ); + fputc( '}', stderr ); remove_data( size ); }