Added a __wine_dbg_set_channel_flags function to allow changing flags
from inside the code.
This commit is contained in:
parent
7686aa86e6
commit
2058f54300
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue