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
3d83da04
Commit
3d83da04
authored
Aug 29, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use a RunOnce function to initialize relay debugging options.
parent
d191d5bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
relay.c
dlls/ntdll/relay.c
+6
-8
No files found.
dlls/ntdll/relay.c
View file @
3d83da04
...
...
@@ -81,7 +81,7 @@ static const WCHAR **debug_from_relay_includelist;
static
const
WCHAR
**
debug_from_snoop_excludelist
;
static
const
WCHAR
**
debug_from_snoop_includelist
;
static
BOOL
init_done
;
static
RTL_RUN_ONCE
init_once
=
RTL_RUN_ONCE_INIT
;
/* compare an ASCII and a Unicode string without depending on the current codepage */
static
inline
int
strcmpAW
(
const
char
*
strA
,
const
WCHAR
*
strW
)
...
...
@@ -172,7 +172,7 @@ static const WCHAR **load_list( HKEY hkey, const WCHAR *value )
*
* Build the relay include/exclude function lists.
*/
static
void
init_debug_lists
(
void
)
static
DWORD
WINAPI
init_debug_lists
(
RTL_RUN_ONCE
*
once
,
void
*
param
,
void
**
context
)
{
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
name
;
...
...
@@ -189,9 +189,6 @@ static void init_debug_lists(void)
static
const
WCHAR
SnoopFromIncludeW
[]
=
{
'S'
,
'n'
,
'o'
,
'o'
,
'p'
,
'F'
,
'r'
,
'o'
,
'm'
,
'I'
,
'n'
,
'c'
,
'l'
,
'u'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
SnoopFromExcludeW
[]
=
{
'S'
,
'n'
,
'o'
,
'o'
,
'p'
,
'F'
,
'r'
,
'o'
,
'm'
,
'E'
,
'x'
,
'c'
,
'l'
,
'u'
,
'd'
,
'e'
,
0
};
if
(
init_done
)
return
;
init_done
=
TRUE
;
RtlOpenCurrentUser
(
KEY_ALL_ACCESS
,
&
root
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
root
;
...
...
@@ -204,7 +201,7 @@ static void init_debug_lists(void)
/* @@ Wine registry key: HKCU\Software\Wine\Debug */
if
(
NtOpenKey
(
&
hkey
,
KEY_ALL_ACCESS
,
&
attr
))
hkey
=
0
;
NtClose
(
root
);
if
(
!
hkey
)
return
;
if
(
!
hkey
)
return
TRUE
;
debug_relay_includelist
=
load_list
(
hkey
,
RelayIncludeW
);
debug_relay_excludelist
=
load_list
(
hkey
,
RelayExcludeW
);
...
...
@@ -216,6 +213,7 @@ static void init_debug_lists(void)
debug_from_snoop_excludelist
=
load_list
(
hkey
,
SnoopFromExcludeW
);
NtClose
(
hkey
);
return
TRUE
;
}
...
...
@@ -698,7 +696,7 @@ void RELAY_SetupDLL( HMODULE module )
struct
relay_private_data
*
data
;
const
WORD
*
ordptr
;
if
(
!
init_done
)
init_debug_lists
(
);
RtlRunOnceExecuteOnce
(
&
init_once
,
init_debug_lists
,
NULL
,
NULL
);
exports
=
RtlImageDirectoryEntryToData
(
module
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_EXPORT
,
&
size
);
if
(
!
exports
)
return
;
...
...
@@ -855,7 +853,7 @@ void SNOOP_SetupDLL(HMODULE hmod)
ULONG
size32
;
IMAGE_EXPORT_DIRECTORY
*
exports
;
if
(
!
init_done
)
init_debug_lists
(
);
RtlRunOnceExecuteOnce
(
&
init_once
,
init_debug_lists
,
NULL
,
NULL
);
exports
=
RtlImageDirectoryEntryToData
(
hmod
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_EXPORT
,
&
size32
);
if
(
!
exports
||
!
exports
->
NumberOfFunctions
)
return
;
...
...
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