Commit 6cd829bd authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Check for syslevel violations while relay debugging.

parent c5b8b3ae
......@@ -189,6 +189,8 @@ void RELAY_DebugCallFrom16( int func_type, char *args,
AX_reg(context), BX_reg(context), CX_reg(context),
DX_reg(context), SI_reg(context), DI_reg(context),
(WORD)ES_reg(context), EFL_reg(context) );
SYSLEVEL_CheckNotLevel( 2 );
}
......@@ -226,6 +228,8 @@ void RELAY_DebugCallFrom16Ret( int func_type, int ret_val, CONTEXT *context)
(WORD)ES_reg(context), EFL_reg(context) );
break;
}
SYSLEVEL_CheckNotLevel( 2 );
}
......@@ -294,6 +298,8 @@ void RELAY_DebugCallTo16( int* stack, int nb_args )
DPRINTF(") ss:sp=%04x:%04x\n", SELECTOROF(thdb->cur_stack),
OFFSETOF(thdb->cur_stack) );
}
SYSLEVEL_CheckNotLevel( 2 );
}
......@@ -309,6 +315,8 @@ void RELAY_DebugCallTo16Ret( int ret_val )
DPRINTF("CallTo16() ss:sp=%04x:%04x retval=0x%08x\n",
SELECTOROF(thdb->cur_stack), OFFSETOF(thdb->cur_stack), ret_val);
SYSLEVEL_CheckNotLevel( 2 );
}
......
......@@ -11,6 +11,7 @@
#include "builtin32.h"
#include "selectors.h"
#include "stackframe.h"
#include "syslevel.h"
#include "debugstr.h"
#include "main.h"
#include "debugtools.h"
......@@ -113,6 +114,8 @@ int RELAY_CallFrom32( int ret_addr, ... )
GET_FS( fs );
DPRINTF( ") ret=%08x fs=%04x\n", ret_addr, fs );
SYSLEVEL_CheckNotLevel( 1 );
if (*relay_addr == 0xc3) /* cdecl */
{
LRESULT (*cfunc)() = (LRESULT(*)())func;
......@@ -200,6 +203,9 @@ int RELAY_CallFrom32( int ret_addr, ... )
}
DPRINTF( "Ret %s() retval=%08x ret=%08x fs=%04x\n",
buffer, ret, ret_addr, fs );
SYSLEVEL_CheckNotLevel( 1 );
return ret;
}
......@@ -250,6 +256,8 @@ void WINAPI REGS_FUNC(RELAY_CallFrom32Regs)( CONTEXT *context )
EBP_reg(context), ESP_reg(context), DS_reg(context),
ES_reg(context), GS_reg(context), EFL_reg(context) );
SYSLEVEL_CheckNotLevel( 1 );
/* Now call the real function */
switch(nb_args)
{
......@@ -291,6 +299,8 @@ void WINAPI REGS_FUNC(RELAY_CallFrom32Regs)( CONTEXT *context )
DPRINTF(" ebp=%08lx esp=%08lx ds=%04lx es=%04lx gs=%04lx flags=%08lx\n",
EBP_reg(context), ESP_reg(context), DS_reg(context),
ES_reg(context), GS_reg(context), EFL_reg(context) );
SYSLEVEL_CheckNotLevel( 1 );
}
#else /* __i386__ */
......
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