Adapted to new register function handling.
This commit is contained in:
parent
9b233bdb8a
commit
eb94c7d2c4
|
@ -140,9 +140,10 @@ static void EXC_DefaultHandling( EXCEPTION_RECORD *rec, CONTEXT *context )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* RtlRaiseException (NTDLL.464)
|
||||
* EXC_RtlRaiseException / RtlRaiseException (NTDLL.464)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(RtlRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
DEFINE_REGS_ENTRYPOINT_1( RtlRaiseException, EXC_RtlRaiseException, EXCEPTION_RECORD * )
|
||||
void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
{
|
||||
PEXCEPTION_FRAME frame, dispatch, nested_frame;
|
||||
EXCEPTION_RECORD newrec;
|
||||
|
@ -210,11 +211,13 @@ void WINAPI REGS_FUNC(RtlRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *contex
|
|||
|
||||
|
||||
/*******************************************************************
|
||||
* RtlUnwind (KERNEL32.590) (NTDLL.518)
|
||||
* EXC_RtlUnwind / RtlUnwind (KERNEL32.590) (NTDLL.518)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(RtlUnwind)( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
|
||||
PEXCEPTION_RECORD pRecord, DWORD returnEax,
|
||||
CONTEXT *context )
|
||||
DEFINE_REGS_ENTRYPOINT_4( RtlUnwind, EXC_RtlUnwind,
|
||||
PEXCEPTION_FRAME, LPVOID, PEXCEPTION_RECORD, DWORD )
|
||||
void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
|
||||
PEXCEPTION_RECORD pRecord, DWORD returnEax,
|
||||
CONTEXT *context )
|
||||
{
|
||||
EXCEPTION_RECORD record, newrec;
|
||||
PEXCEPTION_FRAME frame, dispatch;
|
||||
|
@ -285,15 +288,14 @@ void WINAPI REGS_FUNC(RtlUnwind)( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
|
|||
|
||||
|
||||
/*******************************************************************
|
||||
* NtRaiseException (NTDLL.175)
|
||||
*
|
||||
* Real prototype:
|
||||
* DWORD WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *ctx, BOOL first );
|
||||
* EXC_NtRaiseException / NtRaiseException (NTDLL.175)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(NtRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *ctx,
|
||||
BOOL first, CONTEXT *context )
|
||||
DEFINE_REGS_ENTRYPOINT_3( NtRaiseException, EXC_NtRaiseException,
|
||||
EXCEPTION_RECORD *, CONTEXT *, BOOL )
|
||||
void WINAPI EXC_NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *ctx,
|
||||
BOOL first, CONTEXT *context )
|
||||
{
|
||||
REGS_FUNC(RtlRaiseException)( rec, ctx );
|
||||
EXC_RtlRaiseException( rec, ctx );
|
||||
*context = *ctx;
|
||||
}
|
||||
|
||||
|
@ -316,9 +318,10 @@ void WINAPI RtlRaiseStatus( NTSTATUS status )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* DebugBreak (KERNEL32.181)
|
||||
* EXC_DebugBreak / DebugBreak (KERNEL32.181)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(DebugBreak)( CONTEXT *context )
|
||||
DEFINE_REGS_ENTRYPOINT_0( DebugBreak, EXC_DebugBreak )
|
||||
void WINAPI EXC_DebugBreak( CONTEXT *context )
|
||||
{
|
||||
EXCEPTION_RECORD rec;
|
||||
|
||||
|
@ -326,7 +329,7 @@ void WINAPI REGS_FUNC(DebugBreak)( CONTEXT *context )
|
|||
rec.ExceptionFlags = 0;
|
||||
rec.ExceptionRecord = NULL;
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, context );
|
||||
EXC_RtlRaiseException( &rec, context );
|
||||
}
|
||||
|
||||
|
||||
|
@ -336,6 +339,6 @@ void WINAPI REGS_FUNC(DebugBreak)( CONTEXT *context )
|
|||
void WINAPI DebugBreak16( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
REGS_FUNC(DebugBreak)( context );
|
||||
EXC_DebugBreak( context );
|
||||
#endif /* defined(__i386__) */
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ type win32
|
|||
172 stdcall NtQueryValueKey(long long long long long long) NtQueryValueKey
|
||||
173 stub NtQueryVirtualMemory
|
||||
174 stub NtQueryVolumeInformationFile
|
||||
175 register NtRaiseException(ptr ptr long) NtRaiseException
|
||||
175 stdcall NtRaiseException(ptr ptr long) NtRaiseException
|
||||
176 stub NtRaiseHardError
|
||||
177 stdcall NtReadFile(long long long long long long long long long) NtReadFile
|
||||
178 stub NtReadRequestData
|
||||
|
@ -469,7 +469,7 @@ type win32
|
|||
461 stub RtlQuerySecurityObject
|
||||
462 stub RtlQueryTagHeap
|
||||
463 stub RtlQueryTimeZoneInformation
|
||||
464 register RtlRaiseException(ptr) RtlRaiseException
|
||||
464 stdcall RtlRaiseException(ptr) RtlRaiseException
|
||||
465 stdcall RtlRaiseStatus(long) RtlRaiseStatus
|
||||
466 stub RtlRandom
|
||||
467 stub RtlReAllocateHeap
|
||||
|
@ -523,7 +523,7 @@ type win32
|
|||
515 stdcall RtlUnicodeToOemN(ptr long ptr ptr long) RtlUnicodeToOemN
|
||||
516 stub RtlUniform
|
||||
517 stub RtlUnlockHeap
|
||||
518 register RtlUnwind(ptr ptr ptr long) RtlUnwind
|
||||
518 stdcall RtlUnwind(ptr ptr ptr long) RtlUnwind
|
||||
519 stub RtlUpcaseUnicodeChar
|
||||
520 stdcall RtlUpcaseUnicodeString(ptr ptr long) RtlUpcaseUnicodeString
|
||||
521 stub RtlUpcaseUnicodeStringToAnsiString
|
||||
|
|
|
@ -378,17 +378,13 @@ BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type)
|
|||
* NTDLL_alloca_probe [NTDLL.861]
|
||||
* Glorified "enter xxxx".
|
||||
*/
|
||||
void WINAPI REGS_FUNC(NTDLL_chkstk)( CONTEXT *context )
|
||||
void WINAPI NTDLL_chkstk( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
ESP_reg(context) -= EAX_reg(context);
|
||||
#endif
|
||||
}
|
||||
void WINAPI REGS_FUNC(NTDLL_alloca_probe)( CONTEXT *context )
|
||||
void WINAPI NTDLL_alloca_probe( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
ESP_reg(context) -= EAX_reg(context);
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
|
@ -272,6 +272,7 @@ typedef struct
|
|||
|
||||
#define T_UNKNOWN (-1) /* Unknown fault (TRAP_sig not defined) */
|
||||
|
||||
#include "wine/exception.h"
|
||||
#include "winnt.h"
|
||||
#include "stackframe.h"
|
||||
#include "global.h"
|
||||
|
@ -283,8 +284,6 @@ typedef struct
|
|||
DEFAULT_DEBUG_CHANNEL(seh)
|
||||
|
||||
|
||||
extern void WINAPI REGS_FUNC(RtlRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *context );
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* handler_init
|
||||
|
@ -537,7 +536,7 @@ static HANDLER_DEF(segv_handler)
|
|||
break;
|
||||
}
|
||||
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore:
|
||||
restore_context( &context, HANDLER_CONTEXT );
|
||||
}
|
||||
|
@ -570,7 +569,7 @@ static HANDLER_DEF(trap_handler)
|
|||
rec.ExceptionRecord = NULL;
|
||||
rec.ExceptionAddress = (LPVOID)context.Eip;
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, HANDLER_CONTEXT );
|
||||
}
|
||||
|
||||
|
@ -611,7 +610,7 @@ static HANDLER_DEF(fpe_handler)
|
|||
rec.ExceptionRecord = NULL;
|
||||
rec.ExceptionAddress = (LPVOID)context.Eip;
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, HANDLER_CONTEXT );
|
||||
restore_fpu( &context, HANDLER_CONTEXT );
|
||||
}
|
||||
|
@ -634,7 +633,7 @@ static HANDLER_DEF(int_handler)
|
|||
rec.ExceptionRecord = NULL;
|
||||
rec.ExceptionAddress = (LPVOID)context.Eip;
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, HANDLER_CONTEXT );
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
#include "wine/exception.h"
|
||||
#include "winnt.h"
|
||||
#include "winbase.h"
|
||||
#include "global.h"
|
||||
|
@ -24,8 +25,6 @@
|
|||
DEFAULT_DEBUG_CHANNEL(seh)
|
||||
|
||||
|
||||
extern void WINAPI REGS_FUNC(RtlRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *context );
|
||||
|
||||
/*
|
||||
* FIXME: All this works only on Solaris for now
|
||||
*/
|
||||
|
@ -136,7 +135,7 @@ static void segv_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
|
|||
rec.ExceptionInformation[0] = 0; /* FIXME: read/write access ? */
|
||||
rec.ExceptionInformation[1] = (DWORD)info->si_addr;
|
||||
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, ucontext );
|
||||
}
|
||||
|
||||
|
@ -161,7 +160,7 @@ static void bus_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
|
|||
else
|
||||
rec.ExceptionCode = EXCEPTION_ACCESS_VIOLATION;
|
||||
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, ucontext );
|
||||
}
|
||||
|
||||
|
@ -200,7 +199,7 @@ static void ill_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
|
|||
rec.ExceptionFlags = EXCEPTION_CONTINUABLE;
|
||||
rec.ExceptionAddress = (LPVOID)context.pc;
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, ucontext );
|
||||
}
|
||||
|
||||
|
@ -231,7 +230,7 @@ static void trap_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
|
|||
rec.ExceptionRecord = NULL;
|
||||
rec.ExceptionAddress = (LPVOID)context.pc;
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, ucontext );
|
||||
}
|
||||
|
||||
|
@ -281,7 +280,7 @@ static void fpe_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
|
|||
rec.ExceptionRecord = NULL;
|
||||
rec.ExceptionAddress = (LPVOID)context.pc;
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, ucontext );
|
||||
restore_fpu( &context, ucontext );
|
||||
}
|
||||
|
@ -303,7 +302,7 @@ static void int_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
|
|||
rec.ExceptionRecord = NULL;
|
||||
rec.ExceptionAddress = (LPVOID)context.pc;
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, &context );
|
||||
EXC_RtlRaiseException( &rec, &context );
|
||||
restore_context( &context, ucontext );
|
||||
}
|
||||
|
||||
|
|
|
@ -376,8 +376,8 @@ file krnl386.exe
|
|||
469 stub WOAGimmeTitle
|
||||
470 stub WOADestroyConsole
|
||||
471 pascal GetCurrentProcessId() GetCurrentProcessId
|
||||
472 register MapHInstLS() WIN16_MapHInstLS
|
||||
473 register MapHInstSL() WIN16_MapHInstSL
|
||||
472 register MapHInstLS() MapHInstLS
|
||||
473 register MapHInstSL() MapHInstSL
|
||||
474 pascal CloseW32Handle(long) CloseHandle
|
||||
475 pascal16 GetTEBSelectorFS() GetTEBSelectorFS16
|
||||
476 pascal ConvertToGlobalHandle(long) ConvertToGlobalHandle
|
||||
|
|
|
@ -586,7 +586,7 @@ BOOLEAN WINAPI RtlFreeHeap(
|
|||
* misc
|
||||
*/
|
||||
void WINAPIV DbgPrint(LPCSTR fmt, ...);
|
||||
DWORD WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
|
||||
void WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
|
||||
void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
|
||||
void WINAPI RtlRaiseStatus(NTSTATUS);
|
||||
void WINAPI RtlUnwind(PEXCEPTION_FRAME,LPVOID,PEXCEPTION_RECORD,DWORD);
|
||||
|
|
|
@ -166,6 +166,12 @@ static inline EXCEPTION_FRAME * WINE_UNUSED EXC_pop_frame( EXCEPTION_FRAME *fram
|
|||
}
|
||||
|
||||
#ifdef __WINE__
|
||||
extern void WINAPI EXC_NtRaiseException( PEXCEPTION_RECORD, PCONTEXT, BOOL, PCONTEXT );
|
||||
extern void WINAPI EXC_RtlRaiseException( PEXCEPTION_RECORD, PCONTEXT );
|
||||
extern void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME, LPVOID,
|
||||
PEXCEPTION_RECORD, DWORD, CONTEXT * );
|
||||
extern void WINAPI EXC_DebugBreak( CONTEXT *context );
|
||||
|
||||
typedef DWORD (*DEBUGHOOK)( EXCEPTION_RECORD *, CONTEXT *, BOOL );
|
||||
extern void EXC_SetDebugEventHook( DEBUGHOOK hook );
|
||||
extern DEBUGHOOK EXC_GetDebugEventHook(void);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <sys/stat.h>
|
||||
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/exception.h"
|
||||
#include "winuser.h"
|
||||
#include "winnt.h"
|
||||
#include "msdos.h"
|
||||
|
@ -51,9 +52,6 @@ DECLARE_DEBUG_CHANNEL(relay)
|
|||
|
||||
#undef TRY_PICRETURN
|
||||
|
||||
extern void WINAPI REGS_FUNC(RtlRaiseException)( EXCEPTION_RECORD *rec,
|
||||
CONTEXT *context );
|
||||
|
||||
static void do_exception( int signal, CONTEXT86 *context )
|
||||
{
|
||||
EXCEPTION_RECORD rec;
|
||||
|
@ -70,7 +68,7 @@ static void do_exception( int signal, CONTEXT86 *context )
|
|||
rec.ExceptionRecord = NULL;
|
||||
rec.ExceptionAddress = (LPVOID)EIP_reg(context);
|
||||
rec.NumberParameters = 0;
|
||||
REGS_FUNC(RtlRaiseException)( &rec, context );
|
||||
EXC_RtlRaiseException( &rec, context );
|
||||
}
|
||||
|
||||
static void DOSVM_Dump( LPDOSTASK lpDosTask, int fn, int sig,
|
||||
|
|
|
@ -1733,59 +1733,36 @@ HMODULE WINAPI MapHModuleSL(HMODULE16 hmod) {
|
|||
}
|
||||
|
||||
/***************************************************************************
|
||||
* MapHInstLS (KERNEL32.516)
|
||||
* MapHInstLS (KERNEL32.516)(KERNEL.472)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(MapHInstLS)( CONTEXT *context )
|
||||
void WINAPI MapHInstLS( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
EAX_reg(context) = MapHModuleLS(EAX_reg(context));
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
* MapHInstSL (KERNEL32.518)
|
||||
* MapHInstSL (KERNEL32.518)(KERNEL.473)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(MapHInstSL)( CONTEXT *context )
|
||||
void WINAPI MapHInstSL( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
EAX_reg(context) = MapHModuleSL(EAX_reg(context));
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
* MapHInstLS_PN (KERNEL32.517)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(MapHInstLS_PN)( CONTEXT *context )
|
||||
void WINAPI MapHInstLS_PN( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
if (EAX_reg(context))
|
||||
EAX_reg(context) = MapHModuleLS(EAX_reg(context));
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
* MapHInstSL_PN (KERNEL32.519)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(MapHInstSL_PN)( CONTEXT *context )
|
||||
void WINAPI MapHInstSL_PN( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
if (EAX_reg(context))
|
||||
EAX_reg(context) = MapHModuleSL(EAX_reg(context));
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
* WIN16_MapHInstLS (KERNEL.472)
|
||||
*/
|
||||
VOID WINAPI WIN16_MapHInstLS( CONTEXT86 *context )
|
||||
{
|
||||
EAX_reg(context) = MapHModuleLS(EAX_reg(context));
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
* WIN16_MapHInstSL (KERNEL.473)
|
||||
*/
|
||||
VOID WINAPI WIN16_MapHInstSL( CONTEXT86 *context )
|
||||
{
|
||||
EAX_reg(context) = MapHModuleSL(EAX_reg(context));
|
||||
}
|
||||
|
|
|
@ -569,7 +569,7 @@ LPVOID WINAPI MapSLFix( SEGPTR sptr )
|
|||
* UnMapSLFixArray (KERNEL32.701)
|
||||
*/
|
||||
|
||||
void WINAPI REGS_FUNC(UnMapSLFixArray)( SEGPTR sptr[], INT length, CONTEXT *context )
|
||||
void WINAPI UnMapSLFixArray( SEGPTR sptr[], INT length, CONTEXT86 *context )
|
||||
{
|
||||
/* Must not change EAX, hence defined as 'register' function */
|
||||
}
|
||||
|
@ -637,8 +637,7 @@ BOOL WINAPI GetThreadSelectorEntry( HANDLE hthread, DWORD sel,
|
|||
* unravel them at SUnMapLS. We just store the segmented pointer there.
|
||||
*/
|
||||
static void
|
||||
x_SMapLS_IP_EBP_x(CONTEXT *context,int argoff) {
|
||||
#ifdef __i386__
|
||||
x_SMapLS_IP_EBP_x(CONTEXT86 *context,int argoff) {
|
||||
DWORD val,ptr;
|
||||
|
||||
val =*(DWORD*)(EBP_reg(context)+argoff);
|
||||
|
@ -650,56 +649,49 @@ x_SMapLS_IP_EBP_x(CONTEXT *context,int argoff) {
|
|||
*(DWORD*)(EBP_reg(context)+argoff) = ptr;
|
||||
}
|
||||
EAX_reg(context) = ptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_8)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,8);}
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_12)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,12);}
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_16)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,16);}
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_20)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,20);}
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_24)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,24);}
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_28)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,28);}
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_32)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,32);}
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_36)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,36);}
|
||||
void WINAPI REGS_FUNC(SMapLS_IP_EBP_40)(CONTEXT *context) {x_SMapLS_IP_EBP_x(context,40);}
|
||||
void WINAPI SMapLS_IP_EBP_8 (CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context, 8);}
|
||||
void WINAPI SMapLS_IP_EBP_12(CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context,12);}
|
||||
void WINAPI SMapLS_IP_EBP_16(CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context,16);}
|
||||
void WINAPI SMapLS_IP_EBP_20(CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context,20);}
|
||||
void WINAPI SMapLS_IP_EBP_24(CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context,24);}
|
||||
void WINAPI SMapLS_IP_EBP_28(CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context,28);}
|
||||
void WINAPI SMapLS_IP_EBP_32(CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context,32);}
|
||||
void WINAPI SMapLS_IP_EBP_36(CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context,36);}
|
||||
void WINAPI SMapLS_IP_EBP_40(CONTEXT86 *context) {x_SMapLS_IP_EBP_x(context,40);}
|
||||
|
||||
void WINAPI REGS_FUNC(SMapLS)( CONTEXT *context )
|
||||
void WINAPI SMapLS( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
if (EAX_reg(context)>=0x10000) {
|
||||
EAX_reg(context) = MapLS((LPVOID)EAX_reg(context));
|
||||
EDX_reg(context) = EAX_reg(context);
|
||||
} else {
|
||||
EDX_reg(context) = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WINAPI REGS_FUNC(SUnMapLS)( CONTEXT *context )
|
||||
void WINAPI SUnMapLS( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
if (EAX_reg(context)>=0x10000)
|
||||
UnMapLS((SEGPTR)EAX_reg(context));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
x_SUnMapLS_IP_EBP_x(CONTEXT *context,int argoff) {
|
||||
#ifdef __i386__
|
||||
x_SUnMapLS_IP_EBP_x(CONTEXT86 *context,int argoff) {
|
||||
if (*(DWORD*)(EBP_reg(context)+argoff))
|
||||
UnMapLS(*(DWORD*)(EBP_reg(context)+argoff));
|
||||
*(DWORD*)(EBP_reg(context)+argoff)=0;
|
||||
#endif
|
||||
}
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_8)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,8); }
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_12)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,12); }
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_16)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,16); }
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_20)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,20); }
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_24)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,24); }
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_28)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,28); }
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_32)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,32); }
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_36)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,36); }
|
||||
void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_40)(CONTEXT *context) { x_SUnMapLS_IP_EBP_x(context,40); }
|
||||
void WINAPI SUnMapLS_IP_EBP_8 (CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context, 8); }
|
||||
void WINAPI SUnMapLS_IP_EBP_12(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,12); }
|
||||
void WINAPI SUnMapLS_IP_EBP_16(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,16); }
|
||||
void WINAPI SUnMapLS_IP_EBP_20(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,20); }
|
||||
void WINAPI SUnMapLS_IP_EBP_24(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,24); }
|
||||
void WINAPI SUnMapLS_IP_EBP_28(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,28); }
|
||||
void WINAPI SUnMapLS_IP_EBP_32(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,32); }
|
||||
void WINAPI SUnMapLS_IP_EBP_36(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,36); }
|
||||
void WINAPI SUnMapLS_IP_EBP_40(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,40); }
|
||||
|
||||
/**********************************************************************
|
||||
* AllocMappedBuffer (KERNEL32.38)
|
||||
|
@ -720,9 +712,8 @@ void WINAPI REGS_FUNC(SUnMapLS_IP_EBP_40)(CONTEXT *context) { x_SUnMapLS_IP_EBP_
|
|||
* The SEGPTR is used by the caller!
|
||||
*/
|
||||
|
||||
void WINAPI REGS_FUNC(AllocMappedBuffer)( CONTEXT *context )
|
||||
void WINAPI AllocMappedBuffer( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
HGLOBAL handle = GlobalAlloc(0, EDI_reg(context) + 8);
|
||||
DWORD *buffer = (DWORD *)GlobalLock(handle);
|
||||
SEGPTR ptr = 0;
|
||||
|
@ -744,7 +735,6 @@ void WINAPI REGS_FUNC(AllocMappedBuffer)( CONTEXT *context )
|
|||
EAX_reg(context) = (DWORD) ptr;
|
||||
EDI_reg(context) = (DWORD)(buffer + 2);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -755,9 +745,8 @@ void WINAPI REGS_FUNC(AllocMappedBuffer)( CONTEXT *context )
|
|||
* Input: EDI register: pointer to buffer
|
||||
*/
|
||||
|
||||
void WINAPI REGS_FUNC(FreeMappedBuffer)( CONTEXT *context )
|
||||
void WINAPI FreeMappedBuffer( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
if (EDI_reg(context))
|
||||
{
|
||||
DWORD *buffer = (DWORD *)EDI_reg(context) - 2;
|
||||
|
@ -767,7 +756,6 @@ void WINAPI REGS_FUNC(FreeMappedBuffer)( CONTEXT *context )
|
|||
GlobalUnlock(buffer[0]);
|
||||
GlobalFree(buffer[0]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@ import ntdll.dll
|
|||
# - code generated by the MS Thunk Compiler
|
||||
# - symbols exported by the Oct 94 beta version of kernel32.dll
|
||||
|
||||
1 register VxDCall0(long) VxDCall0
|
||||
2 register VxDCall1(long) VxDCall1
|
||||
3 register VxDCall2(long) VxDCall2
|
||||
4 register VxDCall3(long) VxDCall3
|
||||
5 register VxDCall4(long) VxDCall4
|
||||
6 register VxDCall5(long) VxDCall5
|
||||
7 register VxDCall6(long) VxDCall6
|
||||
8 register VxDCall7(long) VxDCall7
|
||||
9 register VxDCall8(long) VxDCall8
|
||||
1 register VxDCall0(long) VxDCall
|
||||
2 register VxDCall1(long) VxDCall
|
||||
3 register VxDCall2(long) VxDCall
|
||||
4 register VxDCall3(long) VxDCall
|
||||
5 register VxDCall4(long) VxDCall
|
||||
6 register VxDCall5(long) VxDCall
|
||||
7 register VxDCall6(long) VxDCall
|
||||
8 register VxDCall7(long) VxDCall
|
||||
9 register VxDCall8(long) VxDCall
|
||||
10 stdcall k32CharToOemA(str str) CharToOemA
|
||||
11 stdcall k32CharToOemBuffA(str str long) CharToOemBuffA
|
||||
12 stdcall k32OemToCharA(ptr ptr) OemToCharA
|
||||
|
@ -196,7 +196,7 @@ import ntdll.dll
|
|||
178 stdcall CreateThread(ptr long ptr long long ptr) CreateThread
|
||||
179 stdcall CreateToolhelp32Snapshot(long long) CreateToolhelp32Snapshot
|
||||
180 stdcall DebugActiveProcess(long) DebugActiveProcess
|
||||
181 register DebugBreak() DebugBreak
|
||||
181 stdcall DebugBreak() DebugBreak
|
||||
182 stdcall DefineDosDeviceA(long str str) DefineDosDeviceA
|
||||
183 stub DefineDosDeviceW
|
||||
184 stdcall DeleteAtom(long) DeleteAtom
|
||||
|
|
|
@ -20,7 +20,6 @@ DEFAULT_DEBUG_CHANNEL(relay)
|
|||
|
||||
char **debug_relay_excludelist = NULL, **debug_relay_includelist = NULL;
|
||||
|
||||
#ifdef __i386__
|
||||
/***********************************************************************
|
||||
* RELAY_ShowDebugmsgRelay
|
||||
*
|
||||
|
@ -223,7 +222,7 @@ int RELAY_CallFrom32( int ret_addr, ... )
|
|||
* ... >128 bytes space free to be modified (ensured by the assembly glue)
|
||||
*/
|
||||
|
||||
void WINAPI REGS_FUNC(RELAY_CallFrom32Regs)( CONTEXT *context )
|
||||
void WINAPI RELAY_CallFrom32Regs( CONTEXT86 *context )
|
||||
{
|
||||
unsigned int typemask;
|
||||
char buffer[80];
|
||||
|
@ -303,8 +302,3 @@ void WINAPI REGS_FUNC(RELAY_CallFrom32Regs)( CONTEXT *context )
|
|||
SYSLEVEL_CheckNotLevel( 2 );
|
||||
}
|
||||
|
||||
#else /* __i386__ */
|
||||
|
||||
void WINAPI REGS_FUNC(RELAY_CallFrom32Regs)( CONTEXT *context ) { }
|
||||
|
||||
#endif /* __i386__ */
|
||||
|
|
|
@ -251,7 +251,7 @@ SNOOP_PrintArg(DWORD x) {
|
|||
}
|
||||
|
||||
#define CALLER1REF (*(DWORD*)ESP_reg(context))
|
||||
void WINAPI REGS_FUNC(SNOOP_Entry)( CONTEXT *context )
|
||||
void WINAPI SNOOP_Entry( CONTEXT86 *context )
|
||||
{
|
||||
DWORD ordinal=0,entry = EIP_reg(context)-5;
|
||||
SNOOP_DLL *dll = firstdll;
|
||||
|
@ -331,7 +331,7 @@ void WINAPI REGS_FUNC(SNOOP_Entry)( CONTEXT *context )
|
|||
DPRINTF(") ret=%08lx fs=%04lx\n",(DWORD)ret->origreturn,FS_reg(context));
|
||||
}
|
||||
|
||||
void WINAPI REGS_FUNC(SNOOP_Return)( CONTEXT *context )
|
||||
void WINAPI SNOOP_Return( CONTEXT86 *context )
|
||||
{
|
||||
SNOOP_RETURNENTRY *ret = (SNOOP_RETURNENTRY*)(EIP_reg(context)-5);
|
||||
|
||||
|
@ -373,13 +373,4 @@ void SNOOP_RegisterDLL(HMODULE hmod,LPCSTR name,DWORD nrofordinals) {
|
|||
FARPROC SNOOP_GetProcAddress(HMODULE hmod,LPCSTR name,DWORD ordinal,FARPROC origfun) {
|
||||
return origfun;
|
||||
}
|
||||
|
||||
void WINAPI REGS_FUNC(SNOOP_Entry)( CONTEXT *context )
|
||||
{
|
||||
}
|
||||
|
||||
void WINAPI REGS_FUNC(SNOOP_Return)( CONTEXT *context )
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !__i386__ */
|
||||
|
|
|
@ -57,7 +57,7 @@ static BOOL DeviceIo_MMDEVLDR(DWORD dwIoControlCode,
|
|||
LPDWORD lpcbBytesReturned,
|
||||
LPOVERLAPPED lpOverlapped);
|
||||
|
||||
static DWORD VxDCall_VMM( DWORD service, CONTEXT *context );
|
||||
static DWORD VxDCall_VMM( DWORD service, CONTEXT86 *context );
|
||||
|
||||
static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode,
|
||||
LPVOID lpvInBuffer, DWORD cbInBuffer,
|
||||
|
@ -65,7 +65,7 @@ static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode,
|
|||
LPDWORD lpcbBytesReturned,
|
||||
LPOVERLAPPED lpOverlapped);
|
||||
|
||||
static DWORD VxDCall_VWin32( DWORD service, CONTEXT *context );
|
||||
static DWORD VxDCall_VWin32( DWORD service, CONTEXT86 *context );
|
||||
|
||||
static BOOL DeviceIo_VWin32(DWORD dwIoControlCode,
|
||||
LPVOID lpvInBuffer, DWORD cbInBuffer,
|
||||
|
@ -86,7 +86,7 @@ struct VxDInfo
|
|||
{
|
||||
LPCSTR name;
|
||||
WORD id;
|
||||
DWORD (*vxdcall)(DWORD, PCONTEXT);
|
||||
DWORD (*vxdcall)(DWORD, CONTEXT86 *);
|
||||
BOOL (*deviceio)(DWORD, LPVOID, DWORD,
|
||||
LPVOID, DWORD, LPDWORD, LPOVERLAPPED);
|
||||
};
|
||||
|
@ -438,7 +438,7 @@ static BOOL DeviceIo_VTDAPI(DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbI
|
|||
/***********************************************************************
|
||||
* VxDCall (KERNEL32.[1-9])
|
||||
*/
|
||||
static void VxDCall( DWORD service, CONTEXT *context )
|
||||
void VxDCall( DWORD service, CONTEXT86 *context )
|
||||
{
|
||||
DWORD ret = 0xffffffff; /* FIXME */
|
||||
int i;
|
||||
|
@ -456,26 +456,14 @@ static void VxDCall( DWORD service, CONTEXT *context )
|
|||
else
|
||||
ret = VxDList[i].vxdcall( service, context );
|
||||
|
||||
#ifdef __i386__
|
||||
EAX_reg( context ) = ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
void WINAPI REGS_FUNC(VxDCall0)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
void WINAPI REGS_FUNC(VxDCall1)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
void WINAPI REGS_FUNC(VxDCall2)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
void WINAPI REGS_FUNC(VxDCall3)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
void WINAPI REGS_FUNC(VxDCall4)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
void WINAPI REGS_FUNC(VxDCall5)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
void WINAPI REGS_FUNC(VxDCall6)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
void WINAPI REGS_FUNC(VxDCall7)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
void WINAPI REGS_FUNC(VxDCall8)( DWORD service, CONTEXT *context ) { VxDCall( service, context ); }
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* VxDCall_VMM
|
||||
*/
|
||||
static DWORD VxDCall_VMM( DWORD service, CONTEXT *context )
|
||||
static DWORD VxDCall_VMM( DWORD service, CONTEXT86 *context )
|
||||
{
|
||||
switch ( LOWORD(service) )
|
||||
{
|
||||
|
@ -794,7 +782,7 @@ static BOOL DeviceIo_IFSMgr(DWORD dwIoControlCode, LPVOID lpvInBuffer, DWORD cbI
|
|||
*
|
||||
*/
|
||||
|
||||
static DWORD VxDCall_VWin32( DWORD service, CONTEXT *context )
|
||||
static DWORD VxDCall_VWin32( DWORD service, CONTEXT86 *context )
|
||||
{
|
||||
switch ( LOWORD(service) )
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@ void WINAPI LogApiThk( LPSTR func )
|
|||
*
|
||||
* NOTE: needs to preserve all registers!
|
||||
*/
|
||||
void WINAPI REGS_FUNC(LogApiThkLSF)( LPSTR func, CONTEXT *context )
|
||||
void WINAPI LogApiThkLSF( LPSTR func, CONTEXT86 *context )
|
||||
{
|
||||
TRACE_(thunk)( "%s\n", debugstr_a(func) );
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ void WINAPI REGS_FUNC(LogApiThkLSF)( LPSTR func, CONTEXT *context )
|
|||
*
|
||||
* NOTE: needs to preserve all registers!
|
||||
*/
|
||||
void WINAPI REGS_FUNC(LogApiThkSL)( LPSTR func, CONTEXT *context )
|
||||
void WINAPI LogApiThkSL( LPSTR func, CONTEXT86 *context )
|
||||
{
|
||||
TRACE_(thunk)( "%s\n", debugstr_a(func) );
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ void WINAPI REGS_FUNC(LogApiThkSL)( LPSTR func, CONTEXT *context )
|
|||
*
|
||||
* NOTE: needs to preserve all registers!
|
||||
*/
|
||||
void WINAPI REGS_FUNC(LogCBThkSL)( LPSTR func, CONTEXT *context )
|
||||
void WINAPI LogCBThkSL( LPSTR func, CONTEXT86 *context )
|
||||
{
|
||||
TRACE_(thunk)( "%s\n", debugstr_a(func) );
|
||||
}
|
||||
|
@ -290,9 +290,8 @@ UINT WINAPI ThunkConnect32(
|
|||
* The number of 16bit argument bytes is EBP-ESP-0x40 (64 Byte thunksetup).
|
||||
* [ok]
|
||||
*/
|
||||
void WINAPI REGS_FUNC(QT_Thunk)( CONTEXT *context )
|
||||
void WINAPI QT_Thunk( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
CONTEXT86 context16;
|
||||
DWORD argsize;
|
||||
|
||||
|
@ -311,7 +310,6 @@ void WINAPI REGS_FUNC(QT_Thunk)( CONTEXT *context )
|
|||
EAX_reg(context) = Callbacks->CallRegisterShortProc( &context16, argsize );
|
||||
EDX_reg(context) = HIWORD(EAX_reg(context));
|
||||
EAX_reg(context) = LOWORD(EAX_reg(context));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -359,9 +357,8 @@ void WINAPI REGS_FUNC(QT_Thunk)( CONTEXT *context )
|
|||
*
|
||||
*/
|
||||
|
||||
void WINAPI REGS_FUNC(FT_Prolog)( CONTEXT *context )
|
||||
void WINAPI FT_Prolog( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
/* Build stack frame */
|
||||
stack32_push(context, EBP_reg(context));
|
||||
EBP_reg(context) = ESP_reg(context);
|
||||
|
@ -379,7 +376,6 @@ void WINAPI REGS_FUNC(FT_Prolog)( CONTEXT *context )
|
|||
|
||||
*(DWORD *)(EBP_reg(context) - 48) = EAX_reg(context);
|
||||
*(DWORD *)(EBP_reg(context) - 52) = EDX_reg(context);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -403,9 +399,8 @@ void WINAPI REGS_FUNC(FT_Prolog)( CONTEXT *context )
|
|||
* sufficient ...
|
||||
*/
|
||||
|
||||
void WINAPI REGS_FUNC(FT_Thunk)( CONTEXT *context )
|
||||
void WINAPI FT_Thunk( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
DWORD mapESPrelative = *(DWORD *)(EBP_reg(context) - 20);
|
||||
DWORD callTarget = *(DWORD *)(EBP_reg(context) - 52);
|
||||
|
||||
|
@ -441,7 +436,6 @@ void WINAPI REGS_FUNC(FT_Thunk)( CONTEXT *context )
|
|||
|
||||
/* Copy modified buffers back to 32-bit stack */
|
||||
memcpy( oldstack, newstack, argsize );
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -456,9 +450,8 @@ void WINAPI REGS_FUNC(FT_Thunk)( CONTEXT *context )
|
|||
* the given number of arguments from the caller's stack).
|
||||
*/
|
||||
|
||||
static void FT_Exit(CONTEXT *context, int nPopArgs)
|
||||
static void FT_Exit(CONTEXT86 *context, int nPopArgs)
|
||||
{
|
||||
#ifdef __i386__
|
||||
/* Return value is in EBX */
|
||||
EAX_reg(context) = EBX_reg(context);
|
||||
|
||||
|
@ -475,24 +468,23 @@ static void FT_Exit(CONTEXT *context, int nPopArgs)
|
|||
EIP_reg(context) = stack32_pop(context);
|
||||
/* Remove arguments */
|
||||
ESP_reg(context) += nPopArgs;
|
||||
#endif
|
||||
}
|
||||
|
||||
void WINAPI REGS_FUNC(FT_Exit0)(CONTEXT *context) { FT_Exit(context, 0); }
|
||||
void WINAPI REGS_FUNC(FT_Exit4)(CONTEXT *context) { FT_Exit(context, 4); }
|
||||
void WINAPI REGS_FUNC(FT_Exit8)(CONTEXT *context) { FT_Exit(context, 8); }
|
||||
void WINAPI REGS_FUNC(FT_Exit12)(CONTEXT *context) { FT_Exit(context, 12); }
|
||||
void WINAPI REGS_FUNC(FT_Exit16)(CONTEXT *context) { FT_Exit(context, 16); }
|
||||
void WINAPI REGS_FUNC(FT_Exit20)(CONTEXT *context) { FT_Exit(context, 20); }
|
||||
void WINAPI REGS_FUNC(FT_Exit24)(CONTEXT *context) { FT_Exit(context, 24); }
|
||||
void WINAPI REGS_FUNC(FT_Exit28)(CONTEXT *context) { FT_Exit(context, 28); }
|
||||
void WINAPI REGS_FUNC(FT_Exit32)(CONTEXT *context) { FT_Exit(context, 32); }
|
||||
void WINAPI REGS_FUNC(FT_Exit36)(CONTEXT *context) { FT_Exit(context, 36); }
|
||||
void WINAPI REGS_FUNC(FT_Exit40)(CONTEXT *context) { FT_Exit(context, 40); }
|
||||
void WINAPI REGS_FUNC(FT_Exit44)(CONTEXT *context) { FT_Exit(context, 44); }
|
||||
void WINAPI REGS_FUNC(FT_Exit48)(CONTEXT *context) { FT_Exit(context, 48); }
|
||||
void WINAPI REGS_FUNC(FT_Exit52)(CONTEXT *context) { FT_Exit(context, 52); }
|
||||
void WINAPI REGS_FUNC(FT_Exit56)(CONTEXT *context) { FT_Exit(context, 56); }
|
||||
void WINAPI FT_Exit0 (CONTEXT86 *context) { FT_Exit(context, 0); }
|
||||
void WINAPI FT_Exit4 (CONTEXT86 *context) { FT_Exit(context, 4); }
|
||||
void WINAPI FT_Exit8 (CONTEXT86 *context) { FT_Exit(context, 8); }
|
||||
void WINAPI FT_Exit12(CONTEXT86 *context) { FT_Exit(context, 12); }
|
||||
void WINAPI FT_Exit16(CONTEXT86 *context) { FT_Exit(context, 16); }
|
||||
void WINAPI FT_Exit20(CONTEXT86 *context) { FT_Exit(context, 20); }
|
||||
void WINAPI FT_Exit24(CONTEXT86 *context) { FT_Exit(context, 24); }
|
||||
void WINAPI FT_Exit28(CONTEXT86 *context) { FT_Exit(context, 28); }
|
||||
void WINAPI FT_Exit32(CONTEXT86 *context) { FT_Exit(context, 32); }
|
||||
void WINAPI FT_Exit36(CONTEXT86 *context) { FT_Exit(context, 36); }
|
||||
void WINAPI FT_Exit40(CONTEXT86 *context) { FT_Exit(context, 40); }
|
||||
void WINAPI FT_Exit44(CONTEXT86 *context) { FT_Exit(context, 44); }
|
||||
void WINAPI FT_Exit48(CONTEXT86 *context) { FT_Exit(context, 48); }
|
||||
void WINAPI FT_Exit52(CONTEXT86 *context) { FT_Exit(context, 52); }
|
||||
void WINAPI FT_Exit56(CONTEXT86 *context) { FT_Exit(context, 56); }
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -566,9 +558,8 @@ DWORD WINAPI ThunkInitLS(
|
|||
* (Those two values should be equal anyway ...?)
|
||||
*
|
||||
*/
|
||||
void WINAPI REGS_FUNC(Common32ThkLS)( CONTEXT *context )
|
||||
void WINAPI Common32ThkLS( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
CONTEXT86 context16;
|
||||
DWORD argsize;
|
||||
|
||||
|
@ -593,7 +584,6 @@ void WINAPI REGS_FUNC(Common32ThkLS)( CONTEXT *context )
|
|||
|
||||
/* Clean up caller's stack frame */
|
||||
ESP_reg(context) += argsize;
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -623,9 +613,8 @@ void WINAPI REGS_FUNC(Common32ThkLS)( CONTEXT *context )
|
|||
* (Note that this function seems only to be used for
|
||||
* OLECLI32 -> OLECLI and OLESVR32 -> OLESVR thunking.)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(OT_32ThkLSF)( CONTEXT *context )
|
||||
void WINAPI OT_32ThkLSF( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
CONTEXT86 context16;
|
||||
DWORD argsize;
|
||||
|
||||
|
@ -645,7 +634,6 @@ void WINAPI REGS_FUNC(OT_32ThkLSF)( CONTEXT *context )
|
|||
|
||||
memcpy( (LPBYTE)ESP_reg(context),
|
||||
(LPBYTE)CURRENT_STACK16 - argsize, argsize );
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -730,9 +718,8 @@ LPVOID WINAPI ThunkInitLSF(
|
|||
* Note: The two DWORD arguments get popped off the stack.
|
||||
*
|
||||
*/
|
||||
void WINAPI REGS_FUNC(FT_PrologPrime)( CONTEXT *context )
|
||||
void WINAPI FT_PrologPrime( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
DWORD targetTableOffset;
|
||||
LPBYTE relayCode;
|
||||
|
||||
|
@ -747,7 +734,6 @@ void WINAPI REGS_FUNC(FT_PrologPrime)( CONTEXT *context )
|
|||
|
||||
/* Jump to the call stub just created */
|
||||
EIP_reg(context) = (DWORD)relayCode;
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -761,9 +747,8 @@ void WINAPI REGS_FUNC(FT_PrologPrime)( CONTEXT *context )
|
|||
* EAX start of relay code
|
||||
*
|
||||
*/
|
||||
void WINAPI REGS_FUNC(QT_ThunkPrime)( CONTEXT *context )
|
||||
void WINAPI QT_ThunkPrime( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
DWORD targetTableOffset;
|
||||
LPBYTE relayCode;
|
||||
|
||||
|
@ -778,7 +763,6 @@ void WINAPI REGS_FUNC(QT_ThunkPrime)( CONTEXT *context )
|
|||
|
||||
/* Jump to the call stub just created */
|
||||
EIP_reg(context) = (DWORD)relayCode;
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -904,9 +888,8 @@ DWORD WINAPIV SSCall(
|
|||
/**********************************************************************
|
||||
* W32S_BackTo32 (KERNEL32.51)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(W32S_BackTo32)( CONTEXT *context )
|
||||
void WINAPI W32S_BackTo32( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
LPDWORD stack = (LPDWORD)ESP_reg( context );
|
||||
FARPROC proc = (FARPROC)EIP_reg(context);
|
||||
|
||||
|
@ -914,7 +897,6 @@ void WINAPI REGS_FUNC(W32S_BackTo32)( CONTEXT *context )
|
|||
stack[6], stack[7], stack[8], stack[9], stack[10] );
|
||||
|
||||
EIP_reg( context ) = stack32_pop(context);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
@ -1035,9 +1017,8 @@ BOOL16 WINAPI IsPeFormat16(
|
|||
/***********************************************************************
|
||||
* K32Thk1632Prolog (KERNEL32.492)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(K32Thk1632Prolog)( CONTEXT *context )
|
||||
void WINAPI K32Thk1632Prolog( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
LPBYTE code = (LPBYTE)EIP_reg(context) - 5;
|
||||
|
||||
/* Arrrgh! SYSTHUNK.DLL just has to re-implement another method
|
||||
|
@ -1090,15 +1071,13 @@ void WINAPI REGS_FUNC(K32Thk1632Prolog)( CONTEXT *context )
|
|||
}
|
||||
|
||||
SYSLEVEL_ReleaseWin16Lock();
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* K32Thk1632Epilog (KERNEL32.491)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(K32Thk1632Epilog)( CONTEXT *context )
|
||||
void WINAPI K32Thk1632Epilog( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
LPBYTE code = (LPBYTE)EIP_reg(context) - 13;
|
||||
|
||||
SYSLEVEL_RestoreWin16Lock();
|
||||
|
@ -1126,7 +1105,6 @@ void WINAPI REGS_FUNC(K32Thk1632Epilog)( CONTEXT *context )
|
|||
TRACE_(thunk)("after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %08lx\n",
|
||||
EBP_reg(context), ESP_reg(context), NtCurrentTeb()->cur_stack);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -47,9 +47,8 @@ LPVOID WINAPI GetPK16SysVar(void)
|
|||
/**********************************************************************
|
||||
* CommonUnimpStub (KERNEL32.17)
|
||||
*/
|
||||
void WINAPI REGS_FUNC(CommonUnimpStub)( CONTEXT *context )
|
||||
void WINAPI CommonUnimpStub( CONTEXT86 *context )
|
||||
{
|
||||
#ifdef __i386__
|
||||
if (EAX_reg(context))
|
||||
MESSAGE( "*** Unimplemented Win32 API: %s\n", (LPSTR)EAX_reg(context) );
|
||||
|
||||
|
@ -63,7 +62,6 @@ void WINAPI REGS_FUNC(CommonUnimpStub)( CONTEXT *context )
|
|||
}
|
||||
|
||||
ESP_reg(context) += (ECX_reg(context) & 0x0f) * 4;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
Loading…
Reference in New Issue