Go to the documentation of this file.
4 #ifndef __ASM_SH_PTRACE_H
5 #define __ASM_SH_PTRACE_H
9 #include <linux/stddef.h>
11 #include <asm/addrspace.h>
13 #include <uapi/asm/ptrace.h>
15 #define user_mode(regs) (((regs)->sr & 0x40000000)==0)
16 #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15])
18 #define GET_FP(regs) ((regs)->regs[14])
19 #define GET_USP(regs) ((regs)->regs[15])
21 #define arch_has_single_step() (1)
31 #define REG_OFFSET_NAME(r) {.name = #r, .offset = offsetof(struct pt_regs, r)}
32 #define REGS_OFFSET_NAME(num) \
33 {.name = __stringify(r##num), .offset = offsetof(struct pt_regs, regs[num])}
34 #define TREGS_OFFSET_NAME(num) \
35 {.name = __stringify(tr##num), .offset = offsetof(struct pt_regs, tregs[num])}
36 #define REG_OFFSET_END {.name = NULL, .offset = 0}
58 return *(
unsigned long *)((
unsigned long)regs +
offset);
97 struct perf_sample_data;
100 struct perf_sample_data *
data,
struct pt_regs *regs);
102 #define task_pt_regs(task) \
103 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
107 unsigned long pc = regs->
pc;
114 #define profile_pc profile_pc