ntdll: Reimplement RtlRaiseException() to build a correct context on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
57f419993e
commit
d775b9fd93
|
@ -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.@)
|
||||||
|
|
Loading…
Reference in New Issue