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
cc0ca49a
Commit
cc0ca49a
authored
Mar 08, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Pass the WoW context to the server on ARM64.
parent
fa47ea74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
signal_arm64.c
dlls/ntdll/unix/signal_arm64.c
+10
-1
thread.c
dlls/ntdll/unix/thread.c
+17
-3
No files found.
dlls/ntdll/unix/signal_arm64.c
View file @
cc0ca49a
...
@@ -590,7 +590,7 @@ void *get_native_context( CONTEXT *context )
...
@@ -590,7 +590,7 @@ void *get_native_context( CONTEXT *context )
*/
*/
void
*
get_wow_context
(
CONTEXT
*
context
)
void
*
get_wow_context
(
CONTEXT
*
context
)
{
{
return
NULL
;
return
get_cpu_area
(
main_image_info
.
Machine
)
;
}
}
...
@@ -878,6 +878,15 @@ NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size )
...
@@ -878,6 +878,15 @@ NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size )
memcpy
(
&
context
->
FloatSave
,
&
wow_frame
->
FloatSave
,
sizeof
(
context
->
FloatSave
)
);
memcpy
(
&
context
->
FloatSave
,
&
wow_frame
->
FloatSave
,
sizeof
(
context
->
FloatSave
)
);
context
->
ContextFlags
|=
CONTEXT_I386_FLOATING_POINT
;
context
->
ContextFlags
|=
CONTEXT_I386_FLOATING_POINT
;
}
}
if
(
needed_flags
&
CONTEXT_I386_DEBUG_REGISTERS
)
{
context
->
Dr0
=
wow_frame
->
Dr0
;
context
->
Dr1
=
wow_frame
->
Dr1
;
context
->
Dr2
=
wow_frame
->
Dr2
;
context
->
Dr3
=
wow_frame
->
Dr3
;
context
->
Dr6
=
wow_frame
->
Dr6
;
context
->
Dr7
=
wow_frame
->
Dr7
;
}
/* FIXME: CONTEXT_I386_XSTATE */
/* FIXME: CONTEXT_I386_XSTATE */
break
;
break
;
}
}
...
...
dlls/ntdll/unix/thread.c
View file @
cc0ca49a
...
@@ -214,8 +214,15 @@ static unsigned int get_server_context_flags( const void *context, USHORT machin
...
@@ -214,8 +214,15 @@ static unsigned int get_server_context_flags( const void *context, USHORT machin
*/
*/
static
unsigned
int
get_native_context_flags
(
USHORT
native_machine
,
USHORT
wow_machine
)
static
unsigned
int
get_native_context_flags
(
USHORT
native_machine
,
USHORT
wow_machine
)
{
{
if
(
native_machine
==
wow_machine
)
return
0
;
switch
(
MAKELONG
(
native_machine
,
wow_machine
))
return
SERVER_CTX_DEBUG_REGISTERS
|
SERVER_CTX_FLOATING_POINT
|
SERVER_CTX_YMM_REGISTERS
;
{
case
MAKELONG
(
IMAGE_FILE_MACHINE_AMD64
,
IMAGE_FILE_MACHINE_I386
):
return
SERVER_CTX_DEBUG_REGISTERS
|
SERVER_CTX_FLOATING_POINT
|
SERVER_CTX_YMM_REGISTERS
;
case
MAKELONG
(
IMAGE_FILE_MACHINE_ARM64
,
IMAGE_FILE_MACHINE_ARMNT
):
return
SERVER_CTX_DEBUG_REGISTERS
|
SERVER_CTX_FLOATING_POINT
;
default:
return
0
;
}
}
}
...
@@ -595,6 +602,10 @@ static NTSTATUS context_to_server( context_t *to, USHORT to_machine, const void
...
@@ -595,6 +602,10 @@ static NTSTATUS context_to_server( context_t *to, USHORT to_machine, const void
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
case
MAKELONG
(
IMAGE_FILE_MACHINE_ARM64
,
IMAGE_FILE_MACHINE_I386
):
case
MAKELONG
(
IMAGE_FILE_MACHINE_I386
,
IMAGE_FILE_MACHINE_ARM64
):
return
STATUS_SUCCESS
;
default:
default:
return
STATUS_INVALID_PARAMETER
;
return
STATUS_INVALID_PARAMETER
;
}
}
...
@@ -974,7 +985,6 @@ static NTSTATUS context_from_server( void *dst, const context_t *from, USHORT ma
...
@@ -974,7 +985,6 @@ static NTSTATUS context_from_server( void *dst, const context_t *from, USHORT ma
ARM64_NT_CONTEXT
*
to
=
dst
;
ARM64_NT_CONTEXT
*
to
=
dst
;
to_flags
=
to
->
ContextFlags
&
~
CONTEXT_ARM64
;
to_flags
=
to
->
ContextFlags
&
~
CONTEXT_ARM64
;
to
->
ContextFlags
=
CONTEXT_ARM64
;
if
((
from
->
flags
&
SERVER_CTX_CONTROL
)
&&
(
to_flags
&
CONTEXT_ARM64_CONTROL
))
if
((
from
->
flags
&
SERVER_CTX_CONTROL
)
&&
(
to_flags
&
CONTEXT_ARM64_CONTROL
))
{
{
to
->
ContextFlags
|=
CONTEXT_ARM64_CONTROL
;
to
->
ContextFlags
|=
CONTEXT_ARM64_CONTROL
;
...
@@ -1011,6 +1021,10 @@ static NTSTATUS context_from_server( void *dst, const context_t *from, USHORT ma
...
@@ -1011,6 +1021,10 @@ static NTSTATUS context_from_server( void *dst, const context_t *from, USHORT ma
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
case
MAKELONG
(
IMAGE_FILE_MACHINE_ARM64
,
IMAGE_FILE_MACHINE_I386
):
case
MAKELONG
(
IMAGE_FILE_MACHINE_I386
,
IMAGE_FILE_MACHINE_ARM64
):
return
STATUS_SUCCESS
;
default:
default:
return
STATUS_INVALID_PARAMETER
;
return
STATUS_INVALID_PARAMETER
;
}
}
...
...
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