Commit 47d77025 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Added a stub for RtlUnwindEx on x86_64.

parent 644f5767
...@@ -888,6 +888,7 @@ ...@@ -888,6 +888,7 @@
@ stdcall RtlUnlockHeap(long) @ stdcall RtlUnlockHeap(long)
# @ stub RtlUnlockMemoryStreamRegion # @ stub RtlUnlockMemoryStreamRegion
@ stdcall -register RtlUnwind(ptr ptr ptr ptr) @ stdcall -register RtlUnwind(ptr ptr ptr ptr)
@ stdcall -arch=x86_64 RtlUnwindEx(long long ptr long ptr)
@ stdcall RtlUpcaseUnicodeChar(long) @ stdcall RtlUpcaseUnicodeChar(long)
@ stdcall RtlUpcaseUnicodeString(ptr ptr long) @ stdcall RtlUpcaseUnicodeString(ptr ptr long)
@ stdcall RtlUpcaseUnicodeStringToAnsiString(ptr ptr long) @ stdcall RtlUpcaseUnicodeStringToAnsiString(ptr ptr long)
......
...@@ -897,30 +897,39 @@ PVOID WINAPI RtlVirtualUnwind ( ULONG type, ULONG64 base, ULONG64 pc, ...@@ -897,30 +897,39 @@ PVOID WINAPI RtlVirtualUnwind ( ULONG type, ULONG64 base, ULONG64 pc,
/******************************************************************* /*******************************************************************
* RtlUnwind (NTDLL.@) * RtlUnwindEx (NTDLL.@)
*/ */
void WINAPI __regs_RtlUnwind( EXCEPTION_REGISTRATION_RECORD* pEndFrame, PVOID targetIp, void WINAPI RtlUnwindEx( ULONG64 frame, ULONG64 target_ip, EXCEPTION_RECORD *rec,
PEXCEPTION_RECORD pRecord, PVOID retval, CONTEXT *context ) ULONG64 retval, CONTEXT *context, UNWIND_HISTORY_TABLE *table )
{ {
EXCEPTION_RECORD record; EXCEPTION_RECORD record;
/* build an exception record, if we do not have one */ /* build an exception record, if we do not have one */
if (!pRecord) if (!rec)
{ {
record.ExceptionCode = STATUS_UNWIND; record.ExceptionCode = STATUS_UNWIND;
record.ExceptionFlags = 0; record.ExceptionFlags = 0;
record.ExceptionRecord = NULL; record.ExceptionRecord = NULL;
record.ExceptionAddress = (void *)context->Rip; record.ExceptionAddress = (void *)context->Rip;
record.NumberParameters = 0; record.NumberParameters = 0;
pRecord = &record; rec = &record;
} }
pRecord->ExceptionFlags |= EH_UNWINDING | (pEndFrame ? 0 : EH_EXIT_UNWIND); rec->ExceptionFlags |= EH_UNWINDING | (frame ? 0 : EH_EXIT_UNWIND);
FIXME( "code=%x flags=%x not implemented on x86_64\n", FIXME( "code=%x flags=%x not implemented on x86_64\n", rec->ExceptionCode, rec->ExceptionFlags );
pRecord->ExceptionCode, pRecord->ExceptionFlags );
NtTerminateProcess( GetCurrentProcess(), 1 ); NtTerminateProcess( GetCurrentProcess(), 1 );
} }
/*******************************************************************
* RtlUnwind (NTDLL.@)
*/
void WINAPI __regs_RtlUnwind( ULONG64 frame, ULONG64 target_ip, EXCEPTION_RECORD *rec,
ULONG64 retval, CONTEXT *context )
{
RtlUnwindEx( frame, target_ip, rec, retval, context, NULL );
}
DEFINE_REGS_ENTRYPOINT( RtlUnwind, 4 ) DEFINE_REGS_ENTRYPOINT( RtlUnwind, 4 )
......
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