Added a __wine_dbg_set_channel_flags function to allow changing flags

from inside the code.
This commit is contained in:
Alexandre Julliard 2005-10-18 10:49:20 +00:00
parent 7686aa86e6
commit 2058f54300
4 changed files with 21 additions and 0 deletions

View File

@ -149,6 +149,8 @@ struct __wine_debug_functions
};
extern unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel );
extern int __wine_dbg_set_channel_flags( struct __wine_debug_channel *channel,
unsigned char set, unsigned char clear );
extern void __wine_dbg_set_functions( const struct __wine_debug_functions *new_funcs,
struct __wine_debug_functions *old_funcs, size_t size );

View File

@ -62,6 +62,23 @@ unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel
return default_flags;
}
/* set the flags to use for a given channel; return 0 if the channel is not available to set */
int __wine_dbg_set_channel_flags( struct __wine_debug_channel *channel,
unsigned char set, unsigned char clear )
{
if (nb_debug_options)
{
struct __wine_debug_channel *opt = bsearch( channel->name, debug_options, nb_debug_options,
sizeof(debug_options[0]), cmp_name );
if (opt)
{
opt->flags = (opt->flags & ~clear) | set;
return 1;
}
}
return 0;
}
/* add a new debug option at the end of the option list */
static void add_option( const char *name, unsigned char set, unsigned char clear )
{

View File

@ -2,6 +2,7 @@ LIBRARY libwine.dll
EXPORTS
__wine_dbg_get_channel_flags
__wine_dbg_set_channel_flags
__wine_dbg_set_functions
__wine_dll_register
__wine_main_argc

View File

@ -2,6 +2,7 @@ WINE_1.0
{
global:
__wine_dbg_get_channel_flags;
__wine_dbg_set_channel_flags;
__wine_dbg_set_functions;
__wine_dll_register;
__wine_main_argc;