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
b9304bd6
Commit
b9304bd6
authored
Sep 11, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Initialize debug channels options on first use.
parent
9663f942
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
debug.c
libs/wine/debug.c
+10
-2
loader.c
libs/wine/loader.c
+0
-2
No files found.
libs/wine/debug.c
View file @
b9304bd6
...
...
@@ -35,11 +35,13 @@ static const char * const debug_classes[] = { "fixme", "err", "warn", "trace" };
#define MAX_DEBUG_OPTIONS 256
static
unsigned
char
default_flags
=
(
1
<<
__WINE_DBCL_ERR
)
|
(
1
<<
__WINE_DBCL_FIXME
);
static
unsigned
int
nb_debug_options
=
0
;
static
int
nb_debug_options
=
-
1
;
static
struct
__wine_debug_channel
debug_options
[
MAX_DEBUG_OPTIONS
];
static
struct
__wine_debug_functions
funcs
;
static
void
debug_init
(
void
);
static
int
cmp_name
(
const
void
*
p1
,
const
void
*
p2
)
{
const
char
*
name
=
p1
;
...
...
@@ -50,6 +52,8 @@ static int cmp_name( const void *p1, const void *p2 )
/* get the flags to use for a given channel, possibly setting them too in case of lazy init */
unsigned
char
__wine_dbg_get_channel_flags
(
struct
__wine_debug_channel
*
channel
)
{
if
(
nb_debug_options
==
-
1
)
debug_init
();
if
(
nb_debug_options
)
{
struct
__wine_debug_channel
*
opt
=
bsearch
(
channel
->
name
,
debug_options
,
nb_debug_options
,
...
...
@@ -65,6 +69,8 @@ unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel
int
__wine_dbg_set_channel_flags
(
struct
__wine_debug_channel
*
channel
,
unsigned
char
set
,
unsigned
char
clear
)
{
if
(
nb_debug_options
==
-
1
)
debug_init
();
if
(
nb_debug_options
)
{
struct
__wine_debug_channel
*
opt
=
bsearch
(
channel
->
name
,
debug_options
,
nb_debug_options
,
...
...
@@ -177,10 +183,12 @@ static void debug_usage(void)
/* initialize all options at startup */
void
debug_init
(
void
)
static
void
debug_init
(
void
)
{
char
*
wine_debug
;
if
(
nb_debug_options
!=
-
1
)
return
;
/* already initialized */
nb_debug_options
=
0
;
if
((
wine_debug
=
getenv
(
"WINEDEBUG"
)))
{
if
(
!
strcmp
(
wine_debug
,
"help"
))
debug_usage
();
...
...
libs/wine/loader.c
View file @
b9304bd6
...
...
@@ -88,7 +88,6 @@ static unsigned int nb_dll_paths;
static
int
dll_path_maxlen
;
extern
void
mmap_init
(
void
);
extern
void
debug_init
(
void
);
extern
const
char
*
get_dlldir
(
const
char
**
default_dlldir
);
/* build the dll load path from the WINEDLLPATH variable */
...
...
@@ -629,7 +628,6 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
__wine_main_argv
=
argv
;
__wine_main_environ
=
environ
;
mmap_init
();
debug_init
();
for
(
path
=
first_dll_path
(
"ntdll.dll"
,
0
,
&
context
);
path
;
path
=
next_dll_path
(
&
context
))
{
...
...
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