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