#include <mono/utils/mono-math.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-counters.h>
-#include <mono/utils/mono-logger.h>
+#include <mono/utils/mono-logger-internal.h>
#include <mono/utils/mono-mmap.h>
#include <mono/utils/dtrace.h>
#include "jit-icalls.h"
+gboolean mono_win_chained_exception_needs_run;
+
void
mono_runtime_install_handlers (void)
{
+#ifndef MONO_CROSS_COMPILE
win32_seh_init();
win32_seh_set_handler(SIGFPE, mono_sigfpe_signal_handler);
win32_seh_set_handler(SIGILL, mono_sigill_signal_handler);
win32_seh_set_handler(SIGSEGV, mono_sigsegv_signal_handler);
if (mini_get_debug_options ()->handle_sigint)
win32_seh_set_handler(SIGINT, mono_sigint_signal_handler);
+#endif
}
void
mono_runtime_cleanup_handlers (void)
{
+#ifndef MONO_CROSS_COMPILE
win32_seh_cleanup();
+#endif
+}
+
+
+/* mono_chain_signal:
+ *
+ * Call the original signal handler for the signal given by the arguments, which
+ * should be the same as for a signal handler. Returns TRUE if the original handler
+ * was called, false otherwise.
+ */
+gboolean
+SIG_HANDLER_SIGNATURE (mono_chain_signal)
+{
+ mono_win_chained_exception_needs_run = TRUE;
+ return TRUE;
}
static HANDLE win32_main_thread;
mono_runtime_shutdown_stat_profiler (void)
{
}
+
+gboolean
+mono_thread_state_init_from_handle (MonoThreadUnwindState *tctx, MonoNativeThreadId thread_id, MonoNativeThreadHandle thread_handle)
+{
+ g_error ("Windows systems haven't been ported to support mono_thread_state_init_from_handle");
+ return FALSE;
+}
+