summaryrefslogtreecommitdiff
path: root/lang/mono/patches/patch-an
diff options
context:
space:
mode:
Diffstat (limited to 'lang/mono/patches/patch-an')
-rw-r--r--lang/mono/patches/patch-an56
1 files changed, 56 insertions, 0 deletions
diff --git a/lang/mono/patches/patch-an b/lang/mono/patches/patch-an
new file mode 100644
index 00000000000..5771fa5e4da
--- /dev/null
+++ b/lang/mono/patches/patch-an
@@ -0,0 +1,56 @@
+$NetBSD: patch-an,v 1.1 2005/07/31 15:26:58 recht Exp $
+
+--- mono/mini/exceptions-x86.c.orig 2005-04-11 16:16:27.000000000 +0200
++++ mono/mini/exceptions-x86.c
+@@ -563,7 +563,17 @@ mono_arch_sigctx_to_monoctx (void *sigct
+ mctx->esi = ctx->uc_mcontext.mc_esi;
+ mctx->edi = ctx->uc_mcontext.mc_edi;
+ mctx->eip = ctx->uc_mcontext.mc_eip;
+-#else
++#elif defined(__NetBSD__)
++ mctx->eax = ctx->uc_mcontext.__gregs[_REG_EAX];
++ mctx->ebx = ctx->uc_mcontext.__gregs[_REG_EBX];
++ mctx->ecx = ctx->uc_mcontext.__gregs[_REG_ECX];
++ mctx->edx = ctx->uc_mcontext.__gregs[_REG_EDX];
++ mctx->ebp = ctx->uc_mcontext.__gregs[_REG_EBP];
++ mctx->esp = ctx->uc_mcontext.__gregs[_REG_ESP];
++ mctx->esi = ctx->uc_mcontext.__gregs[_REG_ESI];
++ mctx->edi = ctx->uc_mcontext.__gregs[_REG_EDI];
++ mctx->eip = ctx->uc_mcontext.__gregs[_REG_EIP];
++#else
+ mctx->eax = ctx->uc_mcontext.gregs [REG_EAX];
+ mctx->ebx = ctx->uc_mcontext.gregs [REG_EBX];
+ mctx->ecx = ctx->uc_mcontext.gregs [REG_ECX];
+@@ -600,12 +610,21 @@ mono_arch_monoctx_to_sigctx (MonoContext
+ ctx->uc_mcontext.mc_ebx = mctx->ebx;
+ ctx->uc_mcontext.mc_ecx = mctx->ecx;
+ ctx->uc_mcontext.mc_edx = mctx->edx;
+- ctx->uc_mcontext.mc_ebp = mctx->ebp;
++ ctx->uc_mcontext.mc_ebp = mctx->ebp;
+ ctx->uc_mcontext.mc_esp = mctx->esp;
+ ctx->uc_mcontext.mc_esi = mctx->esi;
+ ctx->uc_mcontext.mc_edi = mctx->edi;
+ ctx->uc_mcontext.mc_eip = mctx->eip;
+-
++#elif defined(__NetBSD__)
++ ctx->uc_mcontext.__gregs[_REG_EAX] = mctx->eax;
++ ctx->uc_mcontext.__gregs[_REG_EBX] = mctx->ebx;
++ ctx->uc_mcontext.__gregs[_REG_ECX] = mctx->ecx;
++ ctx->uc_mcontext.__gregs[_REG_EDX] = mctx->edx;
++ ctx->uc_mcontext.__gregs[_REG_EBP] = mctx->ebp;
++ ctx->uc_mcontext.__gregs[_REG_ESP] = mctx->esp;
++ ctx->uc_mcontext.__gregs[_REG_ESI] = mctx->esi;
++ ctx->uc_mcontext.__gregs[_REG_EDI] = mctx->edi;
++ ctx->uc_mcontext.__gregs[_REG_EIP] = mctx->eip;
+ #else
+ ctx->uc_mcontext.gregs [REG_EAX] = mctx->eax;
+ ctx->uc_mcontext.gregs [REG_EBX] = mctx->ebx;
+@@ -639,6 +658,8 @@ mono_arch_ip_from_context (void *sigctx)
+ ucontext_t *ctx = (ucontext_t*)sigctx;
+ #if defined(__FreeBSD__)
+ return (gpointer)ctx->uc_mcontext.mc_eip;
++#elif defined(__NetBSD__)
++ return (gpointer)ctx->uc_mcontext.__gregs[_REG_EIP];
+ #else
+ return (gpointer)ctx->uc_mcontext.gregs [REG_EIP];
+ #endif