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
Releases
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
Felix Münchhalfen
wine
Commits
1cf02615
Commit
1cf02615
authored
22 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Check if relay debugging is still on before printing something.
parent
235d82ee
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
relay32/relay386.c
+47
-39
47 additions, 39 deletions
relay32/relay386.c
with
47 additions
and
39 deletions
relay32/relay386.c
+
47
−
39
View file @
1cf02615
...
...
@@ -371,7 +371,6 @@ static LONGLONG RELAY_CallFrom32( int ret_addr, ... )
{
LONGLONG
ret
;
char
buffer
[
80
];
BOOL
ret64
;
int
*
args
=
&
ret_addr
+
1
;
/* Relay addr is the return address for this function */
...
...
@@ -379,12 +378,14 @@ static LONGLONG RELAY_CallFrom32( int ret_addr, ... )
DEBUG_ENTRY_POINT
*
relay
=
(
DEBUG_ENTRY_POINT
*
)(
relay_addr
-
5
);
WORD
nb_args
=
relay
->
args
/
sizeof
(
int
);
get_entry_point
(
buffer
,
relay
);
if
(
TRACE_ON
(
relay
))
{
get_entry_point
(
buffer
,
relay
);
DPRINTF
(
"%08lx:Call %s("
,
GetCurrentThreadId
(),
buffer
);
RELAY_PrintArgs
(
args
,
nb_args
,
relay
->
argtypes
);
DPRINTF
(
") ret=%08x
\n
"
,
ret_addr
);
ret64
=
(
relay
->
argtypes
&
0x80000000
)
&&
(
nb_args
<
16
);
DPRINTF
(
"%08lx:Call %s("
,
GetCurrentThreadId
(),
buffer
);
RELAY_PrintArgs
(
args
,
nb_args
,
relay
->
argtypes
);
DPRINTF
(
") ret=%08x
\n
"
,
ret_addr
);
}
if
(
relay
->
ret
==
0xc3
)
/* cdecl */
{
...
...
@@ -395,15 +396,18 @@ static LONGLONG RELAY_CallFrom32( int ret_addr, ... )
ret
=
call_stdcall_function
(
(
LONGLONG_FARPROC
)
relay
->
orig
,
nb_args
,
args
);
}
if
(
ret64
)
DPRINTF
(
"%08lx:Ret %s() retval=%08x%08x ret=%08x
\n
"
,
GetCurrentThreadId
(),
buffer
,
(
UINT
)(
ret
>>
32
),
(
UINT
)
ret
,
ret_addr
);
else
DPRINTF
(
"%08lx:Ret %s() retval=%08x ret=%08x
\n
"
,
GetCurrentThreadId
(),
buffer
,
(
UINT
)
ret
,
ret_addr
);
if
(
TRACE_ON
(
relay
))
{
BOOL
ret64
=
(
relay
->
argtypes
&
0x80000000
)
&&
(
nb_args
<
16
);
if
(
ret64
)
DPRINTF
(
"%08lx:Ret %s() retval=%08x%08x ret=%08x
\n
"
,
GetCurrentThreadId
(),
buffer
,
(
UINT
)(
ret
>>
32
),
(
UINT
)
ret
,
ret_addr
);
else
DPRINTF
(
"%08lx:Ret %s() retval=%08x ret=%08x
\n
"
,
GetCurrentThreadId
(),
buffer
,
(
UINT
)
ret
,
ret_addr
);
}
return
ret
;
}
...
...
@@ -437,23 +441,24 @@ void WINAPI RELAY_DoCallFrom32Regs( CONTEXT86 *context )
if
(
relay
->
ret
==
0xc2
)
/* stdcall */
context
->
Esp
+=
nb_args
*
sizeof
(
int
);
assert
(
TRACE_ON
(
relay
));
entry_point
=
(
BYTE
*
)
relay
->
orig
;
assert
(
*
entry_point
==
0xe8
/* lcall */
);
get_entry_point
(
buffer
,
relay
);
DPRINTF
(
"%08lx:Call %s("
,
GetCurrentThreadId
(),
buffer
);
RELAY_PrintArgs
(
args
,
nb_args
,
relay
->
argtypes
);
DPRINTF
(
") ret=%08lx fs=%04lx
\n
"
,
context
->
Eip
,
context
->
SegFs
);
DPRINTF
(
" eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx
\n
"
,
context
->
Eax
,
context
->
Ebx
,
context
->
Ecx
,
context
->
Edx
,
context
->
Esi
,
context
->
Edi
);
DPRINTF
(
" ebp=%08lx esp=%08lx ds=%04lx es=%04lx gs=%04lx flags=%08lx
\n
"
,
context
->
Ebp
,
context
->
Esp
,
context
->
SegDs
,
context
->
SegEs
,
context
->
SegGs
,
context
->
EFlags
);
if
(
TRACE_ON
(
relay
))
{
get_entry_point
(
buffer
,
relay
);
DPRINTF
(
"%08lx:Call %s("
,
GetCurrentThreadId
(),
buffer
);
RELAY_PrintArgs
(
args
,
nb_args
,
relay
->
argtypes
);
DPRINTF
(
") ret=%08lx fs=%04lx
\n
"
,
context
->
Eip
,
context
->
SegFs
);
DPRINTF
(
" eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx
\n
"
,
context
->
Eax
,
context
->
Ebx
,
context
->
Ecx
,
context
->
Edx
,
context
->
Esi
,
context
->
Edi
);
DPRINTF
(
" ebp=%08lx esp=%08lx ds=%04lx es=%04lx gs=%04lx flags=%08lx
\n
"
,
context
->
Ebp
,
context
->
Esp
,
context
->
SegDs
,
context
->
SegEs
,
context
->
SegGs
,
context
->
EFlags
);
}
/* Now call the real function */
...
...
@@ -468,16 +473,19 @@ void WINAPI RELAY_DoCallFrom32Regs( CONTEXT86 *context )
call_stdcall_function
(
*
(
LONGLONG_FARPROC
*
)(
entry_point
+
5
),
nb_args
+
1
,
args_copy
);
}
DPRINTF
(
"%08lx:Ret %s() retval=%08lx ret=%08lx fs=%04lx
\n
"
,
GetCurrentThreadId
(),
buffer
,
context
->
Eax
,
context
->
Eip
,
context
->
SegFs
);
DPRINTF
(
" eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx
\n
"
,
context
->
Eax
,
context
->
Ebx
,
context
->
Ecx
,
context
->
Edx
,
context
->
Esi
,
context
->
Edi
);
DPRINTF
(
" ebp=%08lx esp=%08lx ds=%04lx es=%04lx gs=%04lx flags=%08lx
\n
"
,
context
->
Ebp
,
context
->
Esp
,
context
->
SegDs
,
context
->
SegEs
,
context
->
SegGs
,
context
->
EFlags
);
if
(
TRACE_ON
(
relay
))
{
DPRINTF
(
"%08lx:Ret %s() retval=%08lx ret=%08lx fs=%04lx
\n
"
,
GetCurrentThreadId
(),
buffer
,
context
->
Eax
,
context
->
Eip
,
context
->
SegFs
);
DPRINTF
(
" eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx esi=%08lx edi=%08lx
\n
"
,
context
->
Eax
,
context
->
Ebx
,
context
->
Ecx
,
context
->
Edx
,
context
->
Esi
,
context
->
Edi
);
DPRINTF
(
" ebp=%08lx esp=%08lx ds=%04lx es=%04lx gs=%04lx flags=%08lx
\n
"
,
context
->
Ebp
,
context
->
Esp
,
context
->
SegDs
,
context
->
SegEs
,
context
->
SegGs
,
context
->
EFlags
);
}
}
void
WINAPI
RELAY_CallFrom32Regs
(
void
);
...
...
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