ptrace.h 681 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (C) 2006 Atmark Techno, Inc.
  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. #ifndef _ASM_MICROBLAZE_PTRACE_H
  9. #define _ASM_MICROBLAZE_PTRACE_H
  10. #include <uapi/asm/ptrace.h>
  11. #ifndef __ASSEMBLY__
  12. #define kernel_mode(regs) ((regs)->pt_mode)
  13. #define user_mode(regs) (!kernel_mode(regs))
  14. #define instruction_pointer(regs) ((regs)->pc)
  15. #define profile_pc(regs) instruction_pointer(regs)
  16. static inline long regs_return_value(struct pt_regs *regs)
  17. {
  18. return regs->r3;
  19. }
  20. #endif /* __ASSEMBLY__ */
  21. #endif /* _ASM_MICROBLAZE_PTRACE_H */