2009-09-03 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Wed, 2 Sep 2009 23:50:56 +0000 (23:50 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 2 Sep 2009 23:50:56 +0000 (23:50 -0000)
* mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
mono_breakpoint_clean_code () when using LLVM as the prologues generated by
LLVM might be very short.

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

mono/mini/ChangeLog
mono/mini/mini-amd64.c

index 1585bfd0d2d34d6b82990d3de91e47a5ff01a778..5f996c91f7d70863f5ad0365aee58367eb92ec9d 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-03  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
+       mono_breakpoint_clean_code () when using LLVM as the prologues generated by
+       LLVM might be very short.
+
 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
 
        * exceptions-x86.c (throw_exception): Fix the previous change by substracting
index c09f7722a22f29ce032298fc148b7adfa12b021a..013fa52770cecc75e3c61ffd29a7a0deb0651366 100644 (file)
@@ -6404,8 +6404,15 @@ mono_arch_get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
        guint32 reg;
        gint32 disp;
        guint8 rex = 0;
+       MonoJitInfo *ji;
 
-       mono_breakpoint_clean_code (NULL, code, 9, buf, sizeof (buf));
+#ifdef ENABLE_LLVM
+       /* code - 9 might be before the start of the method */
+       /* FIXME: Avoid this expensive call somehow */
+       ji = mono_jit_info_table_find (mono_domain_get (), (char*)code);
+#endif
+
+       mono_breakpoint_clean_code (ji ? ji->code_start : NULL, code, 9, buf, sizeof (buf));
        code = buf + 9;
 
        *displacement = 0;