hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/sh/include/asm/ptrace.h
....@@ -16,8 +16,31 @@
1616 #define user_mode(regs) (((regs)->sr & 0x40000000)==0)
1717 #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15])
1818
19
-#define GET_FP(regs) ((regs)->regs[14])
20
-#define GET_USP(regs) ((regs)->regs[15])
19
+static inline unsigned long instruction_pointer(struct pt_regs *regs)
20
+{
21
+ return regs->pc;
22
+}
23
+static inline void instruction_pointer_set(struct pt_regs *regs,
24
+ unsigned long val)
25
+{
26
+ regs->pc = val;
27
+}
28
+
29
+static inline unsigned long frame_pointer(struct pt_regs *regs)
30
+{
31
+ return regs->regs[14];
32
+}
33
+
34
+static inline unsigned long user_stack_pointer(struct pt_regs *regs)
35
+{
36
+ return regs->regs[15];
37
+}
38
+
39
+static inline void user_stack_pointer_set(struct pt_regs *regs,
40
+ unsigned long val)
41
+{
42
+ regs->regs[15] = val;
43
+}
2144
2245 #define arch_has_single_step() (1)
2346
....@@ -112,7 +135,5 @@
112135
113136 return pc;
114137 }
115
-#define profile_pc profile_pc
116138
117
-#include <asm-generic/ptrace.h>
118139 #endif /* __ASM_SH_PTRACE_H */