projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restructure of mono.sln and build properties to better fix static/dynamic library...
[mono.git]
/
mono
/
mini
/
exceptions-mips.c
diff --git
a/mono/mini/exceptions-mips.c
b/mono/mini/exceptions-mips.c
index dfb4a57d3b9a3ff5418b7cb005b8f283ffbbd387..69d37cba757101366624d29b50aec5982c0b3905 100644
(file)
--- a/
mono/mini/exceptions-mips.c
+++ b/
mono/mini/exceptions-mips.c
@@
-1,5
+1,6
@@
-/*
- * exceptions-mips.c: exception support for MIPS
+/**
+ * \file
+ * exception support for MIPS
*
* Authors:
* Mark Mason (mason@broadcom.com)
*
* Authors:
* Mark Mason (mason@broadcom.com)
@@
-77,7
+78,7
@@
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
g_assert ((code - start) < sizeof(start));
mono_arch_flush_icache (start, code - start);
g_assert ((code - start) < sizeof(start));
mono_arch_flush_icache (start, code - start);
-
mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL
);
+
MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)
);
return start;
}
return start;
}
@@
-169,13
+170,14
@@
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
g_assert ((code - start) < sizeof(start));
mono_arch_flush_icache (start, code - start);
g_assert ((code - start) < sizeof(start));
mono_arch_flush_icache (start, code - start);
-
mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL
);
+
MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)
);
return start;
}
static void
throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, gboolean rethrow)
{
return start;
}
static void
throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, gboolean rethrow)
{
+ MonoError error;
MonoContext ctx;
#ifdef DEBUG_EXCEPTIONS
MonoContext ctx;
#ifdef DEBUG_EXCEPTIONS
@@
-194,13
+196,14
@@
throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, gboolean
memset (&ctx.sc_fpregs, 0, sizeof (mips_freg) * MONO_SAVED_FREGS);
MONO_CONTEXT_SET_IP (&ctx, eip);
memset (&ctx.sc_fpregs, 0, sizeof (mips_freg) * MONO_SAVED_FREGS);
MONO_CONTEXT_SET_IP (&ctx, eip);
- if (mono_object_isinst
(exc, mono_defaults.exception_class
)) {
+ if (mono_object_isinst
_checked (exc, mono_defaults.exception_class, &error
)) {
MonoException *mono_ex = (MonoException*)exc;
if (!rethrow) {
mono_ex->stack_trace = NULL;
mono_ex->trace_ips = NULL;
}
}
MonoException *mono_ex = (MonoException*)exc;
if (!rethrow) {
mono_ex->stack_trace = NULL;
mono_ex->trace_ips = NULL;
}
}
+ mono_error_assert_ok (&error);
mono_handle_exception (&ctx, exc);
#ifdef DEBUG_EXCEPTIONS
g_print ("throw_exception: restore to pc=%p sp=%p fp=%p ctx=%p\n",
mono_handle_exception (&ctx, exc);
#ifdef DEBUG_EXCEPTIONS
g_print ("throw_exception: restore to pc=%p sp=%p fp=%p ctx=%p\n",
@@
-285,17
+288,15
@@
mono_arch_get_throw_exception_generic (guint8 *start, int size, int corlib, gboo
g_assert ((code - start) < size);
mono_arch_flush_icache (start, code - start);
g_assert ((code - start) < size);
mono_arch_flush_icache (start, code - start);
-
mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL
);
+
MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)
);
return start;
}
/**
* mono_arch_get_rethrow_exception:
return start;
}
/**
* mono_arch_get_rethrow_exception:
- *
- * Returns a function pointer which can be used to rethrow
+ * \returns a function pointer which can be used to rethrow
* exceptions. The returned function has the following
* signature: void (*func) (MonoException *exc);
* exceptions. The returned function has the following
* signature: void (*func) (MonoException *exc);
- *
*/
gpointer
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
*/
gpointer
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
@@
-353,14
+354,13
@@
mono_arch_get_throw_exception_by_name (void)
start = code = mono_global_codeman_reserve (size);
mips_break (code, 0xfd);
mono_arch_flush_icache (start, code - start);
start = code = mono_global_codeman_reserve (size);
mips_break (code, 0xfd);
mono_arch_flush_icache (start, code - start);
-
mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL
);
+
MONO_PROFILER_RAISE (jit_code_buffer, (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL)
);
return start;
}
/**
* mono_arch_get_throw_corlib_exception:
return start;
}
/**
* mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise
+ * \returns a function pointer which can be used to raise
* corlib exceptions. The returned function has the following
* signature: void (*func) (guint32 ex_token, guint32 offset);
* On MIPS, the offset argument is missing.
* corlib exceptions. The returned function has the following
* signature: void (*func) (guint32 ex_token, guint32 offset);
* On MIPS, the offset argument is missing.
@@
-383,7
+383,7
@@
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
}
/*
}
/*
- * mono_arch_
find_jit_info
:
+ * mono_arch_
unwind_frame
:
*
* This function is used to gather information from @ctx, and store it in @frame_info.
* It unwinds one stack frame, and stores the resulting context into @new_ctx. @lmf
*
* This function is used to gather information from @ctx, and store it in @frame_info.
* It unwinds one stack frame, and stores the resulting context into @new_ctx. @lmf
@@
-391,7
+391,7
@@
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
* Returns TRUE on success, FALSE otherwise.
*/
gboolean
* Returns TRUE on success, FALSE otherwise.
*/
gboolean
-mono_arch_
find_jit_info
(MonoDomain *domain, MonoJitTlsData *jit_tls,
+mono_arch_
unwind_frame
(MonoDomain *domain, MonoJitTlsData *jit_tls,
MonoJitInfo *ji, MonoContext *ctx,
MonoContext *new_ctx, MonoLMF **lmf,
mgreg_t **save_locations,
MonoJitInfo *ji, MonoContext *ctx,
MonoContext *new_ctx, MonoLMF **lmf,
mgreg_t **save_locations,
@@
-410,7
+410,10
@@
mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
guint32 unwind_info_len;
guint8 *unwind_info;
guint32 unwind_info_len;
guint8 *unwind_info;
- frame->type = FRAME_TYPE_MANAGED;
+ if (ji->is_trampoline)
+ frame->type = FRAME_TYPE_TRAMPOLINE;
+ else
+ frame->type = FRAME_TYPE_MANAGED;
unwind_info = mono_jinfo_get_unwind_info (ji, &unwind_info_len);
unwind_info = mono_jinfo_get_unwind_info (ji, &unwind_info_len);
@@
-455,7
+458,7
@@
mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
if (!(*lmf)->method) {
#ifdef DEBUG_EXCEPTIONS
if (!(*lmf)->method) {
#ifdef DEBUG_EXCEPTIONS
- g_print ("mono_arch_
find_jit_info
: bad lmf @ %p\n", (void *) *lmf);
+ g_print ("mono_arch_
unwind_frame
: bad lmf @ %p\n", (void *) *lmf);
#endif
return FALSE;
}
#endif
return FALSE;
}
@@
-498,7
+501,7
@@
mono_arch_ip_from_context (void *sigctx)
static void
handle_signal_exception (gpointer obj)
{
static void
handle_signal_exception (gpointer obj)
{
- MonoJitTlsData *jit_tls = mono_
native_tls_get_value (mono_jit_tls_id
);
+ MonoJitTlsData *jit_tls = mono_
tls_get_jit_tls (
);
MonoContext ctx;
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
MonoContext ctx;
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
@@
-524,7
+527,7
@@
mono_arch_handle_exception (void *ctx, gpointer obj)
* signal is disabled, and we could run arbitrary code though the debugger. So
* resume into the normal stack and do most work there if possible.
*/
* signal is disabled, and we could run arbitrary code though the debugger. So
* resume into the normal stack and do most work there if possible.
*/
- MonoJitTlsData *jit_tls = mono_
native_tls_get_value (mono_jit_tls_id
);
+ MonoJitTlsData *jit_tls = mono_
tls_get_jit_tls (
);
guint64 sp = UCONTEXT_GREGS (sigctx) [mips_sp];
/* Pass the ctx parameter in TLS */
guint64 sp = UCONTEXT_GREGS (sigctx) [mips_sp];
/* Pass the ctx parameter in TLS */