diff options
Diffstat (limited to 'arch/um/include/sysdep-i386/ptrace.h')
-rw-r--r-- | arch/um/include/sysdep-i386/ptrace.h | 59 |
1 files changed, 28 insertions, 31 deletions
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h index 45573088864c..d765175d42be 100644 --- a/arch/um/include/sysdep-i386/ptrace.h +++ b/arch/um/include/sysdep-i386/ptrace.h | |||
@@ -52,37 +52,34 @@ extern int sysemu_supported; | |||
52 | #define PTRACE_SYSEMU_SINGLESTEP 32 | 52 | #define PTRACE_SYSEMU_SINGLESTEP 32 |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | union uml_pt_regs { | 55 | struct uml_pt_regs { |
56 | struct skas_regs { | 56 | unsigned long regs[MAX_REG_NR]; |
57 | unsigned long regs[MAX_REG_NR]; | 57 | unsigned long fp[HOST_FP_SIZE]; |
58 | unsigned long fp[HOST_FP_SIZE]; | 58 | unsigned long xfp[HOST_XFP_SIZE]; |
59 | unsigned long xfp[HOST_XFP_SIZE]; | 59 | struct faultinfo faultinfo; |
60 | struct faultinfo faultinfo; | 60 | long syscall; |
61 | long syscall; | 61 | int is_user; |
62 | int is_user; | ||
63 | } skas; | ||
64 | }; | 62 | }; |
65 | 63 | ||
66 | #define EMPTY_UML_PT_REGS { } | 64 | #define EMPTY_UML_PT_REGS { } |
67 | 65 | ||
68 | #define UPT_SC(r) ((r)->tt.sc) | 66 | #define UPT_IP(r) REGS_IP((r)->regs) |
69 | #define UPT_IP(r) REGS_IP((r)->skas.regs) | 67 | #define UPT_SP(r) REGS_SP((r)->regs) |
70 | #define UPT_SP(r) REGS_SP((r)->skas.regs) | 68 | #define UPT_EFLAGS(r) REGS_EFLAGS((r)->regs) |
71 | #define UPT_EFLAGS(r) REGS_EFLAGS((r)->skas.regs) | 69 | #define UPT_EAX(r) REGS_EAX((r)->regs) |
72 | #define UPT_EAX(r) REGS_EAX((r)->skas.regs) | 70 | #define UPT_EBX(r) REGS_EBX((r)->regs) |
73 | #define UPT_EBX(r) REGS_EBX((r)->skas.regs) | 71 | #define UPT_ECX(r) REGS_ECX((r)->regs) |
74 | #define UPT_ECX(r) REGS_ECX((r)->skas.regs) | 72 | #define UPT_EDX(r) REGS_EDX((r)->regs) |
75 | #define UPT_EDX(r) REGS_EDX((r)->skas.regs) | 73 | #define UPT_ESI(r) REGS_ESI((r)->regs) |
76 | #define UPT_ESI(r) REGS_ESI((r)->skas.regs) | 74 | #define UPT_EDI(r) REGS_EDI((r)->regs) |
77 | #define UPT_EDI(r) REGS_EDI((r)->skas.regs) | 75 | #define UPT_EBP(r) REGS_EBP((r)->regs) |
78 | #define UPT_EBP(r) REGS_EBP((r)->skas.regs) | 76 | #define UPT_ORIG_EAX(r) ((r)->syscall) |
79 | #define UPT_ORIG_EAX(r) ((r)->skas.syscall) | 77 | #define UPT_CS(r) REGS_CS((r)->regs) |
80 | #define UPT_CS(r) REGS_CS((r)->skas.regs) | 78 | #define UPT_SS(r) REGS_SS((r)->regs) |
81 | #define UPT_SS(r) REGS_SS((r)->skas.regs) | 79 | #define UPT_DS(r) REGS_DS((r)->regs) |
82 | #define UPT_DS(r) REGS_DS((r)->skas.regs) | 80 | #define UPT_ES(r) REGS_ES((r)->regs) |
83 | #define UPT_ES(r) REGS_ES((r)->skas.regs) | 81 | #define UPT_FS(r) REGS_FS((r)->regs) |
84 | #define UPT_FS(r) REGS_FS((r)->skas.regs) | 82 | #define UPT_GS(r) REGS_GS((r)->regs) |
85 | #define UPT_GS(r) REGS_GS((r)->skas.regs) | ||
86 | 83 | ||
87 | #define UPT_SYSCALL_ARG1(r) UPT_EBX(r) | 84 | #define UPT_SYSCALL_ARG1(r) UPT_EBX(r) |
88 | #define UPT_SYSCALL_ARG2(r) UPT_ECX(r) | 85 | #define UPT_SYSCALL_ARG2(r) UPT_ECX(r) |
@@ -93,7 +90,7 @@ union uml_pt_regs { | |||
93 | 90 | ||
94 | extern int user_context(unsigned long sp); | 91 | extern int user_context(unsigned long sp); |
95 | 92 | ||
96 | #define UPT_IS_USER(r) ((r)->skas.is_user) | 93 | #define UPT_IS_USER(r) ((r)->is_user) |
97 | 94 | ||
98 | struct syscall_args { | 95 | struct syscall_args { |
99 | unsigned long args[6]; | 96 | unsigned long args[6]; |
@@ -162,14 +159,14 @@ struct syscall_args { | |||
162 | } while (0) | 159 | } while (0) |
163 | 160 | ||
164 | #define UPT_SET_SYSCALL_RETURN(r, res) \ | 161 | #define UPT_SET_SYSCALL_RETURN(r, res) \ |
165 | REGS_SET_SYSCALL_RETURN((r)->skas.regs, (res)) | 162 | REGS_SET_SYSCALL_RETURN((r)->regs, (res)) |
166 | 163 | ||
167 | #define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->skas.regs) | 164 | #define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->regs) |
168 | 165 | ||
169 | #define UPT_ORIG_SYSCALL(r) UPT_EAX(r) | 166 | #define UPT_ORIG_SYSCALL(r) UPT_EAX(r) |
170 | #define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r) | 167 | #define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r) |
171 | #define UPT_SYSCALL_RET(r) UPT_EAX(r) | 168 | #define UPT_SYSCALL_RET(r) UPT_EAX(r) |
172 | 169 | ||
173 | #define UPT_FAULTINFO(r) (&(r)->skas.faultinfo) | 170 | #define UPT_FAULTINFO(r) (&(r)->faultinfo) |
174 | 171 | ||
175 | #endif | 172 | #endif |