2009-05-03 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Sun, 3 May 2009 12:46:27 +0000 (12:46 -0000)
committerMartin Baulig <martin@novell.com>
Sun, 3 May 2009 12:46:27 +0000 (12:46 -0000)
* debug-debugger.c (debugger_insert_source_breakpoint): Don't call
mono_debugger_insert_method_breakpoint() since the class init
handler we're inserting at the top of the method already gives us
a notification.

svn path=/trunk/mono/; revision=133425

mono/metadata/ChangeLog
mono/metadata/mono-debug-debugger.c
mono/mini/ChangeLog
mono/mini/debug-debugger.c
mono/mini/debug-mini.c

index aab592610ffef2ad478c657456186d0fe1603e95..9156b24ca2738b298df77b9782a6cbda37671ccb 100644 (file)
 
        * sgen-gc.c: Fix skip size for vectors.
 
+2009-05-03  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug-debugger.c
+       (mono_debugger_check_breakpoints): Check class init handlers even
+       if we don't have any method load handers.
+
 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
 
        * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid 
index 511b888301722bd331845b8ac3f93a9c2ef0a08e..6755f63630980bd65f60e80a3cea1df44182be44 100644 (file)
@@ -194,33 +194,31 @@ mono_debugger_check_breakpoints (MonoMethod *method, MonoDebugMethodAddress *deb
 {
        int i;
 
-       if (!method_breakpoints)
-               return;
-
        if (method->is_inflated)
                method = ((MonoMethodInflated *) method)->declaring;
 
-       for (i = 0; i < method_breakpoints->len; i++) {
-               MethodBreakpointInfo *info = g_ptr_array_index (method_breakpoints, i);
+       if (method_breakpoints) {
+               for (i = 0; i < method_breakpoints->len; i++) {
+                       MethodBreakpointInfo *info = g_ptr_array_index (method_breakpoints, i);
 
-               if (method != info->method)
-                       continue;
+                       if (method != info->method)
+                               continue;
 
-               mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT,
-                                    (guint64) (gsize) debug_info, info->index);
+                       mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT,
+                                            (guint64) (gsize) debug_info, info->index);
+               }
        }
 
-       if (!class_init_callbacks)
-               return;
+       if (class_init_callbacks) {
+               for (i = 0; i < class_init_callbacks->len; i++) {
+                       ClassInitCallback *info = g_ptr_array_index (class_init_callbacks, i);
 
-       for (i = 0; i < class_init_callbacks->len; i++) {
-               ClassInitCallback *info = g_ptr_array_index (class_init_callbacks, i);
+                       if ((method->token != info->token) || (method->klass->image != info->image))
+                               continue;
 
-               if ((method->token != info->token) || (method->klass->image != info->image))
-                       continue;
-
-               mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT,
-                                    (guint64) (gsize) debug_info, info->index);
+                       mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT,
+                                            (guint64) (gsize) debug_info, info->index);
+               }
        }
 }
 
index e1cfa8c94e8ef6875ba4d05b56ae06927621602b..52504eca74f91b1482ad4a52db2e9575d6223c04 100644 (file)
 
        * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
 
+2009-05-03  Martin Baulig  <martin@ximian.com>
+
+       * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
+       mono_debugger_insert_method_breakpoint() since the class init
+       handler we're inserting at the top of the method already gives us
+       a notification.
+
 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
 
        * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
index c426eb860f1488403ed03416696b02f92790eead..b76d4d52a2ca5b57ca2dc56ed692967c7cb07a12 100644 (file)
@@ -340,7 +340,7 @@ debugger_insert_source_breakpoint (guint64 image_argument, guint64 token, guint6
                        method = nm;
                }
 
-               info = mono_debugger_insert_method_breakpoint (method, index);
+               info = mono_debug_lookup_method_addresses (method);
                mono_debugger_unlock ();
                return (guint64) (gsize) info;
        }
index d4f5645c391387c353b0b37ead428e0d872d3e36..796a70106cff77d5c351620e6b08152144dd38a9 100644 (file)
@@ -308,9 +308,6 @@ mono_debug_close_method (MonoCompile *cfg)
 
        mono_debug_add_vg_method (method, jit);
 
-       if (info->breakpoint_id)
-               mono_debugger_breakpoint_callback (method, info->breakpoint_id);
-
        mono_debugger_check_breakpoints (method, debug_info);
 
        mono_debug_free_method_jit_info (jit);