Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c03cd085
Commit
c03cd085
authored
Dec 27, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add support for relay debugging on x86_64.
parent
f5547635
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
4 deletions
+36
-4
relay.c
dlls/ntdll/relay.c
+36
-4
No files found.
dlls/ntdll/relay.c
View file @
c03cd085
...
...
@@ -38,7 +38,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
relay
);
#if
def __i386__
#if
defined(__i386__) || defined(__x86_64__)
struct
relay_descr
/* descriptor for a module */
{
...
...
@@ -317,7 +317,8 @@ static inline void RELAY_PrintArgs( const INT_PTR *args, int nb_args, unsigned i
}
}
extern
LONGLONG
call_entry_point
(
void
*
func
,
int
nb_args
,
const
INT_PTR
*
args
);
extern
LONGLONG
CDECL
call_entry_point
(
void
*
func
,
int
nb_args
,
const
INT_PTR
*
args
);
#ifdef __i386__
__ASM_GLOBAL_FUNC
(
call_entry_point
,
"
\t
pushl %ebp
\n
"
"
\t
movl %esp,%ebp
\n
"
...
...
@@ -339,6 +340,33 @@ __ASM_GLOBAL_FUNC( call_entry_point,
"
\t
popl %esi
\n
"
"
\t
popl %ebp
\n
"
"
\t
ret"
)
#else
__ASM_GLOBAL_FUNC
(
call_entry_point
,
"
\t
pushq %rbp
\n
"
"
\t
movq %rsp,%rbp
\n
"
"
\t
pushq %rsi
\n
"
"
\t
pushq %rdi
\n
"
"
\t
movq %rcx,%rax
\n
"
"
\t
movq $4,%rcx
\n
"
"
\t
cmp %rcx,%rdx
\n
"
"
\t
cmovgq %rdx,%rcx
\n
"
"
\t
leaq 0(,%rcx,8),%rdx
\n
"
"
\t
subq %rdx,%rsp
\n
"
"
\t
andq $~15,%rsp
\n
"
"
\t
movq %rsp,%rdi
\n
"
"
\t
movq %r8,%rsi
\n
"
"
\t
rep; movsq
\n
"
"
\t
movq 0(%rsp),%rcx
\n
"
"
\t
movq 8(%rsp),%rdx
\n
"
"
\t
movq 16(%rsp),%r8
\n
"
"
\t
movq 24(%rsp),%r9
\n
"
"
\t
callq *%rax
\n
"
"
\t
leaq -16(%rbp),%rsp
\n
"
"
\t
popq %rdi
\n
"
"
\t
popq %rsi
\n
"
"
\t
popq %rbp
\n
"
"
\t
ret
\n
"
)
#endif
/***********************************************************************
...
...
@@ -386,6 +414,7 @@ static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx,
/***********************************************************************
* relay_call_regs
*/
#ifdef __i386__
void
WINAPI
__regs_relay_call_regs
(
struct
relay_descr
*
descr
,
unsigned
int
idx
,
unsigned
int
orig_eax
,
unsigned
int
ret_addr
,
CONTEXT86
*
context
)
...
...
@@ -451,6 +480,7 @@ void WINAPI __regs_relay_call_regs( struct relay_descr *descr, unsigned int idx,
}
extern
void
WINAPI
relay_call_regs
(
void
);
DEFINE_REGS_ENTRYPOINT
(
relay_call_regs
,
16
,
16
)
#endif
/***********************************************************************
...
...
@@ -500,7 +530,9 @@ void RELAY_SetupDLL( HMODULE module )
return
;
descr
->
relay_call
=
relay_call
;
#ifdef __i386__
descr
->
relay_call_regs
=
relay_call_regs
;
#endif
descr
->
private
=
data
;
data
->
module
=
module
;
...
...
@@ -535,7 +567,7 @@ void RELAY_SetupDLL( HMODULE module )
}
}
#else
/* __i386__ */
#else
/* __i386__
|| __x86_64__
*/
FARPROC
RELAY_GetProcAddress
(
HMODULE
module
,
const
IMAGE_EXPORT_DIRECTORY
*
exports
,
DWORD
exp_size
,
FARPROC
proc
,
DWORD
ordinal
,
const
WCHAR
*
user
)
...
...
@@ -547,7 +579,7 @@ void RELAY_SetupDLL( HMODULE module )
{
}
#endif
/* __i386__ */
#endif
/* __i386__
|| __x86_64__
*/
/***********************************************************************/
...
...
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