1 #ifndef _ASMAXP_PTRACE_H 2 #define _ASMAXP_PTRACE_H 3 4 #include <uapi/asm/ptrace.h> 5 6 7 #define arch_has_single_step() (1) 8 #define user_mode(regs) (((regs)->ps & 8) != 0) 9 #define instruction_pointer(regs) ((regs)->pc) 10 #define profile_pc(regs) instruction_pointer(regs) 11 #define current_user_stack_pointer() rdusp() 12 13 #define task_pt_regs(task) \ 14 ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1) 15 16 #define current_pt_regs() \ 17 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1) 18 #define signal_pt_regs current_pt_regs 19 20 #define force_successful_syscall_return() (current_pt_regs()->r0 = 0) 21 regs_return_value(struct pt_regs * regs)22static inline unsigned long regs_return_value(struct pt_regs *regs) 23 { 24 return regs->r0; 25 } 26 27 #endif 28