mscoree: Add support for tracing the entry point assembly.

Vincent Povirk madewokherd at gmail.com
Tue Sep 4 11:34:34 CDT 2012


-------------- next part --------------
From 414c1faef65111ed89c19e8f8b6a3c8ab6b02d38 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 4 Sep 2012 11:32:00 -0500
Subject: [PATCH] mscoree: Add support for tracing the entry point assembly.

---
 dlls/mscoree/corruntimehost.c  |    2 ++
 dlls/mscoree/metahost.c        |    1 +
 dlls/mscoree/mscoree_private.h |    1 +
 3 files changed, 4 insertions(+)

diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c
index ffc204d..ecefe75 100644
--- a/dlls/mscoree/corruntimehost.c
+++ b/dlls/mscoree/corruntimehost.c
@@ -1073,6 +1073,8 @@ __int32 WINAPI _CorExeMain(void)
 
             if (assembly)
             {
+                host->mono->mono_trace_set_assembly(assembly);
+
                 exit_code = host->mono->mono_jit_exec(domain, assembly, argc, argv);
             }
             else
diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c
index 8417344..66dde5d 100644
--- a/dlls/mscoree/metahost.c
+++ b/dlls/mscoree/metahost.c
@@ -207,6 +207,7 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
         LOAD_MONO_FUNCTION(mono_stringify_assembly_name);
         LOAD_MONO_FUNCTION(mono_string_new);
         LOAD_MONO_FUNCTION(mono_thread_attach);
+        LOAD_MONO_FUNCTION(mono_trace_set_assembly);
 
         /* GLib imports obsoleted by the 2.0 ABI */
         if (This->mono_abi_version == 1)
diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h
index 7266687..f7e9c11 100644
--- a/dlls/mscoree/mscoree_private.h
+++ b/dlls/mscoree/mscoree_private.h
@@ -175,6 +175,7 @@ struct loaded_mono
     void (CDECL *mono_thread_pool_cleanup)(void);
     void (CDECL *mono_thread_suspend_all_other_threads)(void);
     void (CDECL *mono_threads_set_shutting_down)(void);
+    void (CDECL *mono_trace_set_assembly)(MonoAssembly *assembly);
     MonoString* (CDECL *mono_string_new)(MonoDomain *domain, const char *str);
     MonoThread* (CDECL *mono_thread_attach)(MonoDomain *domain);
 };
-- 
1.7.9.5


More information about the wine-patches mailing list