ptrace.h 715 B

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