This commit was manufactured by cvs2svn to create tag
[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 /* syscall emulation path in ptrace */
14
15 #ifndef PTRACE_SYSEMU
16 #define PTRACE_SYSEMU 31
17 #endif
18
19 void set_using_sysemu(int value);
20 int get_using_sysemu(void);
21
22 #include "skas_ptregs.h"
23
24 #define HOST_FRAME_SIZE 17
25
26 #define REGS_IP(r) ((r)[HOST_IP])
27 #define REGS_SP(r) ((r)[HOST_SP])
28 #define REGS_EFLAGS(r) ((r)[HOST_EFLAGS])
29 #define REGS_EAX(r) ((r)[HOST_EAX])
30 #define REGS_EBX(r) ((r)[HOST_EBX])
31 #define REGS_ECX(r) ((r)[HOST_ECX])
32 #define REGS_EDX(r) ((r)[HOST_EDX])
33 #define REGS_ESI(r) ((r)[HOST_ESI])
34 #define REGS_EDI(r) ((r)[HOST_EDI])
35 #define REGS_EBP(r) ((r)[HOST_EBP])
36 #define REGS_CS(r) ((r)[HOST_CS])
37 #define REGS_SS(r) ((r)[HOST_SS])
38 #define REGS_DS(r) ((r)[HOST_DS])
39 #define REGS_ES(r) ((r)[HOST_ES])
40 #define REGS_FS(r) ((r)[HOST_FS])
41 #define REGS_GS(r) ((r)[HOST_GS])
42
43 #define REGS_SET_SYSCALL_RETURN(r, res) REGS_EAX(r) = (res)
44
45 #define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r))
46
47 #define REGS_SEGV_IS_FIXABLE(r) SEGV_IS_FIXABLE((r)->trap_type)
48
49 #define REGS_FAULT_ADDR(r) ((r)->fault_addr)
50
51 #define REGS_FAULT_WRITE(r) FAULT_WRITE((r)->fault_type)
52
53 #endif
54
55 #endif
56
57 /*
58  * Overrides for Emacs so that we follow Linus's tabbing style.
59  * Emacs will notice this stuff at the end of the file and automatically
60  * adjust the settings for this buffer only.  This must remain at the end
61  * of the file.
62  * ---------------------------------------------------------------------------
63  * Local variables:
64  * c-file-style: "linux"
65  * End:
66  */