2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #ifndef __PTRACE_SKAS_H
7 #define __PTRACE_SKAS_H
9 #include "uml-config.h"
11 #ifdef UML_CONFIG_MODE_SKAS
13 #include "skas_ptregs.h"
15 #define HOST_FRAME_SIZE 17
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])
34 #define REGS_SET_SYSCALL_RETURN(r, res) REGS_EAX(r) = (res)
36 #define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r))
38 #define REGS_SEGV_IS_FIXABLE(r) SEGV_IS_FIXABLE((r)->trap_type)
40 #define REGS_FAULT_ADDR(r) ((r)->fault_addr)
42 #define REGS_FAULT_WRITE(r) FAULT_WRITE((r)->fault_type)
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
53 * ---------------------------------------------------------------------------
55 * c-file-style: "linux"