ptrace.h 1013 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef _H8300_PTRACE_H
  2. #define _H8300_PTRACE_H
  3. #include <uapi/asm/ptrace.h>
  4. #ifndef __ASSEMBLY__
  5. #ifndef PS_S
  6. #define PS_S (0x10)
  7. #endif
  8. #if defined(CONFIG_CPU_H8300H)
  9. #define H8300_REGS_NO 11
  10. #endif
  11. #if defined(CONFIG_CPU_H8S)
  12. #define H8300_REGS_NO 12
  13. #endif
  14. #define arch_has_single_step() (1)
  15. #define user_mode(regs) (!((regs)->ccr & PS_S))
  16. #define instruction_pointer(regs) ((regs)->pc)
  17. #define profile_pc(regs) instruction_pointer(regs)
  18. #define user_stack_pointer(regs) ((regs)->sp)
  19. #define current_pt_regs() ((struct pt_regs *) \
  20. (THREAD_SIZE + (unsigned long)current_thread_info()) - 1)
  21. #define signal_pt_regs() ((struct pt_regs *)current->thread.esp0)
  22. #define current_user_stack_pointer() rdusp()
  23. #define task_pt_regs(task) \
  24. ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
  25. extern long h8300_get_reg(struct task_struct *task, int regno);
  26. extern int h8300_put_reg(struct task_struct *task, int regno,
  27. unsigned long data);
  28. #endif /* __ASSEMBLY__ */
  29. #endif /* _H8300_PTRACE_H */