Author: martin
Date: 2007-11-22 05:17:36 -0500 (Thu, 22 Nov 2007)
New Revision: 90134

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/class.c
   trunk/mono/mono/metadata/mono-debug-debugger.c
   trunk/mono/mono/metadata/mono-debug-debugger.h
   trunk/mono/mono/metadata/mono-debug.c
   trunk/mono/mono/metadata/mono-debug.h
Log:
2007-11-22  Martin Baulig  <[EMAIL PROTECTED]>

        * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.

        * mono-debug.c
        (mono_debug_debugger_version): Bump to 3.
        (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
        -> mono_debugger_class_initialized().

        * mono-debug-debugger.c
        (mono_debugger_add_type): Renamed into 
mono_debugger_class_initialized().

        * class.c
        (mono_debugger_start_class_init_func): Removed.
        (mono_debugger_class_loaded_methods_func): Added.
        (mono_class_setup_methods): Call it here.



Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2007-11-22 10:12:57 UTC (rev 90133)
+++ trunk/mono/mono/metadata/ChangeLog  2007-11-22 10:17:36 UTC (rev 90134)
@@ -1,6 +1,23 @@
 2007-11-22  Martin Baulig  <[EMAIL PROTECTED]>
 
+       * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
+
        * mono-debug.c
+       (mono_debug_debugger_version): Bump to 3.
+       (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
+       -> mono_debugger_class_initialized().
+
+       * mono-debug-debugger.c
+       (mono_debugger_add_type): Renamed into 
mono_debugger_class_initialized().
+
+       * class.c
+       (mono_debugger_start_class_init_func): Removed.
+       (mono_debugger_class_loaded_methods_func): Added.
+       (mono_class_setup_methods): Call it here.
+
+2007-11-22  Martin Baulig  <[EMAIL PROTECTED]>
+
+       * mono-debug.c
        (mono_debug_add_delegate_impl): New public method.
        (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_IMPL'.
 

Modified: trunk/mono/mono/metadata/class.c
===================================================================
--- trunk/mono/mono/metadata/class.c    2007-11-22 10:12:57 UTC (rev 90133)
+++ trunk/mono/mono/metadata/class.c    2007-11-22 10:17:36 UTC (rev 90134)
@@ -46,8 +46,8 @@
 static MonoClass * mono_class_create_from_typedef (MonoImage *image, guint32 
type_token);
 static gboolean mono_class_get_cached_class_info (MonoClass *klass, 
MonoCachedClassInfo *res);
 
-void (*mono_debugger_start_class_init_func) (MonoClass *klass) = NULL;
 void (*mono_debugger_class_init_func) (MonoClass *klass) = NULL;
+void (*mono_debugger_class_loaded_methods_func) (MonoClass *klass) = NULL;
 
 /*
  * mono_class_from_typeref:
@@ -1328,6 +1328,9 @@
        /* Leave this assignment as the last op in this function */
        class->methods = methods;
 
+       if (mono_debugger_class_init_methods_func)
+               mono_debugger_class_loaded_methods_func (class);
+
        mono_loader_unlock ();
 }
 
@@ -2957,9 +2960,6 @@
        if (mono_security_get_mode () == MONO_SECURITY_MODE_CORE_CLR)
                check_core_clr_inheritance (class);
 
-       if (mono_debugger_start_class_init_func)
-               mono_debugger_start_class_init_func (class);
-
        mono_stats.initialized_class_count++;
 
        if (class->generic_class && !class->generic_class->is_dynamic) {

Modified: trunk/mono/mono/metadata/mono-debug-debugger.c
===================================================================
--- trunk/mono/mono/metadata/mono-debug-debugger.c      2007-11-22 10:12:57 UTC 
(rev 90133)
+++ trunk/mono/mono/metadata/mono-debug-debugger.c      2007-11-22 10:17:36 UTC 
(rev 90134)
@@ -351,7 +351,7 @@
 }
 
 void
-mono_debugger_add_type (MonoDebugHandle *symfile, MonoClass *klass)
+mono_debugger_class_initialized (MonoClass *klass)
 {
        int i;
 

Modified: trunk/mono/mono/metadata/mono-debug-debugger.h
===================================================================
--- trunk/mono/mono/metadata/mono-debug-debugger.h      2007-11-22 10:12:57 UTC 
(rev 90133)
+++ trunk/mono/mono/metadata/mono-debug-debugger.h      2007-11-22 10:17:36 UTC 
(rev 90134)
@@ -60,7 +60,7 @@
 mono_debugger_check_runtime_version (const char *filename);
 
 void
-mono_debugger_add_type (MonoDebugHandle *symfile, MonoClass *klass);
+mono_debugger_class_initialized (MonoClass *klass);
 
 MonoDebugMethodAddressList *
 mono_debugger_insert_method_breakpoint (MonoMethod *method, guint64 idx);

Modified: trunk/mono/mono/metadata/mono-debug.c
===================================================================
--- trunk/mono/mono/metadata/mono-debug.c       2007-11-22 10:12:57 UTC (rev 
90133)
+++ trunk/mono/mono/metadata/mono-debug.c       2007-11-22 10:17:36 UTC (rev 
90134)
@@ -96,7 +96,7 @@
 
 MonoSymbolTable *mono_symbol_table = NULL;
 MonoDebugFormat mono_debug_format = MONO_DEBUG_FORMAT_NONE;
-gint32 mono_debug_debugger_version = 2;
+gint32 mono_debug_debugger_version = 3;
 
 static gboolean in_the_mono_debugger = FALSE;
 static gboolean mono_debug_initialized = FALSE;
@@ -110,13 +110,12 @@
 static MonoDebugHandle     *_mono_debug_get_image      (MonoImage *image);
 static void                 mono_debug_add_assembly    (MonoAssembly *assembly,
                                                        gpointer user_data);
-static void                 mono_debug_start_add_type  (MonoClass *klass);
 static void                 mono_debug_add_type        (MonoClass *klass);
 
 void _mono_debug_init_corlib (MonoDomain *domain);
 
 extern void (*mono_debugger_class_init_func) (MonoClass *klass);
-extern void (*mono_debugger_start_class_init_func) (MonoClass *klass);
+extern void (*mono_debugger_class_init_methods_func) (MonoClass *klass);
 
 static MonoDebugDataTable *
 create_data_table (MonoDomain *domain)
@@ -233,8 +232,8 @@
        data_table_hash = g_hash_table_new_full (
                NULL, NULL, NULL, (GDestroyNotify) free_data_table);
 
-       mono_debugger_start_class_init_func = mono_debug_start_add_type;
        mono_debugger_class_init_func = mono_debug_add_type;
+       mono_debugger_class_loaded_methods_func = 
mono_debugger_class_initialized;
        mono_install_assembly_load_hook (mono_debug_add_assembly, NULL);
 
        mono_symbol_table->global_data_table = create_data_table (NULL);
@@ -842,21 +841,7 @@
        return jit;
 }
 
-/*
- * This is called via the `mono_debugger_class_init_func' from 
mono_class_init() each time
- * a new class is initialized.
- */
 static void
-mono_debug_start_add_type (MonoClass *klass)
-{
-       MonoDebugHandle *handle;
-
-       handle = _mono_debug_get_image (klass->image);
-       if (!handle)
-               return;
-}
-
-static void
 mono_debug_add_type (MonoClass *klass)
 {
        MonoDebugHandle *handle;
@@ -870,8 +855,6 @@
        if (!handle)
                return;
 
-       mono_debugger_add_type (handle, klass);
-
        if (klass->generic_class || klass->rank ||
            (klass->byval_arg.type == MONO_TYPE_VAR) || (klass->byval_arg.type 
== MONO_TYPE_MVAR))
                return;

Modified: trunk/mono/mono/metadata/mono-debug.h
===================================================================
--- trunk/mono/mono/metadata/mono-debug.h       2007-11-22 10:12:57 UTC (rev 
90133)
+++ trunk/mono/mono/metadata/mono-debug.h       2007-11-22 10:17:36 UTC (rev 
90134)
@@ -128,7 +128,7 @@
        MonoType *type;
 };
 
-#define MONO_DEBUGGER_VERSION                          65
+#define MONO_DEBUGGER_VERSION                          66
 #define MONO_DEBUGGER_MAGIC                            0x7aff65af4253d427ULL
 
 extern MonoSymbolTable *mono_symbol_table;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to