Commit 2ecd3772 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

mscoree: Send Mono's debug output to Unix stderr.

parent 29a9ea18
......@@ -102,6 +102,8 @@ static char* (CDECL *mono_stringify_assembly_name)(MonoAssemblyName *aname);
MonoThread* (CDECL *mono_thread_attach)(MonoDomain *domain);
void (CDECL *mono_thread_manage)(void);
void (CDECL *mono_trace_set_assembly)(MonoAssembly *assembly);
void (CDECL *mono_trace_set_print_handler)(MonoPrintCallback callback);
void (CDECL *mono_trace_set_printerr_handler)(MonoPrintCallback callback);
static BOOL get_mono_path(LPWSTR path);
......@@ -111,12 +113,18 @@ static MonoAssembly* mono_assembly_preload_hook_fn(MonoAssemblyName *aname, char
static void mono_shutdown_callback_fn(MonoProfiler *prof);
static void mono_print_handler_fn(const char *string, INT is_stdout);
static MonoImage* CDECL image_open_module_handle_dummy(HMODULE module_handle,
char* fname, UINT has_entry_point, MonoImageOpenStatus* status)
{
return mono_image_open(fname, status);
}
static void CDECL set_print_handler_dummy(MonoPrintCallback callback)
{
}
static void missing_runtime_message(void)
{
MESSAGE("wine: Install Mono for Windows to run .NET applications.\n");
......@@ -204,11 +212,16 @@ static HRESULT load_mono(LPCWSTR mono_path)
} while (0);
LOAD_OPT_MONO_FUNCTION(mono_image_open_from_module_handle, image_open_module_handle_dummy);
LOAD_OPT_MONO_FUNCTION(mono_trace_set_print_handler, set_print_handler_dummy);
LOAD_OPT_MONO_FUNCTION(mono_trace_set_printerr_handler, set_print_handler_dummy);
#undef LOAD_OPT_MONO_FUNCTION
mono_profiler_install(NULL, mono_shutdown_callback_fn);
mono_trace_set_print_handler(mono_print_handler_fn);
mono_trace_set_printerr_handler(mono_print_handler_fn);
mono_set_dirs(mono_lib_path_a, mono_etc_path_a);
mono_config_parse(NULL);
......@@ -244,6 +257,11 @@ static void mono_shutdown_callback_fn(MonoProfiler *prof)
is_mono_shutdown = TRUE;
}
static void mono_print_handler_fn(const char *string, INT is_stdout)
{
wine_dbg_printf("%s", string);
}
static HRESULT CLRRuntimeInfo_GetRuntimeHost(CLRRuntimeInfo *This, RuntimeHost **result)
{
HRESULT hr = S_OK;
......
......@@ -132,6 +132,8 @@ typedef MonoAssembly* (*MonoAssemblyPreLoadFunc)(MonoAssemblyName *aname, char *
typedef void (*MonoProfileFunc)(MonoProfiler *prof);
typedef void (*MonoPrintCallback) (const char *string, INT is_stdout);
extern BOOL is_mono_started DECLSPEC_HIDDEN;
extern MonoImage* (CDECL *mono_assembly_get_image)(MonoAssembly *assembly) DECLSPEC_HIDDEN;
......@@ -156,6 +158,8 @@ extern MonoString* (CDECL *mono_string_new)(MonoDomain *domain, const char *str)
extern MonoThread* (CDECL *mono_thread_attach)(MonoDomain *domain) DECLSPEC_HIDDEN;
extern void (CDECL *mono_thread_manage)(void) DECLSPEC_HIDDEN;
extern void (CDECL *mono_trace_set_assembly)(MonoAssembly *assembly) DECLSPEC_HIDDEN;
extern void (CDECL *mono_trace_set_print_handler)(MonoPrintCallback callback) DECLSPEC_HIDDEN;
extern void (CDECL *mono_trace_set_printerr_handler)(MonoPrintCallback callback) DECLSPEC_HIDDEN;
/* loaded runtime interfaces */
extern void expect_no_runtimes(void) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment