[runtime] Move the monograph tool to tools/.
[mono.git] / mono / mini / debug-mini.c
index b581ee2d14f85de4fc1ed1da5f7efa4f67b10a5d..1565a8684f84b00d89fd5c28eed0368c2b96f339 100644 (file)
@@ -16,7 +16,6 @@
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/threads-types.h>
 
-#define _IN_THE_MONO_DEBUGGER
 #include <mono/metadata/mono-debug-debugger.h>
 
 #include <mono/utils/valgrind.h>
@@ -51,7 +50,7 @@ mono_debug_init_method (MonoCompile *cfg, MonoBasicBlock *start_block, guint32 b
 {
        MiniDebugMethodInfo *info;
 
-       if (mono_debug_format == MONO_DEBUG_FORMAT_NONE)
+       if (!mono_debug_enabled ())
                return;
 
        info = g_new0 (MiniDebugMethodInfo, 1);
@@ -275,8 +274,6 @@ mono_debug_close_method (MonoCompile *cfg)
 
        mono_debug_add_vg_method (method, jit);
 
-       mono_debugger_check_breakpoints (method, debug_info);
-
        mono_debug_free_method_jit_info (jit);
        mono_debug_free_method (cfg);
 }
@@ -427,10 +424,10 @@ serialize_variable (MonoDebugVarInfo *var, guint8 *p, guint8 **endbuf)
                break;
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET:
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+       case MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR:
                encode_value (var->offset, p, &p);
                break;
        case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
-       case MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR:
        case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
                break;
        default:
@@ -510,10 +507,10 @@ deserialize_variable (MonoDebugVarInfo *var, guint8 *p, guint8 **endbuf)
                break;
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET:
        case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+       case MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR:
                var->offset = decode_value (p, &p);
                break;
        case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
-       case MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR:
        case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
                break;
        default:
@@ -592,7 +589,7 @@ mono_debug_add_aot_method (MonoDomain *domain, MonoMethod *method, guint8 *code_
 {
        MonoDebugMethodJitInfo *jit;
 
-       if (mono_debug_format == MONO_DEBUG_FORMAT_NONE)
+       if (!mono_debug_enabled ())
                return;
 
        if ((method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) ||
@@ -614,15 +611,6 @@ mono_debug_add_aot_method (MonoDomain *domain, MonoMethod *method, guint8 *code_
        mono_debug_free_method_jit_info (jit);
 }
 
-void
-mono_debug_add_icall_wrapper (MonoMethod *method, MonoJitICallInfo* callinfo)
-{
-       if (mono_debug_format == MONO_DEBUG_FORMAT_NONE)
-               return;
-
-       // mono_debug_add_wrapper (method, callinfo->wrapper, callinfo->func);
-}
-
 static void
 print_var_info (MonoDebugVarInfo *info, int idx, const char *name, const char *type)
 {
@@ -700,7 +688,7 @@ mono_debug_print_vars (gpointer ip, gboolean only_arguments)
  * breakpoint when the method is JITed.
  */
 
-static GPtrArray *breakpoints = NULL;
+static GPtrArray *breakpoints;
 
 static int
 mono_debugger_insert_breakpoint_full (MonoMethodDesc *desc)