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
30c112e6
Commit
30c112e6
authored
Nov 14, 1998
by
Marcus Meissner
Committed by
Alexandre Julliard
Nov 14, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up relay32, snoop16 and snoop32 include/excludes by doing them
just once at creation time.
parent
06b4eb32
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
13 deletions
+21
-13
snoop.c
if1632/snoop.c
+5
-8
snoop.h
include/snoop.h
+1
-0
builtin32.c
relay32/builtin32.c
+13
-0
snoop.c
relay32/snoop.c
+2
-5
No files found.
if1632/snoop.c
View file @
30c112e6
...
...
@@ -60,7 +60,6 @@ typedef struct tagSNOOP16_RETURNENTRY {
DWORD
ordinal
;
WORD
origSP
;
WORD
*
args
;
/* saved args across a stdcall */
BYTE
show
;
}
SNOOP16_RETURNENTRY
;
typedef
struct
tagSNOOP16_RETURNENTRIES
{
...
...
@@ -187,6 +186,9 @@ SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) {
fun
->
name
=
HEAP_strdupA
(
SystemHeap
,
0
,
name
);
else
fun
->
name
=
HEAP_strdupA
(
SystemHeap
,
0
,
""
);
if
(
!
SNOOP_ShowDebugmsgSnoop
(
dll
->
name
,
ordinal
,
fun
->
name
))
return
origfun
;
/* more magic. do not try to snoop thunk data entries (MMSYSTEM) */
if
(
strchr
(
fun
->
name
,
'_'
))
{
char
*
s
=
strchr
(
fun
->
name
,
'_'
);
...
...
@@ -214,8 +216,6 @@ void WINAPI SNOOP16_Entry(CONTEXT *context) {
SNOOP16_RETURNENTRIES
**
rets
=
&
firstrets
;
SNOOP16_RETURNENTRY
*
ret
;
int
i
,
max
;
/* from relay32/snoop.c */
extern
int
SNOOP_ShowDebugmsgSnoop
(
const
char
*
dll
,
int
ord
,
const
char
*
fname
);
while
(
dll
)
{
if
(
xcs
==
dll
->
funhandle
)
{
...
...
@@ -257,8 +257,7 @@ void WINAPI SNOOP16_Entry(CONTEXT *context) {
IP_reg
(
context
)
=
LOWORD
(
fun
->
origfun
);
CS_reg
(
context
)
=
HIWORD
(
fun
->
origfun
);
ret
->
show
=
SNOOP_ShowDebugmsgSnoop
(
dll
->
name
,
ordinal
,
fun
->
name
);
if
(
!
ret
->
show
)
return
;
DPRINTF
(
"Call %s.%ld: %s("
,
dll
->
name
,
ordinal
,
fun
->
name
);
if
(
fun
->
nrofargs
>
0
)
{
max
=
fun
->
nrofargs
;
...
...
@@ -288,9 +287,7 @@ void WINAPI SNOOP16_Return(CONTEXT *context) {
}
IP_reg
(
context
)
=
LOWORD
(
ret
->
origreturn
);
CS_reg
(
context
)
=
HIWORD
(
ret
->
origreturn
);
if
(
!
ret
->
show
)
{
;
}
else
if
(
ret
->
args
)
{
if
(
ret
->
args
)
{
int
i
,
max
;
DPRINTF
(
"Ret %s.%ld: %s("
,
ret
->
dll
->
name
,
ret
->
ordinal
,
ret
->
dll
->
funs
[
ret
->
ordinal
].
name
);
...
...
include/snoop.h
View file @
30c112e6
...
...
@@ -11,4 +11,5 @@ extern FARPROC32 SNOOP_GetProcAddress32(HMODULE32,LPCSTR,DWORD,FARPROC32);
extern
void
(
*
fnSNOOP16_RegisterDLL
)(
NE_MODULE
*
,
LPCSTR
);
extern
FARPROC16
(
*
fnSNOOP16_GetProcAddress16
)(
HMODULE16
,
DWORD
,
FARPROC16
);
extern
void
SNOOP16_Init
();
extern
int
SNOOP_ShowDebugmsgSnoop
(
const
char
*
dll
,
int
ord
,
const
char
*
fname
);
#endif
relay32/builtin32.c
View file @
30c112e6
...
...
@@ -236,10 +236,23 @@ static HMODULE32 BUILTIN32_DoLoadModule( BUILTIN32_DLL *dll, PDB32 *pdb )
for
(
i
=
0
;
i
<
dll
->
descr
->
nb_funcs
;
i
++
,
funcs
++
,
debug
++
)
{
BYTE
args
=
dll
->
descr
->
args
[
i
];
int
j
;
if
(
!
dll
->
descr
->
functions
[
i
])
continue
;
*
funcs
=
(
LPVOID
)((
BYTE
*
)
dll
->
descr
->
functions
[
i
]
-
addr
);
#ifdef __i386__
if
(
!
TRACE_ON
(
relay
))
continue
;
for
(
j
=
0
;
j
<
dll
->
descr
->
nb_names
;
j
++
)
if
(
dll
->
descr
->
ordinals
[
j
]
==
i
)
break
;
if
(
j
<
dll
->
descr
->
nb_names
)
{
if
(
dll
->
descr
->
names
[
j
])
{
char
buffer
[
200
];
sprintf
(
buffer
,
"%s.%d: %s"
,
dll
->
descr
->
name
,
i
,
dll
->
descr
->
names
[
j
]);
if
(
!
RELAY_ShowDebugmsgRelay
(
buffer
))
continue
;
}
}
switch
(
args
)
{
case
0xfe
:
/* register func */
...
...
relay32/snoop.c
View file @
30c112e6
...
...
@@ -197,6 +197,8 @@ SNOOP_GetProcAddress32(HMODULE32 hmod,LPCSTR name,DWORD ordinal,FARPROC32 origfu
}
if
(
!
dll
)
/* probably internal */
return
origfun
;
if
(
!
SNOOP_ShowDebugmsgSnoop
(
dll
->
name
,
ordinal
,
name
))
return
origfun
;
assert
(
ordinal
<
dll
->
nrofordinals
);
fun
=
dll
->
funs
+
ordinal
;
if
(
!
fun
->
name
)
fun
->
name
=
HEAP_strdupA
(
SystemHeap
,
0
,
name
);
...
...
@@ -285,11 +287,6 @@ REGS_ENTRYPOINT(SNOOP_Entry) {
FIXME
(
snoop
,
"entrypoint 0x%08lx not found
\n
"
,
entry
);
return
;
/* oops */
}
if
(
!
SNOOP_ShowDebugmsgSnoop
(
dll
->
name
,
ordinal
,
fun
->
name
))
{
/* we don't display, so we don't need returndisplay either */
EIP_reg
(
context
)
=
(
DWORD
)
fun
->
origfun
;
return
;
}
/* guess cdecl ... */
if
(
fun
->
nrofargs
<
0
)
{
/* Typical cdecl return frame is:
...
...
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