blob: d826bbeb19e8bbf9e557d34452d1e8ebad8b8959 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
$NetBSD: patch-aa,v 1.13 2005/09/06 18:15:32 tonio Exp $
--- config/i386/netbsd1/md.h.orig 2005-04-24 19:53:29.000000000 +0200
+++ config/i386/netbsd1/md.h 2005-04-24 19:58:35.000000000 +0200
@@ -17,6 +17,7 @@
#include "i386/common.h"
#include "i386/threads.h"
+#include <sys/ucontext.h>
#if defined(HAVE_SYS_RESOURCE_H)
#include <sys/resource.h>
@@ -31,11 +32,11 @@
#undef SP_OFFSET
#define SP_OFFSET 2
-#define SIGNAL_ARGS(sig, sc) int sig, int __code, struct sigcontext *sc
-#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext *scp
+#define SIGNAL_ARGS(sig, sc) int sig, int __code, struct __ucontext *sc
+#define SIGNAL_CONTEXT_POINTER(scp) struct __ucontext *scp
#define GET_SIGNAL_CONTEXT_POINTER(sc) (sc)
-#define SIGNAL_PC(scp) (scp)->sc_pc
-#define STACK_POINTER(scp) (scp)->sc_sp
+#define SIGNAL_PC(scp) ((scp)->uc_mcontext.__gregs[_REG_EIP])
+#define STACK_POINTER(scp) ((scp)->uc_mcontext.__gregs[_REG_ESP])
#if defined(TRANSLATOR)
#include "jit-md.h"
|