projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[wasm] Add one more wasm_invoke entry.
[mono.git]
/
mono
/
mini
/
exceptions-sparc.c
diff --git
a/mono/mini/exceptions-sparc.c
b/mono/mini/exceptions-sparc.c
index 3ebe2e7a29c422b5bc72c2a65e1002cd8a1ad235..f7010b13f88e4873928d655ee63ddb576e9a7b28 100644
(file)
--- a/
mono/mini/exceptions-sparc.c
+++ b/
mono/mini/exceptions-sparc.c
@@
-1,5
+1,6
@@
-/*
- * exceptions-sparc.c: exception support for sparc
+/**
+ * \file
+ * exception support for sparc
*
* Authors:
* Mark Crichton (crichton@gimp.org)
*
* Authors:
* Mark Crichton (crichton@gimp.org)
@@
-21,7
+22,7
@@
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/exception.h>
#include <mono/metadata/mono-debug.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/exception.h>
#include <mono/metadata/mono-debug.h>
-#include <mono/metadata/gc-internal.h>
+#include <mono/metadata/gc-internal
s
.h>
#include <mono/metadata/tokentype.h>
#include "mini.h"
#include <mono/metadata/tokentype.h>
#include "mini.h"
@@
-166,6
+167,7
@@
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
static void
throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow)
{
static void
throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow)
{
+ MonoError error;
MonoContext ctx;
static void (*restore_context) (MonoContext *);
gpointer *window;
MonoContext ctx;
static void (*restore_context) (MonoContext *);
gpointer *window;
@@
-178,11
+180,14
@@
throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow)
ctx.ip = ip;
ctx.fp = (gpointer*)(MONO_SPARC_WINDOW_ADDR (sp) [sparc_i6 - 16]);
ctx.ip = ip;
ctx.fp = (gpointer*)(MONO_SPARC_WINDOW_ADDR (sp) [sparc_i6 - 16]);
- 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;
MonoException *mono_ex = (MonoException*)exc;
- if (!rethrow)
+ if (!rethrow)
{
mono_ex->stack_trace = NULL;
mono_ex->stack_trace = NULL;
+ mono_ex->trace_ips = NULL;
+ }
}
}
+ mono_error_assert_ok (&error);
mono_handle_exception (&ctx, exc);
restore_context (&ctx);
mono_handle_exception (&ctx, exc);
restore_context (&ctx);
@@
-216,8
+221,7
@@
get_throw_exception (gboolean rethrow)
/**
* mono_arch_get_throw_exception:
/**
* mono_arch_get_throw_exception:
- *
- * Returns a function pointer which can be used to raise exceptions.
+ * \returns a function pointer which can be used to raise exceptions.
* The returned function has the following
* signature: void (*func) (MonoException *exc);
*/
* The returned function has the following
* signature: void (*func) (MonoException *exc);
*/
@@
-263,8
+267,7
@@
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
/**
* mono_arch_get_throw_corlib_exception:
/**
* 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);
* Here, offset is the offset which needs to be substracted from the caller IP
* corlib exceptions. The returned function has the following
* signature: void (*func) (guint32 ex_token, guint32 offset);
* Here, offset is the offset which needs to be substracted from the caller IP
@@
-324,7
+327,7
@@
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
return start;
}
return start;
}
-/* mono_arch_
find_jit_info
:
+/* mono_arch_
unwind_frame
:
*
* This function is used to gather information from @ctx. It return the
* MonoJitInfo of the corresponding function, unwinds one stack frame and
*
* This function is used to gather information from @ctx. It return the
* MonoJitInfo of the corresponding function, unwinds one stack frame and
@@
-334,7
+337,7
@@
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
* start of the function or -1 if that info is not available.
*/
gboolean
* start of the function or -1 if that info is not available.
*/
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,
@@
-348,7
+351,10
@@
mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
*new_ctx = *ctx;
if (ji != NULL) {
*new_ctx = *ctx;
if (ji != NULL) {
- frame->type = FRAME_TYPE_MANAGED;
+ if (ji->is_trampoline)
+ frame->type = FRAME_TYPE_TRAMPOLINE;
+ else
+ frame->type = FRAME_TYPE_MANAGED;
/* Restore ip and sp from the saved register window */
window = MONO_SPARC_WINDOW_ADDR (ctx->sp);
/* Restore ip and sp from the saved register window */
window = MONO_SPARC_WINDOW_ADDR (ctx->sp);