mscoree: Add WINE_MONO_VERBOSE environment setting.

This commit is contained in:
Vincent Povirk 2013-02-27 09:46:43 -06:00 committed by Alexandre Julliard
parent c0a17a4f09
commit ad5c4671a5
2 changed files with 11 additions and 0 deletions

View File

@ -138,6 +138,8 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
char mono_lib_path_a[MAX_PATH], mono_etc_path_a[MAX_PATH];
int trace_size;
char trace_setting[256];
int verbose_size;
char verbose_setting[256];
if (This->mono_abi_version <= 0 || This->mono_abi_version > NUM_ABI_VERSIONS)
{
@ -204,6 +206,7 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
LOAD_MONO_FUNCTION(mono_runtime_object_init);
LOAD_MONO_FUNCTION(mono_runtime_quit);
LOAD_MONO_FUNCTION(mono_set_dirs);
LOAD_MONO_FUNCTION(mono_set_verbose_level);
LOAD_MONO_FUNCTION(mono_stringify_assembly_name);
LOAD_MONO_FUNCTION(mono_string_new);
LOAD_MONO_FUNCTION(mono_thread_attach);
@ -254,6 +257,13 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
{
(*result)->mono_jit_set_trace_options(trace_setting);
}
verbose_size = GetEnvironmentVariableA("WINE_MONO_VERBOSE", verbose_setting, sizeof(verbose_setting));
if (verbose_size)
{
(*result)->mono_set_verbose_level(verbose_setting[0] - '0');
}
}
return S_OK;

View File

@ -171,6 +171,7 @@ struct loaded_mono
void (CDECL *mono_runtime_quit)(void);
void (CDECL *mono_runtime_set_shutting_down)(void);
void (CDECL *mono_set_dirs)(const char *assembly_dir, const char *config_dir);
void (CDECL *mono_set_verbose_level)(DWORD level);
char* (CDECL *mono_stringify_assembly_name)(MonoAssemblyName *aname);
void (CDECL *mono_thread_pool_cleanup)(void);
void (CDECL *mono_thread_suspend_all_other_threads)(void);