Commit ee0b909f authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Export RtlWow64Get/SetThreadContext() on all 64-bit platforms.

parent 8eda3fcc
...@@ -1073,9 +1073,9 @@ ...@@ -1073,9 +1073,9 @@
@ stdcall -arch=win64 RtlWow64GetCpuAreaInfo(ptr long ptr) @ stdcall -arch=win64 RtlWow64GetCpuAreaInfo(ptr long ptr)
@ stdcall RtlWow64GetCurrentMachine() @ stdcall RtlWow64GetCurrentMachine()
@ stdcall RtlWow64GetProcessMachines(long ptr ptr) @ stdcall RtlWow64GetProcessMachines(long ptr ptr)
@ stdcall -arch=x86_64 RtlWow64GetThreadContext(long ptr) @ stdcall -arch=win64 RtlWow64GetThreadContext(long ptr)
@ stdcall RtlWow64IsWowGuestMachineSupported(long ptr) @ stdcall RtlWow64IsWowGuestMachineSupported(long ptr)
@ stdcall -arch=x86_64 RtlWow64SetThreadContext(long ptr) @ stdcall -arch=win64 RtlWow64SetThreadContext(long ptr)
@ stub RtlWriteMemoryStream @ stub RtlWriteMemoryStream
@ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long) @ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stub RtlZeroHeap @ stub RtlZeroHeap
......
...@@ -142,6 +142,24 @@ NTSTATUS WINAPI RtlWow64GetCpuAreaInfo( WOW64_CPURESERVED *cpu, ULONG reserved, ...@@ -142,6 +142,24 @@ NTSTATUS WINAPI RtlWow64GetCpuAreaInfo( WOW64_CPURESERVED *cpu, ULONG reserved,
return STATUS_INVALID_PARAMETER; return STATUS_INVALID_PARAMETER;
} }
/******************************************************************************
* RtlWow64GetThreadContext (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context )
{
return NtQueryInformationThread( handle, ThreadWow64Context, context, sizeof(*context), NULL );
}
/******************************************************************************
* RtlWow64SetThreadContext (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context )
{
return NtSetInformationThread( handle, ThreadWow64Context, context, sizeof(*context) );
}
#endif #endif
/********************************************************************** /**********************************************************************
......
...@@ -343,24 +343,6 @@ __ASM_GLOBAL_FUNC( RtlCaptureContext, ...@@ -343,24 +343,6 @@ __ASM_GLOBAL_FUNC( RtlCaptureContext,
"fxsave 0x100(%rcx)\n\t" /* context->FltSave */ "fxsave 0x100(%rcx)\n\t" /* context->FltSave */
"ret" ); "ret" );
/******************************************************************************
* RtlWow64GetThreadContext (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context )
{
return NtQueryInformationThread( handle, ThreadWow64Context, context, sizeof(*context), NULL );
}
/******************************************************************************
* RtlWow64SetThreadContext (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context )
{
return NtSetInformationThread( handle, ThreadWow64Context, context, sizeof(*context) );
}
static DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, static DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{ {
......
...@@ -1666,7 +1666,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, ...@@ -1666,7 +1666,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
case ThreadWow64Context: case ThreadWow64Context:
{ {
#ifdef __x86_64__ #ifdef _WIN64
BOOL self; BOOL self;
WOW64_CONTEXT *context = data; WOW64_CONTEXT *context = data;
...@@ -1861,7 +1861,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, ...@@ -1861,7 +1861,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
case ThreadWow64Context: case ThreadWow64Context:
{ {
#ifdef __x86_64__ #ifdef _WIN64
BOOL self; BOOL self;
const WOW64_CONTEXT *context = data; const WOW64_CONTEXT *context = data;
......
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