wow64: Add handler for exceptions happening in 32-bit mode.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
47f59be21f
commit
111398c364
|
@ -670,6 +670,39 @@ NTSTATUS WINAPI Wow64SystemServiceEx( UINT num, UINT *args )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void cpu_simulate(void);
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* simulate_filter
|
||||||
|
*/
|
||||||
|
static LONG CALLBACK simulate_filter( EXCEPTION_POINTERS *ptrs )
|
||||||
|
{
|
||||||
|
Wow64PassExceptionToGuest( ptrs );
|
||||||
|
cpu_simulate(); /* re-enter simulation to run the exception dispatcher */
|
||||||
|
return EXCEPTION_EXECUTE_HANDLER;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* cpu_simulate
|
||||||
|
*/
|
||||||
|
static void cpu_simulate(void)
|
||||||
|
{
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
__TRY
|
||||||
|
{
|
||||||
|
pBTCpuSimulate();
|
||||||
|
}
|
||||||
|
__EXCEPT( simulate_filter )
|
||||||
|
{
|
||||||
|
/* restart simulation loop */
|
||||||
|
}
|
||||||
|
__ENDTRY
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Wow64AllocateTemp (wow64.@)
|
* Wow64AllocateTemp (wow64.@)
|
||||||
*
|
*
|
||||||
|
@ -769,7 +802,7 @@ void WINAPI Wow64LdrpInitialize( CONTEXT *context )
|
||||||
|
|
||||||
RtlRunOnceExecuteOnce( &init_done, process_init, NULL, NULL );
|
RtlRunOnceExecuteOnce( &init_done, process_init, NULL, NULL );
|
||||||
thread_init();
|
thread_init();
|
||||||
pBTCpuSimulate();
|
cpu_simulate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue