ntdll: Remove support for relay debugging of register functions.
The only remaining ones in krnl386 have been removed. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bab6ece637
commit
ca20bddefc
@ -239,18 +239,6 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void)
|
|||||||
extern mode_t FILE_umask DECLSPEC_HIDDEN;
|
extern mode_t FILE_umask DECLSPEC_HIDDEN;
|
||||||
extern HANDLE keyed_event DECLSPEC_HIDDEN;
|
extern HANDLE keyed_event DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* Register functions */
|
|
||||||
|
|
||||||
#ifdef __i386__
|
|
||||||
#define DEFINE_REGS_ENTRYPOINT( name, args ) \
|
|
||||||
__ASM_GLOBAL_FUNC( name, \
|
|
||||||
".byte 0x68\n\t" /* pushl $__regs_func */ \
|
|
||||||
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
|
|
||||||
".byte 0x6a," #args "\n\t" /* pushl $args */ \
|
|
||||||
"call " __ASM_NAME("__wine_call_from_regs") "\n\t" \
|
|
||||||
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HASH_STRING_ALGORITHM_DEFAULT 0
|
#define HASH_STRING_ALGORITHM_DEFAULT 0
|
||||||
#define HASH_STRING_ALGORITHM_X65599 1
|
#define HASH_STRING_ALGORITHM_X65599 1
|
||||||
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
|
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
|
||||||
|
@ -47,7 +47,7 @@ struct relay_descr /* descriptor for a module */
|
|||||||
{
|
{
|
||||||
void *magic; /* signature */
|
void *magic; /* signature */
|
||||||
void *relay_call; /* functions to call from relay thunks */
|
void *relay_call; /* functions to call from relay thunks */
|
||||||
void *relay_call_regs;
|
void *relay_call_regs; /* no longer used */
|
||||||
void *private; /* reserved for the relay code private data */
|
void *private; /* reserved for the relay code private data */
|
||||||
const char *entry_point_base; /* base address of entry point thunks */
|
const char *entry_point_base; /* base address of entry point thunks */
|
||||||
const unsigned int *entry_point_offsets; /* offsets of entry points thunks */
|
const unsigned int *entry_point_offsets; /* offsets of entry points thunks */
|
||||||
@ -481,70 +481,6 @@ __ASM_GLOBAL_FUNC( relay_call,
|
|||||||
__ASM_CFI(".cfi_same_value %ebp\n\t")
|
__ASM_CFI(".cfi_same_value %ebp\n\t")
|
||||||
"ret $12" )
|
"ret $12" )
|
||||||
|
|
||||||
void WINAPI DECLSPEC_HIDDEN __regs_relay_call_regs( struct relay_descr *descr, unsigned int idx,
|
|
||||||
unsigned int orig_eax, unsigned int ret_addr,
|
|
||||||
CONTEXT *context )
|
|
||||||
{
|
|
||||||
WORD ordinal = LOWORD(idx);
|
|
||||||
BYTE nb_args = LOBYTE(HIWORD(idx));
|
|
||||||
struct relay_private_data *data = descr->private;
|
|
||||||
struct relay_entry_point *entry_point = data->entry_points + ordinal;
|
|
||||||
BYTE *orig_func = entry_point->orig_func;
|
|
||||||
INT_PTR *args = (INT_PTR *)context->Esp;
|
|
||||||
INT_PTR args_copy[32];
|
|
||||||
|
|
||||||
/* restore the context to what it was before the relay thunk */
|
|
||||||
context->Eax = orig_eax;
|
|
||||||
context->Eip = ret_addr;
|
|
||||||
context->Esp += nb_args * sizeof(int);
|
|
||||||
|
|
||||||
if (TRACE_ON(relay))
|
|
||||||
{
|
|
||||||
if (entry_point->name)
|
|
||||||
DPRINTF( "%04x:Call %s.%s(", GetCurrentThreadId(), data->dllname, entry_point->name );
|
|
||||||
else
|
|
||||||
DPRINTF( "%04x:Call %s.%u(", GetCurrentThreadId(), data->dllname, data->base + ordinal );
|
|
||||||
RELAY_PrintArgs( args, nb_args, descr->arg_types[ordinal] );
|
|
||||||
DPRINTF( ") ret=%08x\n", ret_addr );
|
|
||||||
|
|
||||||
DPRINTF( "%04x: eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x "
|
|
||||||
"ebp=%08x esp=%08x ds=%04x es=%04x fs=%04x gs=%04x flags=%08x\n",
|
|
||||||
GetCurrentThreadId(), context->Eax, context->Ebx, context->Ecx,
|
|
||||||
context->Edx, context->Esi, context->Edi, context->Ebp, context->Esp,
|
|
||||||
context->SegDs, context->SegEs, context->SegFs, context->SegGs, context->EFlags );
|
|
||||||
|
|
||||||
assert( orig_func[0] == 0x68 /* pushl func */ );
|
|
||||||
assert( orig_func[5] == 0x6a /* pushl args */ );
|
|
||||||
assert( orig_func[7] == 0xe8 /* call */ );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* now call the real function */
|
|
||||||
|
|
||||||
memcpy( args_copy, args, nb_args * sizeof(args[0]) );
|
|
||||||
args_copy[nb_args++] = (INT_PTR)context; /* append context argument */
|
|
||||||
|
|
||||||
call_entry_point( orig_func + 12 + *(int *)(orig_func + 1), nb_args, args_copy, 0 );
|
|
||||||
|
|
||||||
if (TRACE_ON(relay))
|
|
||||||
{
|
|
||||||
if (entry_point->name)
|
|
||||||
DPRINTF( "%04x:Ret %s.%s() retval=%08x ret=%08x\n",
|
|
||||||
GetCurrentThreadId(), data->dllname, entry_point->name,
|
|
||||||
context->Eax, context->Eip );
|
|
||||||
else
|
|
||||||
DPRINTF( "%04x:Ret %s.%u() retval=%08x ret=%08x\n",
|
|
||||||
GetCurrentThreadId(), data->dllname, data->base + ordinal,
|
|
||||||
context->Eax, context->Eip );
|
|
||||||
DPRINTF( "%04x: eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x "
|
|
||||||
"ebp=%08x esp=%08x ds=%04x es=%04x fs=%04x gs=%04x flags=%08x\n",
|
|
||||||
GetCurrentThreadId(), context->Eax, context->Ebx, context->Ecx,
|
|
||||||
context->Edx, context->Esi, context->Edi, context->Ebp, context->Esp,
|
|
||||||
context->SegDs, context->SegEs, context->SegFs, context->SegGs, context->EFlags );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
extern void WINAPI relay_call_regs(void);
|
|
||||||
DEFINE_REGS_ENTRYPOINT( relay_call_regs, 4 )
|
|
||||||
|
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
|
|
||||||
extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args, int flags );
|
extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args, int flags );
|
||||||
@ -591,10 +527,6 @@ static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WINAPI relay_call_regs( struct relay_descr *descr, INT_PTR idx, INT_PTR *stack )
|
|
||||||
{
|
|
||||||
assert(0); /* should never be called */
|
|
||||||
}
|
|
||||||
#elif defined(__aarch64__)
|
#elif defined(__aarch64__)
|
||||||
|
|
||||||
extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args, int flags );
|
extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args, int flags );
|
||||||
@ -650,11 +582,6 @@ static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WINAPI relay_call_regs( struct relay_descr *descr, INT_PTR idx, INT_PTR *stack )
|
|
||||||
{
|
|
||||||
assert(0); /* should never be called */
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(__x86_64__)
|
#elif defined(__x86_64__)
|
||||||
|
|
||||||
extern void * WINAPI relay_call( struct relay_descr *descr, unsigned int idx, const INT_PTR *stack );
|
extern void * WINAPI relay_call( struct relay_descr *descr, unsigned int idx, const INT_PTR *stack );
|
||||||
@ -719,11 +646,6 @@ __ASM_GLOBAL_FUNC( relay_call,
|
|||||||
__ASM_CFI(".cfi_same_value %rbp\n\t")
|
__ASM_CFI(".cfi_same_value %rbp\n\t")
|
||||||
"ret")
|
"ret")
|
||||||
|
|
||||||
static void WINAPI relay_call_regs( struct relay_descr *descr, INT_PTR idx, INT_PTR *stack )
|
|
||||||
{
|
|
||||||
assert(0); /* should never be called */
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error Not supported on this CPU
|
#error Not supported on this CPU
|
||||||
#endif
|
#endif
|
||||||
@ -776,7 +698,6 @@ void RELAY_SetupDLL( HMODULE module )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
descr->relay_call = relay_call;
|
descr->relay_call = relay_call;
|
||||||
descr->relay_call_regs = relay_call_regs;
|
|
||||||
descr->private = data;
|
descr->private = data;
|
||||||
|
|
||||||
data->module = module;
|
data->module = module;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user