Commit a51f26ba authored by Alexandre Julliard's avatar Alexandre Julliard

server: Return the process machine from the main exe instead of a CPU flag.

parent 96865eb7
......@@ -1259,7 +1259,8 @@ NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class
{
req->handle = wine_server_obj_handle( handle );
if (!(ret = wine_server_call( req )))
val = (reply->cpu != CPU_x86_64 && reply->cpu != CPU_ARM64);
val = (reply->machine != IMAGE_FILE_MACHINE_AMD64 &&
reply->machine != IMAGE_FILE_MACHINE_ARM64);
}
SERVER_END_REQ;
}
......
......@@ -1010,9 +1010,9 @@ struct get_process_info_reply
timeout_t end_time;
int exit_code;
int priority;
client_cpu_t cpu;
unsigned short machine;
/* VARARG(image,pe_image_info); */
char __pad_60[4];
char __pad_58[6];
};
......@@ -6219,7 +6219,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 693
#define SERVER_PROTOCOL_VERSION 694
/* ### protocol_version end ### */
......
......@@ -362,6 +362,7 @@ static void add_process_view( struct thread *thread, struct memory_view *view )
else if (!(view->image.image_charact & IMAGE_FILE_DLL))
{
/* main exe */
process->machine = view->image.machine;
list_add_head( &process->views, &view->entry );
if (get_view_nt_name( view, &name ) && (process->image = memdup( name.str, name.len )))
process->imagelen = name.len;
......
......@@ -1317,7 +1317,7 @@ DECL_HANDLER(get_process_info)
reply->peb = process->peb;
reply->start_time = process->start_time;
reply->end_time = process->end_time;
reply->cpu = process->cpu;
reply->machine = process->machine;
if (get_reply_max_size())
{
client_ptr_t base;
......
......@@ -53,6 +53,7 @@ struct process
process_id_t group_id; /* group id of the process */
struct timeout_user *sigkill_timeout; /* timeout for final SIGKILL */
enum cpu_type cpu; /* client CPU type */
unsigned short machine; /* client machine type */
int unix_pid; /* Unix pid for final SIGKILL */
int exit_code; /* process exit code */
int running_threads; /* number of threads running in this process */
......@@ -66,7 +67,7 @@ struct process
unsigned int is_terminating:1;/* is process terminating? */
data_size_t imagelen; /* length of image path in bytes */
WCHAR *image; /* main exe image full path */
struct job *job; /* job object ascoicated with this process */
struct job *job; /* job object associated with this process */
struct list job_entry; /* list entry for job object */
struct list asyncs; /* list of async object owned by the process */
struct list locks; /* list of file locks owned by the process */
......
......@@ -963,7 +963,7 @@ typedef struct
timeout_t end_time; /* process end time */
int exit_code; /* process exit code */
int priority; /* priority class */
client_cpu_t cpu; /* CPU that this process is running on */
unsigned short machine; /* process architecture */
VARARG(image,pe_image_info); /* image info for main exe */
@END
......
......@@ -783,7 +783,7 @@ C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, start_time) == 32 );
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, end_time) == 40 );
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, exit_code) == 48 );
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, priority) == 52 );
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, cpu) == 56 );
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, machine) == 56 );
C_ASSERT( sizeof(struct get_process_info_reply) == 64 );
C_ASSERT( FIELD_OFFSET(struct get_process_debug_info_request, handle) == 12 );
C_ASSERT( sizeof(struct get_process_debug_info_request) == 16 );
......
......@@ -1503,7 +1503,7 @@ static void dump_get_process_info_reply( const struct get_process_info_reply *re
dump_timeout( ", end_time=", &req->end_time );
fprintf( stderr, ", exit_code=%d", req->exit_code );
fprintf( stderr, ", priority=%d", req->priority );
dump_client_cpu( ", cpu=", &req->cpu );
fprintf( stderr, ", machine=%04x", req->machine );
dump_varargs_pe_image_info( ", image=", cur_size );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment