#include "mini.h"
#include "mini-amd64.h"
#include "tasklets.h"
-#include "debug-mini.h"
#define ALIGN_TO(val,align) (((val) + ((align) - 1)) & ~((align) - 1))
static MonoW32ExceptionHandler segv_handler;
LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter;
-guint64 mono_win_vectored_exception_handle;
+void *mono_win_vectored_exception_handle;
extern gboolean mono_win_chained_exception_needs_run;
#define W32_SEH_HANDLE_EX(_ex) \
if (_ex##_handler) _ex##_handler(0, ep, sctx)
-LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
+static LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
{
#ifndef MONO_CROSS_COMPILE
if (mono_old_win_toplevel_exception_filter) {
* Unhandled Exception Filter
* Top-level per-process exception handler.
*/
-LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
+static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
{
EXCEPTION_RECORD* er;
CONTEXT* ctx;
void win32_seh_cleanup()
{
- if (mono_old_win_toplevel_exception_filter) SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);
-
guint32 ret = 0;
+ if (mono_old_win_toplevel_exception_filter) SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);
+
ret = RemoveVectoredExceptionHandler (mono_win_vectored_exception_handle);
g_assert (ret);
}
mono_ex->stack_trace = NULL;
}
- if (mono_debug_using_mono_debugger ()) {
- guint8 buf [16];
-
- mono_breakpoint_clean_code (NULL, (gpointer)rip, 8, buf, sizeof (buf));
-
- if (buf [3] == 0xe8) {
- MonoContext ctx_cp = ctx;
- ctx_cp.rip = rip - 5;
-
- if (mono_debugger_handle_exception (&ctx_cp, exc)) {
- mono_restore_context (&ctx_cp);
- g_assert_not_reached ();
- }
- }
- }
-
/* adjust eip so that it point into the call instruction */
ctx.rip -= 1;
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
- if (mono_debugger_handle_exception (&ctx, (MonoObject *)obj))
- return;
-
mono_handle_exception (&ctx, obj);
mono_restore_context (&ctx);
mono_arch_sigctx_to_monoctx (sigctx, &mctx);
- if (mono_debugger_handle_exception (&mctx, (MonoObject *)obj))
- return TRUE;
-
mono_handle_exception (&mctx, obj);
mono_arch_monoctx_to_sigctx (&mctx, sigctx);
mono_arch_sigctx_to_monoctx (sigctx, &mctx);
- if (mono_debugger_handle_exception (&mctx, (MonoObject *)obj)) {
- if (stack_ovf)
- prepare_for_guard_pages (&mctx);
- mono_restore_context (&mctx);
- }
-
mono_handle_exception (&mctx, obj);
if (stack_ovf)
prepare_for_guard_pages (&mctx);
(sizeof (UNWIND_CODE) * (MONO_MAX_UNWIND_CODES - unwindinfo->unwindInfo.CountOfCodes));
}
-PRUNTIME_FUNCTION
+static PRUNTIME_FUNCTION
MONO_GET_RUNTIME_FUNCTION_CALLBACK ( DWORD64 ControlPc, IN PVOID Context )
{
MonoJitInfo *ji;