Commit 31a641aa authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Implemented RtlCaptureContext.

parent 3182a363
......@@ -920,7 +920,7 @@
@ stdcall ResetWriteWatch(ptr long)
@ stdcall RestoreLastError(long) ntdll.RtlRestoreLastWin32Error
@ stdcall ResumeThread(long)
# @ stub RtlCaptureContext ( -> ntdll.RtlCaptureContext)
@ stdcall -register RtlCaptureContext(ptr) ntdll.RtlCaptureContext
# @ stub RtlCaptureStackBackTrace ( -> ntdll.RtlCaptureStackBackTrace)
@ stdcall RtlFillMemory(ptr long long) ntdll.RtlFillMemory
@ stdcall RtlMoveMemory(ptr ptr long) ntdll.RtlMoveMemory
......
......@@ -381,6 +381,26 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
}
/***********************************************************************
* RtlCaptureContext (NTDLL.@)
*/
void WINAPI __regs_RtlCaptureContext( CONTEXT *context_out, CONTEXT *context_in )
{
*context_out = *context_in;
}
/**********************************************************************/
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( RtlCaptureContext, 4, 4 )
#else
void WINAPI RtlCaptureContext( CONTEXT *context_out )
{
memset( context_out, 0, sizeof(*context_out) );
}
#endif
/***********************************************************************
* RtlRaiseException (NTDLL.@)
*/
void WINAPI __regs_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
......@@ -405,7 +425,7 @@ DEFINE_REGS_ENTRYPOINT( RtlRaiseException, 4, 4 )
void WINAPI RtlRaiseException( EXCEPTION_RECORD *rec )
{
CONTEXT context;
memset( &context, 0, sizeof(context) );
RtlCaptureContext( &context );
__regs_RtlRaiseException( rec, &context );
}
#endif
......@@ -498,7 +518,7 @@ void WINAPI RtlUnwind( PVOID pEndFrame, PVOID unusedEip,
PEXCEPTION_RECORD pRecord, PVOID returnEax )
{
CONTEXT context;
memset( &context, 0, sizeof(context) );
RtlCaptureContext( &context );
__regs_RtlUnwind( pEndFrame, unusedEip, pRecord, returnEax, &context );
}
#endif
......
......@@ -433,7 +433,7 @@
# @ stub RtlAssert2
@ stdcall RtlAssert(ptr ptr long long)
# @ stub RtlCancelTimer
# @ stub RtlCaptureContext
@ stdcall -register RtlCaptureContext(ptr)
@ stub RtlCaptureStackBackTrace
# @ stub RtlCaptureStackContext
@ stdcall RtlCharToInteger(ptr long ptr)
......
......@@ -1454,6 +1454,8 @@ typedef struct _CONTEXT
typedef CONTEXT *PCONTEXT;
NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*);
/*
* Language IDs
*/
......
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