diff options
Diffstat (limited to 'arch/um/include/sysdep-i386/ptrace.h')
-rw-r--r-- | arch/um/include/sysdep-i386/ptrace.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h index 661d495e2044..6eaeb9919983 100644 --- a/arch/um/include/sysdep-i386/ptrace.h +++ b/arch/um/include/sysdep-i386/ptrace.h | |||
@@ -53,17 +53,12 @@ extern int sysemu_supported; | |||
53 | 53 | ||
54 | #define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r)) | 54 | #define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r)) |
55 | 55 | ||
56 | #define REGS_SEGV_IS_FIXABLE(r) SEGV_IS_FIXABLE((r)->trap_type) | ||
57 | |||
58 | #define REGS_FAULT_ADDR(r) ((r)->fault_addr) | ||
59 | |||
60 | #define REGS_FAULT_WRITE(r) FAULT_WRITE((r)->fault_type) | ||
61 | |||
62 | #endif | 56 | #endif |
63 | #ifndef PTRACE_SYSEMU_SINGLESTEP | 57 | #ifndef PTRACE_SYSEMU_SINGLESTEP |
64 | #define PTRACE_SYSEMU_SINGLESTEP 32 | 58 | #define PTRACE_SYSEMU_SINGLESTEP 32 |
65 | #endif | 59 | #endif |
66 | 60 | ||
61 | #include "sysdep/faultinfo.h" | ||
67 | #include "choose-mode.h" | 62 | #include "choose-mode.h" |
68 | 63 | ||
69 | union uml_pt_regs { | 64 | union uml_pt_regs { |
@@ -71,6 +66,7 @@ union uml_pt_regs { | |||
71 | struct tt_regs { | 66 | struct tt_regs { |
72 | long syscall; | 67 | long syscall; |
73 | void *sc; | 68 | void *sc; |
69 | struct faultinfo faultinfo; | ||
74 | } tt; | 70 | } tt; |
75 | #endif | 71 | #endif |
76 | #ifdef UML_CONFIG_MODE_SKAS | 72 | #ifdef UML_CONFIG_MODE_SKAS |
@@ -78,9 +74,7 @@ union uml_pt_regs { | |||
78 | unsigned long regs[HOST_FRAME_SIZE]; | 74 | unsigned long regs[HOST_FRAME_SIZE]; |
79 | unsigned long fp[HOST_FP_SIZE]; | 75 | unsigned long fp[HOST_FP_SIZE]; |
80 | unsigned long xfp[HOST_XFP_SIZE]; | 76 | unsigned long xfp[HOST_XFP_SIZE]; |
81 | unsigned long fault_addr; | 77 | struct faultinfo faultinfo; |
82 | unsigned long fault_type; | ||
83 | unsigned long trap_type; | ||
84 | long syscall; | 78 | long syscall; |
85 | int is_user; | 79 | int is_user; |
86 | } skas; | 80 | } skas; |
@@ -217,15 +211,8 @@ struct syscall_args { | |||
217 | #define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r) | 211 | #define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r) |
218 | #define UPT_SYSCALL_RET(r) UPT_EAX(r) | 212 | #define UPT_SYSCALL_RET(r) UPT_EAX(r) |
219 | 213 | ||
220 | #define UPT_SEGV_IS_FIXABLE(r) \ | 214 | #define UPT_FAULTINFO(r) \ |
221 | CHOOSE_MODE(SC_SEGV_IS_FIXABLE(UPT_SC(r)), \ | 215 | CHOOSE_MODE((&(r)->tt.faultinfo), (&(r)->skas.faultinfo)) |
222 | REGS_SEGV_IS_FIXABLE(&r->skas)) | ||
223 | |||
224 | #define UPT_FAULT_ADDR(r) \ | ||
225 | __CHOOSE_MODE(SC_FAULT_ADDR(UPT_SC(r)), REGS_FAULT_ADDR(&r->skas)) | ||
226 | |||
227 | #define UPT_FAULT_WRITE(r) \ | ||
228 | CHOOSE_MODE(SC_FAULT_WRITE(UPT_SC(r)), REGS_FAULT_WRITE(&r->skas)) | ||
229 | 216 | ||
230 | #endif | 217 | #endif |
231 | 218 | ||