Commit 14c452fe authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Replaced get_cpu_context by RtlCaptureContext. Implemented it for x86_64.

parent d1e8a85b
......@@ -400,25 +400,6 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
return status;
}
/***********************************************************************
* RtlCaptureContext (NTDLL.@)
*/
void WINAPI __regs_RtlCaptureContext( CONTEXT *context_out, CONTEXT *context_in )
{
*context_out = *context_in;
}
/**********************************************************************/
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( RtlCaptureContext, 1 )
#else
void WINAPI RtlCaptureContext( CONTEXT *context_out )
{
memset( context_out, 0, sizeof(*context_out) );
}
#endif
/***********************************************************************
* RtlRaiseException (NTDLL.@)
......
......@@ -41,7 +41,6 @@ struct drive_info
/* exceptions */
extern void wait_suspend( CONTEXT *context );
extern void WINAPI __regs_RtlRaiseException( PEXCEPTION_RECORD, PCONTEXT );
extern void get_cpu_context( CONTEXT *context );
extern void set_cpu_context( const CONTEXT *context );
/* debug helper */
......
......@@ -886,17 +886,15 @@ static inline void restore_context( const CONTEXT *context, SIGCONTEXT *sigconte
/***********************************************************************
* get_cpu_context
*
* Register function to get the context of the current thread.
* RtlCaptureContext (NTDLL.@)
*/
void WINAPI __regs_get_cpu_context( CONTEXT *context, CONTEXT *regs )
void WINAPI __regs_RtlCaptureContext( CONTEXT *context, CONTEXT *regs )
{
*context = *regs;
if (fpux_support) save_fpux( context );
else save_fpu( context );
}
DEFINE_REGS_ENTRYPOINT( get_cpu_context, 1 )
DEFINE_REGS_ENTRYPOINT( RtlCaptureContext, 1 )
/***********************************************************************
......
......@@ -268,13 +268,12 @@ static inline void restore_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
/***********************************************************************
* get_cpu_context
*
* Get the context of the current thread.
* RtlCaptureContext (NTDLL.@)
*/
void get_cpu_context( CONTEXT *context )
void WINAPI RtlCaptureContext( CONTEXT *context )
{
FIXME("not implemented\n");
memset( context, 0, sizeof(*context) );
}
......
......@@ -149,13 +149,12 @@ static void restore_fpu( CONTEXT *context, ucontext_t *ucontext )
/***********************************************************************
* get_cpu_context
*
* Get the context of the current thread.
* RtlCaptureContext (NTDLL.@)
*/
void get_cpu_context( CONTEXT *context )
void WINAPI RtlCaptureContext( CONTEXT *context )
{
FIXME("not implemented\n");
memset( context, 0, sizeof(*context) );
}
......
......@@ -199,14 +199,13 @@ static void restore_context( const CONTEXT *context, SIGCONTEXT *sigcontext )
/***********************************************************************
* get_cpu_context
*
* Get the context of the current thread.
* RtlCaptureContext (NTDLL.@)
*/
void get_cpu_context( CONTEXT *context )
void WINAPI __regs_RtlCaptureContext( CONTEXT *context, CONTEXT *regs )
{
FIXME("not implemented\n");
*context = *regs;
}
DEFINE_REGS_ENTRYPOINT( RtlCaptureContext, 1 )
/***********************************************************************
......
......@@ -1134,7 +1134,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
{
if (needed_flags)
{
get_cpu_context( &ctx );
RtlCaptureContext( &ctx );
copy_context( context, &ctx, ctx.ContextFlags & needed_flags );
}
#ifdef __i386__
......
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