summaryrefslogtreecommitdiff
path: root/emulators/twin/patches/patch-ae
blob: 013dc8cbc7211d78cde4763b9d667791db603553 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
$NetBSD: patch-ae,v 1.2 2006/01/15 19:20:59 joerg Exp $

--- debugger/sig_context.h.orig	Sun May 13 03:01:07 2001
+++ debugger/sig_context.h	Sun May 13 03:25:31 2001
@@ -57,7 +57,21 @@ enum {
 
 #endif  /* linux */
 
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+
+enum {
+    REG_GS = 0, REG_FS, REG_ES, REG_DS,
+    REG_EDI, REG_ESI, REG_EBP,
+    REG_EBX, REG_EDX, REG_ECX, REG_EAX,
+    REG_EIP, REG_CS, REG_EFL, REG_ESP,
+    REG_SS, REG_BSD_ONSTACK, REG_BSD_MASK13,
+    REG_TRAPNO, REG_ERR,
+
+    REG_AX = 100, REG_BX, REG_CX, REG_DX,
+    REG_BP, REG_IP, REG_SP,
+    REG_DI, REG_SI,
+    REG_FL
+};
 
 #include <signal.h>
 typedef struct sigcontext SIGCONTEXT;
@@ -120,7 +134,7 @@ typedef struct _CONTEXT		/* Note 1 */
 
 
 #if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) \
- || defined(__OpenBSD__)
+ || defined(__OpenBSD__) || defined(__DragonFly__)
 
 #define EAX_sig(context)     ((context)->sc_eax)
 #define EBX_sig(context)     ((context)->sc_ebx)
@@ -143,7 +157,7 @@ typedef struct _CONTEXT		/* Note 1 */
 #define TRAP_sig(context)    ((context)->sc_trapno)
 #endif
                             
-#ifndef __FreeBSD__         
+#if !defined(__FreeBSD__) && !defined(__DragonFly__)
 #define EFL_sig(context)     ((context)->sc_eflags)
 #else                       
 #define EFL_sig(context)     ((context)->sc_efl)