* simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
[mono.git] / mono / mini / mini-exceptions.c
index b28ec067f33200a4ad433f6d22ddd578c5f5825a..18ff15488d3075b112c00295f04bc36dc97356b3 100644 (file)
@@ -83,7 +83,7 @@ mono_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *re
                else
                        real_ip = (const char*)ip;
 
-               if ((real_ip >= ji->code_start) && (real_ip <= ji->code_start + ji->code_size))
+               if ((real_ip >= start) && (real_ip <= start + ji->code_size))
                        offset = real_ip - start;
                else
                        offset = -1;
@@ -340,9 +340,20 @@ ves_icall_get_frame_info (gint32 skip, MonoBoolean need_file_info,
 
        mono_arch_flush_register_windows ();
 
+#ifdef MONO_INIT_CONTEXT_FROM_CURRENT
+       MONO_INIT_CONTEXT_FROM_CURRENT (&ctx);
+#else
        MONO_INIT_CONTEXT_FROM_FUNC (&ctx, ves_icall_get_frame_info);
+#endif
 
+       /* 
+        * FIXME: This is needed because of the LMF stuff which doesn't exist on ia64.
+        * Probably the whole mono_find_jit_info () stuff needs to be fixed so this isn't
+        * needed even on other platforms. This is also true for s390/s390x.
+        */
+#if    !defined(__ia64__) && !defined(__s390__) && !defined(__s390x__)
        skip++;
+#endif
 
        do {
                ji = mono_find_jit_info (domain, jit_tls, &rji, NULL, &ctx, &new_ctx, NULL, &lmf, native_offset, NULL);