ptrace.h 871 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _H8300_PTRACE_H
  2. #define _H8300_PTRACE_H
  3. #include <uapi/asm/ptrace.h>
  4. #ifndef __ASSEMBLY__
  5. #if defined(CONFIG_CPU_H8S)
  6. #endif
  7. #ifndef PS_S
  8. #define PS_S (0x10)
  9. #endif
  10. #if defined(__H8300H__)
  11. #define H8300_REGS_NO 11
  12. #endif
  13. #if defined(__H8300S__)
  14. #define H8300_REGS_NO 12
  15. #endif
  16. /* Find the stack offset for a register, relative to thread.esp0. */
  17. #define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg)
  18. #define arch_has_single_step() (1)
  19. #define user_mode(regs) (!((regs)->ccr & PS_S))
  20. #define instruction_pointer(regs) ((regs)->pc)
  21. #define profile_pc(regs) instruction_pointer(regs)
  22. #define current_pt_regs() ((struct pt_regs *) \
  23. (THREAD_SIZE + (unsigned long)current_thread_info()) - 1)
  24. #define signal_pt_regs() ((struct pt_regs *)current->thread.esp0)
  25. #define current_user_stack_pointer() rdusp()
  26. #endif /* __ASSEMBLY__ */
  27. #endif /* _H8300_PTRACE_H */