Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
c03cd085
Commit
c03cd085
authored
16 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
ntdll: Add support for relay debugging on x86_64.
parent
f5547635
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ntdll/relay.c
+36
-4
36 additions, 4 deletions
dlls/ntdll/relay.c
with
36 additions
and
4 deletions
dlls/ntdll/relay.c
+
36
−
4
View file @
c03cd085
...
...
@@ -38,7 +38,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
relay
);
#ifdef
__i386__
#if
def
ined(
__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__
*/
/***********************************************************************/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment