[jit] Remove some dead code.
authorZoltan Varga <vargaz@gmail.com>
Sat, 28 Feb 2015 22:01:19 +0000 (17:01 -0500)
committerZoltan Varga <vargaz@gmail.com>
Sat, 28 Feb 2015 22:01:28 +0000 (17:01 -0500)
mono/mini/mini-amd64.c
mono/mini/mini-x86.c
mono/mini/mini.c
mono/mini/mini.h

index a86fedc83988c9e86c231df48dd76f167d1586cd..4684f7d4704ffc34d84a52149c719efc8d7eb11c 100755 (executable)
@@ -7879,7 +7879,7 @@ gboolean
 mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guint8 *buf, int size)
 {
        int i;
-       gboolean can_write = TRUE;
+
        /*
         * If method_start is non-NULL we need to perform bound checks, since we access memory
         * at code - offset we could go before the start of the method and end up in a different
@@ -7893,21 +7893,7 @@ mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guin
                memset (buf, 0, size);
                memcpy (buf + offset - diff, method_start, diff + size - offset);
        }
-       code -= offset;
-       for (i = 0; i < MONO_BREAKPOINT_ARRAY_SIZE; ++i) {
-               int idx = mono_breakpoint_info_index [i];
-               guint8 *ptr;
-               if (idx < 1)
-                       continue;
-               ptr = mono_breakpoint_info [idx].address;
-               if (ptr >= code && ptr < code + size) {
-                       guint8 saved_byte = mono_breakpoint_info [idx].saved_byte;
-                       can_write = FALSE;
-                       /*g_print ("patching %p with 0x%02x (was: 0x%02x)\n", ptr, saved_byte, buf [ptr - code]);*/
-                       buf [ptr - code] = saved_byte;
-               }
-       }
-       return can_write;
+       return TRUE;
 }
 
 #if defined(__native_client_codegen__)
index 41a2741591d6dfb5e3f9b0f5e606f27bba7454aa..8137fcdddf255ccc82c9f19dee89b3c311ba4398 100644 (file)
@@ -6040,7 +6040,7 @@ gboolean
 mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guint8 *buf, int size)
 {
        int i;
-       gboolean can_write = TRUE;
+
        /*
         * If method_start is non-NULL we need to perform bound checks, since we access memory
         * at code - offset we could go before the start of the method and end up in a different
@@ -6054,21 +6054,7 @@ mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guin
                memset (buf, 0, size);
                memcpy (buf + offset - diff, method_start, diff + size - offset);
        }
-       code -= offset;
-       for (i = 0; i < MONO_BREAKPOINT_ARRAY_SIZE; ++i) {
-               int idx = mono_breakpoint_info_index [i];
-               guint8 *ptr;
-               if (idx < 1)
-                       continue;
-               ptr = mono_breakpoint_info [idx].address;
-               if (ptr >= code && ptr < code + size) {
-                       guint8 saved_byte = mono_breakpoint_info [idx].saved_byte;
-                       can_write = FALSE;
-                       /*g_print ("patching %p with 0x%02x (was: 0x%02x)\n", ptr, saved_byte, buf [ptr - code]);*/
-                       buf [ptr - code] = saved_byte;
-               }
-       }
-       return can_write;
+       return TRUE;
 }
 
 /*
index ca734ad3e2252313216a5d557c906d99b2bd4c7a..f1a405bcfa5485e5216a49f82a54df7a72fd9d2f 100755 (executable)
@@ -130,14 +130,6 @@ static MonoDebugOptions debug_options;
 static int valgrind_register = 0;
 #endif
 
-/*
- * Table written to by the debugger with a 1-based index into the
- * mono_breakpoint_info table, which contains changes made to
- * the JIT instructions by the debugger.
- */
-gssize
-mono_breakpoint_info_index [MONO_BREAKPOINT_ARRAY_SIZE];
-
 /* Whenever to check for pending exceptions in managed-to-native wrappers */
 gboolean check_for_pending_exc = TRUE;
 
index e6577e720f31a01aea438c0816573ad15dd74930..ade6e8feb8f9904fafea7d90d18888d5cf00eca9 100755 (executable)
@@ -2663,8 +2663,6 @@ void      mono_debug_add_aot_method             (MonoDomain *domain,
 MONO_API void      mono_debug_print_vars                 (gpointer ip, gboolean only_arguments);
 MONO_API void      mono_debugger_run_finally             (MonoContext *start_ctx);
 
-extern gssize mono_breakpoint_info_index [MONO_BREAKPOINT_ARRAY_SIZE];
-
 MONO_API gboolean mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guint8 *buf, int size);
 
 /* Tracing */