[interp] Fix interp logging (#17636)
[mono-project.git] / mono / mini / exceptions-wasm.c
blob605474cb5c6322d36dbd87dc5ad0bfd717798d8c
1 #include "mini.h"
3 static void
4 wasm_restore_context (void)
6 g_error ("wasm_restore_context");
9 static void
10 wasm_call_filter (void)
12 g_error ("wasm_call_filter");
15 static void
16 wasm_throw_exception (void)
18 g_error ("wasm_throw_exception");
21 static void
22 wasm_rethrow_exception (void)
24 g_error ("wasm_rethrow_exception");
27 static void
28 wasm_rethrow_preserve_exception (void)
30 g_error ("wasm_rethrow_preserve_exception");
33 static void
34 wasm_throw_corlib_exception (void)
36 g_error ("wasm_throw_corlib_exception");
39 gboolean
40 mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls,
41 MonoJitInfo *ji, MonoContext *ctx,
42 MonoContext *new_ctx, MonoLMF **lmf,
43 host_mgreg_t **save_locations,
44 StackFrameInfo *frame)
46 if (ji)
47 g_error ("Can't unwind compiled code");
49 if (*lmf) {
50 if ((*lmf)->top_entry)
51 return FALSE;
52 g_error ("Can't handle non-top-entry LMFs\n");
55 return FALSE;
58 gpointer
59 mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
61 if (info)
62 *info = mono_tramp_info_create ("call_filter", (guint8*)wasm_call_filter, 1, NULL, NULL);
63 return (gpointer)wasm_call_filter;
66 gpointer
67 mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
69 if (info)
70 *info = mono_tramp_info_create ("restore_context", (guint8*)wasm_restore_context, 1, NULL, NULL);
71 return (gpointer)wasm_restore_context;
73 gpointer
74 mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
76 if (info)
77 *info = mono_tramp_info_create ("throw_corlib_exception", (guint8*)wasm_throw_corlib_exception, 1, NULL, NULL);
78 return (gpointer)wasm_throw_corlib_exception;
81 gpointer
82 mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
84 if (info)
85 *info = mono_tramp_info_create ("rethrow_exception", (guint8*)wasm_rethrow_exception, 1, NULL, NULL);
86 return (gpointer)wasm_rethrow_exception;
89 gpointer
90 mono_arch_get_rethrow_preserve_exception (MonoTrampInfo **info, gboolean aot)
92 if (info)
93 *info = mono_tramp_info_create ("rethrow_preserve_exception", (guint8*)wasm_rethrow_preserve_exception, 1, NULL, NULL);
94 return (gpointer)wasm_rethrow_exception;
97 gpointer
98 mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
100 if (info)
101 *info = mono_tramp_info_create ("throw_exception", (guint8*)wasm_throw_exception, 1, NULL, NULL);
102 return (gpointer)wasm_throw_exception;
105 void
106 mono_arch_undo_ip_adjustment (MonoContext *ctx)
110 gboolean
111 mono_arch_handle_exception (void *sigctx, gpointer obj)
113 g_error ("mono_arch_handle_exception");