Commit d775b9fd authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Reimplement RtlRaiseException() to build a correct context on ARM.

parent 57f41999
...@@ -239,14 +239,21 @@ void WINAPI RtlUnwind( void *endframe, void *target_ip, EXCEPTION_RECORD *rec, v ...@@ -239,14 +239,21 @@ void WINAPI RtlUnwind( void *endframe, void *target_ip, EXCEPTION_RECORD *rec, v
/*********************************************************************** /***********************************************************************
* RtlRaiseException (NTDLL.@) * RtlRaiseException (NTDLL.@)
*/ */
void WINAPI RtlRaiseException( EXCEPTION_RECORD *rec ) __ASM_STDCALL_FUNC( RtlRaiseException, 4,
{ "push {r0, lr}\n\t"
CONTEXT context; "sub sp, sp, #0x1a0\n\t" /* sizeof(CONTEXT) */
"mov r0, sp\n\t" /* context */
RtlCaptureContext( &context ); "bl " __ASM_NAME("RtlCaptureContext") "\n\t"
rec->ExceptionAddress = (LPVOID)context.Pc; "ldr r0, [sp, #0x1a0]\n\t" /* rec */
RtlRaiseStatus( NtRaiseException( rec, &context, TRUE )); "ldr r1, [sp, #0x1a4]\n\t"
} "str r1, [sp, #0x40]\n\t" /* context->Pc */
"str r1, [r0, #12]\n\t" /* rec->ExceptionAddress */
"add r1, sp, #0x1a8\n\t"
"str r1, [sp, #0x38]\n\t" /* context->Sp */
"mov r1, sp\n\t"
"mov r2, #1\n\t"
"bl " __ASM_NAME("NtRaiseException") "\n\t"
"bl " __ASM_NAME("RtlRaiseStatus") )
/************************************************************************* /*************************************************************************
* RtlCaptureStackBackTrace (NTDLL.@) * RtlCaptureStackBackTrace (NTDLL.@)
......
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