Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a51f26ba
Commit
a51f26ba
authored
Apr 23, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Return the process machine from the main exe instead of a CPU flag.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
96865eb7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
9 deletions
+12
-9
process.c
dlls/ntdll/unix/process.c
+2
-1
server_protocol.h
include/wine/server_protocol.h
+3
-3
mapping.c
server/mapping.c
+1
-0
process.c
server/process.c
+1
-1
process.h
server/process.h
+2
-1
protocol.def
server/protocol.def
+1
-1
request.h
server/request.h
+1
-1
trace.c
server/trace.c
+1
-1
No files found.
dlls/ntdll/unix/process.c
View file @
a51f26ba
...
...
@@ -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
;
}
...
...
include/wine/server_protocol.h
View file @
a51f26ba
...
...
@@ -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 69
3
#define SERVER_PROTOCOL_VERSION 69
4
/* ### protocol_version end ### */
...
...
server/mapping.c
View file @
a51f26ba
...
...
@@ -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
;
...
...
server/process.c
View file @
a51f26ba
...
...
@@ -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
;
...
...
server/process.h
View file @
a51f26ba
...
...
@@ -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 as
coic
ated with this process */
struct
job
*
job
;
/* job object as
soci
ated 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 */
...
...
server/protocol.def
View file @
a51f26ba
...
...
@@ -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
...
...
server/request.h
View file @
a51f26ba
...
...
@@ -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
);
...
...
server/trace.c
View file @
a51f26ba
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment