ptrace.h 956 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __ASM_SH64_PTRACE_H
  2. #define __ASM_SH64_PTRACE_H
  3. /*
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * include/asm-sh64/ptrace.h
  9. *
  10. * Copyright (C) 2000, 2001 Paolo Alberelli
  11. *
  12. */
  13. /*
  14. * This struct defines the way the registers are stored on the
  15. * kernel stack during a system call or other kernel entry.
  16. */
  17. struct pt_regs {
  18. unsigned long long pc;
  19. unsigned long long sr;
  20. unsigned long long syscall_nr;
  21. unsigned long long regs[63];
  22. unsigned long long tregs[8];
  23. unsigned long long pad[2];
  24. };
  25. #ifdef __KERNEL__
  26. #define user_mode(regs) (((regs)->sr & 0x40000000)==0)
  27. #define instruction_pointer(regs) ((regs)->pc)
  28. #define profile_pc(regs) ((unsigned long)instruction_pointer(regs))
  29. extern void show_regs(struct pt_regs *);
  30. #endif
  31. #define PTRACE_O_TRACESYSGOOD 0x00000001
  32. #endif /* __ASM_SH64_PTRACE_H */