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
69277bba
Commit
69277bba
authored
Apr 23, 2000
by
Uwe Bonnes
Committed by
Alexandre Julliard
Apr 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SNOOP_PrintArg: replaced IsBad* functions by exception handler.
parent
5e5ad531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
snoop.c
relay32/snoop.c
+21
-4
No files found.
relay32/snoop.c
View file @
69277bba
...
...
@@ -20,9 +20,17 @@
#include "selectors.h"
#include "stackframe.h"
#include "debugtools.h"
#include "wine/exception.h"
DEFAULT_DEBUG_CHANNEL
(
snoop
);
static
WINE_EXCEPTION_FILTER
(
page_fault
)
{
if
(
GetExceptionCode
()
==
EXCEPTION_ACCESS_VIOLATION
)
return
EXCEPTION_EXECUTE_HANDLER
;
return
EXCEPTION_CONTINUE_SEARCH
;
}
char
**
debug_snoop_excludelist
=
NULL
,
**
debug_snoop_includelist
=
NULL
;
#ifdef __i386__
...
...
@@ -201,6 +209,7 @@ static char*
SNOOP_PrintArg
(
DWORD
x
)
{
static
char
buf
[
200
];
int
i
,
nostring
;
char
*
ret
=
0
;
MEMORY_BASIC_INFORMATION
mbi
;
if
(
!
HIWORD
(
x
)
||
...
...
@@ -210,7 +219,7 @@ SNOOP_PrintArg(DWORD x) {
sprintf
(
buf
,
"%08lx"
,
x
);
return
buf
;
}
if
(
!
IsBadStringPtrA
((
LPSTR
)
x
,
80
))
{
__TRY
{
LPBYTE
s
=
(
LPBYTE
)
x
;
i
=
0
;
nostring
=
0
;
while
(
i
<
80
)
{
...
...
@@ -222,11 +231,15 @@ SNOOP_PrintArg(DWORD x) {
if
(
!
nostring
)
{
if
(
i
>
5
)
{
wsnprintfA
(
buf
,
sizeof
(
buf
),
"%08lx %s"
,
x
,
debugstr_an
((
LPSTR
)
x
,
sizeof
(
buf
)
-
10
));
ret
urn
buf
;
ret
=
buf
;
}
}
}
if
(
!
IsBadStringPtrW
((
LPWSTR
)
x
,
80
))
{
__EXCEPT
(
page_fault
){}
__ENDTRY
if
(
ret
)
return
ret
;
__TRY
{
LPWSTR
s
=
(
LPWSTR
)
x
;
i
=
0
;
nostring
=
0
;
while
(
i
<
80
)
{
...
...
@@ -238,10 +251,14 @@ SNOOP_PrintArg(DWORD x) {
if
(
!
nostring
)
{
if
(
i
>
5
)
{
wsnprintfA
(
buf
,
sizeof
(
buf
),
"%08lx %s"
,
x
,
debugstr_wn
((
LPWSTR
)
x
,
sizeof
(
buf
)
-
10
));
ret
urn
buf
;
ret
=
buf
;
}
}
}
__EXCEPT
(
page_fault
){}
__ENDTRY
if
(
ret
)
return
ret
;
sprintf
(
buf
,
"%08lx"
,
x
);
return
buf
;
}
...
...
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