server: Also return CPU type in the mapping image information.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ecea7a94c9
commit
33584dc12c
|
@ -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 */
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue