Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ca20bdde
Commit
ca20bdde
authored
Jul 26, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
bab6ece6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
92 deletions
+1
-92
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+0
-12
relay.c
dlls/ntdll/relay.c
+1
-80
No files found.
dlls/ntdll/ntdll_misc.h
View file @
ca20bdde
...
...
@@ -239,18 +239,6 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void)
extern
mode_t
FILE_umask
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_X65599 1
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
...
...
dlls/ntdll/relay.c
View file @
ca20bdde
...
...
@@ -47,7 +47,7 @@ struct relay_descr /* descriptor for a module */
{
void
*
magic
;
/* signature */
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 */
const
char
*
entry_point_base
;
/* base address of entry point 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
"
)
"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__)
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
;
}
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__)
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
;
}
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__)
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
"
)
"ret"
)
static
void
WINAPI
relay_call_regs
(
struct
relay_descr
*
descr
,
INT_PTR
idx
,
INT_PTR
*
stack
)
{
assert
(
0
);
/* should never be called */
}
#else
#error Not supported on this CPU
#endif
...
...
@@ -776,7 +698,6 @@ void RELAY_SetupDLL( HMODULE module )
return
;
descr
->
relay_call
=
relay_call
;
descr
->
relay_call_regs
=
relay_call_regs
;
descr
->
private
=
data
;
data
->
module
=
module
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment