Wed Feb 24 15:47:16 CET 2010 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / mini / exceptions-s390x.c
index 65dddc08a4f3a87fb901dcd74ab640478d3d9dc4..91d7859f5795e203ccc0e5177091213d8f0437a9 100644 (file)
@@ -426,7 +426,7 @@ mono_arch_get_throw_exception_by_name (void)
 /*                                                                  */
 /* Name                - mono_arch_find_jit_info                           */
 /*                                                                  */
-/* Function    - This function is used to gather informatoin from  */
+/* Function    - This function is used to gather information from  */
 /*                @ctx. It returns the MonoJitInfo of the corres-   */
 /*                ponding function, unwinds one stack frame and     */
 /*                stores the resulting context into @new_ctx. It    */
@@ -434,15 +434,14 @@ mono_arch_get_throw_exception_by_name (void)
 /*                into @trace (if not NULL), and modifies the @lmf  */
 /*                if necessary. @native_offset returns the IP off-  */
 /*                set from the start of the function or -1 if that  */
-/*                informatoin is not available.                     */
+/*                information is not available.                     */
 /*                                                                  */
 /*------------------------------------------------------------------*/
 
 MonoJitInfo *
 mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, 
                         MonoJitInfo *res, MonoJitInfo *prev_ji, MonoContext *ctx, 
-                        MonoContext *new_ctx, char **trace, MonoLMF **lmf, 
-                        int *native_offset, gboolean *managed)
+                        MonoContext *new_ctx, MonoLMF **lmf, gboolean *managed)
 {
        MonoJitInfo *ji;
        gpointer ip = (gpointer) MONO_CONTEXT_GET_IP (ctx);
@@ -453,13 +452,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
            ((guint8 *) ip <= ((guint8 *) prev_ji->code_start) + prev_ji->code_size)))
                ji = prev_ji;
        else
-               ji = mono_jit_info_table_find (domain, ip);
-
-       if (trace)
-               *trace = NULL;
-
-       if (native_offset)
-               *native_offset = -1;
+               ji = mini_jit_info_table_find (domain, ip, NULL);
 
        if (managed)
                *managed = FALSE;
@@ -476,9 +469,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                address = (char *)ip - (char *)ji->code_start;
 
-               if (native_offset)
-                       *native_offset = address;
-
                if (managed)
                        if (!ji->method->wrapper_type)
                                *managed = TRUE;
@@ -489,6 +479,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                MONO_CONTEXT_SET_IP (new_ctx, sframe->return_address);
                memcpy (&new_ctx->uc_mcontext.gregs[6], sframe->regs, (8*sizeof(gint64)));
                return ji;
+
        } else if (*lmf) {
                
                *new_ctx = *ctx;
@@ -496,9 +487,9 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                if (!(*lmf)->method)
                        return (gpointer)-1;
 
-               if ((ji = mono_jit_info_table_find (domain, (gpointer)(*lmf)->eip))) {
+               if ((ji = mini_jit_info_table_find (domain, (gpointer)(*lmf)->eip, NULL))) {
                } else {
-                       memset (res, 0, sizeof (MonoJitInfo));
+                       memset (res, 0, MONO_SIZEOF_JIT_INFO);
                        res->method = (*lmf)->method;
                }