ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / um / kernel / skas / include / ptrace-skas.h
1 /* 
2  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #ifndef __PTRACE_SKAS_H
7 #define __PTRACE_SKAS_H
8
9 #include "uml-config.h"
10
11 #ifdef UML_CONFIG_MODE_SKAS
12
13 #include "skas_ptregs.h"
14
15 #define HOST_FRAME_SIZE 17
16
17 #define REGS_IP(r) ((r)[HOST_IP])
18 #define REGS_SP(r) ((r)[HOST_SP])
19 #define REGS_EFLAGS(r) ((r)[HOST_EFLAGS])
20 #define REGS_EAX(r) ((r)[HOST_EAX])
21 #define REGS_EBX(r) ((r)[HOST_EBX])
22 #define REGS_ECX(r) ((r)[HOST_ECX])
23 #define REGS_EDX(r) ((r)[HOST_EDX])
24 #define REGS_ESI(r) ((r)[HOST_ESI])
25 #define REGS_EDI(r) ((r)[HOST_EDI])
26 #define REGS_EBP(r) ((r)[HOST_EBP])
27 #define REGS_CS(r) ((r)[HOST_CS])
28 #define REGS_SS(r) ((r)[HOST_SS])
29 #define REGS_DS(r) ((r)[HOST_DS])
30 #define REGS_ES(r) ((r)[HOST_ES])
31 #define REGS_FS(r) ((r)[HOST_FS])
32 #define REGS_GS(r) ((r)[HOST_GS])
33
34 #define REGS_SET_SYSCALL_RETURN(r, res) REGS_EAX(r) = (res)
35
36 #define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r))
37
38 #define REGS_SEGV_IS_FIXABLE(r) SEGV_IS_FIXABLE((r)->trap_type)
39
40 #define REGS_FAULT_ADDR(r) ((r)->fault_addr)
41
42 #define REGS_FAULT_WRITE(r) FAULT_WRITE((r)->fault_type)
43
44 #endif
45
46 #endif
47
48 /*
49  * Overrides for Emacs so that we follow Linus's tabbing style.
50  * Emacs will notice this stuff at the end of the file and automatically
51  * adjust the settings for this buffer only.  This must remain at the end
52  * of the file.
53  * ---------------------------------------------------------------------------
54  * Local variables:
55  * c-file-style: "linux"
56  * End:
57  */