ntdll: Implemented RtlCaptureContext.

This commit is contained in:
Alexandre Julliard 2008-12-04 12:23:13 +01:00
parent 3182a36335
commit 31a641aa59
4 changed files with 26 additions and 4 deletions

View File

@ -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

View File

@ -380,6 +380,26 @@ 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, 4, 4 )
#else
void WINAPI RtlCaptureContext( CONTEXT *context_out )
{
memset( context_out, 0, sizeof(*context_out) );
}
#endif
/***********************************************************************
* RtlRaiseException (NTDLL.@)
*/
@ -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

View File

@ -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)

View File

@ -1454,6 +1454,8 @@ typedef struct _CONTEXT
typedef CONTEXT *PCONTEXT;
NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*);
/*
* Language IDs
*/