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